/* =========================================================
   CS Media Suite – ACNewsletter
   cs_layout.css (FAZA 1 – CLEANUP)
   ========================================================= */

:root{
  --bg:#f3f4f6;
  --card:#ffffff;
  --text:#111827;
  --muted:#6b7280;
  --line:#e5e7eb;

  --a1:#0ea5e9;
  --a2:#6366f1;

  --sb-bg1:#0b1220;
  --sb-bg2:#020617;
  --sb-text:#e5e7eb;
  --sb-muted:#94a3b8;

  --danger:#ef4444;
  --ok:#16a34a;
  --warn:#f59e0b;

  --radius:16px;
  --radius-sm:12px;
  --pill:999px;

  --shadow:
    0 1px 2px rgba(15,23,42,.06),
    0 10px 28px rgba(15,23,42,.08);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
}

a{ color:inherit; }

.layout{
  display:flex;
  min-height:100vh;
}

/* =========================
   SIDEBAR
   ========================= */
.sidebar{
  width:280px;
  background:linear-gradient(180deg,var(--sb-bg1),var(--sb-bg2));
  color:var(--sb-text);
  padding:16px 14px;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.sidebar-logo{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:12px 10px 6px;
}
.sidebar-logo-img{
  max-width:190px;
  height:auto;
  display:block;
}

.nav{ list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:6px; }
.nav a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:14px;
  color:var(--sb-text);
  text-decoration:none;
  position:relative;
  background:transparent;
  transition:all .15s ease;
}
.nav a:hover{
  background:rgba(148,163,184,.10);
}
.nav .active a{
  background:rgba(14,165,233,.16);
  box-shadow: 0 10px 24px rgba(14,165,233,.12);
}
.nav-dot{
  width:8px;height:8px;border-radius:999px;
  background:rgba(148,163,184,.45);
}
.nav .active .nav-dot{ background:linear-gradient(135deg,var(--a1),var(--a2)); }
.nav-ic{ width:16px; text-align:center; opacity:.95; }
.nav-label{ font-weight:700; font-size:13px; }

.sidebar-footer{
  margin-top:auto;
  padding-top:10px;
  border-top:1px solid rgba(148,163,184,.14);
  display:flex;
  flex-direction:column;
  gap:10px;
}

.sidebar-user{
  display:flex;
  gap:10px;
  align-items:center;
  padding:10px 10px;
  border-radius:14px;
  background:rgba(148,163,184,.08);
}
.sidebar-user-avatar{
  width:36px;height:36px;border-radius:12px;
  display:flex;align-items:center;justify-content:center;
  background:rgba(14,165,233,.16);
  font-weight:800;
}
.sidebar-user-meta{ line-height:1.15; }
.sidebar-user-name{ font-weight:800; font-size:13px; }
.sidebar-user-role{ color:var(--sb-muted); font-size:12px; }

.sidebar-logout-link{
  display:inline-flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  text-decoration:none;
  padding:10px 12px;
  border-radius:999px;
  background:rgba(239,68,68,.12);
  color:#fecaca;
  font-weight:800;
}
.sidebar-logout-link:hover{ background:rgba(239,68,68,.16); }

/* =========================
   MAIN SHELL
   ========================= */
.main-shell{
  flex:1;
  display:flex;
  flex-direction:column;
  min-width:0;
}

