:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Arial,sans-serif;color:#dce9ef;background:#0b1420;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}button{cursor:pointer;border:1px solid #2e485b;border-radius:9px;background:#183142;color:#e2f0f5;padding:10px 14px;transition:filter .15s}button:hover{filter:brightness(1.18)}button:disabled{opacity:.48;cursor:not-allowed}input,textarea{width:100%;border:1px solid #314c5c;border-radius:9px;background:#101f2a;color:#e7f0f5;padding:12px;outline:none}input:focus,textarea:focus{border-color:#49b2aa}label{display:block;color:#bfd2dd;font-size:13px;font-weight:600;margin:0 0 15px}label input{margin-top:7px}.primary{background:#13a892;color:#04201c;border:1px solid #13a892;font-weight:750}.danger{background:#4f2731;border-color:#93515f;color:#ffd6df}.subtle{background:transparent;border:1px solid #335060}.muted,small{color:#8ca7b6;font-size:12px}.error{color:#ff9da9;font-size:13px;min-height:18px}.hidden{display:none!important}.login-page{min-height:100vh;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at 30% 20%,#143a45,#0b1420 55%)}.login-card{width:min(100%,420px);background:#12222e;border:1px solid #294454;padding:33px;border-radius:18px;box-shadow:0 22px 80px #0005}.login-card h1{font-size:25px;margin:16px 0 3px}.login-card>p{margin:0 0 26px}.login-card button{width:100%}.logo{background:#0eaa8c;color:#05251f;font-size:22px;font-weight:1000;width:47px;height:47px;border-radius:14px;display:grid;place-items:center;letter-spacing:-2px}.logo span{color:white}.logo.small{width:38px;height:38px;font-size:18px;border-radius:11px}.app-page{display:flex;height:100vh;min-height:600px}.sidebar{width:250px;flex-shrink:0;background:#0c1b26;border-right:1px solid #203746;display:flex;flex-direction:column;padding:20px 12px}.brandmark{display:flex;align-items:center;gap:10px;padding:3px 11px 25px}.brandmark b{font-size:14px}.brandmark small{display:block;margin-top:3px}.side-caption{color:#637e8d;font-size:10px;font-weight:900;letter-spacing:1.4px;margin:20px 13px 9px}.brand-list{max-height:34vh;overflow:auto}.brand-button,.nav{display:flex;width:100%;align-items:center;gap:7px;text-align:left;background:transparent;border:0;padding:11px 14px;border-radius:9px;font-size:13px;color:#a7beca;margin:3px 0}.brand-button.active,.nav.active{background:#183e44;color:#aff1d9}.brand-button .mini-dot{width:8px;height:8px;background:#22c9ab;border-radius:50%;margin-right:5px}.sidebar-bottom{margin-top:auto;padding:14px 12px;border-top:1px solid #254052;color:#a7c2cf;font-size:13px}.sidebar-bottom button{width:100%;margin-top:12px}.main{flex:1;min-width:0;display:flex;flex-direction:column}.topbar{height:83px;min-height:83px;padding:18px 27px;border-bottom:1px solid #233949;display:flex;justify-content:space-between;align-items:center}.topbar h2{font-size:19px;margin:0 0 4px}.clock{font-size:13px;color:#a6c1cd;text-align:right}.tab-pane{flex:1;min-height:0;overflow-y:auto}.inbox-layout{display:grid;grid-template-columns:315px 1fr}.conversations{border-right:1px solid #263d4a;display:flex;flex-direction:column;min-height:0}.pane-heading{display:flex;align-items:center;justify-content:space-between;padding:19px 16px 12px}.conversations>input{margin:0 13px 12px;width:calc(100% - 26px)}.pill{background:#21464a;padding:3px 9px;border-radius:10px;font-size:12px}.conversation-list{overflow:auto;flex:1}.conversation-item{width:100%;padding:14px;border:0;border-radius:0;border-bottom:1px solid #213645;display:flex;gap:10px;text-align:left;background:transparent}.conversation-item.selected{background:#193640}.avatar{display:grid;place-items:center;min-width:38px;width:38px;height:38px;border-radius:50%;background:#245867;color:#d5fff0;font-weight:750}.conv-content{flex:1;min-width:0}.conv-top{display:flex;align-items:center;justify-content:space-between;gap:9px}.conv-top b{font-size:13px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.conv-content p{font-size:12px;margin:5px 0;color:#87a7b6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.conv-top small{white-space:nowrap;font-size:10px}.unread{background:#19ad94;color:#062a22;border-radius:20px;padding:2px 7px;font-size:11px}.chat{min-height:0;display:flex;flex-direction:column}.chat-header{padding:15px 21px;border-bottom:1px solid #233d4c;min-height:66px}.chat-header b,.chat-header small{display:block}.chat-header small{margin-top:5px}.message-list{flex:1;overflow:auto;padding:20px 22px;display:flex;flex-direction:column;align-items:flex-start;gap:10px;background:repeating-linear-gradient(135deg,#0c1823,#0c1823 60px,#0d1b26 61px,#0d1b26 63px)}.bubble{max-width:min(78%,650px);background:#203444;padding:11px 13px;border-radius:12px;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}.bubble.mine{background:#125747;align-self:flex-end}.bubble .meta{display:block;color:#9fb9bc;font-size:10px;text-align:right;margin-top:8px}.reply-form{display:flex;gap:10px;border-top:1px solid #233d4c;padding:13px}.reply-form textarea{resize:vertical;min-height:50px;max-height:150px}.reply-form button{align-self:end;height:50px}.placeholder{padding:16px;color:#8aa3b2;font-size:13px}.panel-width{padding:27px;width:min(100%,900px);margin:auto}.panel-width h3{margin:0 0 12px;font-size:19px}.panel-width>p{margin:0 0 23px}.card{background:#122632;border:1px solid #284757;border-radius:14px;padding:21px;margin:0 0 20px}.card h3{font-size:15px;margin:0 0 15px}.button-row,.inline-form{display:flex;align-items:center;gap:11px;flex-wrap:wrap}.inline-form input{flex:1;min-width:185px}.status-row{font-weight:700;padding:8px 0 5px}.qr-container{margin:18px 0}.qr-container img{width:230px;height:230px;background:white;border-radius:12px;padding:7px}.pair-form{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin:14px 0}.pair-form label{flex:1;min-width:200px;margin:0}.pair-code{font-size:20px;letter-spacing:3px;font-weight:800;color:#51dbc3}.checks{display:flex;gap:15px;flex-wrap:wrap;margin:12px 0}.checks label{display:inline-flex;align-items:center;gap:6px;margin:0}.checks input{width:auto}.user-row{padding:16px 0;border-bottom:1px solid #274454}.user-head{display:flex;justify-content:space-between;gap:10px;align-items:center}.user-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:11px}.user-actions button{font-size:11px;padding:7px 9px}.status-badge{padding:3px 8px;border-radius:7px;background:#1f5648;color:#a2efd8;font-size:11px}.status-badge.off{background:#50373a;color:#ffb9bf}.audit-row{padding:12px 2px;border-bottom:1px solid #244252;font-size:12px}.audit-row small{display:block;margin-top:5px}.stack-form{max-width:420px}.stack-form button{width:100%}.flash{background:#184e4a;color:#c8fff3;padding:11px 20px;font-size:13px}.flash.bad{background:#65303e;color:#fff}.flash:not(.hidden){display:block}@media(max-width:850px){.sidebar{width:195px}.inbox-layout{grid-template-columns:245px 1fr}.topbar{padding:12px 17px}}@media(max-width:640px){.app-page{height:auto;min-height:100vh;display:block}.sidebar{width:100%;padding:10px;display:block}.brandmark{padding:5px}.side-caption{margin:6px 8px}.brand-list{display:flex;max-height:none;overflow:auto}.brand-button{min-width:115px}.nav{width:auto;display:inline-flex;margin:3px}.sidebar-bottom{display:flex;gap:9px;justify-content:space-between;align-items:center}.sidebar-bottom button{width:auto;margin:0}.main{height:calc(100vh - 270px);min-height:520px}.topbar{height:65px;min-height:65px}.inbox-layout{grid-template-columns:140px 1fr}.conversation-item{padding:9px 6px}.avatar{display:none}.conv-top small{display:none}.message-list{padding:9px}.reply-form{padding:8px;gap:6px}.reply-form button{padding:8px}.panel-width{padding:15px}.clock{font-size:10px}}

