/* ===== Panel Admin Ronsen ===== */
body.adm { background: #F2F5FA; }
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: radial-gradient(900px 600px at 70% 10%, #18263F, var(--night) 70%); }
.login-card { width: 100%; max-width: 420px; background: #fff; border-radius: 26px; padding: 34px 30px; box-shadow: var(--shadow-lg); }
.login-card h1 { font-family: var(--f-serif); font-weight: 400; font-size: 38px; margin: 18px 0 6px; }
.login-card form { display: grid; gap: 16px; margin-top: 24px; }
.login-card .err { color: var(--crit); font-size: 14px; min-height: 20px; font-weight: 600; }

.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--night); color: #fff; padding: 22px 16px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 26px; }
.menu { display: grid; gap: 4px; }
.menu button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 0; background: transparent; color: rgba(226,230,238,.7); font-weight: 600; font-size: 14.5px; cursor: pointer; text-align: left; }
.menu button:hover { background: rgba(255,255,255,.06); color: #fff; }
.menu button.on { background: rgba(143,208,227,.12); color: #fff; box-shadow: inset 2px 0 0 var(--cyan); }
.menu svg { width: 18px; height: 18px; flex: none; }
.side-foot { margin-top: auto; font-size: 13px; color: rgba(226,230,238,.6); display: grid; gap: 10px; }
.side-foot b { color: #fff; }
.main { padding: 28px clamp(16px, 3vw, 40px) 100px; min-width: 0; }
.page-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-h h1 { font-family: var(--f-serif); font-weight: 400; font-size: clamp(32px, 4vw, 44px); line-height: 1; }
.page-h p { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }
.tools { display: flex; gap: 8px; flex-wrap: wrap; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 18px 20px; border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); }
.kpi small { font: 600 12px var(--f-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.kpi b { display: block; font-family: var(--f-serif); font-weight: 400; font-size: 42px; line-height: 1.05; margin-top: 6px; }
.kpi span { font-size: 12.5px; color: var(--muted); }
.kpi.dark { background: var(--night); color: #fff; box-shadow: none; }
.kpi.dark small, .kpi.dark span { color: rgba(205,214,228,.6); }
.kpi.gold b { color: #B45309; }

.panels { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; }
.panel { background: #fff; border-radius: 20px; padding: 22px; box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); min-width: 0; }
.panel h3 { font-size: 16px; margin-bottom: 4px; }
.panel .sub { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.hbar { display: grid; grid-template-columns: 120px 1fr 34px; gap: 10px; align-items: center; font-size: 13.5px; font-weight: 600; margin-bottom: 10px; }
.hbar em { font: 700 12.5px var(--f-mono); font-style: normal; text-align: right; }
.hbar .track { height: 10px; border-radius: 99px; background: #EEF2F7; overflow: hidden; }
.hbar .track i { display: block; height: 100%; border-radius: 99px; }
.list-mini { display: grid; gap: 8px; }
.list-mini div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 9px 12px; border-radius: 10px; background: var(--paper); }
.list-mini b { font-family: var(--f-mono); font-size: 13px; }
.empty { padding: 30px; text-align: center; color: var(--muted); font-size: 14px; }

/* Tabel */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filters .input { min-height: 44px; padding: 10px 14px; font-size: 14px; width: auto; }
.filters .search { flex: 1; min-width: 200px; }
.tbl-wrap { background: #fff; border-radius: 20px; box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); overflow: hidden; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font: 600 10.5px var(--f-mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding: 14px 16px; background: #F8FAFD; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { cursor: pointer; transition: background .15s; }
.tbl tbody tr:hover { background: #F8FAFD; }
.tbl .biz b { display: block; }
.tbl .biz span { font-size: 12.5px; color: var(--muted); }
.ikb { display: inline-flex; align-items: center; gap: 8px; }
.ikb b { font: 700 15px var(--f-mono); }
.lead { display: inline-block; font: 700 10.5px var(--f-mono); letter-spacing: .1em; padding: 4px 9px; border-radius: 999px; text-transform: uppercase; }
.lead-hot { background: #FEE2E2; color: #B91C1C; }
.lead-warm { background: #FEF3C7; color: #A16207; }
.lead-cold { background: #E0F2FE; color: #0369A1; }
.fs { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #EEF2F7; color: var(--ink-2); white-space: nowrap; }
.fs-klien { background: #DCFCE7; color: #166534; } .fs-sesi, .fs-proposal { background: #EDE9FE; color: #5B21B6; } .fs-tidak { background: #F1F5F9; color: #94A3B8; }
.code { font: 600 14px var(--f-code); letter-spacing: .06em; white-space: nowrap; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 0; background: var(--paper); cursor: pointer; display: inline-grid; place-items: center; color: var(--ink-2); }
.icon-btn:hover { background: #E2E8F0; }
.icon-btn.danger:hover { background: #FEE2E2; color: var(--crit); }
.cards-m { display: none; }

/* Token */
.tok-form { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr 1.4fr auto; gap: 12px; align-items: end; }
.tok-form .input { min-height: 46px; padding: 10px 14px; font-size: 14.5px; }
.created { margin-top: 16px; padding: 16px; border-radius: 16px; background: #F0FDF4; box-shadow: inset 0 0 0 1px #BBF7D0; }
.created .codes { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.created .codes span { background: #fff; padding: 6px 12px; border-radius: 8px; box-shadow: inset 0 0 0 1px #BBF7D0; }
.use-bar { width: 90px; height: 6px; border-radius: 99px; background: #EEF2F7; overflow: hidden; display: inline-block; vertical-align: middle; margin-left: 8px; }
.use-bar i { display: block; height: 100%; background: var(--cyan-2); }

/* Detail */
.detail { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.detail .rp { padding: 0; max-width: none; }
.detail .rp-cover { margin-top: 0; }
.crm { position: sticky; top: 20px; display: grid; gap: 14px; }
.crm .panel { padding: 20px; }
.crm .field { margin-bottom: 12px; }
.crm .input { min-height: 44px; padding: 10px 12px; font-size: 14px; }
.contact { display: grid; gap: 8px; font-size: 14px; }
.contact a { color: var(--cyan-2); font-weight: 700; text-decoration: none; word-break: break-all; }
.back { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer; font-weight: 700; color: var(--muted); padding: 0; margin-bottom: 14px; }
.back:hover { color: var(--ink); }

.mob-nav { display: none; }

@media (max-width: 1180px) {
  .detail { grid-template-columns: 1fr; }
  .crm { position: static; grid-template-columns: 1fr 1fr; }
  .tok-form { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mob-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--night); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); justify-content: space-around; }
  .mob-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: none; color: rgba(226,230,238,.6); font-size: 11px; font-weight: 700; padding: 6px; cursor: pointer; }
  .mob-nav button.on { color: var(--gold-2); }
  .mob-nav svg { width: 20px; height: 20px; }
  .mtop { display: flex !important; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .panels { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .tbl-wrap.resp table { display: none; }
  .tbl-wrap.resp .cards-m { display: grid; }
  .cards-m { gap: 0; }
  .cm { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; cursor: pointer; }
  .cm:last-child { border-bottom: 0; }
  .cm-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
  .cm-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 12.5px; color: var(--muted); }
  .crm { grid-template-columns: 1fr; }
  .tok-form { grid-template-columns: 1fr 1fr; }
  .tok-form .full-m { grid-column: 1 / -1; }
  .kpi b { font-size: 34px; }
  .hbar { grid-template-columns: 96px 1fr 30px; }
  .filters .input { flex: 1 1 140px; }
}
.mtop { display: none; align-items: center; justify-content: space-between; margin: -10px 0 18px; }

/* ===== Artikel ===== */
.at-list { display: grid; gap: 10px; }
.at-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 12px 16px 12px 12px; background: #fff; border-radius: 18px; box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); cursor: pointer; transition: box-shadow .2s, transform .2s; }
.at-row:hover { box-shadow: var(--shadow), inset 0 0 0 1px var(--line-2); }
.at-thumb { width: 112px; border-radius: 12px; aspect-ratio: 4 / 3; }
.at-thumb .ac-fig { top: 10%; bottom: -50%; }
.at-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.at-main b { font-size: 16px; line-height: 1.35; }
.at-main .muted { font-size: 12.5px; }
.at-side { display: flex; align-items: center; gap: 14px; }
.at-acts { display: flex; gap: 6px; }

.ed { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.ed-main { background: #fff; border-radius: 20px; box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line); overflow: hidden; }
.ed-title { width: 100%; border: 0; outline: 0; padding: 26px 28px 14px; font: 400 clamp(28px, 3vw, 40px)/1.1 var(--f-serif); color: var(--ink); background: transparent; }
.ed-title::placeholder { color: #B6C2D3; }
.ed-tb { position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 8px 20px; background: rgba(248,250,253,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ed-tb button { min-width: 36px; height: 34px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font: 600 13px var(--f-sans); cursor: pointer; }
.ed-tb button:hover { background: #E8EEF6; color: var(--ink); }
.ed-tb button[data-cmd="cta"] { color: #A16207; background: #FFF7E6; }
.ed-tb .sep { width: 1px; height: 20px; background: var(--line-2); margin: 0 4px; }
.ed-body { min-height: 460px; padding: 26px 28px 40px; outline: 0; font-size: 17px; }
.ed-body:empty::before { content: 'Mulai menulis isi artikel di sini…'; color: #B6C2D3; }
.ed-body > p:first-child::first-letter { float: none; font: inherit; color: inherit; padding: 0; }
.ed-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 28px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); background: #FAFBFD; }
.ed-side { position: sticky; top: 20px; }
.ed-side .panel { display: grid; gap: 14px; }
.ed-side .input { min-height: 44px; padding: 10px 12px; font-size: 14px; }
.ed-side textarea.input { min-height: 90px; }
.ed-cover { border-radius: 14px; aspect-ratio: 16 / 9; }
.ed-cover .ac-fig { top: 10%; bottom: -45%; }
.ed-pub { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: #F0FDF4; box-shadow: inset 0 0 0 1px #BBF7D0; cursor: pointer; }
.ed-pub input { width: 20px; height: 20px; accent-color: #16A34A; }
.ed-pub span { display: flex; flex-direction: column; }
.ed-pub small { color: var(--muted); font-size: 12px; }

@media (max-width: 1100px) { .ed { grid-template-columns: 1fr; } .ed-side { position: static; } }
@media (max-width: 720px) {
  .at-row { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 10px; }
  .at-thumb { width: 76px; }
  .at-side { grid-column: 1 / -1; justify-content: space-between; }
  .ed-title { padding: 20px 18px 12px; }
  .ed-tb { padding: 8px 10px; }
  .ed-body { padding: 20px 18px 32px; min-height: 360px; }
  .ed-foot { padding: 12px 18px; }
}