.topbar{
  background:#fff;
  border-bottom:1px solid var(--line);
  padding:14px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.topbar-title{ display:flex; flex-direction:column; gap:2px; }
.topbar-app{
  font-size:12px;
  font-weight:900;
  letter-spacing:.08em;
  color:var(--muted);
  text-transform:uppercase;
}
.topbar-breadcrumb{
  font-size:14px;
  font-weight:900;
  color:var(--text);
}
.topbar-right{
  display:flex;
  align-items:center;
  gap:12px;
}
.topbar-user-name{
  color:var(--muted);
  font-weight:800;
  font-size:13px;
}
.topbar-logout{
  text-decoration:none;
  font-weight:800;
  font-size:13px;
  color:var(--text);
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
}
.topbar-logout:hover{ background:#f9fafb; }

.content{
  padding:18px;
  min-width:0;
}

/* =========================
   CARDS / HEADERS
   ========================= */
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:16px 16px 14px;
  box-shadow:var(--shadow);
}

.page-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.page-header h1{
  margin:0;
  font-size:18px;
  font-weight:900;
}
.muted{ color:var(--muted); font-size:13px; }

/* =========================
   FORMS
   ========================= */
label{
  display:block;
  font-size:12px;
  font-weight:900;
  margin:10px 0 6px;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea{
  width:100%;
  padding:10px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  outline:none;
  font-size:13px;
}
textarea{ resize:vertical; }

input:focus,
select:focus,
textarea:focus{
  box-shadow:0 0 0 3px rgba(14,165,233,.16);
  border-color:rgba(14,165,233,.35);
}

/* =========================
   TABLES
   ========================= */
.tbl{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}
.tbl th, .tbl td{
  padding:10px 12px;
  border-bottom:1px solid var(--line);
  font-size:13px;
  vertical-align:top;
}
.tbl th{
  text-align:left;
  font-size:12px;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--muted);
  background:#f9fafb;
  font-weight:900;
}
.tbl tr:last-child td{ border-bottom:none; }

/* =========================
   ALERTS
   ========================= */
.alert-success,
.alert-error{
  border-radius:14px;
  padding:10px 12px;
  font-weight:800;
  font-size:13px;
  border:1px solid var(--line);
}
.alert-success{
  background:#dcfce7;
  border-color:#bbf7d0;
  color:#065f46;
}
.alert-error{
  background:#fee2e2;
  border-color:#fecaca;
  color:#7f1d1d;
}

/* =========================
   BADGES / STATUS
   ========================= */
.status-yes,.status-no,.status-warn{
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
  border:1px solid var(--line);
  background:#fff;
}
.status-yes{ border-color:#bbf7d0; background:#ecfdf5; color:#047857; }
.status-no{ border-color:#fecaca; background:#fff1f2; color:#991b1b; }
.status-warn{ border-color:#fde68a; background:#fffbeb; color:#92400e; }

/* =========================
   BUTTONS (existing)
   ========================= */
.btn-primary,.btn-small,.btn-danger{
  display:inline-block;
  border-radius:var(--pill);
  border:none;
  cursor:pointer;
  font-size:12px;
  text-decoration:none;
  padding:6px 12px;
  line-height:1.3;
}
.btn-primary{
    background: linear-gradient(135deg, #2196F3, #2196F3);
    color: #f9fafb;
    box-shadow: 0 8px 16px rgba(59, 130, 246, .28);
}
.btn-primary:hover{ filter:brightness(1.05); }
.btn-small{ background:#e5e7eb; color:var(--text); }
.btn-small:hover{ background:#d1d5db; }
.btn-danger{ background:var(--danger); color:#f9fafb; }
.btn-danger:hover{ background:#dc2626; }
.btn-full{ width:100%; text-align:center; }

/* -------------------------------------------------
   Buttons (unified)
   - .btn         : primary action (alias of .btn-primary)
   - .btn-ghost   : secondary/neutral (outline)
   - .btn-mini    : compact action for tables
   ------------------------------------------------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border-radius:var(--pill);
  border:1px solid transparent;
  cursor:pointer;
  font-size:12px;
  font-weight:800;
  text-decoration:none;
  padding:8px 14px;
  line-height:1.2;
  background:linear-gradient(135deg,var(--a1),var(--a2));
  color:#f9fafb;
  box-shadow:0 8px 16px rgba(59,130,246,.28);
}
.btn:hover{ filter:brightness(1.05); }
.btn:active{ transform:translateY(1px); }

.btn-ghost{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border-radius:var(--pill);
  border:1px solid var(--line);
  cursor:pointer;
  font-size:12px;
  font-weight:800;
  text-decoration:none;
  padding:8px 14px;
  line-height:1.2;
  background:#fff;
  color:var(--text);
  box-shadow:none;
}
.btn-ghost:hover{ background:#f9fafb; }

.btn-mini{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border-radius:var(--pill);
  border:1px solid var(--line);
  cursor:pointer;
  font-size:12px;
  font-weight:800;
  text-decoration:none;
  padding:6px 12px;
  line-height:1.2;
  background:#fff;
  color:var(--text);
}
.btn-mini:hover{ background:#f9fafb; }

.btn:focus-visible,
.btn-ghost:focus-visible,
.btn-mini:focus-visible,
.btn-primary:focus-visible,
.btn-small:focus-visible,
.btn-danger:focus-visible{
  outline:none;
  box-shadow:0 0 0 3px rgba(14,165,233,.22);
}

/* =========================
   UTIL
   ========================= */
.flex-between{
  display:flex;
  align-items:center;
  justify-content:space-between;
}
