/* ============================================================
   ACCOUNT MONITORING — Design System
   Brand: Promedia Group — Lightbox/shadcn aesthetic
   ============================================================ */

/* Font: Inter Variable — clean, neutral, Geist-like */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,300..700&display=swap');

:root{
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.2, 0.64, 1);
  --dur-fast: 120ms;
  --dur: 220ms;
  --dur-slow: 380ms;

  /* ---- Brand — desaturated, refined ---- */
  --brand-blue: #1a6fcd;
  --brand-blue-light: #4f9cf0;
  --brand-blue-dark: #1458a8;
  --brand-navy: #09090b;
  --brand-navy-soft: #18181b;

  /* ---- Accents — muted, purposeful ---- */
  --accent-coral: #e85d5d;
  --accent-teal: #0e9f8c;
  --accent-amber: #d97706;
  --accent-violet: #7c3aed;
  --accent-green: #16a34a;
  --accent-red: #dc2626;

  /* ---- Surfaces — near-white, neutral ---- */
  --bg-page: #fafafa;
  --bg-iris:
    radial-gradient(ellipse 900px 600px at 92% -5%,  rgba(255,60,80,0.040)  0%, transparent 65%),
    radial-gradient(ellipse 700px 500px at -5% 30%,  rgba(139,92,246,0.035) 0%, transparent 60%),
    radial-gradient(ellipse 600px 400px at 50% 110%, rgba(34,197,94,0.030)  0%, transparent 60%),
    #fafafa;
  --surface: #ffffff;
  --surface-alt: #f4f4f5;
  --surface-sunken: #f0f0f1;
  --border: #e4e4e7;
  --border-soft: #ececee;

  /* ---- Iridescent accent (very subtle, AI-vibe) ---- */
  --iris-r: rgba(255, 60, 80, 0.055);
  --iris-g: rgba(34, 197, 94, 0.045);
  --iris-v: rgba(139, 92, 246, 0.05);
  --iris-b: rgba(59, 130, 246, 0.04);

  /* ---- Text — high-contrast neutral ---- */
  --text-primary: #09090b;
  --text-secondary: #52525b;
  --text-muted: #a1a1aa;
  --text-on-brand: #ffffff;

  /* ---- Elevation — flat, precise ---- */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.07), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.05);
  --shadow-glow: 0 0 0 3px rgba(26,111,205,0.12), 0 4px 16px -4px rgba(26,111,205,0.22);

  /* ---- Radius — tighter, sharper ---- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  /* ---- Type — Geist-like neutral system font stack ---- */
  --font-display: 'Inter', ui-sans-serif, -apple-system, system-ui, sans-serif;
  --font-body: 'Inter', ui-sans-serif, -apple-system, system-ui, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', 'Cascadia Code', 'Fira Code', monospace;

  --sidebar-w: 240px;
  --topbar-h: 56px;
  --card-pad: 18px;
}

*, *::before, *::after{ box-sizing: border-box; }
html, body{ height: 100%; }
body{
  margin:0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-iris);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "tnum" 1, "ss01" 1, "cv02" 1;
}
h1,h2,h3,h4{
  font-family: var(--font-display);
  margin:0;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  font-weight: 600;
  line-height: 1.2;
}
p{ margin:0; }
a{ color: inherit; text-decoration: none; }
ul{ list-style:none; margin:0; padding:0; }
button{ font-family: inherit; cursor:pointer; }
svg{ display:block; width:16px; height:16px; flex-shrink:0; }

::selection{ background: rgba(26,111,205,0.15); }