select{font:inherit;width:100%;border:1px solid #314c5c;border-radius:9px;background:#101f2a;color:#e7f0f5;padding:12px;outline:none;margin-top:7px}.report-filters{display:flex;gap:12px;align-items:end;flex-wrap:wrap}.report-filters label{flex:1;min-width:155px;margin:0}.report-filters button{min-height:45px}.report-row{padding:14px 0;border-bottom:1px solid #284757}.report-row .report-head{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}.report-body{margin:9px 0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}.report-row button{padding:6px 10px;font-size:12px}

/* v0.3 Manajemen Brand — frontend-only */
.brand-manage-list{display:grid;gap:12px;margin-top:18px}
.brand-edit-row{display:grid;grid-template-columns:110px minmax(120px,1fr) auto;gap:12px;align-items:center;margin:0}
.brand-edit-row label{font-size:13px;font-weight:600;margin:0}
.brand-edit-row input{margin:0;min-width:0}
.brand-edit-row button{white-space:nowrap}
@media(max-width:640px){.brand-edit-row{grid-template-columns:1fr}.brand-edit-row button{width:100%}}

/* v0.6 notification controls */
.topbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.notif-bell{position:relative;min-width:45px;border-radius:10px;white-space:nowrap}
.notif-badge{display:inline-flex;align-items:center;justify-content:center;background:#e53935;color:white;
  font-size:11px;font-weight:700;min-width:18px;height:18px;border-radius:99px;padding:0 5px;margin-left:6px;line-height:1}
.notif-badge.hidden{display:none!important}
.brand-button .notif-badge{margin-left:auto}
.sound-toggle{font-size:12px;white-space:nowrap}
@media(max-width:650px){.topbar-actions{gap:5px}.sound-toggle{font-size:11px}.clock{font-size:10px}}

/* v0.7 read-only WhatsApp account archive */
.archive-item{padding:12px 0;border-bottom:1px solid #294655;display:flex;gap:7px;align-items:flex-start;flex-direction:column}
.archive-item b{font-size:13px}.archive-item small{display:block;white-space:pre-wrap;overflow-wrap:anywhere}
.archive-item button{font-size:12px;padding:7px 11px}.archive-list{max-height:400px;overflow:auto}
.archive-message{padding:12px;margin:8px 0;border-radius:10px;background:#1e3947;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px}
.archive-message.mine{background:#165749}.archive-message small{display:block;margin-top:5px}


/* v0.8 kredensial sekali dengan tombol salin */
.one-time-credential-dialog{width:min(96vw,530px);max-height:90vh;overflow:auto;background:#122632;color:#e8f2f6;border:1px solid #416273;border-radius:15px;padding:0;box-shadow:0 22px 90px #000b}
.one-time-credential-dialog::backdrop{background:#000b}
.one-time-inner{padding:22px;display:flex;flex-direction:column;gap:13px}
.one-time-inner h3{margin:0;font-size:19px}
.one-time-inner label{margin:0;flex:1;min-width:170px}
.one-time-inner input{margin-top:7px;font-family:ui-monospace,monospace;user-select:text}
.temp-field{display:flex;align-items:end;flex-wrap:wrap;gap:7px}
.temp-field button{white-space:nowrap;padding:11px}
#tempCredFeedback{min-height:21px;font-size:12px;color:#a4e9d4}
#tempCredClose{width:100%}
