/* Message — Business Messaging Platform. UI SaaS modern & bersih (bagian 47). */
:root{
  --bg:#f4f6fb; --surface:#ffffff; --ink:#1a2233; --muted:#67728a; --line:#e6e9f2;
  --brand:#2563eb; --brand-d:#1d4ed8; --green:#16a34a; --violet:#7c3aed; --slate:#475569;
  --danger:#dc2626; --warn:#d97706; --ok:#16a34a; --radius:14px;
  --shadow:0 1px 2px rgba(16,24,40,.05),0 8px 24px rgba(16,24,40,.06);
  --sidebar:248px;
}
*{box-sizing:border-box}
html,body{margin:0}
body{font-family:system-ui,-apple-system,"Segoe UI",Roboto,Inter,sans-serif;background:var(--bg);color:var(--ink);font-size:14px;line-height:1.55}
a{color:var(--brand);text-decoration:none}
.muted{color:var(--muted)}
code{background:#eef1f7;padding:.1rem .35rem;border-radius:6px}

/* ---------- Brand ---------- */
.brand-mark{width:38px;height:38px;border-radius:10px;background:linear-gradient(135deg,var(--brand),var(--violet));color:#fff;display:grid;place-items:center;font-weight:800;font-size:20px}
.brand-text{display:flex;flex-direction:column;line-height:1.15}
.brand-text strong{font-size:16px}
.brand-text span{font-size:11px;color:var(--muted)}

/* ---------- Auth ---------- */
.auth-body{min-height:100vh;display:grid;place-items:center;background:radial-gradient(1200px 600px at 20% -10%,#e7edff,transparent),var(--bg)}
.auth-wrap{width:100%;max-width:460px;padding:1.5rem}
.auth-card-wide{max-width:560px}
.auth-brand{display:flex;gap:.7rem;align-items:center;justify-content:center;margin-bottom:1.1rem}
.auth-card{background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);padding:1.8rem;margin:0 auto;max-width:560px}
.auth-card h1{margin:0 0 .2rem;font-size:1.5rem}
.auth-alt{text-align:center;margin-top:1rem;color:var(--muted)}
.auth-foot{text-align:center;color:var(--muted);font-size:12px;margin-top:1.1rem}

/* ---------- Form ---------- */
.form{display:flex;flex-direction:column;gap:.85rem;margin-top:1rem}
.form label{display:flex;flex-direction:column;gap:.35rem;font-weight:600;font-size:13px}
.form input[type=text],.form input[type=email],.form input[type=password]{
  padding:.7rem .8rem;border:1px solid var(--line);border-radius:10px;font-size:14px;background:#fff;transition:border .15s,box-shadow .15s}
.form input:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px rgba(37,99,235,.14)}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:.85rem}
.check{flex-direction:row!important;align-items:center;gap:.5rem;font-weight:500}
.check input{width:16px;height:16px}
.row-between{display:flex;justify-content:flex-end}
.link{font-size:13px}

/* ---------- Buttons ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;padding:.65rem 1rem;border-radius:10px;border:1px solid var(--line);background:#fff;color:var(--ink);font-weight:600;cursor:pointer;font-size:14px}
.btn:hover{background:#f6f8fc}
.btn-primary{background:var(--brand);border-color:var(--brand);color:#fff}
.btn-primary:hover{background:var(--brand-d)}
.btn-block{width:100%}

/* ---------- Alerts ---------- */
.alert{padding:.7rem .9rem;border-radius:10px;margin-bottom:.9rem;font-size:13px;border:1px solid transparent}
.alert-success{background:#e9f9ef;color:#0f7a37;border-color:#bbe8cd}
.alert-danger{background:#fdeaea;color:#b42318;border-color:#f6cccc}
.alert-warn{background:#fff5e6;color:#a15c07;border-color:#f6dcae}
.alert-info{background:#eaf1ff;color:#1d4ed8;border-color:#c7d8ff}

/* ---------- App shell ---------- */
.app-shell{display:flex;min-height:100vh}
.sidebar{width:var(--sidebar);background:#0f172a;color:#cbd5e1;display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0;height:100vh;z-index:40}
.side-brand{display:flex;gap:.6rem;align-items:center;padding:1.1rem 1.1rem;border-bottom:1px solid rgba(255,255,255,.08)}
.side-brand .brand-text strong{color:#fff}
.side-nav{flex:1;overflow-y:auto;padding:.7rem .6rem;display:flex;flex-direction:column;gap:.15rem}
.nav-link{display:flex;align-items:center;gap:.7rem;padding:.62rem .75rem;border-radius:10px;color:#cbd5e1;font-weight:600;font-size:13.5px;background:none;border:0;width:100%;text-align:left;cursor:pointer}
.nav-link .ni{width:20px;display:inline-grid;place-items:center;font-size:15px;opacity:.85}
.nav-link:hover{background:rgba(255,255,255,.06);color:#fff}
.nav-link.active{background:var(--brand);color:#fff}
.nav-sep{padding:.6rem .8rem .3rem;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:#64748b}
.side-logout{padding:.6rem;border-top:1px solid rgba(255,255,255,.08)}
.nav-logout:hover{background:rgba(220,38,38,.15);color:#fff}

.main{flex:1;margin-left:var(--sidebar);display:flex;flex-direction:column;min-width:0}
.topbar{height:62px;background:var(--surface);border-bottom:1px solid var(--line);display:flex;align-items:center;gap:1rem;padding:0 1.2rem;position:sticky;top:0;z-index:30}
.topbar-title{font-weight:700;font-size:1.05rem}
.topbar-right{margin-left:auto}
.hamburger{display:none;background:none;border:0;font-size:22px;cursor:pointer;color:var(--ink)}
.user-chip{display:flex;align-items:center;gap:.6rem}
.avatar{width:36px;height:36px;border-radius:50%;background:linear-gradient(135deg,var(--brand),var(--violet));color:#fff;display:grid;place-items:center;font-weight:700}
.user-meta{display:flex;flex-direction:column;line-height:1.15}
.user-meta strong{font-size:13px}
.user-meta span{font-size:11px;color:var(--muted)}
.content{padding:1.4rem 1.6rem;max-width:1200px;width:100%}

/* ---------- Dashboard ---------- */
.page-head{display:flex;justify-content:space-between;align-items:flex-end;margin-bottom:1.2rem}
.page-head h1{margin:0 0 .15rem;font-size:1.5rem}
.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:1rem;margin-bottom:1.3rem}
.stat-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:1.1rem 1.2rem;box-shadow:var(--shadow);position:relative;overflow:hidden}
.stat-card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--brand)}
.stat-card.accent-green::before{background:var(--green)}
.stat-card.accent-violet::before{background:var(--violet)}
.stat-card.accent-slate::before{background:var(--slate)}
.stat-label{font-size:12.5px;color:var(--muted);font-weight:600}
.stat-value{font-size:1.9rem;font-weight:800;margin:.25rem 0}
.stat-unit{font-size:.85rem;font-weight:600;color:var(--muted)}
.stat-action{font-size:12.5px;font-weight:600}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);margin-bottom:1.2rem}
.card-head{padding:1rem 1.2rem;border-bottom:1px solid var(--line)}
.card-head h3{margin:0;font-size:1rem}
.card-body{padding:1.2rem}
.empty-chart{height:180px;display:grid;place-items:center;border:1.5px dashed var(--line);border-radius:10px}
.note-strip{background:#eef4ff;border:1px solid #d3e0ff;border-radius:12px;padding:.9rem 1.1rem;color:#1e40af;font-size:13px}

/* ---------- Errors ---------- */
.error-box{background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);padding:2rem;text-align:center}
.error-code{font-size:3rem;font-weight:800;color:var(--brand)}
.error-detail{text-align:left;background:#fbeaea;color:#b42318;padding:.7rem;border-radius:8px;overflow:auto;font-size:12px}

/* ---------- Responsive ---------- */
@media (max-width:960px){
  .sidebar{transform:translateX(-100%);transition:transform .2s}
  .sidebar.open{transform:none;box-shadow:0 0 40px rgba(0,0,0,.35)}
  .main{margin-left:0}
  .hamburger{display:block}
}
@media (max-width:560px){
  .grid-2{grid-template-columns:1fr}
  .content{padding:1rem}
  .user-meta{display:none}
}

/* ---------- Fase 2: tabel, modal, filter, kartu ---------- */
.head-actions{display:flex;gap:.5rem;flex-wrap:wrap}
.filter-bar{display:flex;gap:.5rem;margin-bottom:1rem;flex-wrap:wrap}
.filter-bar input[type=text],.filter-bar select{padding:.55rem .7rem;border:1px solid var(--line);border-radius:9px;background:#fff;font-size:14px}
.filter-bar input[type=text]{flex:1;min-width:180px}
.table-actions{margin-bottom:.6rem}
.table-wrap{overflow-x:auto}
.table{width:100%;border-collapse:collapse;font-size:13.5px}
.table th,.table td{padding:.65rem .8rem;text-align:left;border-bottom:1px solid var(--line);vertical-align:middle}
.table th{background:#f8fafc;font-size:12px;text-transform:uppercase;letter-spacing:.03em;color:var(--muted)}
.table tbody tr:hover{background:#f8fbff}
.table td.actions,.table td.mono{white-space:nowrap}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.pill{display:inline-block;background:#eef2ff;color:#4338ca;border-radius:999px;padding:.15rem .55rem;font-size:11.5px;font-weight:600}
.empty-row{padding:1.6rem;text-align:center;color:var(--muted)}
.btn-sm{padding:.4rem .6rem;font-size:12.5px}
.btn-danger{background:var(--danger);border-color:var(--danger);color:#fff}
.btn-danger:hover{filter:brightness(.94)}
.btn:disabled{opacity:.5;cursor:not-allowed}

.pagination{display:flex;gap:.35rem;margin-top:1rem;flex-wrap:wrap}
.pagination .page{padding:.4rem .7rem;border:1px solid var(--line);border-radius:8px;background:#fff;font-weight:600;font-size:13px}
.pagination .page.active{background:var(--brand);color:#fff;border-color:var(--brand)}

/* Modal */
.modal{position:fixed;inset:0;background:rgba(15,23,42,.5);display:flex;align-items:flex-start;justify-content:center;padding:4vh 1rem;z-index:60;overflow-y:auto}
.modal[hidden]{display:none}
.modal-card{background:#fff;border-radius:16px;width:100%;max-width:560px;box-shadow:0 20px 60px rgba(0,0,0,.3)}
.modal-head{display:flex;justify-content:space-between;align-items:center;padding:1rem 1.2rem;border-bottom:1px solid var(--line)}
.modal-head h3{margin:0;font-size:1.05rem}
.modal-x{background:none;border:0;font-size:1.5rem;cursor:pointer;color:var(--muted);line-height:1}
.modal-card form{padding:1.2rem}
.modal-card .form{padding:0}
.modal-card label{display:flex;flex-direction:column;gap:.3rem;font-weight:600;font-size:13px;margin-bottom:.7rem}
.modal-card input[type=text],.modal-card input[type=email],.modal-card input[type=password],.modal-card input[type=file]{padding:.6rem .7rem;border:1px solid var(--line);border-radius:9px;font-size:14px}
.modal-foot{display:flex;justify-content:flex-end;gap:.5rem;margin-top:.6rem}
.check-list{max-height:300px;overflow-y:auto;border:1px solid var(--line);border-radius:10px;padding:.5rem}
.check-list .check{padding:.35rem;border-radius:7px}
.check-list .check:hover{background:#f6f8fc}

/* Kartu group & profil */
.card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:1rem}
.mini-card{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:1rem;box-shadow:var(--shadow)}
.mini-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:.4rem}
.mini-foot{display:flex;gap:.4rem;margin-top:.8rem;align-items:center}
.mini-foot form{display:inline}
.grid-cards{display:grid;grid-template-columns:1fr 1fr;gap:1.2rem}
.breadcrumb{color:var(--muted);font-size:13px;margin-bottom:.6rem}
.breadcrumb a{font-weight:600}
form{margin:0}
@media (max-width:760px){.grid-cards{grid-template-columns:1fr}}

/* ---------- Fase 3: top up, pembayaran, transaksi ---------- */
.tabs{display:flex;gap:.4rem;border-bottom:1px solid var(--line);margin-bottom:1.2rem}
.tab{background:none;border:0;padding:.7rem 1rem;font-weight:600;color:var(--muted);cursor:pointer;border-bottom:2px solid transparent}
.tab.active{color:var(--brand);border-bottom-color:var(--brand)}
.tab-panel{margin-bottom:1rem}
.price-card{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:1.2rem;box-shadow:var(--shadow);text-align:center}
.pc-name{font-weight:700;font-size:1.05rem}
.pc-qty{color:var(--muted);font-size:13px;margin:.2rem 0 .6rem}
.pc-price{font-size:1.6rem;font-weight:800;color:var(--brand)}
.pc-unit{color:var(--muted);font-size:12px;margin-bottom:.8rem}
.pc-method{width:100%;padding:.5rem;border:1px solid var(--line);border-radius:9px;margin-bottom:.5rem}
.num{text-align:right}
.badge{display:inline-block;padding:.2rem .55rem;border-radius:999px;font-size:11.5px;font-weight:700}
.badge-ok{background:#e9f9ef;color:#0f7a37}.badge-warn{background:#fff5e6;color:#a15c07}
.badge-danger{background:#fdeaea;color:#b42318}.badge-muted{background:#eef1f7;color:#64748b}
.pay-layout{display:grid;grid-template-columns:1.4fr 1fr;gap:1.2rem}
.pay-detail{text-align:center}.pay-amount{font-size:2rem;font-weight:800}
.pay-status{display:inline-block;margin-top:.3rem;padding:.2rem .7rem;border-radius:999px;font-weight:700;font-size:12px;background:#fff5e6;color:#a15c07}
.pay-status.status-paid{background:#e9f9ef;color:#0f7a37}
.qr-img{width:230px;height:230px;margin:1rem auto;display:block;border:1px solid var(--line);border-radius:12px;padding:.5rem;background:#fff}
.va-box{display:flex;align-items:center;gap:.6rem;justify-content:center;background:#f6f8fc;border:1px dashed var(--line);border-radius:10px;padding:.8rem;margin:.8rem 0}
.va-box strong{font-size:1.2rem;font-family:ui-monospace,monospace;letter-spacing:.05em}
.pay-actions{display:flex;gap:.5rem;margin-top:1rem;flex-wrap:wrap}
.kv{display:grid;grid-template-columns:auto 1fr;gap:.4rem 1rem;margin:0}
.kv dt{color:var(--muted);font-size:13px}.kv dd{margin:0;text-align:right;font-size:13px}
.result-wrap{max-width:460px;margin:3rem auto;text-align:center}
.result-icon{width:72px;height:72px;border-radius:50%;display:grid;place-items:center;font-size:2.4rem;margin:0 auto 1rem;color:#fff}
.result-icon.ok{background:var(--green)}.result-icon.cancel{background:var(--danger)}
@media (max-width:760px){.pay-layout{grid-template-columns:1fr}}

/* ---------- Fase 6: WhatsApp Personal ---------- */
.wa-card{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:1.1rem;box-shadow:var(--shadow)}
.wa-head{display:flex;justify-content:space-between;align-items:center;gap:.5rem}
.wa-dot{font-size:12px;font-weight:600;white-space:nowrap}
.wa-number{font-size:1.15rem;font-weight:700;font-family:ui-monospace,monospace;margin:.4rem 0 .1rem}
.wa-meta{color:var(--muted);font-size:12.5px;margin-top:.4rem}
.wa-actions{display:flex;gap:.4rem;margin-top:.9rem;flex-wrap:wrap}
.wa-actions form{display:inline}
.connect-wrap{display:grid;grid-template-columns:1.2fr 1fr;gap:1.2rem}
.connect-card .qr-img{width:260px;height:260px}
.wa-status{margin-top:.8rem;color:var(--muted);font-weight:600;display:flex;align-items:center;gap:.5rem;justify-content:center}
.spinner{width:16px;height:16px;border:2px solid var(--line);border-top-color:var(--brand);border-radius:50%;display:inline-block;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.steps{margin:0;padding-left:1.2rem;line-height:1.9}
@media (max-width:760px){.connect-wrap{grid-template-columns:1fr}}

/* ---------- Fase 7: Chat WhatsApp (UI original, familiar) ---------- */
.chat-shell{display:grid;grid-template-columns:320px 1fr;gap:0;height:calc(100vh - 62px - 2.8rem);border:1px solid var(--line);border-radius:14px;overflow:hidden;background:var(--surface)}
.chat-left{border-right:1px solid var(--line);display:flex;flex-direction:column;min-width:0}
.chat-left-head{padding:.7rem;border-bottom:1px solid var(--line);display:flex;flex-direction:column;gap:.5rem}
.sess-switch,#chatSearch{padding:.5rem .6rem;border:1px solid var(--line);border-radius:9px;font-size:13px;width:100%}
.chat-list{flex:1;overflow-y:auto}
.chat-loading{padding:1.2rem;color:var(--muted);text-align:center;font-size:13px}
.chat-item{display:flex;gap:.6rem;padding:.65rem .7rem;cursor:pointer;border-bottom:1px solid #f1f3f8}
.chat-item:hover{background:#f6f8fc}.chat-item.active{background:#eaf1ff}
.ci-avatar,.conv-avatar{width:40px;height:40px;border-radius:50%;background:linear-gradient(135deg,var(--brand),var(--violet));color:#fff;display:grid;place-items:center;font-weight:700;flex-shrink:0}
.ci-body{min-width:0;flex:1}
.ci-top{display:flex;justify-content:space-between;gap:.5rem}
.ci-top strong{font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ci-top span{font-size:11px;color:var(--muted);flex-shrink:0}
.ci-last{font-size:12.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-main{display:flex;flex-direction:column;min-width:0;background:#f5f6fa}
.chat-empty{flex:1;display:grid;place-items:center;text-align:center}
.chat-empty-icon{font-size:3rem;color:var(--line)}
.chat-conv{flex:1;display:flex;flex-direction:column;min-height:0}
.conv-head{display:flex;align-items:center;gap:.7rem;padding:.7rem 1rem;background:var(--surface);border-bottom:1px solid var(--line)}
.conv-body{flex:1;overflow-y:auto;padding:1rem;display:flex;flex-direction:column;gap:.4rem;background:linear-gradient(#eef1f6,#eef1f6)}
.msg{display:flex}.msg-out{justify-content:flex-end}
.bubble{max-width:70%;padding:.5rem .7rem;border-radius:12px;font-size:13.5px;position:relative;box-shadow:0 1px 1px rgba(0,0,0,.06);word-wrap:break-word}
.msg-in .bubble{background:#fff;border-bottom-left-radius:3px}
.msg-out .bubble{background:#d9fdd3;border-bottom-right-radius:3px}
.msg-time{display:block;font-size:10px;color:#667;text-align:right;margin-top:.15rem}
.conv-composer{display:flex;gap:.5rem;padding:.7rem;background:var(--surface);border-top:1px solid var(--line)}
.conv-composer input{flex:1;padding:.65rem .8rem;border:1px solid var(--line);border-radius:20px;font-size:14px}
@media (max-width:760px){.chat-shell{grid-template-columns:1fr}.chat-left{display:none}}

/* ---------- Fase 5: WhatsApp OTP & API Keys ---------- */
.field{display:flex;flex-direction:column;gap:.35rem;font-weight:600;font-size:13px;margin-bottom:.85rem}
.field>span{font-weight:600}
.field input[type=text],.field input[type=email],.field textarea,.field select{
  padding:.7rem .8rem;border:1px solid var(--line);border-radius:10px;font-size:14px;background:#fff;font-family:inherit;width:100%;box-sizing:border-box}
.field input:focus,.field textarea:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px rgba(37,99,235,.14)}
.pill-ok{background:#e9f9ef;color:#0f7a37}
.pill-warn{background:#fff5e6;color:#a15c07}
.pill-danger{background:#fdeaea;color:#b42318}
.pill-muted{background:#eef1f7;color:#64748b}
.code-block{background:#0f172a;color:#e2e8f0;padding:.85rem;border-radius:10px;font-size:12px;line-height:1.5;overflow-x:auto;white-space:pre;font-family:ui-monospace,Menlo,monospace}
.key-reveal{padding:1rem;border-left:4px solid var(--brand);background:#f0f6ff}
.key-reveal-row{display:flex;align-items:center;gap:.6rem;margin-top:.5rem;flex-wrap:wrap}
.key-reveal-row code{background:#fff;border:1px solid var(--line);padding:.5rem .7rem;border-radius:8px;word-break:break-all;flex:1}

/* ---------- Fase 8: WAHA lanjutan (chat media, aksi pesan) ---------- */
.msg{position:relative}
.msg-actions{display:none;position:absolute;top:-14px;gap:2px;background:#fff;border:1px solid var(--line);border-radius:8px;padding:2px;box-shadow:0 2px 8px rgba(0,0,0,.1);z-index:3}
.msg-in .msg-actions{left:6px}.msg-out .msg-actions{right:6px}
.msg:hover .msg-actions{display:flex}
.msg-actions button{border:none;background:none;cursor:pointer;font-size:13px;padding:2px 5px;border-radius:6px;line-height:1}
.msg-actions button:hover{background:#eef2ff}
.msg-media{max-width:230px;max-height:260px;border-radius:10px;display:block}
.msg-file{display:inline-block;color:inherit;text-decoration:none;font-weight:500}
.msg-react{position:absolute;bottom:-10px;right:8px;background:#fff;border:1px solid var(--line);border-radius:999px;padding:0 4px;font-size:12px}
.msg-out .msg-react{right:auto;left:8px}
.msg-star{color:#eab308}
.msg-deleted{opacity:.6;font-style:italic}
.reply-bar{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.4rem .8rem;background:#f0f6ff;border-top:1px solid var(--line);font-size:13px}
.reply-bar em{color:var(--muted)}
.reply-x{border:none;background:none;font-size:18px;cursor:pointer;color:var(--muted)}
.attach-wrap{position:relative}
.attach-btn{padding:.55rem .7rem;font-size:16px;line-height:1}
.attach-menu{position:absolute;bottom:46px;left:0;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 4px 16px rgba(0,0,0,.12);padding:4px;z-index:5;min-width:150px}
.attach-menu button{display:block;width:100%;text-align:left;border:none;background:none;padding:.5rem .7rem;border-radius:7px;cursor:pointer;font-size:14px}
.attach-menu button:hover{background:#f6f8fc}
.emoji-pop{position:absolute;display:flex;gap:2px;background:#fff;border:1px solid var(--line);border-radius:999px;padding:3px 6px;box-shadow:0 3px 12px rgba(0,0,0,.15);z-index:10}
.emoji-pop button{border:none;background:none;cursor:pointer;font-size:18px;padding:2px;border-radius:6px}
.emoji-pop button:hover{background:#eef2ff}
.conv-head{display:flex;align-items:center;gap:.7rem}
.plain-list{list-style:none;padding:0;margin:0;max-height:280px;overflow:auto}
.plain-list li{padding:.35rem .2rem;border-bottom:1px solid var(--line);font-size:12.5px}
.add-part{display:flex;gap:.4rem;margin-top:.7rem}
.add-part input{flex:1;padding:.5rem .6rem;border:1px solid var(--line);border-radius:8px}

/* ---------- Fase 9: Super Admin ---------- */
.stat-card>span{display:block;font-size:12.5px;color:var(--muted);font-weight:600}
.stat-card>strong{display:block;font-size:1.7rem;font-weight:800;margin:.2rem 0;line-height:1.1}
.stat-card>em{font-style:normal;font-size:12px;color:var(--muted);font-weight:600}
.stat-card.accent::before{background:#16a34a}
.stat-card.danger-card::before{background:#dc2626}
.ok-text{color:#16a34a}
.barchart{display:flex;align-items:flex-end;gap:6px;height:180px;padding-top:.5rem}
.bar-col{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%}
.bar-col .bar{width:100%;max-width:26px;background:linear-gradient(180deg,#3b82f6,#2563eb);border-radius:5px 5px 0 0;transition:height .3s}
.bar-col span{font-size:9.5px;color:var(--muted);margin-top:4px;white-space:nowrap}
.hdot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:4px;vertical-align:middle}
.hdot-ok{background:#16a34a;box-shadow:0 0 0 3px rgba(22,163,74,.15)}
.hdot-bad{background:#dc2626;box-shadow:0 0 0 3px rgba(220,38,38,.15)}
.admin-side .side-brand{border-bottom:1px solid rgba(255,255,255,.08)}
.admin-mark{background:#f59e0b!important;color:#111!important}
.admin-badge{display:inline-block;background:#f59e0b;color:#111;font-size:10px;font-weight:800;padding:1px 6px;border-radius:5px;vertical-align:middle;letter-spacing:.5px}
.admin-avatar{background:#f59e0b!important;color:#111!important}
.btn-row{display:flex;gap:.5rem;flex-wrap:wrap;margin:.5rem 0 1rem}
.actions form{display:inline}

/* ---------- Dokumentasi API ---------- */
.docs{display:grid;grid-template-columns:200px 1fr;gap:24px;align-items:start}
.docs-toc{position:sticky;top:80px;display:flex;flex-direction:column;gap:2px;font-size:13.5px}
.docs-toc a{padding:.4rem .6rem;border-radius:8px;color:var(--muted);font-weight:500}
.docs-toc a:hover{background:#f6f8fc;color:var(--ink)}
.docs-body{display:flex;flex-direction:column;gap:18px;min-width:0}
.doc-card{background:#fff;border:1px solid var(--line);border-radius:14px;padding:20px 22px}
.doc-card h2{margin:0 0 .5rem;font-size:20px}
.doc-card h4{margin:1rem 0 .4rem;font-size:14px;color:var(--muted);text-transform:uppercase;letter-spacing:.03em}
.doc-card p{margin:.3rem 0}
.doc-list,.doc-steps{margin:.4rem 0;padding-left:1.2rem;color:#334155;font-size:14.5px}
.doc-list li,.doc-steps li{margin:.3rem 0}
.doc-card code{background:#eef2ff;color:#3730a3;padding:.1rem .35rem;border-radius:5px;font-size:12.5px;font-family:ui-monospace,Menlo,monospace}
.doc-card pre.code-block code{background:none;color:inherit;padding:0}
.ep{display:flex;align-items:center;gap:.6rem;margin-bottom:.4rem;flex-wrap:wrap}
.ep code{background:#0f172a;color:#e2e8f0;font-size:14px;padding:.35rem .7rem;border-radius:8px}
.verb{font-weight:800;font-size:12px;padding:.28rem .6rem;border-radius:7px;color:#fff;letter-spacing:.03em}
.verb.post{background:#16a34a}.verb.get{background:#2563eb}
.doc-table{width:100%;border-collapse:collapse;margin:.3rem 0;font-size:14px}
.doc-table th{text-align:left;color:var(--muted);font-weight:600;padding:.4rem .6rem;border-bottom:2px solid var(--line);font-size:12px;text-transform:uppercase}
.doc-table td{padding:.5rem .6rem;border-bottom:1px solid var(--line);vertical-align:top}
.doc-table td:first-child{white-space:nowrap;width:1%}
.code-block{position:relative}
.copied{position:absolute;top:8px;right:8px;background:#16a34a;color:#fff;font-size:11px;padding:.15rem .5rem;border-radius:6px}
@media(max-width:820px){.docs{grid-template-columns:1fr}.docs-toc{position:static;flex-direction:row;flex-wrap:wrap;border-bottom:1px solid var(--line);padding-bottom:10px;margin-bottom:4px}}