/* Scrollbar — minimal */
::-webkit-scrollbar{ width:5px; height:5px; }
::-webkit-scrollbar-thumb{ background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-track{ background: transparent; }

/* ============================================================
   APP SHELL
   ============================================================ */
.app-shell{
  display:flex;
  min-height:100vh;
}

/* ---------- Sidebar ---------- */
.sidebar{
  width: var(--sidebar-w);
  flex-shrink:0;
  background:
    radial-gradient(ellipse 280px 200px at -20% 15%, rgba(139,92,246,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 260px 180px at 120% 80%, rgba(34,197,94,0.03) 0%, transparent 70%),
    #ffffff;
  border-right: 1px solid var(--border);
  display:flex;
  flex-direction:column;
  position: fixed;
  top:0; left:0; bottom:0;
  /* Harus lebih tinggi dari z-index tertinggi yang dipakai konten halaman
     (mis. .toolbar-row:50, dipakai supaya dropdown filter melayang di atas
     kartu) — kalau tidak, drawer mobile "tembus" ditimpa toolbar halaman
     saat dibuka (lihat .sidebar-overlay di bawah untuk pasangan z-index-nya).
     Tetap di bawah topbar(55), dropdown panel(80-160), modal(200), toast(220). */
  z-index: 53;
  transition: transform .25s var(--ease-out), width .25s var(--ease-out);
  overflow: hidden;
}
.sidebar-brand{
  display:flex;
  align-items:center;
  gap:8px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand img{ height: 22px; width:auto; display:block; }
.sidebar-brand .app-name{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height:1.2;
}
.sidebar-brand .app-name span{
  display:block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-top:1px;
}

.sidebar-scroll{
  flex:1;
  overflow-y:auto;
  padding: 12px 10px 10px;
}
.nav-label{
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 8px 6px;
}
.nav-list{ display:flex; flex-direction:column; gap:1px; margin-bottom:4px; }
.nav-item{
  display:flex;
  align-items:center;
  gap:9px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  position:relative;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}
.nav-item svg{ width:16px; height:16px; flex-shrink:0; opacity:.7; }
.nav-item:hover{ background: var(--surface-alt); color: var(--text-primary); }
.nav-item:hover svg{ opacity:.9; }
.nav-item.active{
  background: var(--surface-alt);
  color: var(--text-primary);
  font-weight: 600;
}
.nav-item.active svg{ opacity:1; }
.nav-item.active::before{
  content:"";
  position:absolute;
  left:-10px; top:5px; bottom:5px;
  width:2px;
  border-radius: 0 2px 2px 0;
  background: var(--brand-blue);
}
.nav-badge{
  margin-left:auto;
  font-size: 10px;
  font-weight: 600;
  background: var(--surface-sunken);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: var(--radius-pill);
}

.sidebar-foot{
  padding: 10px;
  border-top: 1px solid var(--border);
  display:flex;
  flex-direction:column;
  gap:4px;
}
.user-card{
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px;
  border-radius: var(--radius-sm);
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.user-card:hover,
.user-card.is-open{ background: var(--surface-alt); }
.user-card-chev{
  width: 14px; height: 14px;
  margin-left: auto;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform var(--dur-fast) ease;
}
.user-card.is-open .user-card-chev{ transform: rotate(180deg); }

/* Sidebar nav-label and nav-text transitions */
.sidebar .app-name,
.sidebar .nav-label span,
.sidebar .nav-text,
.sidebar .user-meta{
  transition: opacity .2s ease, width .25s ease;
  white-space:nowrap;
}
.avatar-ring{
  width:32px; height:32px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-display); font-weight:600; font-size:12px;
  color:#fff;
  background: var(--brand-navy);
  flex-shrink:0;
}
.user-meta{ line-height:1.3; min-width:0; flex:1; }
.user-meta .u-name{ font-size:12.5px; font-weight:600; color:var(--text-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.user-meta .u-role{ font-size:11px; color:var(--text-muted); }

.nav-item-btn{
  width: 100%;
  border: none;
  background: transparent;
  font: inherit;
  text-align: left;
}
.nav-item-btn:hover{ background: var(--surface-alt); color: var(--text-primary); }

.profile-menu-wrap{ position: relative; }
.profile-trigger{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 4px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.profile-trigger:hover,
.profile-trigger.is-open{
  background: var(--surface-alt);
  border-color: var(--border);
}
.profile-trigger-chev{
  width: 14px; height: 14px;
  color: var(--text-muted);
  transition: transform var(--dur-fast) ease;
}
.profile-trigger.is-open .profile-trigger-chev{ transform: rotate(180deg); }

.profile-menu{
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 130;
  overflow: hidden;
  animation: scaleIn var(--dur-fast) var(--ease-out);
  transform-origin: top right;
}
.profile-menu[hidden]{ display: none !important; }
.profile-menu-head{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}
.profile-menu-head .pm-name{
  font-size: 13px; font-weight: 600; color: var(--text-primary);
}
.profile-menu-head .pm-email{
  font-size: 11px; font-weight: 400; color: var(--text-muted); margin-top: 1px;
  word-break: break-all;
}
.profile-menu-list{ padding: 6px; }
.profile-menu-foot{
  padding: 6px;
  border-top: 1px solid var(--border);
}
.profile-menu-item{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}
.profile-menu-item svg{ width: 14px; height: 14px; flex-shrink: 0; opacity: .8; }
.profile-menu-item:hover{
  background: var(--surface-alt);
  color: var(--text-primary);
}
.profile-menu-item.is-danger{ color: var(--accent-red); }
.profile-menu-item.is-danger:hover{
  background: rgba(220,38,38,.06);
  color: var(--accent-red);
}

/* ---------- Main column ---------- */
.main{
  margin-left: var(--sidebar-w);
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  transition: margin-left .25s var(--ease-out);
}

.topbar{
  height: var(--topbar-h);
  position: sticky; top:0; z-index:55;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display:flex; align-items:center; justify-content:space-between;
  padding: 0 24px;
  gap: 16px;
}
.topbar-title h1{ font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.topbar-title p{ font-size:12px; color: var(--text-muted); margin-top:1px; }
.topbar-actions{ display:flex; align-items:center; gap:8px; }
.topbar-menu-btn{ flex-shrink:0; }

.page-body{
  padding: 24px 28px 56px;
  max-width: 1440px;
}
.mitra-page-body{ margin: 0 auto; }

/* ============================================================
   PORTAL MITRA (/links) — topbar tipis, tanpa sidebar staff
   ============================================================ */
.mitra-topbar{
  height: var(--topbar-h);
  position: sticky; top:0; z-index:55;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display:flex; align-items:center; justify-content:space-between;
  padding: 0 28px;
  gap: 16px;
}
.mitra-topbar-brand{
  display:flex; align-items:center; gap:8px;
  font-family: var(--font-display); font-weight:700; font-size:14px;
  color: var(--text-primary);
}
.mitra-topbar-logo{ height:22px; width:auto; display:block; }
.mitra-topbar-sep{ color: var(--text-muted); font-weight:400; }
.mitra-topbar-account{ display:flex; align-items:center; gap:12px; }
.mitra-topbar-account-meta{ line-height:1.3; text-align:right; }
.mitra-topbar-account-meta .n{ font-size:12.5px; font-weight:600; color:var(--text-primary); }
.mitra-topbar-account-meta .h{ font-size:11px; color:var(--text-muted); }

/* ============================================================
   CONTROLS
   ============================================================ */
.pill-filter{
  display:inline-flex; align-items:center; gap:6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12.5px; font-weight:500; color: var(--text-secondary);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease, color var(--dur-fast) ease;
}
.pill-filter svg{ width:13px; height:13px; opacity:.7; }
.pill-filter .chev{ margin-left:2px; opacity:.5; width:11px; height:11px; transition: transform var(--dur-fast) ease; }
.pill-filter:hover{ border-color: var(--text-muted); color: var(--text-primary); }
.pill-filter.is-open{ border-color: var(--text-primary); box-shadow: 0 0 0 3px rgba(9,9,11,.06); color: var(--text-primary); }
.pill-filter.is-open .chev{ transform: rotate(180deg); }

/* ---------- Dropdown component ---------- */
.dropdown-wrap{
  position: relative;
  display: inline-flex;
  z-index: 1;
}
.dropdown-wrap:has(.pill-filter.is-open),
.dropdown-wrap.is-open{
  z-index: 120;
}
.dropdown-panel{
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 120;
  animation: dropdown-in .12s cubic-bezier(.2,.8,.2,1);
}
@keyframes dropdown-in{
  from{ opacity:0; transform: translateY(-4px) scale(.98); }
  to{ opacity:1; transform: translateY(0) scale(1); }
}
.dd-date{ width:280px; }
.dd-account{ width:280px; }

.dd-section-label{
  font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:.06em;
  color: var(--text-muted); padding: 6px 8px 4px;
}
.dd-item{
  display:flex; align-items:center; gap:8px;
  padding: 7px 8px; border-radius: var(--radius-sm);
  font-size:13px; font-weight:500; color: var(--text-primary);
  cursor:pointer;
}
.dd-item:hover{ background: var(--surface-alt); }
.dd-item.active{ background: var(--surface-alt); color: var(--text-primary); font-weight: 600; }
.dd-item .dd-check{
  width:16px; height:16px; border-radius:5px; border:1.5px solid var(--border);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
  color:#fff;
}
.dd-item.active .dd-check{ background: var(--brand-blue); border-color: var(--brand-blue); }
.dd-item .dd-check svg{ width:11px; height:11px; }
.dd-item .dd-avatar{
  width:22px; height:22px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  font-size:9.5px; font-weight:800; color:#fff;
}
.dd-item .dd-radio{
  width:16px; height:16px; border-radius:50%; border:1.5px solid var(--border);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.dd-item.active .dd-radio{ border-color: var(--text-primary); }
.dd-item.active .dd-radio::after{ content:""; width:7px; height:7px; border-radius:50%; background: var(--text-primary); }
.dd-divider{ height:1px; background: var(--border); margin:4px 0; }
.dd-search{
  display:flex; align-items:center; gap:7px;
  padding: 6px 8px; margin-bottom:4px;
  border:1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-alt);
}
.dd-search svg{ width:13px; height:13px; color: var(--text-muted); }
.dd-search input{
  border:none; background:transparent; outline:none; font-size:12.5px; font-weight:400;
  color: var(--text-primary); width:100%; font-family:inherit;
}
.dd-list{ max-height:220px; overflow-y:auto; }
.dd-foot{
  display:flex; align-items:center; justify-content:space-between;
  padding: 8px 4px 2px; margin-top:4px; border-top:1px solid var(--border);
}
.dd-foot button{
  font-size:12px; font-weight:500; border:none; background:transparent; padding:5px 9px; border-radius: var(--radius-sm);
}
.dd-foot .dd-clear{ color: var(--text-secondary); }
.dd-foot .dd-clear:hover{ background: var(--surface-alt); }
.dd-foot .dd-apply{ color:#fff; background: var(--brand-navy); }
.dd-foot .dd-apply:hover{ background: var(--brand-navy-soft); }
.dd-custom-range{ display:flex; align-items:center; gap:6px; padding: 4px 4px 6px; }
.dd-custom-range input{
  flex:1; min-width:0; padding:6px 8px; border-radius: var(--radius-sm); border:1px solid var(--border);
  font-size:12px; font-family:inherit; color:var(--text-primary); background: var(--surface-alt);
}
.dd-custom-range input:focus{ outline:none; border-color: var(--text-primary); background:#fff; }
.dd-custom-range span{ font-size:11px; color: var(--text-muted); font-weight:400; }

.seg-control{
  display:inline-flex; padding:2px; background: var(--surface-sunken);
  border-radius: var(--radius-sm); gap:1px;
  border: 1px solid var(--border);
}
.seg-control button{
  border:none; background:transparent; padding:5px 11px;
  font-size:12px; font-weight:500; color: var(--text-secondary);
  border-radius: calc(var(--radius-sm) - 2px);
}
.seg-control button.active{
  background: var(--surface); color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

.btn{
  display:inline-flex; align-items:center; gap:6px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight:500;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease, color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.btn svg{ width:14px; height:14px; }
.btn-primary{
  background: var(--brand-navy);
  color:#fff;
  border-color: var(--brand-navy);
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 2px 6px rgba(0,0,0,.08);
}
.btn-primary:hover{
  background: #18181b;
  box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 4px 10px rgba(0,0,0,.12);
  transform: translateY(-1px);
}
/* Gabungkan dengan .btn:active{transform:scale(.98)} yang sudah ada
   (specificity lebih tinggi di sini akan menimpanya kalau ditulis
   terpisah) — supaya efek "ditekan" tetap ada, bukan cuma reset translateY. */
.btn-primary:active{ transform: translateY(0) scale(.98); }
.btn-ghost{
  background: var(--surface); color: var(--text-secondary); border-color: var(--border);
}
.btn-ghost:hover{ color: var(--text-primary); border-color: var(--text-muted); background: var(--surface-alt); }
.btn-icon{ padding:7px; border-radius: var(--radius-sm); background:var(--surface); border:1px solid var(--border); color:var(--text-secondary); display:inline-flex; align-items:center; justify-content:center; }
.btn-icon:hover{ background: var(--surface-alt); color: var(--text-primary); }
.btn-icon svg{ width:15px; height:15px; flex-shrink:0; }

.icon-btn-circle{
  width:34px; height:34px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  background: var(--surface); border:1px solid var(--border); color: var(--text-secondary);
  position:relative;
}
.icon-btn-circle svg{ width:15px; height:15px; }
.dot-alert{
  position:absolute; top:7px; right:8px; width:6px; height:6px; border-radius:50%;
  background: var(--accent-coral); box-shadow: 0 0 0 2px #fff;
}

/* ============================================================
   CARDS / KPI
   ============================================================ */
.grid{ display:grid; gap:14px; }
.grid-6{ grid-template-columns: repeat(6, 1fr); }
.grid-4{ grid-template-columns: repeat(4, 1fr); }
.grid-3{ grid-template-columns: repeat(3, 1fr); }
.grid-2{ grid-template-columns: 1.55fr 1fr; }

.card{
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(2px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: none;
}
.card-pad{ padding: var(--card-pad); }

.kpi-card{
  padding: 14px 16px;
  cursor:default;
  transition: border-color var(--dur-fast) ease;
}
.kpi-card:hover{ border-color: var(--text-muted); }
.kpi-card.is-active{ border-color: var(--brand-blue); }
.kpi-glow{ display: none; }
.kpi-top{ display:none; }
.kpi-icon{ display:none; }
.kpi-label{ font-size: 11px; font-weight:500; color: var(--text-muted); margin-bottom:6px; letter-spacing:.01em; }
.kpi-label .info-dot{ width:11px;height:11px;opacity:.4; }
.kpi-value{ font-size: 22px; font-weight:700; letter-spacing:-0.03em; margin-bottom:10px; line-height:1.1; }
.kpi-foot{ display:flex; align-items:center; justify-content:space-between; }
.kpi-spark{ width:52px; height:20px; }
.tag-delta{
  font-size: 10.5px; font-weight:500; padding: 2px 5px; border-radius: 4px;
  display:inline-flex; align-items:center; gap:2px;
}
.tag-delta.up{ background: rgba(22,163,74,.08); color: var(--accent-green); }
.tag-delta.down{ background: rgba(220,38,38,.08); color: var(--accent-red); }
.tag-delta svg{ width:9px; height:9px; }

.section-title{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:14px;
}
.section-title h2{ font-size:13.5px; font-weight:600; letter-spacing:-0.02em; }
.section-title .sub{ font-size:11.5px; color:var(--text-muted); font-weight:400; margin-top:1px; }
.section-title .right{ display:flex; align-items:center; gap:6px; }

/* Post row widget */
.post-row{
  display:flex; align-items:center; gap:10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.post-row:last-child{ border-bottom:none; padding-bottom:0; }
.post-rank{
  width:18px; flex-shrink:0;
  font-size:11.5px; font-weight:500; color:var(--text-muted);
  text-align:center;
}
.post-body{ flex:1; min-width:0; }
.post-title{
  font-size:12.5px; font-weight:500; color:var(--text-primary);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:1.3;
}
.post-meta{ font-size:11px; color:var(--text-muted); margin-top:2px; }
.post-contrib{
  font-size:11.5px; font-weight:600; color:var(--text-secondary);
  flex-shrink:0; min-width:28px; text-align:right;
}

/* Account avatar in table */
.acct-av{
  width:26px; height:26px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:10px; font-weight:600;
}

.link-more{
  font-size:12px; font-weight:500; color: var(--text-secondary);
  display:inline-flex; align-items:center; gap:4px;
}
.link-more:hover{ color: var(--text-primary); }
.link-more svg{ width:12px; height:12px; }

/* ============================================================
   STATUS / BADGES / CHIPS
   ============================================================ */
.status-dot{ width:8px; height:8px; border-radius:50%; display:inline-block; position:relative; flex-shrink:0; }
.status-dot.live{ background: var(--accent-green); }
.status-dot.live::after{
  content:""; position:absolute; inset:-3px; border-radius:50%;
  border: 1.5px solid var(--accent-green); opacity:.55;
  animation: pulse-ring 1.8s ease-out infinite;
}
.status-dot.warn{ background: var(--accent-amber); }
.status-dot.warn::after{
  content:""; position:absolute; inset:-3px; border-radius:50%;
  border: 1.5px solid var(--accent-amber); opacity:.55;
  animation: pulse-ring 1.8s ease-out infinite;
}
@keyframes pulse-ring{
  0%{ transform:scale(.7); opacity:.7; }
  100%{ transform:scale(1.9); opacity:0; }
}
.status-label{ display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:500; }
.status-label.ok{ color: var(--accent-green); }
.status-label.warn{ color: var(--accent-amber); }

.chip{
  display:inline-flex; align-items:center; gap:6px;
  padding: 3px 8px 3px 4px;
  border-radius: var(--radius-pill);
  border:1px solid var(--border);
  background: var(--surface);
  font-size:12px; font-weight:500; color: var(--text-primary);
}
.chip .chip-avatar{
  width:20px;height:20px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;
  font-size:9px; font-weight:700; color:#fff;
}
.chip.selected{ border-color: var(--border); background: var(--surface-alt); }
/* .chip-x sebagai <button> (bukan <span> seperti draf awal template) —
   supaya tombol hapus bisa difokus & diaktifkan lewat keyboard. Karena itu
   butuh reset penuh: border/background/padding bawaan browser untuk
   elemen <button> tidak hilang sendiri hanya dari width/height, dan ikon
   SVG di dalamnya mewarisi ukuran default 16px dari aturan svg{} global —
   dua hal inilah yang membuatnya terlihat "tidak pas" menempel ke nama
   akun sebelum diperbaiki di sini. */
.chip .chip-x{
  width:15px; height:15px; flex-shrink:0; margin-left:2px;
  display:inline-flex; align-items:center; justify-content:center;
  border:none; background:transparent; padding:0; border-radius:50%;
  color: inherit; opacity:.45;
  transition: opacity var(--dur-fast) ease, background var(--dur-fast) ease;
}
.chip .chip-x svg{ width:11px; height:11px; }
.chip .chip-x:hover{ opacity:1; background: rgba(0,0,0,.06); }
.chip-add{
  display:inline-flex; align-items:center; gap:5px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  border:1px dashed var(--border);
  font-size:12px; font-weight:500; color: var(--text-muted);
}
.chip-add:hover{ border-color: var(--text-muted); color: var(--text-secondary); }
.chip-add svg{ width:13px; height:13px; }

/* Input tags bergaya chip (initTagsInput() di app.js) — bungkus jadi
   terlihat seperti satu kolom input, chip-chip di dalamnya pakai .chip
   yang sudah ada di atas. */
.tags-input{
  display:flex; flex-wrap:wrap; gap:6px; align-items:center;
  min-height:38px; padding:6px 8px;
  border:1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); cursor:text;
}
.tags-input:focus-within{ border-color: var(--brand-blue); }
.tags-input .chip{ background: var(--surface-alt); }
.tags-input-field{
  flex:1; min-width:120px; border:none; outline:none; background:none;
  font: inherit; font-size:13px; padding:4px 2px;
}

.tag{
  font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:.04em;
  padding: 2px 6px; border-radius: 4px;
}
.tag.reels{ background: rgba(124,58,237,.10); color: var(--accent-violet); }
.tag.carousel{ background: rgba(14,159,140,.10); color: var(--accent-teal); }
.tag.image{ background: rgba(26,111,205,.10); color: var(--brand-blue); }
.tag.admin{ background: rgba(37,99,235,.10); color:#2563EB; }
.tag.editor{ background: rgba(14,159,140,.10); color: var(--accent-teal); }
.tag.analyst{ background: rgba(124,58,237,.10); color: var(--accent-violet); }
.tag.viewer{ background: rgba(107,114,128,.10); color:#6B7280; }

/* ============================================================
   USER MANAGEMENT — grup checklist permission per role
   ============================================================ */
.permission-group{ border:1px solid var(--border); border-radius:12px; padding:14px 16px; }
.permission-group-head{
  display:flex; align-items:center; justify-content:space-between;
  font-size:12.5px; font-weight:700; color: var(--text-primary);
  margin-bottom:10px; text-transform:uppercase; letter-spacing:.03em;
}
.permission-group .check-list{ margin-top:0; }
.permission-group .check-row code{ font-size:10.5px; color: var(--text-muted); }

/* ============================================================
   TABLE
   ============================================================ */
.table-wrap{
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  /* subtle fade hint on right edge when scrollable */
}
table.data-table{ width:100%; border-collapse: collapse; min-width: 600px; }
.data-table thead th{
  text-align:left; font-size: 10.5px; font-weight:600; text-transform:uppercase; letter-spacing:.05em;
  color: var(--text-muted); padding: 8px 12px; border-bottom:1px solid var(--border);
  white-space:nowrap;
}
.data-table thead th.num, .data-table td.num{ text-align:right; }
/* Kolom yang sedang jadi kunci sort (Peringkat Konten, Detail Akun) —
   supaya jelas kolom mana yang sedang diurutkan. Tautan header memakai
   color:inherit (lihat markupnya), jadi otomatis ikut warna ini. */
.data-table thead th.active{ color: var(--brand-blue); background: rgba(0,174,230,.06); }
.data-table tbody td{
  padding: 10px 12px; font-size:13px; font-weight:400; color: var(--text-primary);
  border-bottom: 1px solid var(--border); white-space:nowrap;
}
.data-table tbody tr:hover{ background: var(--surface-alt); }
.data-table tbody tr.row-clickable{ cursor:pointer; }
.data-table tbody tr:last-child td{ border-bottom:none; }
.cell-account{ display:flex; align-items:center; gap:10px; }
.cell-account .h{ font-weight:600; color:var(--text-primary); }
.cell-account .s{ font-weight:400; color:var(--text-muted); font-size:11.5px; }
.delta-cell{ display:inline-flex; align-items:center; gap:3px; font-weight:600; font-size:11.5px; padding:2px 6px; border-radius:4px; }
.delta-cell.up{ color: var(--accent-green); background: rgba(22,163,74,.10); }
.delta-cell.down{ color: var(--accent-red); background: rgba(220,38,38,.10); }
.rank-badge{
  width:20px; height:20px; border-radius:5px; display:flex; align-items:center; justify-content:center;
  font-size:10.5px; font-weight:600; color:#fff; background: var(--text-muted);
}
.rank-badge.r1{ background: #b45309; }
.rank-badge.r2{ background: #71717a; }
.rank-badge.r3{ background: #92400e; }

.thumb{
  width:34px; height:34px; border-radius: var(--radius-sm); flex-shrink:0;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  display:flex; align-items:center; justify-content:center; color: var(--text-secondary);
}
.thumb svg{ width:15px;height:15px; }

.progress-bar{ width:100%; height:4px; border-radius:2px; background: var(--surface-sunken); overflow:hidden; }
.progress-bar > span{ display:block; height:100%; border-radius:2px; background: var(--text-primary); }

/* ============================================================
   MISC BLOCKS
   ============================================================ */
.legend-row{ display:flex; flex-wrap:wrap; gap:12px; }
.legend-item{ display:flex; align-items:center; gap:5px; font-size:12px; font-weight:400; color: var(--text-secondary); }
.legend-dot{ width:8px; height:8px; border-radius:2px; }

.activity-item{ display:flex; gap:10px; padding: 9px 0; border-bottom:1px solid var(--border); }
.activity-item:last-child{ border-bottom:none; padding-bottom:0; }
.activity-ico{
  width:28px;height:28px;border-radius: var(--radius-sm);flex-shrink:0;
  display:flex;align-items:center;justify-content:center;
  background: var(--surface-alt); border: 1px solid var(--border);
  color: var(--text-secondary);
}
.activity-ico svg{ width:13px;height:13px; }
.activity-text{ font-size:12.5px; color: var(--text-primary); font-weight:400; line-height:1.4; }
.activity-text b{ font-weight:600; }
.activity-time{ font-size:11px; color: var(--text-muted); margin-top:2px; }

.info-banner{
  display:flex; gap:10px; align-items:flex-start;
  padding:11px 13px; border-radius: var(--radius-sm);
  background: var(--surface-alt); border:1px solid var(--border);
  font-size:12.5px; color: var(--text-secondary); font-weight:400; line-height:1.5;
}
.info-banner svg{ width:14px; height:14px; color: var(--text-muted); flex-shrink:0; margin-top:1px; }
.info-banner b{ font-weight:600; color: var(--text-primary); }

.empty-note{ font-size:12px; color:var(--text-muted); text-align:center; padding:30px 0; }

/* Chart canvas containers */
.chart-box{ position:relative; width:100%; }
.chart-box.h-260{ height:230px; }
.chart-box.h-220{ height:200px; }
.chart-box.h-300{ height:260px; }

/* Utility */
.flex{ display:flex; }
.items-center{ align-items:center; }
.justify-between{ justify-content:space-between; }
.gap-8{ gap:8px; }
.gap-10{ gap:10px; }
.gap-14{ gap:14px; }
.mb-12{ margin-bottom:12px; }
.mb-16{ margin-bottom:16px; }
.mb-20{ margin-bottom:20px; }
.mt-4{ margin-top:4px; }
.w-full{ width:100%; }
.text-muted{ color:var(--text-muted); }
.text-sm{ font-size:12px; }

/* ============================================================
   BIO LINK LANDING PAGE PREVIEW
   ============================================================ */
.mechanism-layout{
  display:grid;
  grid-template-columns: 1fr minmax(260px, 320px);
  gap: 36px 40px;
  align-items: center;
}
.mechanism-steps{ display:flex; flex-direction:column; gap:12px; }
.mech-step{
  display:flex; gap:12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
  background: var(--surface);
  transition: border-color var(--dur-fast) ease;
}
.mech-step:hover{
  border-color: var(--border);
}
.mech-step .ms-num{
  width:26px; height:26px; border-radius: var(--radius-sm); flex-shrink:0;
  background: var(--surface-alt);
  color: var(--text-secondary);
  display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:600;
  font-family: var(--font-display);
  border: 1px solid var(--border);
}
.mech-step .ms-text{ font-size:12.5px; font-weight:400; color: var(--text-secondary); line-height:1.55; padding-top:2px; }
.mech-step .ms-text b{ color: var(--text-primary); font-weight:600; }

.phone-stage{
  position: relative;
  display:flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 0 0;
}
.phone-stage-glow{
  position:absolute;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,114,185,.18) 0%, rgba(63,163,232,.08) 42%, transparent 70%);
  top: 18%;
  pointer-events: none;
  animation: floatOrb 10s ease-in-out infinite;
}
.phone-stage-caption{
  margin-top: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.phone-device{
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 292px;
  background: linear-gradient(165deg, #1A2A3A 0%, #0F2032 55%, #0B1824 100%);
  border-radius: 36px;
  padding: 10px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,.08) inset,
    0 28px 48px -18px rgba(15,32,50,.45),
    0 8px 16px -8px rgba(15,32,50,.25);
  animation: fadeUp .55s var(--ease-out) .12s both;
}
.phone-notch{
  position: absolute;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  width: 92px; height: 22px;
  background: #0B1824;
  border-radius: 0 0 14px 14px;
  display:flex; align-items:center; justify-content:center;
}
.phone-notch span{
  width: 8px; height: 8px; border-radius: 50%;
  background: #1C3348;
  box-shadow: 0 0 0 2px #122433;
}
.phone-status{
  position: relative;
  z-index: 2;
  display:flex; align-items:center; justify-content:space-between;
  padding: 10px 18px 4px;
  color: rgba(255,255,255,.88);
  font-size: 11px; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.phone-status-icons{ display:flex; align-items:center; gap:5px; }
.psi-signal{
  width: 14px; height: 10px;
  background:
    linear-gradient(to top, currentColor 0 35%, transparent 35%) 0 0 / 2.5px 100% no-repeat,
    linear-gradient(to top, currentColor 0 55%, transparent 55%) 4px 0 / 2.5px 100% no-repeat,
    linear-gradient(to top, currentColor 0 75%, transparent 75%) 8px 0 / 2.5px 100% no-repeat,
    linear-gradient(to top, currentColor 0 100%) 12px 0 / 2.5px 100% no-repeat;
  opacity: .9;
}
.psi-wifi{
  width: 12px; height: 10px;
  border: 1.6px solid currentColor;
  border-top: none; border-left: none; border-right: none;
  border-radius: 0 0 12px 12px;
  position: relative; opacity: .9;
  transform: translateY(-1px);
}
.psi-wifi::before{
  content:""; position:absolute; left:2px; right:2px; top:-4px; height:6px;
  border: 1.5px solid currentColor; border-bottom:none; border-radius: 10px 10px 0 0;
}
.psi-batt{
  width: 18px; height: 9px; border: 1.4px solid currentColor; border-radius: 2.5px;
  position: relative; opacity: .9;
}
.psi-batt::before{
  content:""; position:absolute; inset:1.5px 5px 1.5px 1.5px;
  background: currentColor; border-radius: 1px;
}
.psi-batt::after{
  content:""; position:absolute; right:-3px; top:2px;
  width: 2px; height: 4px; background: currentColor; border-radius: 0 1px 1px 0;
}

.phone-screen{
  background:
    radial-gradient(520px 220px at 50% -10%, #D7ECFA 0%, rgba(215,236,250,0) 55%),
    linear-gradient(180deg, #F7FBFE 0%, #FFFFFF 38%, #F4F8FB 100%);
  border-radius: 28px;
  padding: 18px 14px 14px;
  min-height: 420px;
  display:flex; flex-direction:column;
}
.phone-hero{ text-align:center; padding: 6px 6px 4px; }
.phone-mock-avatar-ring{
  width: 68px; height: 68px; margin: 4px auto 12px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #0072B9, #3FA3E8 40%, #833AB4 100%);
  box-shadow: 0 10px 22px -10px rgba(0,114,185,.55);
}
.phone-mock-avatar{
  width:100%; height:100%; border-radius:50%;
  background: linear-gradient(145deg, #0F2032, #1C3A54);
  border: 2.5px solid #fff;
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-family:var(--font-display); font-weight:800; font-size:18px;
}
.phone-mock-handle{
  font-weight:800; font-size:14px; color:var(--text-primary);
  letter-spacing: -0.01em;
}
.phone-mock-bio{
  font-size:11.5px; color:var(--text-secondary); margin: 6px auto 10px;
  font-weight:500; line-height:1.5; max-width: 220px;
}
.phone-live-pill{
  display:inline-flex; align-items:center; gap:6px;
  margin: 0 auto 14px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(34,197,94,.1);
  color: #15803D;
  font-size: 10.5px; font-weight: 800;
}
.phone-links{ display:flex; flex-direction:column; gap:8px; flex:1; }
.phone-link-item{
  display:flex; align-items:center; gap:10px;
  padding: 11px 12px;
  border-radius: 14px;
  border: 1px solid rgba(230,236,241,.95);
  background: rgba(255,255,255,.92);
  box-shadow: 0 1px 2px rgba(15,32,50,.04), 0 8px 16px -14px rgba(15,32,50,.18);
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) ease, border-color var(--dur-fast) ease;
  cursor: default;
  animation: fadeUp .45s var(--ease-out) both;
}
.phone-link-item:hover{
  transform: translateY(-2px);
  border-color: #C9DCEB;
  box-shadow: 0 10px 20px -12px rgba(0,114,185,.28);
}
.phone-link-item .plc-thumb{
  width: 34px; height: 34px; border-radius: 10px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:11px; font-weight:800;
  box-shadow: 0 4px 10px -4px rgba(15,32,50,.35);
}
.phone-link-item .plc-body{ flex:1; min-width:0; }
.phone-link-item .plc-label{
  font-size:11.5px; font-weight:700; color:var(--text-primary);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  line-height:1.25;
}
.phone-link-item .plc-meta{
  margin-top: 2px;
  font-size:10px; font-weight:650; color:var(--text-muted);
}
.phone-link-item .plc-clicks{
  font-size:10px; font-weight:800; color: var(--brand-blue);
  background:rgba(0,114,185,.09); padding:4px 8px; border-radius:999px; flex-shrink:0;
}
.phone-mock-foot{
  text-align:center; margin-top:14px; padding-top: 10px;
  border-top: 1px dashed var(--border-soft);
}
.phone-mock-foot span{
  font-size:10px; font-weight:700; color: var(--text-muted); letter-spacing:.02em;
}
.phone-home-bar{
  width: 108px; height: 4px; border-radius: 999px;
  background: rgba(255,255,255,.35);
  margin: 10px auto 4px;
}

/* ============================================================
   SIDEBAR — COLLAPSED (desktop minimize)
   ============================================================ */
:root{ --sidebar-collapsed-w: 56px; }

/* Overlay for mobile drawer */
.sidebar-overlay{
  display:none;
  position:fixed; inset:0; z-index:52; /* satu di bawah .sidebar (53) */
  background: rgba(0,0,0,.3);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.sidebar-overlay.is-visible{ display:block; }

/* Collapse toggle button (bottom of sidebar) */
.sidebar-collapse-btn{
  width:32px; height:32px;
  display:flex; align-items:center; justify-content:center;
  border:1px solid var(--border); border-radius: var(--radius-sm);
  background: transparent; color: var(--text-muted);
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease, transform var(--dur-fast) ease;
  flex-shrink:0;
}
.sidebar-collapse-btn:hover{ background: var(--surface-alt); color: var(--text-primary); }
.sidebar-collapse-btn .collapse-icon svg{
  width:14px; height:14px;
  transform: rotate(-90deg);
  transition: transform .25s var(--ease-out);
}
.sidebar.is-collapsed .sidebar-collapse-btn .collapse-icon svg{ transform: rotate(90deg); }

/* Sidebar foot layout with collapse btn */
.sidebar-foot{
  padding: 10px;
  border-top: 1px solid var(--border);
  display:flex;
  flex-direction:column;
  gap:6px;
}

/* Collapsed sidebar */
.sidebar.is-collapsed{
  width: var(--sidebar-collapsed-w);
}
.sidebar.is-collapsed .sidebar-brand .app-name,
.sidebar.is-collapsed .nav-label span,
.sidebar.is-collapsed .nav-text,
.sidebar.is-collapsed .user-meta,
.sidebar.is-collapsed .user-card-chev{
  opacity:0;
  width:0;
  overflow:hidden;
  white-space:nowrap;
  pointer-events:none;
}
.sidebar.is-collapsed .sidebar-brand{
  justify-content:center;
  padding: 14px 0;
}
.sidebar.is-collapsed .sidebar-logo{ display:none; }
.sidebar.is-collapsed .nav-label{ padding: 10px 0 4px; text-align:center; }
.sidebar.is-collapsed .nav-item{
  justify-content:center;
  padding: 8px 0;
}
.sidebar.is-collapsed .nav-item svg{ margin:0; }
.sidebar.is-collapsed .user-card{
  justify-content:center;
  padding: 6px 0;
}
.sidebar.is-collapsed .sidebar-collapse-btn{ align-self:center; }

/* Desktop-only tooltip for collapsed sidebar */
@media (min-width: 861px){
  .sidebar.is-collapsed .nav-item,
  .sidebar.is-collapsed .user-card,
  .sidebar.is-collapsed .sidebar-collapse-btn{
    position: relative;
    overflow: visible;
  }
  .sidebar.is-collapsed .nav-item::after,
  .sidebar.is-collapsed .user-card::after,
  .sidebar.is-collapsed .sidebar-collapse-btn::after{
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.96);
    color: var(--text-primary);
    font-size: 11.5px;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    transition: opacity var(--dur-fast) ease, transform var(--dur-fast) ease;
    z-index: 160;
  }
  .sidebar.is-collapsed .nav-item:hover::after,
  .sidebar.is-collapsed .user-card:hover::after,
  .sidebar.is-collapsed .sidebar-collapse-btn:hover::after{
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

/* Pill-style brand in collapsed = just logo icon */
.sidebar.is-collapsed .sidebar-brand::after{
  content: 'A';
  display:flex;
  width:28px; height:28px;
  border-radius: var(--radius-sm);
  background: var(--brand-navy);
  color:#fff;
  font-size:13px; font-weight:700;
  align-items:center; justify-content:center;
}

/* Main offset when collapsed */
body.sidebar-collapsed .main{
  margin-left: var(--sidebar-collapsed-w);
}

/* Topbar menu button — always visible */
.topbar-menu-btn{
  flex-shrink:0;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Large — 4 col KPI */
@media (max-width: 1280px){
  .grid-6{ grid-template-columns: repeat(3, 1fr); }
}

/* Medium — tablet landscape */
@media (max-width: 1100px){
  .grid-6{ grid-template-columns: repeat(2, 1fr); }
  .grid-4{ grid-template-columns: repeat(2, 1fr); }
}

/* Medium small — mechanism */
@media (max-width: 980px){
  .mechanism-layout{ grid-template-columns: 1fr; }
  .phone-stage{ order: -1; }
  .grid-2{ grid-template-columns: 1fr; }
  .lp-layout{ grid-template-columns: 1fr; }
  .lp-add-box{ grid-template-columns: 1fr; }
  .settings-grid{ grid-template-columns: 1fr; }
}

/* Mobile — sidebar becomes drawer */
@media (max-width: 860px){
  .sidebar{
    transform: translateX(-100%);
    width: var(--sidebar-w) !important; /* override collapsed on mobile */
    box-shadow: none;
    /* Mulai di bawah topbar (bukan top:0) — topbar tetap terlihat di atas
       drawer (z-index lebih tinggi), jadi kalau drawer tetap dari top:0
       baris logo/brand-nya sendiri tertutup topbar dan seolah hilang. */
    top: var(--topbar-h);
  }
  .sidebar.is-open{
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }
  /* Always show text labels in mobile drawer */
  .sidebar.is-open .app-name,
  .sidebar.is-open .nav-label span,
  .sidebar.is-open .nav-text,
  .sidebar.is-open .user-meta{
    opacity:1 !important;
    width:auto !important;
    overflow:visible !important;
    pointer-events:auto !important;
  }
  .sidebar.is-open .nav-item{
    justify-content:flex-start !important;
    padding: 7px 10px !important;
  }
  .sidebar.is-open .user-card{
    justify-content:flex-start !important;
    padding: 8px !important;
  }
  .sidebar.is-open .sidebar-brand{
    justify-content:flex-start !important;
    padding: 16px 16px 14px !important;
  }
  .sidebar.is-open .sidebar-logo{ display:block !important; }
  .sidebar.is-open .sidebar-brand::after{ display:none; }

  /* "Lipat sidebar" adalah konsep khusus desktop (menyempitkan jadi
     ikon-saja) — tidak relevan untuk drawer yang sudah slide-out/in penuh
     di mobile, jadi disembunyikan supaya tidak membingungkan. */
  .sidebar-collapse-btn{ display:none; }

  .main{ margin-left:0 !important; }
  body.sidebar-collapsed .main{ margin-left:0 !important; }

  .grid-6{ grid-template-columns: repeat(2, 1fr); }
  .grid-3{ grid-template-columns: repeat(2, 1fr); }
  .grid-4{ grid-template-columns: repeat(2, 1fr); }

  .page-body{ padding: 16px 16px 48px; }
  .topbar{ padding: 0 16px; }

  .settings-nav{ position:static; flex-direction:row; overflow-x:auto; flex-wrap:nowrap; }
  .settings-nav a,
  .settings-nav button{ white-space:nowrap; }

  /* Kartu seperti "Performa dari Waktu ke Waktu" punya seg-control
     (Jangkauan/Followers/dst) di sisi kanan judul — dengan flex row yang
     tidak wrap, judulnya diperas jadi kolom sempit (tiap kata di baris
     sendiri). Biarkan bungkus ke baris baru di bawah judul. */
  .section-title{ flex-wrap: wrap; gap: 10px; }
  .section-title .right,
  .section-title .seg-control{ width: 100%; }
  .seg-control{ overflow-x: auto; }

  body.sidebar-mobile-open{ overflow:hidden; }
}

/* Small mobile */
@media (max-width: 540px){
  .grid-6{ grid-template-columns: repeat(2, 1fr); }
  .grid-3{ grid-template-columns: 1fr; }
  .grid-4{ grid-template-columns: 1fr; }
  .grid-2{ grid-template-columns: 1fr; }
  .toolbar-row{ flex-direction:column; align-items:flex-start; }
  .toolbar-left, .toolbar-right{ width:100%; }
  .login-shell{ grid-template-columns: 1fr; }
  .login-brand-panel{ display:none; }
  .topbar-title p{ display:none; }
  .table-wrap{ -webkit-overflow-scrolling:touch; }
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-shell{
  min-height:100vh;
  display:grid;
  grid-template-columns: 1.05fr 1fr;
  background:#fff;
}
.login-brand-panel{
  position:relative;
  overflow:hidden;
  background: #ffffff;
  padding: 48px 52px;
  display:flex; flex-direction:column; justify-content:space-between;
  color: var(--text-primary);
  border-right: 1px solid var(--border);
}
/* Iridescent wash — three subtle color blobs */
.login-brand-panel::before{
  content:"";
  position:absolute; inset:0; z-index:0;
  background:
    radial-gradient(ellipse 70% 55% at 15% 10%, rgba(255,60,80,0.07) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 85% 20%, rgba(139,92,246,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 65% 60% at 50% 90%, rgba(34,197,94,0.05) 0%, transparent 65%),
    radial-gradient(ellipse 55% 45% at 80% 75%, rgba(59,130,246,0.04) 0%, transparent 55%);
  pointer-events:none;
}
.login-brand-panel::after{ content:none; }
.login-logo-row{ display:flex; align-items:center; gap:12px; position:relative; z-index:2; }
.login-logo-row .logo-card{
  display:inline-flex; align-items:center;
  background: var(--surface);
  border: 1px solid var(--border);
  padding:8px 14px; border-radius: var(--radius-sm);
}
.login-logo-row img{ height:22px; display:block; }
.login-headline{ position:relative; z-index:2; max-width:380px; }
.login-headline h1{ color: var(--text-primary); font-size: 28px; line-height:1.25; font-weight:700; letter-spacing:-0.03em; }
.login-headline p{ color: var(--text-muted); font-size:13px; margin-top:12px; line-height:1.65; font-weight:400; }
.login-feature-list{ position:relative; z-index:2; display:flex; flex-direction:column; gap:10px; margin-top:24px; }
.login-feature{ display:flex; align-items:center; gap:10px; }
.login-feature .f-ico{
  width:28px; height:28px; border-radius: var(--radius-sm); flex-shrink:0;
  background: var(--surface); border:1px solid var(--border);
  display:flex; align-items:center; justify-content:center; color: var(--text-secondary);
}
.login-feature .f-ico svg{ width:13px; height:13px; }
.login-feature span{ font-size:12.5px; font-weight:400; color: var(--text-secondary); }
.login-foot-note{ position:relative; z-index:2; font-size:11px; color: var(--text-muted); font-weight:400; }

.login-form-panel{
  display:flex; align-items:center; justify-content:center;
  padding: 40px;
  background:
    radial-gradient(ellipse 500px 400px at 80% 10%, rgba(59,130,246,0.04) 0%, transparent 65%),
    radial-gradient(ellipse 400px 350px at 20% 90%, rgba(34,197,94,0.03) 0%, transparent 60%),
    #fafafa;
}
.login-form-card{ width:100%; max-width: 360px; }
.login-form-card .lf-eyebrow{ font-size:11px; font-weight:600; color: var(--text-muted); letter-spacing:.05em; text-transform:uppercase; margin-bottom:8px; }
.login-form-card h2{ font-size:22px; font-weight:700; margin-bottom:5px; letter-spacing: -0.025em; }
.login-form-card .lf-sub{ font-size:13px; color: var(--text-muted); margin-bottom:24px; font-weight:400; }

.field{ margin-bottom:14px; }
.field label{ display:block; font-size:12px; font-weight:500; color: var(--text-secondary); margin-bottom:6px; }
.field input{
  width:100%; padding: 9px 12px; border-radius: var(--radius-sm);
  border:1px solid var(--border); font-size:13.5px; font-family: inherit; color: var(--text-primary);
  background: var(--surface);
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.field input:focus{ outline:none; border-color: var(--text-primary); box-shadow: 0 0 0 3px rgba(9,9,11,.06); }
.field-row{ display:flex; align-items:center; justify-content:space-between; margin-bottom:18px; }
.field-row a{ font-size:12px; font-weight:500; color: var(--text-secondary); }
.field-row a:hover{ color: var(--text-primary); }
.check-row{ display:flex; align-items:center; gap:7px; font-size:12.5px; color: var(--text-secondary); font-weight:400; }
.check-row input{ width:14px; height:14px; accent-color: var(--brand-navy); }

.btn-block{ width:100%; justify-content:center; padding:9px 16px; font-size:13.5px; }
.divider-row{ display:flex; align-items:center; gap:10px; margin: 20px 0; }
.divider-row .line{ flex:1; height:1px; background: var(--border); }
.divider-row span{ font-size:11px; color: var(--text-muted); font-weight:400; text-transform:uppercase; letter-spacing:.05em; }

.btn-social{
  width:100%; display:flex; align-items:center; justify-content:center; gap:8px;
  padding: 9px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); font-weight:500; font-size:13px; color: var(--text-primary);
  margin-bottom:8px;
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.btn-social:hover{ border-color: var(--text-muted); background: var(--surface-alt); }
.btn-social svg{ width:16px; height:16px; }

.login-signup-note{ text-align:center; font-size:12px; color: var(--text-muted); margin-top:20px; font-weight:400; }
.login-signup-note a{ color: var(--text-primary); font-weight:500; }

@media (max-width: 900px){
  .login-shell{ grid-template-columns: 1fr; }
  .login-brand-panel{ display:none; }
}

/* ============================================================
   MOTION — entrance, hover, micro-interactions
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.96); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-12px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulseSoft {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes floatOrb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(18px, -14px) scale(1.05); }
}
@keyframes checkPop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes btnShine {
  from { transform: translateX(-120%) skewX(-16deg); }
  to   { transform: translateX(220%) skewX(-16deg); }
}

/* Animasi masuk ini HANYA untuk desktop. CSS animation menang atas cascade
   normal (non-!important) untuk properti yang sama — kalau dibiarkan
   unconditional, keyframe akhirnya (`transform: translateX(0)`) menimpa
   aturan mobile ".sidebar{transform:translateX(-100%)}" yang menyembunyikan
   drawer secara default, sehingga sidebar tampil penuh/lebar di mobile
   walau belum dibuka lewat tombol menu. */
@media (min-width: 861px){
  .sidebar{
    animation: slideInLeft var(--dur-slow) var(--ease-out) both;
  }
}
.page-body > *{
  animation: fadeUp var(--dur) var(--ease-out) both;
}
.page-body > *:nth-child(1){ animation-delay: 20ms; }
.page-body > *:nth-child(2){ animation-delay: 50ms; }
.page-body > *:nth-child(3){ animation-delay: 80ms; }
.page-body > *:nth-child(4){ animation-delay: 110ms; }
.page-body > *:nth-child(5){ animation-delay: 140ms; }
.page-body > *:nth-child(6){ animation-delay: 170ms; }
/* Modal yang dirender server-side (mis. Audit Log) sering jatuh sebagai
   direct child #4 dst dari .page-body, sehingga ikut kena delay stagger
   di atas walau modal baru muncul belakangan saat baris diklik — bukan
   saat page load. Delay yang terwarisi itu membuat modal tampil solid
   sekejap lalu "berkedip" blank sebelum fade-in beneran jalan (lihat
   animation fadeIn di .modal-overlay). Modal tidak pernah perlu delay
   entrance apa pun, jadi di-reset ke 0 di sini (specificity sama dengan
   rule nth-child di atas, menang karena dideklarasikan belakangan). */
.page-body > .modal-overlay{ animation-delay: 0s; }

/* Keep filter bars above following cards (animation creates stacking contexts) */
.toolbar-row,
.page-body > .flex.items-center.justify-between{
  position: relative;
  z-index: 50;
}
.page-body > .card,
.page-body > .grid,
.page-body > .info-banner,
.page-body > .lp-layout,
.page-body > .settings-grid,
.page-body > .mechanism-card{
  position: relative;
  z-index: 1;
}

.card{
  transition: border-color var(--dur-fast) ease;
}
.card:hover{
  border-color: var(--text-muted);
}
.btn{
  position: relative;
  overflow: hidden;
}
.btn:active{ transform: scale(.98); }
.dot-alert{ animation: pulseSoft 1.8s ease-in-out infinite; }
.status-dot.live{ animation: pulseSoft 2s ease-in-out infinite; }

.dropdown-panel{
  animation: scaleIn var(--dur-fast) var(--ease-out);
  transform-origin: top left;
}
.pill-filter.is-open{
  box-shadow: 0 0 0 3px rgba(9,9,11,.06);
}

.login-brand-panel{ animation: fadeIn .5s ease both; }
.login-form-card{ animation: fadeUp .4s var(--ease-out) .08s both; }
.login-headline h1{ animation: fadeUp .45s var(--ease-out) .1s both; }
.login-headline p{ animation: fadeUp .4s var(--ease-out) .16s both; }
.login-feature{ animation: fadeUp .4s var(--ease-out) both; }
.login-feature:nth-child(1){ animation-delay: .2s; }
.login-feature:nth-child(2){ animation-delay: .28s; }
.login-feature:nth-child(3){ animation-delay: .36s; }
.field input{
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

/* Settings */
.settings-grid{
  display:grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  align-items: start;
}
.settings-nav{
  position: sticky;
  top: 12px;
  display:flex;
  flex-direction:column;
  gap: 2px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
/* Navigasi settings berpindah lewat URL (satu halaman per tab), jadi
   view merender <a>. Selector <button> dipertahankan untuk berjaga-jaga
   kalau ada tab berbasis JS yang ditambahkan lagi nanti. */
.settings-nav a,
.settings-nav button{
  position: relative;
  display:flex; align-items:center; gap:10px;
  padding: 9px 10px 9px 12px;
  border: none; background: transparent;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; color: var(--text-secondary);
  text-align:left; text-decoration:none;
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease;
}
.settings-nav a:hover,
.settings-nav button:hover{ background: var(--surface-alt); color: var(--text-primary); }
.settings-nav a.active,
.settings-nav button.active{
  background: var(--surface-alt);
  color: var(--text-primary);
  font-weight: 600;
}
/* Bar aksen di sisi kiri tab aktif — penanda lebih jelas daripada cuma
   beda warna latar, terutama untuk mata yang scan cepat daftar tab. */
.settings-nav a.active::before,
.settings-nav button.active::before{
  content:"";
  position:absolute; left:0; top:50%; transform:translateY(-50%);
  width:3px; height:16px; border-radius:2px;
  background: var(--brand-blue);
}
.settings-nav-icon{
  width:16px; height:16px; flex-shrink:0;
  color: var(--text-muted);
  transition: color var(--dur-fast) ease;
}
.settings-nav a:hover .settings-nav-icon,
.settings-nav button:hover .settings-nav-icon{ color: var(--text-secondary); }
.settings-nav a.active .settings-nav-icon,
.settings-nav button.active .settings-nav-icon{ color: var(--brand-blue); }

/* Tab horizontal bergaris bawah, dipakai halaman non-Settings (mis.
   Manage Accounts). Sama seperti .settings-nav, navigasinya lewat URL
   (server merender hanya panel yang aktif) — BUKAN toggle display:none
   berbasis JS, supaya tidak mengulang bug ".settings-panel{display:none}"
   yang pernah membuat seluruh halaman Settings tampil kosong. */
.page-tabs{
  display:flex; gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.page-tabs a{
  padding: 10px 4px;
  margin-right: 20px;
  font-size: 13.5px; font-weight: 500; color: var(--text-muted);
  text-decoration:none;
  border-bottom: 2px solid transparent;
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.page-tabs a:hover{ color: var(--text-primary); }
.page-tabs a.active{
  color: var(--text-primary);
  font-weight: 600;
  border-bottom-color: var(--brand-blue);
}

/* Panel WAJIB terlihat secara bawaan.
   Aturan lama `display:none` + `.active{display:block}` dibuat untuk tab
   berbasis JavaScript. Setelah navigasi dipindah ke URL, tidak ada lagi
   yang menambahkan kelas .active — akibatnya SELURUH halaman Settings
   tampil kosong meski HTML-nya lengkap. */
.settings-panel{ display:block; animation: fadeUp var(--dur) var(--ease-out); }
.settings-section-title{
  font-size: 14.5px; font-weight: 600; margin-bottom: 4px;
}
.settings-section-sub{
  font-size: 12.5px; color: var(--text-muted); font-weight: 400; margin-bottom: 16px;
}
.settings-row{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.settings-row:last-child{ border-bottom:none; }
.settings-row .sr-label{ font-size: 13px; font-weight: 500; }
.settings-row .sr-hint{ font-size: 11.5px; color: var(--text-muted); font-weight: 400; margin-top: 2px; }
.invite-box{
  display:flex; align-items:center; gap:8px;
  padding: 9px 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 10px;
}
.invite-box input{
  flex:1; border:none; background:transparent;
  font-size: 12px; font-weight: 400; color: var(--text-secondary);
  font-family: var(--font-mono);
  min-width:0;
}
.invite-box input:focus{ outline:none; }
.toggle{
  width: 38px; height: 22px; border-radius: 999px;
  background: var(--border); border:none; position:relative;
  transition: background var(--dur-fast) ease;
  flex-shrink:0;
}
.toggle.on{ background: var(--brand-navy); }
.toggle::after{
  content:"";
  position:absolute; top:2px; left:2px;
  width:18px; height:18px; border-radius:50%;
  background:#fff; box-shadow: 0 1px 2px rgba(0,0,0,.15);
  transition: transform var(--dur) var(--ease-spring);
}
.toggle.on::after{ transform: translateX(16px); }
.toast{
  position: fixed; bottom: 20px; right: 20px; z-index: 220;
  background: var(--brand-navy); color:#fff;
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 12.5px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  display:flex; align-items:center; gap:8px;
  animation: fadeUp var(--dur) var(--ease-out);
}
.toast.hide{ opacity:0; transform: translateY(6px); transition: all var(--dur) ease; }

/* ============================================================
   AJAX PAGE LOADING — halaman yang datanya diambil lewat fetch()
   (lihat initAjaxPage()/fetchAndSwap() di app.js), bukan render
   server penuh per klik filter.
   ============================================================ */

/* Bar tipis di puncak layar, mirip indikator loading YouTube/GitHub —
   nyala tiap kali fetchAndSwap() berjalan (muat awal maupun ganti filter). */
.ajax-top-loader{
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: var(--brand-blue); z-index: 300;
  transition: width .4s ease, opacity .25s ease;
  opacity: 0; pointer-events: none;
}
.ajax-top-loader.is-active{ opacity: 1; width: 70%; }
.ajax-top-loader.is-done{ width: 100%; opacity: 0; }

/* Skeleton — placeholder shimmer dipakai saat halaman baru dimuat
   (sebelum fetchAndSwap() pertama selesai) supaya bukan layar kosong. */
@keyframes skeleton-shimmer{
  0%{ background-position: -300px 0; }
  100%{ background-position: 300px 0; }
}
.skeleton{
  background: linear-gradient(90deg, var(--surface-alt) 25%, var(--border) 37%, var(--surface-alt) 63%);
  background-size: 400px 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
  border: none;
}
.skeleton-kpi{ height: 96px; }
.skeleton-line{ height: 11px; margin-bottom: 8px; }
.skeleton-line.w-60{ width: 60%; }
.skeleton-line.w-40{ width: 40%; }
.skeleton-chart{ height: 260px; }
.skeleton-row{ height: 44px; margin-bottom: 6px; }

/* Semi-transparent overlay dipakai SETELAH konten pertama tampil (mis.
   ganti filter) — bukan skeleton penuh lagi, cukup redupkan konten lama
   sambil menunggu yang baru supaya tidak terasa "berkedip". */
.ajax-updating{ position: relative; }
.ajax-updating > *{ opacity: .45; transition: opacity .15s ease; pointer-events: none; }

/* Invite (public share page) */
.invite-shell{
  min-height: 100vh;
  display:flex; align-items:center; justify-content:center;
  padding: 32px 20px;
  background: var(--bg-page);
}
.invite-card{
  width: 100%; max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 32px 28px 28px;
  animation: fadeUp .4s var(--ease-out) both;
}
.invite-card .invite-logo{
  height: 22px; width: auto; margin-bottom: 20px;
}
.invite-badge{
  display:inline-flex; align-items:center; gap:5px;
  font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 3px 8px; border-radius: var(--radius-pill);
  margin-bottom: 12px;
}
.invite-card h1{
  font-size: 20px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.025em;
}
.invite-card .invite-sub{
  font-size: 13px; color: var(--text-secondary); font-weight: 400; line-height: 1.6;
  margin-bottom: 20px;
}
.invite-workspace{
  display:flex; align-items:center; gap:10px;
  padding: 12px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}
.invite-workspace .iw-avatar{
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: var(--brand-navy);
  color:#fff; display:flex; align-items:center; justify-content:center;
  font-weight: 700; font-size: 12px; font-family: var(--font-display);
}
.invite-workspace .iw-name{ font-size: 13px; font-weight: 600; }
.invite-workspace .iw-meta{ font-size: 11.5px; color: var(--text-muted); font-weight: 400; margin-top: 1px; }
.invite-success{
  text-align:center; padding: 12px 0 4px;
}
.invite-success .ok-ring{
  width: 56px; height: 56px; border-radius: 50%;
  margin: 0 auto 14px;
  background: rgba(22,163,74,.10);
  color: var(--accent-green);
  display:flex; align-items:center; justify-content:center;
  animation: checkPop .4s var(--ease-spring) both;
}
.invite-success .ok-ring svg{ width: 24px; height: 24px; }
.invite-account-chip{
  display:flex; align-items:center; gap:10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 14px 0 6px;
  text-align:left;
}
.invite-account-chip .iac-av{
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, #E1306C, #833AB4);
  color:#fff; display:flex; align-items:center; justify-content:center;
  font-weight: 700; font-size: 12px;
}
.invite-error{
  text-align:center; padding: 20px 8px;
}
.invite-error .err-ico{
  width: 48px; height: 48px; border-radius: 50%;
  margin: 0 auto 12px;
  background: rgba(220,38,38,.08); color: var(--accent-red);
  display:flex; align-items:center; justify-content:center;
}
.invite-error .err-ico svg{ width: 22px; height: 22px; }

.btn.is-loading{
  pointer-events:none;
  opacity: .85;
}
.btn.is-loading .btn-spinner{
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 860px){
  .settings-grid{ grid-template-columns: 1fr; }
  .settings-nav{ position: static; flex-direction: row; overflow-x: auto; }
  .settings-nav button{ white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   SCALE UX — modal picker, pager, landing builder
   ============================================================ */
body.modal-open{ overflow: hidden; }
.modal-overlay{
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.35);
  backdrop-filter: blur(4px);
  display:flex; align-items:center; justify-content:center;
  padding: 20px;
  animation: fadeIn var(--dur-fast) ease;
}
.modal-card{
  width: min(520px, 100%);
  max-height: min(800px, calc(100vh - 40px));
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  display:flex; flex-direction:column;
  animation: scaleIn var(--dur) var(--ease-out);
  overflow: hidden;
}
.modal-head{
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3{ font-size: 15px; font-weight: 600; }
.modal-head p{ font-size: 12px; color: var(--text-muted); font-weight: 400; margin-top: 3px; }
.modal-toolbar{
  display:flex; gap:8px; padding: 12px 12px 6px; flex-wrap:wrap;
}
.modal-meta{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding: 4px 12px 8px;
  font-size: 12px; font-weight: 500; color: var(--text-muted);
}
.modal-meta-actions{ display:flex; gap:6px; }
.btn-text{
  border:none; background:transparent; color: var(--text-secondary);
  font-size: 12px; font-weight: 500; padding: 3px 6px;
}
.btn-text:hover{ color: var(--text-primary); }
.modal-list{
  flex:1; overflow:auto; padding: 0 8px 6px;
  min-height: 280px;
}
.modal-foot{
  display:flex; justify-content:flex-end; gap:8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.detail-summary{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.detail-summary-main{ display:flex; align-items:center; gap:10px; min-width:0; }
.detail-summary-text{ min-width:0; }
.detail-summary-text .h{ font-size:13px; font-weight:600; }
.detail-summary-text .s{
  font-size:11.5px; color: var(--text-muted); margin-top:2px;
  font-family: monospace;
  white-space: nowrap; overflow:hidden; text-overflow:ellipsis;
}
.detail-action{ padding: 13px 20px; border-bottom: 1px solid var(--border); }
.detail-action .act{ font-size:13px; font-weight:600; }
.detail-action .tag{ margin-top:7px; }
.detail-grid{
  display:grid; grid-template-columns: 1fr 1fr; gap: 14px 16px;
  padding: 16px 20px;
}
.detail-field.full{ grid-column: 1 / -1; }
.detail-field-label{
  font-size:10.5px; text-transform:uppercase; letter-spacing:.04em;
  color: var(--text-muted); margin-bottom:4px;
}
.detail-field-value{ font-size:12.5px; word-break:break-word; }
.detail-field-value.mono{ font-family: monospace; font-size: 11.5px; }
.detail-meta-wrap{ padding: 0 20px 18px; }
.detail-meta-wrap .detail-field-label{ margin-bottom:6px; }
.detail-meta{
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  font-family: monospace;
  font-size: 11.5px;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow:auto;
}
.search-field{
  display:flex; align-items:center; gap:7px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  min-width: 200px;
  transition: border-color var(--dur-fast) ease;
}
.search-field:focus-within{ border-color: var(--text-primary); background: var(--surface); }
.search-field.grow{ flex:1; }
.search-field svg{ width:14px; height:14px; color: var(--text-muted); }
.search-field input{
  border:none; background:transparent; outline:none; width:100%;
  font: inherit; font-size: 13px; font-weight: 400; color: var(--text-primary);
}
.select-field{
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font: inherit; font-size: 13px; font-weight: 500; color: var(--text-primary);
  min-width: 140px;
}
.acct-pick-row{
  width:100%;
  display:flex; align-items:center; gap:10px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  text-align:left;
  margin-bottom: 1px;
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease;
}
.acct-pick-row:hover{ background: var(--surface-alt); }
.acct-pick-row.is-on{
  background: var(--surface-alt);
  border-color: var(--border);
}
.acct-pick-check{
  width: 18px; height: 18px; border-radius: 4px; flex-shrink:0;
  border: 1px solid var(--border);
  display:flex; align-items:center; justify-content:center;
  color: #fff; background: #fff;
}
.acct-pick-row.is-on .acct-pick-check{
  background: var(--brand-navy); border-color: var(--brand-navy);
}
.acct-pick-check svg{ width: 11px; height: 11px; }
.acct-pick-av{
  width: 30px; height: 30px; border-radius: 50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  color:#fff; font-size:10px; font-weight:700;
}
.acct-pick-meta{ flex:1; min-width:0; }
.acct-pick-meta .n{ display:block; font-size:13px; font-weight:600; color:var(--text-primary); }
.acct-pick-meta .h{ display:block; font-size:11px; font-weight:400; color:var(--text-muted); margin-top:1px; }
.acct-pick-stats{ text-align:right; flex-shrink:0; }
.acct-pick-stats b{ display:block; font-size:12px; font-weight:600; color:var(--text-primary); }
.acct-pick-stats small{ font-size:10px; font-weight:400; color:var(--text-muted); }

.pager{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  flex-wrap:wrap;
  padding: 10px 0 0;
}
.pager-meta{ font-size:12px; color:var(--text-muted); font-weight:400; }
.pager-meta b{ color: var(--text-secondary); font-weight:600; }
.pager-controls{ display:flex; align-items:center; gap:2px; flex-wrap:wrap; }
.pager-btn{
  min-width: 30px; height: 28px; padding: 0 8px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--text-secondary);
  font-size: 12px; font-weight: 500;
}
.pager-btn:hover:not(:disabled){ border-color: var(--text-muted); color:var(--text-primary); }
.pager-btn.active{
  background: var(--brand-navy); border-color: var(--brand-navy); color:#fff;
}
.pager-btn:disabled{ opacity:.35; cursor:not-allowed; }
.pager-ellipsis{ padding: 0 4px; color: var(--text-muted); font-weight:400; font-size:12px; }

.toolbar-row{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  flex-wrap:wrap; margin-bottom: 16px;
}
.toolbar-left, .toolbar-right{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }

.chip-stack{
  display:flex; flex-wrap:wrap; gap:6px; align-items:center;
}
.chip-stack .chip{
  max-width: 180px;
}
.chip-stack .chip span:not(.chip-avatar):not(.chip-x){
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.compare-limit-note{
  font-size: 12px; font-weight: 400; color: var(--text-muted);
}

/* Landing page builder */
.lp-layout{
  display:grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 320px);
  gap: 16px;
  align-items: start;
}
.lp-panel .field{ margin-bottom: 12px; }
.lp-panel .field input,
.lp-panel .field textarea,
.lp-panel .field select{
  width:100%; padding: 8px 11px; border-radius: var(--radius-sm);
  border:1px solid var(--border); font-size:13px; font-family: inherit;
  font-weight: 400; color: var(--text-primary); background: var(--surface);
}
.lp-panel .field input:focus,
.lp-panel .field textarea:focus,
.lp-panel .field select:focus{ outline:none; border-color: var(--text-primary); }
.lp-panel .field textarea{ min-height: 70px; resize: vertical; }
.lp-link-row{
  display:grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 8px;
}
.lp-link-row .lp-url{ font-size: 12px; font-weight: 400; color: var(--text-secondary); word-break: break-all; }
.lp-link-row .lp-short{
  margin-top: 3px;
  font-size: 12px; font-weight: 600; color: var(--text-primary);
  font-family: var(--font-mono);
}
.lp-link-actions{ display:flex; gap:4px; align-items:flex-start; }
.lp-add-box{
  display:grid; grid-template-columns: 1fr 1.4fr auto;
  gap: 8px; align-items: end;
}
@media (max-width: 980px){
  .lp-layout{ grid-template-columns: 1fr; }
  .lp-add-box{ grid-template-columns: 1fr; }
}


/* =========================================================================
   TAMBAHAN APLIKASI — komponen yang tidak ada di mockup statis
   (dropdown server-side, alert, toast, form auth, pager)
   ========================================================================= */

/* ---- Brand di sidebar ---- */
.sidebar-brand .brand-text { line-height: 1.2; }
.sidebar-brand .brand-product { font-family: var(--font-display, inherit); font-weight: 800; font-size: 14px; color: var(--text-primary, #16181D); }
.sidebar-brand .brand-company { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted, #8A8F98); margin-top: 1px; }

/* ---- Dropdown panel ---- */
.dropdown-panel {
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 80;
    min-width: 240px; padding: 8px;
    background: #fff; border: 1px solid var(--border, #E6E8EB);
    border-radius: 14px; box-shadow: 0 18px 40px -14px rgba(15,20,14,.22);
    animation: dd-in .14s cubic-bezier(.2,.8,.2,1);
}
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.dropdown-panel.align-left { right: auto; left: 0; }

.dd-section-label { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted, #8A8F98); padding: 8px 10px 6px; }
.dd-divider { height: 1px; background: var(--border-soft, #F0F0F3); margin: 6px 2px; }
.dd-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px; border-radius: 9px;
    font-size: 13px; font-weight: 600; color: var(--text-primary, #16181D);
    cursor: pointer; border: none; background: none; width: 100%; text-align: left;
    font-family: inherit;
}
.dd-item:hover { background: var(--surface-alt, #F7F8F9); }
.dd-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: .7; }
.dd-item.active { background: rgba(0,174,230,.08); color: var(--brand-blue, #00AEE6); }
.dd-item-danger { color: #D92544; }
.dd-item-danger:hover { background: rgba(217,37,68,.08); }
.dd-item input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--brand-blue, #00AEE6); }

.dd-list { max-height: 260px; overflow-y: auto; }
.dd-search { display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 4px; border: 1px solid var(--border, #E6E8EB); border-radius: 9px; background: var(--surface-alt, #F7F8F9); }
.dd-search svg { width: 14px; height: 14px; opacity: .5; }
.dd-search input { border: none; background: none; outline: none; width: 100%; font: inherit; font-size: 12.5px; }
.dd-foot { display: flex; justify-content: space-between; gap: 8px; padding: 10px 6px 2px; margin-top: 6px; border-top: 1px solid var(--border-soft, #F0F0F3); }
.dd-range { display: flex; align-items: center; gap: 8px; padding: 4px 10px 8px; }
.dd-range input { flex: 1; min-width: 0; padding: 8px 9px; border: 1px solid var(--border, #E6E8EB); border-radius: 8px; font: inherit; font-size: 12px; }

/* ---- Notifikasi & profil ---- */
.notif-wrap, .profile-wrap { position: relative; }
.notif-panel, .profile-panel {
    width: 300px;
    /* .notif-panel juga kena selector generik ".dropdown-panel" yang
       dipakai dropdown filter pill (main.css baris ~455) — rule itu
       menetapkan left:0 untuk kasusnya sendiri. Karena lebar di sini
       ditentukan eksplisit (width:300px), left:0 yang ikut terwarisi
       itu MENANG atas right:0 dari rule topbar (posisi absolute yang
       over-constrained mengabaikan `right` begitu left+width sama-sama
       ada) — akibatnya panel notifikasi malah nempel ke kiri tombolnya
       dan meluas ke KANAN sampai kepotong tepi layar, padahal harusnya
       meluas ke kiri seperti menu profil. left:auto di sini menghapus
       warisan itu supaya right:0 dari rule topbar yang benar-benar dipakai.
    */
    left: auto;
}
.notif-list { max-height: 340px; overflow-y: auto; }
.notif-item { display: block; padding: 10px; border-radius: 9px; text-decoration: none; }
.notif-item:hover { background: var(--surface-alt, #F7F8F9); }
.notif-item.is-unread { background: rgba(0,174,230,.05); }
.ni-title { font-size: 12.5px; font-weight: 700; color: var(--text-primary, #16181D); }
.ni-body { font-size: 11.5px; color: var(--text-secondary, #5B6169); margin-top: 2px; line-height: 1.45; }
.ni-time { font-size: 10.5px; color: var(--text-muted, #8A8F98); margin-top: 4px; }
.pp-head { padding: 8px 10px; }
.pp-name { font-size: 13px; font-weight: 700; }
.pp-email { font-size: 11.5px; color: var(--text-muted, #8A8F98); margin-top: 1px; }
.avatar-btn { border: none; cursor: pointer; font-family: inherit; }
.logout-form { margin: 0; }

/* ---- Alert ---- */
.alert { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 11px; font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: rgba(143,175,43,.10); color: #5F7A17; border: 1px solid rgba(143,175,43,.25); }
.alert-danger  { background: rgba(217,37,68,.08);  color: #A81B33; border: 1px solid rgba(217,37,68,.20); }

/* ---- Toast ---- */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(10px);
    background: #16181D; color: #fff; padding: 11px 18px; border-radius: 999px;
    font-size: 13px; font-weight: 600; z-index: 200; opacity: 0;
    transition: opacity .2s ease, transform .2s ease;
    box-shadow: 0 12px 30px -8px rgba(0,0,0,.4);
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Form ---- */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }

/* Checkbox & radio harus dikecualikan dari `.field input{width:100%}`.
   Tanpa ini kotak centangnya ikut melebar sebaris penuh sehingga
   teksnya terdorong ke ujung kanan. */
.field input[type="checkbox"],
.field input[type="radio"] { width: auto; flex: none; }

/* Daftar pilihan bercentang (mis. scope token API) */
.check-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.check-row  { display: flex; align-items: center; gap: 10px;
              font-size: 13px; font-weight: 500; margin-bottom: 0; cursor: pointer; }
.check-row code { font-size: 11.5px; color: var(--brand-blue); }
.field input, .field select, .field textarea {
    width: 100%; padding: 11px 13px; border-radius: 10px;
    border: 1.5px solid var(--border, #E6E8EB); background: var(--surface-alt, #F7F8F9);
    font: inherit; font-size: 13.5px; color: var(--text-primary, #16181D);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--brand-blue, #00AEE6); background: #fff;
    box-shadow: 0 0 0 4px rgba(0,174,230,.12);
}
.field textarea { min-height: 88px; resize: vertical; }
.field-error { font-size: 11.5px; color: #D92544; font-weight: 600; margin-top: 5px; }
.field-hint  { font-size: 11.5px; color: var(--text-muted, #8A8F98); margin-top: 5px; }
.field input[aria-invalid=true] { border-color: #D92544; }
.check-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-secondary, #5B6169); }
.check-row input { width: 15px; height: 15px; accent-color: var(--brand-blue, #00AEE6); }

/* ---- Halaman auth ---- */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: #fff; }
.auth-brand { position: relative; overflow: hidden; padding: 48px 52px; display: flex; flex-direction: column; justify-content: space-between;
    background: linear-gradient(160deg, #F4FBFE 0%, #FBFDF6 50%, #FFFDF4 100%); }

/* Logo panel kiri.
   align-self WAJIB: .auth-brand adalah flex column tanpa align-items, jadi
   nilai bawaannya `stretch` — pada arah kolom, stretch berlaku ke LEBAR.
   Tanpa ini <img> ditarik selebar panel sementara tingginya terkunci,
   sehingga logo tampil gepeng.
   Ukuran dipatok lewat width (bukan height) karena logo ini lockup
   horizontal ber-rasio ~3.8:1 — dipatok tinggi 26px, taglinenya jadi
   setinggi 3px dan tidak terbaca. */
.auth-logo {
    align-self: flex-start;
    width: clamp(150px, 13vw, 190px);
    height: auto;
    display: block;
}

.auth-brand h1 { font-size: 33px; line-height: 1.16; font-weight: 800; letter-spacing: -.02em; }
.auth-brand p.lead { font-size: 14.5px; color: var(--text-secondary, #5B6169); margin-top: 14px; line-height: 1.6; max-width: 400px; }
.auth-feature-list { display: flex; flex-direction: column; gap: 13px; margin-top: 28px; }
.auth-feature { display: flex; align-items: center; gap: 12px; }
.auth-feature .f-ico { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    background: #fff; border: 1px solid var(--border, #E6E8EB); color: var(--brand-blue, #00AEE6); flex-shrink: 0; }
.auth-feature .f-ico svg { width: 16px; height: 16px; }
.auth-feature span { font-size: 13px; font-weight: 600; color: var(--text-secondary, #5B6169); }
.auth-foot-note { font-size: 11.5px; color: var(--text-muted, #8A8F98); }
.auth-form-panel { display: flex; align-items: center; justify-content: center; padding: 40px; }
.auth-card { width: 100%; max-width: 372px; }
.auth-card .eyebrow { font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--brand-blue, #00AEE6); margin-bottom: 9px; }
.auth-card h2 { font-size: 24px; font-weight: 800; margin-bottom: 5px; }
.auth-card .sub { font-size: 13px; color: var(--text-secondary, #5B6169); margin-bottom: 24px; }
.auth-card .btn { width: 100%; justify-content: center; padding: 12.5px; font-size: 13.5px; }
.auth-links { display: flex; justify-content: space-between; align-items: center; margin: 16px 0 20px; }
.auth-links a { font-size: 12.5px; font-weight: 700; color: var(--brand-blue, #00AEE6); text-decoration: none; }
.auth-note { text-align: center; font-size: 12.5px; color: var(--text-secondary, #5B6169); margin-top: 20px; }
@media (max-width: 900px) { .auth-shell { grid-template-columns: 1fr; } .auth-brand { display: none; } }

/* ---- Pager ---- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; margin-top: 4px; border-top: 1px solid var(--border-soft, #F0F0F3); }
.pager-info { font-size: 12px; color: var(--text-muted, #8A8F98); font-weight: 600; }
.pager-controls { display: flex; gap: 5px; }
.pager-controls a, .pager-controls span {
    min-width: 32px; height: 32px; padding: 0 9px; border-radius: 8px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12.5px; font-weight: 700; text-decoration: none;
    color: var(--text-secondary, #5B6169); border: 1px solid var(--border, #E6E8EB); background: #fff;
}
.pager-controls a:hover { border-color: #C9CDD2; }
.pager-controls .is-current { background: #16181D; color: #fff; border-color: #16181D; }
.pager-controls .is-disabled { opacity: .4; pointer-events: none; }

/* ---- Utilitas kecil ---- */
.empty-note { font-size: 12.5px; color: var(--text-muted, #8A8F98); text-align: center; padding: 26px 10px; }

/* ---- Kelas tambahan yang dipakai halaman analytics ---- */
.card-fill { display: flex; flex-direction: column; }
.chart-box.h-160 { height: 160px; }
.chart-box.h-300 { height: 300px; }

/* Strip statistik ringkas (Audience) */
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md, 14px); overflow: hidden; }
.stat-cell { padding: 14px 16px; border-right: 1px solid var(--border); }
.stat-cell:last-child { border-right: none; }
.sc-label { font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); }
.sc-value { font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin: 5px 0 3px; }
.sc-value.is-ok { color: #6E8F1E; }
.sc-note { font-size: 11px; color: var(--text-muted); }

/* Funnel / perjalanan audiens */
.funnel { display: flex; flex-direction: column; gap: 14px; }
.funnel-row { display: flex; flex-direction: column; gap: 5px; }
.fr-head { display: flex; align-items: baseline; justify-content: space-between; }
.fr-step { font-size: 12.5px; font-weight: 600; color: var(--text-primary); }
.fr-value { font-size: 13.5px; font-weight: 700; }
.fr-bar { height: 7px; border-radius: 4px; background: var(--surface-alt, #F7F8F9); overflow: hidden; }
.fr-bar > span { display: block; height: 100%; border-radius: 4px; }
.fr-foot { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); }
.fr-conv { font-weight: 600; }
.branch-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.sr-label { font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.card-foot-note { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px;
    border-top: 1px solid var(--border); font-size: 11px; color: var(--text-muted); }

/* Baris ringkas nama–keterangan–nilai */
.mini-list { display: flex; flex-direction: column; }
.mini-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.mini-row:last-child { border-bottom: none; padding-bottom: 0; }
.mr-name { font-size: 12.5px; font-weight: 600; color: var(--text-primary); flex-shrink: 0; }
.mr-meta { flex: 1; font-size: 11px; color: var(--text-muted); text-align: right; }
.mr-value { font-size: 12.5px; font-weight: 700; min-width: 52px; text-align: right; }

/* Daftar lokasi dengan bar */
.loc-row { margin-bottom: 13px; }
.loc-row:last-child { margin-bottom: 0; }
.lr-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; }
.lr-city { font-size: 12.5px; font-weight: 600; }
.lr-meta { font-size: 12px; font-weight: 700; }
.lr-up { color: #6E8F1E; font-size: 10.5px; }
.lr-down { color: #D92544; font-size: 10.5px; }

/* Avatar akun di tabel */
.acct-avatar { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 10.5px; font-weight: 700; color: #fff; background: #16181D; }

/* Baris ranking (dashboard) */
.rank-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.rank-row:last-child { border-bottom: none; padding-bottom: 0; }
.rank-body { flex: 1; min-width: 0; }
.rank-title { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.rank-value { font-size: 12.5px; font-weight: 700; }

/* Mockup ponsel (preview landing page) */
.phone-mock { max-width: 280px; margin: 0 auto; background: #fff; border: 1px solid var(--border);
    border-radius: 28px; padding: 24px 18px 20px; box-shadow: 0 14px 32px -12px rgba(15,20,14,.2); }
.phone-avatar { width: 54px; height: 54px; border-radius: 50%; margin: 0 auto 10px; display: flex;
    align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 17px; background: #16181D; }
.phone-handle { text-align: center; font-weight: 700; font-size: 13px; }
.phone-bio { text-align: center; font-size: 11px; color: var(--text-muted); margin: 4px 0 16px; line-height: 1.5; }
.phone-link { display: flex; align-items: center; gap: 9px; padding: 11px 13px; border-radius: 12px;
    border: 1px solid var(--border); margin-bottom: 8px; }
.phone-link .pl-num { width: 19px; height: 19px; border-radius: 6px; flex-shrink: 0; display: flex;
    align-items: center; justify-content: center; font-size: 9.5px; font-weight: 700; color: #fff; background: var(--brand-blue); }
.phone-link .pl-label { flex: 1; min-width: 0; font-size: 11.5px; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phone-link .pl-clicks { font-size: 9.5px; font-weight: 700; color: var(--brand-blue);
    background: rgba(0,174,230,.09); padding: 3px 7px; border-radius: 999px; flex-shrink: 0; }
.phone-foot { text-align: center; margin-top: 14px; font-size: 9.5px; font-weight: 600;
    letter-spacing: .04em; color: var(--text-muted); }

/* Penjelasan mekanisme bernomor */
.mech-steps { display: flex; flex-direction: column; gap: 13px; }
.mech-step { display: flex; gap: 11px; }
.mech-step .ms-num { width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; display: flex;
    align-items: center; justify-content: center; font-size: 11px; font-weight: 700;
    background: rgba(0,174,230,.09); color: var(--brand-blue); }
.mech-step .ms-text { font-size: 12.5px; color: var(--text-secondary); line-height: 1.55; padding-top: 2px; }
.mech-step .ms-text b { color: var(--text-primary); font-weight: 700; }

@media (max-width: 1100px) { .stat-strip { grid-template-columns: repeat(2, 1fr); }
    .stat-cell { border-bottom: 1px solid var(--border); } }

/* Varian seg-control berbasis <a> (navigasi via URL, bukan JS state) */
.seg-control a {
    display: inline-flex; align-items: center;
    border: none; background: transparent; padding: 5px 11px;
    font-size: 12px; font-weight: 500; color: var(--text-secondary);
    border-radius: calc(var(--radius-sm) - 2px); text-decoration: none; white-space: nowrap;
}
.seg-control a.active {
    background: var(--surface); color: var(--text-primary);
    box-shadow: var(--shadow-sm); font-weight: 600;
}

/* Grid item secara bawaan punya min-width:auto sehingga tidak bisa
   menyusut lebih kecil dari kontennya — membuat canvas chart meluber
   keluar kartu. min-width:0 mengembalikan perilaku yang diharapkan. */
.grid > * { min-width: 0; }
.chart-box { position: relative; width: 100%; }
.chart-box > canvas { max-width: 100%; }

/* Pager memakai <a> (tautan sungguhan) sementara CSS template menargetkan
   <button> — samakan tampilannya. */
a.pager-btn{
  display:inline-flex; align-items:center; justify-content:center;
  text-decoration:none;
}
span.pager-btn{
  display:inline-flex; align-items:center; justify-content:center;
  cursor:not-allowed;
}

/* Modal dirender server dan disembunyikan lewat atribut [hidden].
   Tanpa aturan ini `.modal-overlay{display:flex}` mengalahkan gaya bawaan
   browser untuk [hidden], sehingga modal tampil permanen menutupi halaman.
   Template tidak kena karena overlay-nya dibuat on-the-fly lewat JS. */
.modal-overlay[hidden]{ display: none !important; }

/* ============================================================
   INFOGRAPHIC — laporan presentasi, sengaja beda dari tampilan
   dashboard kerja: lebih lega, tipografi lebih besar, satu "sheet"
   utuh yang jadi target html2canvas saat diekspor.
   ============================================================ */
.infographic-sheet{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px 40px 28px;
  max-width: 900px;
  margin: 20px auto 40px;
  box-shadow: 0 24px 60px -30px rgba(15,20,14,.18);
}
.infographic-header{
  display:flex; align-items:center; gap:18px;
  padding-bottom:22px; margin-bottom:24px;
  border-bottom: 2px solid var(--brand-navy);
}
.infographic-logo{ height:36px; width:auto; flex-shrink:0; }
.infographic-eyebrow{
  font-size:11px; font-weight:800; letter-spacing:.08em; text-transform:uppercase;
  color: var(--brand-blue); margin-bottom:4px;
}
.infographic-header h1{
  font-family: var(--font-display, inherit); font-size:22px; font-weight:800;
  letter-spacing:-.01em; color: var(--text-primary); line-height:1.25;
}
.infographic-period{ font-size:12.5px; color: var(--text-muted); margin-top:4px; }

.infographic-kpis{
  /* Selalu 7 kartu (6 metrik + Post Terbit) — kolom TETAP 7, bukan
     auto-fit, supaya selalu satu baris di desktop (auto-fit dengan
     minmax 110px cuma muat 6 kolom di lebar .infographic-sheet, jadi
     kartu ke-7 turun ke baris baru). Dilonggarkan lagi di mobile lewat
     media query di bawah. */
  display:grid; grid-template-columns:repeat(7, minmax(0,1fr));
  gap:10px; margin-bottom:26px;
}
.infographic-kpi{
  text-align:center; padding:14px 6px;
  background: var(--surface-alt); border-radius:14px;
  min-width:0;
}
.infographic-kpi-ico{
  width:24px; height:24px; border-radius:50%; margin:0 auto 6px;
  display:flex; align-items:center; justify-content:center;
  background: rgba(26,111,205,.1); color: var(--brand-blue);
}
.infographic-kpi-ico svg{ width:12px; height:12px; }
.infographic-kpi .v{
  font-family: var(--font-display, inherit); font-size:18px; font-weight:800;
  color: var(--text-primary); line-height:1.15;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.infographic-kpi .l{
  font-size:10px; color: var(--text-muted); margin-top:3px; text-transform:uppercase; letter-spacing:.02em;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.infographic-kpi .tag-delta{ margin-top:6px; }

.infographic-insights{
  background: linear-gradient(135deg, rgba(26,111,205,.06), rgba(124,58,237,.05));
  border: 1px solid rgba(26,111,205,.15);
  border-radius:14px; padding:18px 20px; margin-bottom:26px;
}
.infographic-insights h2{
  font-size:13px; font-weight:800; color: var(--brand-blue);
  display:flex; align-items:center; gap:6px; margin-bottom:10px;
}
.infographic-insights h2 svg{ width:15px; height:15px; }
.infographic-insights ul{ margin:0; padding:0; list-style:none; display:flex; flex-direction:column; gap:10px; }
.infographic-insights li{
  font-size:13px; color: var(--text-secondary); line-height:1.55;
  display:flex; align-items:flex-start; gap:9px;
}
.infographic-insight-ico{
  flex-shrink:0; width:22px; height:22px; border-radius:50%; margin-top:1px;
  display:flex; align-items:center; justify-content:center;
  background: rgba(26,111,205,.12); color: var(--brand-blue);
}
.infographic-insight-ico svg{ width:11px; height:11px; }

.infographic-card-title{ font-size:13.5px; font-weight:700; color: var(--text-primary); margin-bottom:12px; }

.infographic-leaderboard{ display:flex; flex-direction:column; gap:12px; }
.infographic-lb-row{ display:flex; align-items:center; gap:10px; }
.infographic-lb-meta{ flex:1; min-width:0; }
.infographic-lb-meta .n{ font-size:12.5px; font-weight:600; color: var(--text-primary); margin-bottom:4px;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.infographic-lb-value{ font-size:12.5px; font-weight:700; color: var(--text-primary); flex-shrink:0; }

.infographic-audience-chips{ display:flex; flex-direction:column; gap:14px; }
.infographic-audience-chip{ display:flex; align-items:center; gap:12px; padding:12px; background: var(--surface-alt); border-radius:12px; }
.infographic-audience-chip-ico{
  width:34px; height:34px; border-radius:10px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  background: rgba(124,58,237,.1); color:#7c3aed;
}
.infographic-audience-chip .l{ font-size:10.5px; color: var(--text-muted); text-transform:uppercase; letter-spacing:.04em; }
.infographic-audience-chip .v{ font-size:14px; font-weight:700; color: var(--text-primary); margin-top:1px; }
.infographic-audience-chip .s{ font-size:11.5px; color: var(--text-muted); margin-top:1px; }

@media print{
  .no-print{ display:none !important; }
}

.infographic-footer{
  display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px;
  margin-top:28px; padding-top:16px; border-top:1px solid var(--border);
  font-size:11.5px; color: var(--text-muted);
}
.infographic-powered{ font-weight:700; color: var(--text-secondary); }
.infographic-preview-note{ display:flex; align-items:center; gap:6px; color: var(--brand-blue); font-weight:600; }
.infographic-preview-note svg{ width:13px; height:13px; flex-shrink:0; }

@media (max-width: 640px){
  .infographic-sheet{ padding:24px 18px 20px; }
  .infographic-header{ flex-direction:column; align-items:flex-start; }
  /* 7 kolom tetap kepaksa/kepotong di layar sempit — kembali ke
     auto-fit supaya boleh jadi beberapa baris seperti sebelumnya. */
  .infographic-kpis{ grid-template-columns:repeat(auto-fit, minmax(90px,1fr)); }
}
