/* =====================================================================
   Londribag AI Hub — visual system shared with Londribag ERP
   Merah #E63946 · Merah tua #C1121F · Merah lembut #FDECEE · Slate #2B2D42
   Abu #8D99AE · Latar #F8F9FA · Kuning aktif #FFD166 · Font Inter
   ===================================================================== */
:root {
    --red: #E63946;
    --red-dark: #C1121F;
    --red-deep: #A0101C;
    --red-soft: #FDECEE;
    --red-softer: #FEF5F6;
    --yellow: #FFD166;
    --yellow-soft: #FFF6DD;
    --ink: #2B2D42;
    --ink-2: #4A4E69;
    --muted: #6C7489;
    --muted-2: #8D99AE;
    --line: #ECEEF2;
    --line-2: #F3F4F7;
    --bg: #F8F9FA;
    --white: #FFFFFF;
    --green: #16A34A;
    --green-soft: #E7F7EC;
    --blue: #257DE0;
    --blue-soft: #E8F1FD;
    --violet-soft: #EFEBFD;
    --violet: #6A4CE2;
    --radius: 16px;
    --radius-sm: 12px;
    --shadow: 0 1px 2px rgba(43,45,66,.04), 0 8px 24px rgba(43,45,66,.05);
    --shadow-lg: 0 18px 40px rgba(43,45,66,.12);
    --sidebar: 256px;
    --topbar: 68px;
    --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --bs-body-color: var(--ink);
    --bs-border-color: var(--line);
    --bs-primary: #E63946;
    --bs-primary-rgb: 230, 57, 70;
    --bs-link-color-rgb: 193, 18, 31;
}
html, body { background: var(--bg); color: var(--ink); font-size: 15px; -webkit-font-smoothing: antialiased; }
body { font-feature-settings: "cv11", "ss01"; }
a { color: var(--red-dark); text-decoration: none; }
a:hover { color: var(--red-deep); }
.text-muted { color: var(--muted) !important; }
.text-brand { color: var(--red) !important; }
.text-slate { color: var(--ink) !important; }
::selection { background: var(--yellow); color: var(--ink); }
.small, small { font-size: .84rem; }

/* ================================================================ shell */
.lb-sidebar {
    width: var(--sidebar); position: fixed; inset: 0 auto 0 0; z-index: 1030; display: flex; flex-direction: column;
    background: radial-gradient(120% 60% at 0% 0%, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 55%),
                linear-gradient(180deg, #E63946 0%, #C1121F 62%, #A0101C 100%);
    color: #fff; transition: transform .2s ease; box-shadow: 4px 0 24px rgba(160,16,28,.18);
}
.lb-brand { display: flex; align-items: center; gap: 10px; padding: 22px 22px 16px; color: #fff; text-decoration: none; }
.lb-brand:hover { color: #fff; }
.lb-brand .mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.28); font-size: 17px; backdrop-filter: blur(4px); }
.lb-brand b { font-size: 19px; font-weight: 800; letter-spacing: -.3px; line-height: 1.05; }
.lb-brand b span { font-weight: 500; opacity: .9; }
.mode-label { padding: 0 22px 6px; font-size: 12px; font-weight: 600; opacity: .82; }
.mode-picker { margin: 0 16px 10px; }
.mode-picker > button { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.38); color: #fff; font-weight: 700; font-size: 15px; }
.mode-picker > button:hover { background: rgba(255,255,255,.18); }
.mode-picker .dropdown-menu { width: 100%; }
.mode-picker .dropdown-item { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.mode-picker .dropdown-item i { width: 18px; text-align: center; color: var(--red); }
.lb-nav { flex: 1; overflow-y: auto; padding: 6px 14px; }
.lb-nav a, .lb-side-foot .lb-nav-link {
    position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 3px;
    color: rgba(255,255,255,.95); border-radius: 50rem; font-size: 15px; font-weight: 500; transition: background .15s;
}
.lb-nav a i, .lb-side-foot .lb-nav-link i { width: 20px; text-align: center; font-size: 15px; }
.lb-nav a:hover, .lb-side-foot .lb-nav-link:hover { background: rgba(255,255,255,.14); color: #fff; }
.lb-nav a.active, .lb-side-foot .lb-nav-link.active { background: var(--yellow); color: var(--ink); font-weight: 700; box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.lb-nav a .count { margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 99px; display: grid; place-items: center;
    background: #fff; color: var(--red-dark); font-size: 11.5px; font-weight: 800; }
.lb-nav a.active .count { background: var(--ink); color: #fff; }
.lb-nav .section { padding: 14px 14px 6px; font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(255,255,255,.7); font-weight: 800; }
.lb-side-foot { padding: 10px 14px 14px; border-top: 1px solid rgba(255,255,255,.2); }
.lb-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; color: #fff; border-radius: 12px; width: 100%; background: none; border: 0; text-align: left; margin-top: 4px; }
.lb-user:hover { background: rgba(255,255,255,.12); }
.lb-user .avatar-ring { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.lb-user .who { line-height: 1.2; min-width: 0; }
.lb-user .who b { display: block; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-user .who small { display: block; opacity: .8; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.lb-main { margin-left: var(--sidebar); min-height: 100vh; }
.lb-topbar {
    position: sticky; top: 0; z-index: 1020; height: var(--topbar); display: flex; align-items: center; gap: 14px;
    padding: 0 28px; background: rgba(255,255,255,.88); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line);
}
.mode-switch { display: inline-flex; padding: 4px; border-radius: 50rem; background: var(--line-2); border: 1px solid var(--line); }
.mode-switch a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 50rem; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.mode-switch a.active { background: var(--red); color: #fff; box-shadow: 0 6px 14px rgba(230,57,70,.3); }
.top-search { position: relative; flex: 0 1 380px; }
.top-search i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; }
.top-search input { width: 100%; height: 42px; border-radius: 12px; border: 1px solid var(--line); background: #fff; padding-left: 40px; font-size: 14px; }
.top-search input:focus { outline: 0; border-color: var(--red); box-shadow: 0 0 0 .2rem rgba(230,57,70,.12); }
.sys-status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.sys-status .dot { width: 8px; height: 8px; }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line); background: #fff; color: var(--ink); font-size: 16px; }
.icon-btn:hover { background: var(--line-2); }
.icon-btn .ping { position: absolute; top: 8px; right: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); border: 2px solid #fff; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--red-soft); color: var(--red-dark); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; }
.avatar.dark { background: var(--ink); color: #fff; }
.user-chip { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; color: var(--ink); font-weight: 600; font-size: 14.5px; padding: 4px 6px; border-radius: 12px; }
.user-chip:hover { background: var(--line-2); }
.topbar-divider { width: 1px; height: 28px; background: var(--line); }
.lb-content { padding: 26px 28px 48px; max-width: 1560px; }
@media (max-width: 991px) {
    .lb-sidebar { transform: translateX(-100%); }
    .lb-sidebar.show { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
    .lb-main { margin-left: 0; }
    .lb-topbar, .lb-content { padding-left: 16px; padding-right: 16px; }
    .top-search, .sys-status { display: none !important; }
}

/* ================================================================ page header */
.page-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .head-icon { width: 54px; height: 54px; border-radius: 16px; background: var(--red-soft); color: var(--red); display: grid; place-items: center; font-size: 22px; flex: none; }
.page-title { font-size: 28px; font-weight: 800; letter-spacing: -.6px; line-height: 1.15; margin: 0; }
.page-kicker { font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.page-sub { color: var(--muted); font-size: 15px; margin-top: 6px; }
.page-meta { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.page-meta b { color: var(--ink); }
.crumbs { font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.crumbs b { color: var(--ink); font-weight: 600; }
.chip-demo { display: inline-block; padding: 4px 12px; border-radius: 99px; background: var(--red-soft); color: var(--red-dark); font-size: 12.5px; font-weight: 600; }

/* ================================================================ controls */
.btn { border-radius: 12px; font-weight: 600; padding: .55rem 1rem; font-size: 14.5px; }
.btn-lg { padding: .72rem 1.25rem; font-size: 15px; }
.btn-sm { padding: .32rem .7rem; border-radius: 9px; font-size: 13px; }
.btn-brand, .btn-primary { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 6px 14px rgba(230,57,70,.22); }
.btn-brand:hover, .btn-brand:focus, .btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); color: #fff; }
.btn-brand:disabled { background: #EBA3A9; border-color: #EBA3A9; box-shadow: none; }
.btn-soft { background: var(--red-soft); border: 1px solid transparent; color: var(--red-dark); }
.btn-soft:hover { background: #FADADE; color: var(--red-deep); }
.btn-outline-brand { border: 1px solid #F3B7BD; color: var(--red-dark); background: #fff; }
.btn-outline-brand:hover { background: var(--red-soft); color: var(--red-dark); border-color: #F3B7BD; }
.btn-light { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.btn-light:hover { background: var(--line-2); border-color: var(--line); }
.btn-accent { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.btn-accent:hover { background: #FFC43D; color: var(--ink); }
.btn-ghost { background: none; border: 0; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); background: var(--line-2); }
.form-control, .form-select { border-color: #E3E6EA; border-radius: 12px; padding: .58rem .85rem; font-size: 14.5px; }
.form-control-sm, .form-select-sm { border-radius: 9px; padding: .36rem .6rem; font-size: 13.5px; }
.form-control:focus, .form-select:focus { border-color: var(--red); box-shadow: 0 0 0 .2rem rgba(230,57,70,.12); }
.form-label { font-weight: 600; color: var(--ink); font-size: 14px; margin-bottom: 6px; }
.form-label .req { color: var(--red); }
.form-check-input:checked { background-color: var(--red); border-color: var(--red); }
.form-switch .form-check-input { width: 2.6em; height: 1.4em; cursor: pointer; }
.form-switch .form-check-input:focus { box-shadow: 0 0 0 .2rem rgba(230,57,70,.12); border-color: #E3E6EA; }
.field-label { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.filter-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); margin-bottom: 18px; }
.filter-select { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid #E3E6EA; border-radius: 12px; background: #fff; min-height: 44px; }
.filter-select i { color: var(--ink-2); font-size: 14px; }
.filter-select select, .filter-select input { border: 0; outline: 0; background: transparent; font-size: 14.5px; color: var(--ink); padding: 0; width: 100%; }
.search-box { position: relative; }
.search-box i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; }
.search-box input { padding-left: 40px; height: 44px; }
.select-lg { height: 44px; }
.seg { display: inline-flex; gap: 4px; padding: 4px; background: var(--line-2); border-radius: 12px; }
.seg a, .seg button, .seg label { padding: 6px 14px; border-radius: 9px; color: var(--ink-2); font-weight: 600; font-size: 13.5px; border: 0; background: none; cursor: pointer; }
.seg a.active, .seg button.active, .seg input:checked + label { background: var(--red); color: #fff; }
.seg input { display: none; }
.option-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.option-cards input { display: none; }
.option-cards label { display: flex; align-items: center; gap: 10px; border: 1px solid #E3E6EA; border-radius: 12px; padding: 10px 12px; cursor: pointer; background: #fff; }
.option-cards label i { color: var(--ink-2); font-size: 16px; }
.option-cards label b { display: block; font-size: 13.5px; }
.option-cards label small { color: var(--muted); font-size: 12px; }
.option-cards input:checked + label { border-color: var(--red); background: var(--red-softer); box-shadow: 0 0 0 3px rgba(230,57,70,.1); }
.option-cards input:checked + label i, .option-cards input:checked + label b { color: var(--red-dark); }

/* ================================================================ tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 11px 16px; font-size: 15px; color: var(--ink-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--red); font-weight: 700; border-bottom-color: var(--red); }
.tabs-pill { display: flex; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.tabs-pill a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 12px; font-size: 15px; color: var(--ink-2); font-weight: 500; }
.tabs-pill a:hover { background: var(--line-2); color: var(--ink); }
.tabs-pill a.active { background: var(--red); color: #fff; font-weight: 700; box-shadow: 0 6px 14px rgba(230,57,70,.25); }
.tabs-boxed { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 22px; gap: 4px; }
.tabs-boxed a { padding: 10px 22px; border: 1px solid var(--line); border-bottom: 0; border-radius: 12px 12px 0 0; font-size: 15px; color: var(--ink-2); background: #fff; }
.tabs-boxed a.active { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }
.pill-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.pill-tabs a { padding: 7px 14px; border-radius: 10px; color: var(--ink-2); font-size: 14px; font-weight: 500; }
.pill-tabs a:hover { background: var(--line-2); color: var(--ink); }
.pill-tabs a.active { background: var(--red-soft); color: var(--red-dark); font-weight: 700; }
.pill-tabs a .n { margin-left: 4px; font-size: 12px; opacity: .85; }
.underline-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.underline-tabs a { padding: 10px 14px; font-size: 14px; color: var(--ink-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.underline-tabs a.active { color: var(--red-dark); font-weight: 700; border-bottom-color: var(--red); }

/* ================================================================ cards */
.card, .panel, .kpi { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.card-header { background: #fff; border-bottom: 1px solid var(--line); font-weight: 700; padding: 14px 18px; border-radius: var(--radius) var(--radius) 0 0 !important; }
.card-body { padding: 18px 20px; }
.card-footer { background: #fff; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius) !important; }
.panel { padding: 20px 22px; }
.panel + .panel { margin-top: 18px; }
.panel-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.panel-head .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); font-size: 16px; flex: none; }
.panel-head h2, .card-title-lg { font-size: 18px; font-weight: 800; letter-spacing: -.2px; margin: 0; }
.panel-head p { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
.kpi { padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; height: 100%; }
.kpi .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); font-size: 18px; flex: none; }
.kpi .ico.green { background: var(--green-soft); color: var(--green); }
.kpi .ico.blue { background: var(--blue-soft); color: var(--blue); }
.kpi .ico.violet { background: var(--violet-soft); color: var(--violet); }
.kpi .ico.yellow { background: var(--yellow-soft); color: #A87700; }
.kpi .label { font-size: 14px; color: var(--ink-2); font-weight: 500; }
.kpi .value { font-size: 28px; font-weight: 800; letter-spacing: -.6px; line-height: 1.2; margin-top: 2px; }
.kpi .value small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.kpi .hint { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.delta { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 12.5px; padding: 2px 8px; border-radius: 8px; }
.delta.up { background: var(--green-soft); color: #13703A; }
.delta.down { background: #FDE3E5; color: #A1121F; }
.delta.flat { background: var(--line-2); color: var(--muted); }
.stat { padding: 18px 20px; }
.stat .label { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat .value { font-size: 26px; font-weight: 800; letter-spacing: -.5px; line-height: 1.2; }
.stat .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.1rem; background: var(--red-soft); color: var(--red); }
.stat.accent .icon { background: var(--yellow-soft); color: #A87700; }

/* ================================================================ tables */
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table thead th { background: #F7F8FA; color: var(--ink); font-weight: 700; font-size: 13.5px; border-bottom: 1px solid var(--line); padding: 12px 16px; text-transform: none; letter-spacing: 0; white-space: nowrap; }
.table td { padding: 13px 16px; border-color: var(--line); vertical-align: middle; font-size: 14.5px; }
.table-sm thead th, .table-sm td { padding: 9px 12px; font-size: 13.5px; }
.table-boxed, .table-clean { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.table-boxed .table td + td, .table-boxed .table th + th { border-left: 1px solid var(--line); }
.table-hover tbody tr { cursor: pointer; }
.table-hover tbody tr:hover > * { background: var(--red-softer); }
.table tr.selected > * { background: var(--red-soft) !important; }
.table tfoot td { background: var(--red-softer); font-weight: 700; }

/* ================================================================ badges & status */
.badge { font-weight: 600; padding: .38em .66em; border-radius: 8px; font-size: .76rem; letter-spacing: .1px; }
.badge-brand { background: var(--red); color: #fff; }
.badge-accent { background: var(--yellow); color: var(--ink); }
.badge-success { background: var(--green-soft); color: #13703A; }
.badge-danger { background: #FDE3E5; color: #A1121F; }
.badge-info { background: var(--blue-soft); color: #1849A9; }
.badge-primary { background: #ECEBFF; color: #3730A3; }
.badge-secondary { background: #EEEFF3; color: #4A4E69; }
.badge-dark { background: var(--ink); color: #fff; }
.badge-light { background: #F4F5F8; color: #4A4E69; border: 1px solid var(--line); }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 8px; background: #F4F5F8; border: 1px solid var(--line); font-size: 12px; color: var(--ink-2); font-weight: 500; }
.tag i { font-size: 11px; }
.tag.red { background: var(--red-soft); border-color: #F7CDD2; color: var(--red-dark); }
.tag.green { background: var(--green-soft); border-color: #C9EBD4; color: #13703A; }
.tag.violet { background: var(--violet-soft); border-color: #DDD5FB; color: #4C33B8; }
.stage { display: inline-block; padding: 5px 14px; border-radius: 99px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.stage-NEW { background: #EEEFF3; color: var(--ink-2); }
.stage-CONTACTED { background: var(--blue-soft); color: #1849A9; }
.stage-QUALIFIED, .stage-NEGOTIATION { background: var(--green-soft); color: #13703A; }
.stage-WON { background: var(--yellow-soft); color: #7A5600; }
.stage-LOST { background: #F3F4F7; color: var(--muted); text-decoration: line-through; }
.status-ok { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--ink); }
.status-ok::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(22,163,74,.12); }
.status-ok.off::before { background: #A1A1AA; box-shadow: 0 0 0 4px rgba(161,161,170,.15); }
.status-ok.bad::before { background: var(--red); box-shadow: 0 0 0 4px rgba(230,57,70,.12); }
.pill-ok { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; background: var(--green-soft); color: #13703A; font-weight: 600; font-size: 13px; }
.pill-ok::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.pill-warn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; background: var(--yellow-soft); color: #7A5600; font-weight: 600; font-size: 13px; }
.pill-warn::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #E0A800; }
.pill-off { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; background: #F1F2F5; color: var(--muted); font-weight: 600; font-size: 13px; }
.pill-off::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #A1A1AA; }
.pill-aktif { display: inline-block; padding: 4px 12px; border-radius: 99px; background: var(--green-soft); color: #13703A; font-weight: 600; font-size: 13px; }
.pill-nonaktif { display: inline-block; padding: 4px 12px; border-radius: 99px; background: #F1F2F5; color: var(--muted); font-weight: 600; font-size: 13px; }
.chip-paused { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 10px; background: var(--red-soft); font-size: 13px; color: var(--red-dark); font-weight: 600; border: 1px solid #F7CDD2; }
.chip-active { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 10px; background: var(--violet-soft); font-size: 13px; color: #4C33B8; font-weight: 600; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.ok { background: var(--green); } .dot.err { background: var(--red); } .dot.warn { background: #E0A800; }
.prio { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600; }
.prio::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.prio.high { background: #FDE3E5; color: #A1121F; } .prio.high::before { background: var(--red); }
.prio.mid { background: var(--yellow-soft); color: #7A5600; } .prio.mid::before { background: #E0A800; }
.prio.low { background: var(--line-2); color: var(--muted); } .prio.low::before { background: #A1A1AA; }

/* ================================================================ charts & data */
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 220px; }
.legend-list { list-style: none; padding: 0; margin: 0; }
.legend-list li { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14px; }
.legend-list .sw { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.legend-list .v { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.legend-list .p { color: var(--muted); font-size: 13px; width: 64px; text-align: right; }
.donut-wrap { position: relative; width: 210px; height: 210px; margin: 0 auto; }
.donut-wrap .center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; pointer-events: none; }
.donut-wrap .center b { display: block; font-size: 26px; font-weight: 800; }
.donut-wrap .center small { color: var(--muted); }
.funnel { display: flex; flex-direction: column; gap: 10px; }
.funnel .step { display: grid; grid-template-columns: 1fr 120px; gap: 12px; align-items: center; }
.funnel .bar { height: 54px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink); margin: 0 auto; min-width: 34%; }
.funnel .bar small { font-size: 12.5px; font-weight: 600; }
.funnel .bar b { font-size: 20px; font-weight: 800; line-height: 1.1; }
.funnel .rate { font-size: 12.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; background: #fff; }
.funnel .rate b { display: block; color: var(--ink); font-size: 15px; }
.hbars { display: grid; grid-template-columns: max-content 1fr; gap: 14px 16px; align-items: center; }
.hbars .name { font-size: 14px; color: var(--ink-2); }
.hbars .track { display: flex; align-items: center; gap: 10px; border-left: 2px solid #D7DBE2; min-height: 30px; }
.hbars .bar { height: 26px; background: var(--red); border-radius: 0 6px 6px 0; min-width: 3px; }
.hbars .val { font-size: 14px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rank-list { list-style: none; padding: 0; margin: 0; }
.rank-list li { display: flex; align-items: center; gap: 14px; padding: 12px 6px; border-bottom: 1px solid var(--line); }
.rank-list li:last-child { border-bottom: 0; }
.rank-list li.top { background: var(--red-softer); border-left: 3px solid var(--red); border-radius: 8px; }
.rank-list .no { width: 28px; height: 28px; border-radius: 50%; background: var(--red-soft); color: var(--red-dark); display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.rank-list .nm { font-weight: 600; font-size: 15px; }
.rank-list .ct { margin-left: auto; font-weight: 800; font-size: 18px; color: var(--red-dark); font-variant-numeric: tabular-nums; }
.bubbles { position: relative; min-height: 360px; border-radius: 14px; background:
    radial-gradient(circle at 20% 30%, rgba(230,57,70,.05), transparent 40%),
    repeating-linear-gradient(0deg, transparent 0 39px, #EEF0F3 39px 40px), repeating-linear-gradient(90deg, transparent 0 39px, #EEF0F3 39px 40px), #FAFBFC;
    display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 14px; padding: 24px; }
.bubble-area { border-radius: 50%; display: grid; place-items: center; text-align: center; color: #fff; font-weight: 700; box-shadow: 0 0 0 6px rgba(230,57,70,.10); line-height: 1.1; padding: 6px; }
.bubble-area span { display: block; font-size: 12px; font-weight: 600; opacity: .95; }

/* ================================================================ inbox */
.inbox { display: grid; grid-template-columns: 330px 1fr 320px; gap: 14px; height: calc(100vh - var(--topbar) - 168px); min-height: 560px; }
.inbox.no-ctx { grid-template-columns: 330px 1fr; }
.inbox-list, .inbox-thread, .inbox-ctx { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; display: flex; flex-direction: column; min-height: 0; box-shadow: var(--shadow); }
.inbox-list .head { padding: 14px 14px 0; border-bottom: 1px solid var(--line); }
.inbox-list .head h2 { font-size: 18px; font-weight: 800; margin: 0; }
.inbox-list .items { overflow-y: auto; flex: 1; padding: 8px; }
.conv { display: flex; gap: 12px; padding: 12px; border-radius: 12px; color: var(--ink); position: relative; }
.conv + .conv { margin-top: 2px; }
.conv:hover { background: var(--red-softer); color: var(--ink); }
.conv.active { background: var(--red-soft); }
.conv .unread { position: absolute; left: 3px; top: 22px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.conv .body { min-width: 0; flex: 1; }
.conv .name { font-weight: 700; font-size: 14.5px; display: flex; gap: 6px; align-items: center; }
.conv .preview { color: var(--ink-2); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.conv .time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.conv .tag { margin-top: 6px; }
.inbox-thread .thead { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.inbox-thread .thead h2 { font-size: 17px; font-weight: 800; margin: 0 0 2px; }
.inbox-thread .thead small { color: var(--muted); }
.thread { flex: 1; overflow-y: auto; padding: 18px 20px 8px; background: linear-gradient(180deg, #FCFCFD, #fff); }
.day-sep { text-align: center; margin: 4px 0 14px; }
.day-sep span { font-size: 12px; color: var(--muted); background: #F1F2F5; border-radius: 99px; padding: 4px 12px; }
.msg { display: flex; gap: 10px; max-width: 78%; margin-bottom: 14px; align-items: flex-end; }
.msg .av { width: 30px; height: 30px; border-radius: 50%; background: var(--red-soft); color: var(--red-dark); display: grid; place-items: center; font-weight: 800; font-size: 11px; flex: none; }
.msg .b { padding: 11px 15px; border-radius: 14px; font-size: 14.5px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; position: relative; }
.msg .t { display: block; font-size: 11.5px; color: var(--muted); margin-top: 4px; text-align: right; }
.msg.in .b { background: #F1F2F5; border-bottom-left-radius: 4px; }
.msg.out { margin-left: auto; flex-direction: row-reverse; }
.msg.out .b { background: var(--red-soft); border-bottom-right-radius: 4px; }
.msg.out .ai-ico { width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 1px solid #F7CDD2; color: var(--red); display: grid; place-items: center; font-size: 12px; flex: none; }
.msg.out.admin .b { background: var(--yellow-soft); border: 1px solid #FBE3A3; }
.msg .tag-who { display: block; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; color: var(--red-dark); margin-bottom: 3px; }
.msg.sys { max-width: 100%; justify-content: center; }
.msg.sys .b { background: none; color: var(--muted); font-size: 12.5px; padding: 3px 12px; border: 1px dashed var(--line); border-radius: 99px; }
.paused-band { margin: 6px 16px 0; padding: 12px 16px; border-radius: 12px; background: var(--yellow-soft); border: 1px solid #FBE3A3; display: flex; gap: 12px; align-items: center; }
.paused-band i { color: #C58A00; font-size: 20px; }
.paused-band b { display: block; font-size: 14.5px; }
.paused-band small { color: var(--ink-2); }
.handover-band { margin: 12px 16px 0; padding: 12px 16px; border-radius: 12px; background: var(--red-soft); border-left: 4px solid var(--red); display: flex; gap: 12px; align-items: center; }
.handover-band b { font-size: 15px; }
.composer { margin: 10px 14px 14px; display: flex; align-items: flex-end; gap: 8px; }
.composer .box { flex: 1; display: flex; align-items: flex-end; gap: 8px; border: 1px solid #E3E6EA; border-radius: 14px; padding: 6px 10px 6px 14px; background: #fff; }
.composer textarea { flex: 1; border: 0; background: transparent; resize: none; outline: 0; font-size: 14.5px; padding: 8px 0; max-height: 140px; }
.composer .send { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--red); color: #fff; font-size: 16px; flex: none; }
.composer.disabled .box { background: #F7F8FA; }
.composer.disabled .send { background: #D7DBE2; }
.inbox-ctx { overflow-y: auto; }
.inbox-ctx .sec { padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.inbox-ctx h3 { font-size: 15px; font-weight: 800; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.kv { display: grid; grid-template-columns: 82px 1fr; gap: 8px 10px; font-size: 13.5px; }
.kv .k { color: var(--muted); }
.order-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; font-size: 13.5px; }
.order-card .inv { font-weight: 700; }
.order-card .tot { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; font-weight: 800; }
.note-box { background: var(--yellow-soft); border-radius: 12px; padding: 12px; font-size: 13.5px; }
@media (max-width: 1280px) { .inbox { grid-template-columns: 300px 1fr; } .inbox-ctx { display: none; } }
@media (max-width: 900px) { .inbox { grid-template-columns: 1fr; height: auto; } .inbox-list { max-height: 420px; } .inbox-thread { min-height: 600px; } }

/* ================================================================ kanban */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(230px, 1fr)); gap: 14px; align-items: start; }
.kcol { background: var(--red-softer); border: 1px solid #F8E1E4; border-radius: var(--radius); padding: 12px; min-height: 300px; }
.kcol.drop { outline: 2px dashed var(--red); outline-offset: -4px; }
.kcol h3 { font-size: 16px; font-weight: 800; margin: 0; display: flex; align-items: center; }
.kcol h3 .n { margin-left: auto; min-width: 26px; height: 22px; border-radius: 99px; background: #fff; color: var(--red-dark); font-size: 12px; display: grid; place-items: center; font-weight: 800; border: 1px solid #F7CDD2; }
.kcol .desc { font-size: 12.5px; color: var(--muted); margin: 4px 0 12px; min-height: 32px; }
.kcard { display: block; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 10px; color: var(--ink); box-shadow: 0 1px 2px rgba(43,45,66,.04); cursor: grab; }
.kcard:hover { border-color: #F3B7BD; color: var(--ink); }
.kcard.active { border-color: var(--red); box-shadow: 0 0 0 3px rgba(230,57,70,.12); }
.kcard .top { display: flex; gap: 8px; }
.kcard .top b { font-size: 14.5px; }
.kcard .top small { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.kcard .interest { font-size: 13px; color: var(--ink-2); margin: 4px 0 8px; display: flex; gap: 6px; align-items: flex-start; }
.kcard .tags { display: flex; gap: 6px; flex-wrap: wrap; }
.kcard .next { margin-top: 10px; background: var(--red-soft); color: var(--red-dark); border-radius: 9px; padding: 6px 10px; font-size: 12.5px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.kcard .next.done { background: var(--green-soft); color: #13703A; }
.k-add { display: block; text-align: center; padding: 10px; color: var(--ink-2); font-weight: 600; font-size: 14px; border-radius: 10px; background: none; border: 0; width: 100%; }
.k-add:hover { background: #fff; color: var(--red-dark); }
@media (max-width: 1200px) { .kanban { grid-template-columns: repeat(2, 1fr); } }

/* ================================================================ drawer */
.with-drawer { display: grid; grid-template-columns: 1fr 380px; gap: 18px; align-items: start; }
.with-drawer > .main { min-width: 0; }
.drawer { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: #fff; box-shadow: var(--shadow); position: sticky; top: calc(var(--topbar) + 16px); max-height: calc(100vh - var(--topbar) - 32px); overflow-y: auto; display: flex; flex-direction: column; }
.drawer h2 { font-size: 20px; font-weight: 800; letter-spacing: -.3px; margin: 0; }
.drawer h3 { font-size: 15px; font-weight: 800; margin: 0 0 10px; display: flex; gap: 8px; align-items: center; }
.drawer .sec { padding: 16px 0; border-bottom: 1px solid var(--line); }
.drawer .sec:last-of-type { border-bottom: 0; }
.drawer .k { color: var(--muted); font-size: 13px; font-weight: 600; }
.next-box { background: var(--red-soft); border-radius: 12px; padding: 12px 14px; display: flex; gap: 10px; }
.next-box b { color: var(--red-dark); display: block; }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 18px 28px; }
.timeline li::before { content: ""; position: absolute; left: 2px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 7px; top: 20px; bottom: 2px; width: 2px; background: var(--line); }
.timeline b { display: block; font-size: 14.5px; }
.timeline small { display: block; color: var(--muted); font-size: 12px; margin: 1px 0 3px; }
.timeline p { margin: 0; font-size: 13.5px; color: var(--ink-2); }
@media (max-width: 1200px) { .with-drawer { grid-template-columns: 1fr; } .drawer { position: static; max-height: none; } }

/* ================================================================ calendar */
.cal-grid { display: grid; grid-template-columns: 150px repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.cal-grid > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 118px; padding: 8px; }
.cal-grid .hd { min-height: auto; text-align: center; padding: 12px 6px; background: #FAFBFC; }
.cal-grid .hd b { display: block; font-size: 14px; }
.cal-grid .hd small { color: var(--muted); font-size: 12.5px; }
.cal-grid .hd.today { background: var(--red-soft); color: var(--red-dark); }
.cal-grid .col-today { background: rgba(253,236,238,.45); }
.cal-grid .plat { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; }
.cal-grid .plat i { font-size: 22px; }
.cal-grid .plat small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.cal-thumb { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; margin-bottom: 6px; color: var(--ink); }
.cal-thumb:hover { border-color: var(--red); color: var(--ink); }
.cal-thumb.active { border-color: var(--red); box-shadow: 0 0 0 3px rgba(230,57,70,.15); }
.cal-thumb .img { aspect-ratio: 4/3; background: #F1F2F5 center/cover; display: grid; place-items: center; color: var(--muted-2); }
.cal-thumb .meta { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px; font-size: 12px; font-weight: 600; }
.cal-thumb .meta i.pub { color: var(--green); }
.cal-thumb .meta i.sch { color: var(--ink-2); }
.cal-thumb .meta i.fail { color: var(--red); }
.plat-ig { color: #E1306C; } .plat-fb { color: #1877F2; } .plat-tt { color: #111; }
@media (max-width: 1100px) { .cal-grid { grid-template-columns: 110px repeat(7, minmax(90px, 1fr)); overflow-x: auto; } }

/* ================================================================ design studio */
.studio { display: grid; grid-template-columns: 340px 1fr 220px; gap: 16px; align-items: start; }
.studio.no-var { grid-template-columns: 360px 1fr; }
.design-stage { background: #F4F5F8; border-radius: 14px; display: grid; place-items: center; padding: 16px; min-height: 420px; position: relative; }
.design-stage img { max-width: 100%; max-height: 560px; border-radius: 10px; box-shadow: var(--shadow-lg); background: #fff; }
.design-stage .tools { position: absolute; right: 26px; top: 26px; display: flex; flex-direction: column; gap: 8px; }
.design-stage .tools a { width: 38px; height: 38px; border-radius: 10px; background: #fff; display: grid; place-items: center; color: var(--ink); box-shadow: var(--shadow); }
.var-list { display: flex; flex-direction: column; gap: 10px; }
.var-item { position: relative; display: block; border-radius: 12px; overflow: hidden; border: 2px solid transparent; background: #F4F5F8; }
.var-item img { width: 100%; display: block; }
.var-item.active { border-color: var(--red); }
.var-item .no { position: absolute; left: 8px; bottom: 8px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 800; border-radius: 6px; padding: 1px 7px; }
.var-item .check { position: absolute; right: 8px; top: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-size: 11px; }
.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.design-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.design-card .img { background: #F4F5F8; display: grid; place-items: center; aspect-ratio: 1/1; overflow: hidden; }
.design-card .img img { width: 100%; height: 100%; object-fit: cover; }
.design-card .body { padding: 12px 14px; }
.design-card .body b { display: block; font-size: 14.5px; }
.swatch { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); }
@media (max-width: 1300px) { .studio { grid-template-columns: 320px 1fr; } .studio .var-col { grid-column: 1 / -1; } .var-list { flex-direction: row; } .var-item { width: 160px; } }
@media (max-width: 900px) { .studio, .studio.no-var { grid-template-columns: 1fr; } }

/* ================================================================ integrations */
.integ-row { display: grid; grid-template-columns: 1.7fr .7fr .8fr .8fr 1fr 30px; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid transparent; border-radius: 14px; color: var(--ink); }
.integ-row + .integ-row { margin-top: 4px; }
.integ-row:hover { background: var(--red-softer); color: var(--ink); }
.integ-row.active { border-color: #F3B7BD; background: var(--red-softer); box-shadow: 0 0 0 3px rgba(230,57,70,.06); }
.integ-row .who { display: flex; gap: 12px; align-items: center; min-width: 0; }
.integ-row .logo { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; flex: none; background: #F4F5F8; }
.integ-row .who b { display: block; font-size: 14.5px; }
.integ-row .who small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.integ-head { display: grid; grid-template-columns: 1.7fr .7fr .8fr .8fr 1fr 30px; gap: 12px; padding: 10px 16px; font-size: 13px; font-weight: 700; color: var(--ink-2); background: #F7F8FA; border-radius: 10px; }
@media (max-width: 1200px) { .integ-row, .integ-head { grid-template-columns: 1.6fr .8fr .9fr 30px; } .integ-row > :nth-child(4), .integ-row > :nth-child(5), .integ-head > :nth-child(4), .integ-head > :nth-child(5) { display: none; } }

/* ================================================================ automations */
.rule { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: #fff; }
.rule + .rule { margin-top: 10px; }
.rule:hover { border-color: #F3B7BD; color: var(--ink); }
.rule.active { background: var(--red-softer); border-color: var(--red); }
.rule b { display: block; font-size: 16px; font-weight: 700; }
.rule small { display: block; color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.rule .chev { font-size: 14px; color: var(--ink-2); }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { display: flex; gap: 16px; position: relative; padding-bottom: 22px; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 38px; bottom: 4px; width: 2px; background: var(--line); }
.steps .n { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px; box-shadow: 0 0 0 4px var(--red-soft); }
.steps b { display: block; font-size: 15.5px; font-weight: 700; }
.steps small { display: block; color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }

/* ================================================================ misc / legacy */
.att-list { list-style: none; padding: 0; margin: 0; }
.att-list li + li { border-top: 1px solid var(--line); }
.att-list a { display: flex; align-items: center; gap: 14px; padding: 13px 2px; color: var(--ink); }
.att-list .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); font-size: 15px; flex: none; }
.att-list b { display: block; font-size: 15px; font-weight: 600; }
.att-list small { display: block; color: var(--muted); font-size: 13px; }
.att-list .go { margin-left: auto; color: var(--muted-2); }
.cta-card { display: flex; align-items: center; gap: 16px; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; color: var(--ink); background: #fff; box-shadow: var(--shadow); }
.cta-card .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); font-size: 17px; }
.cta-card b { display: block; font-size: 16px; font-weight: 700; }
.cta-card small { color: var(--muted); font-size: 13.5px; }
.cta-card .go { margin-left: auto; width: 40px; height: 40px; border-radius: 12px; background: var(--red); color: #fff; display: grid; place-items: center; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty i { font-size: 2rem; display: block; margin-bottom: 10px; color: #C9CED8; }
.bg-accent-soft { background: var(--yellow-soft); }
.wa-preview { background: #EAF7E6; border-radius: 12px; padding: 14px 16px; white-space: pre-wrap; font-size: 14px; line-height: 1.55; }
.post-media { aspect-ratio: 1/1; background: #F4F5F8; border-radius: 10px; overflow: hidden; display: grid; place-items: center; color: #A1A1AA; }
.post-media img { width: 100%; height: 100%; object-fit: cover; }
.typing { font-size: .85rem; color: var(--muted); font-style: italic; }
.alert { border-radius: 12px; border: 0; }
.alert-success { background: var(--green-soft); color: #14532D; }
.alert-danger { background: #FDE8EA; color: #7F1420; }
.alert-warning { background: var(--yellow-soft); color: #6B4E00; }
.dropdown-menu { border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; font-size: 14.5px; }
.dropdown-item { border-radius: 9px; padding: 8px 12px; }
.dropdown-item:active { background: var(--red-soft); color: var(--ink); }
.list-group-item { border-color: var(--line); }
.modal-content { border: 0; border-radius: 18px; }
.modal-header, .modal-footer { border-color: var(--line); }
.progress { background: var(--line-2); }
.chat { background: #F7F8FA; padding: 16px; overflow-y: auto; }
.bubble { max-width: 78%; padding: 10px 14px 8px; border-radius: 14px; margin-bottom: 10px; white-space: pre-wrap; word-wrap: break-word; font-size: .92rem; }
.bubble .meta { font-size: .7rem; color: var(--muted); text-align: right; margin-top: 4px; }
.bubble.user { background: #fff; border: 1px solid var(--line); margin-right: auto; border-top-left-radius: 4px; }
.bubble.ai { background: var(--red-soft); margin-left: auto; border-top-right-radius: 4px; }
.bubble.admin { background: var(--yellow-soft); margin-left: auto; border: 1px solid #FBE3A3; border-top-right-radius: 4px; }
.bubble.system { background: none; color: var(--muted); margin: 6px auto; font-size: .78rem; text-align: center; border: 1px dashed var(--line); border-radius: 99px; max-width: 90%; }
.bubble .tag { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--red-dark); background: none; border: 0; padding: 0; }
.phone { max-width: 420px; margin: 0 auto; border-radius: 30px; border: 10px solid var(--ink); overflow: hidden; background: #fff; box-shadow: var(--shadow-lg); }
.phone .head { background: #075E54; color: #fff; padding: 12px 16px; display: flex; align-items: center; gap: 10px; }
.phone .head .avatar { width: 36px; height: 36px; font-size: 15px; background: var(--red); color: #fff; }
.phone .chat { height: 480px; background: #EFE7DE; }
.phone .compose { display: flex; gap: 8px; padding: 10px; background: #F0F0F0; }
.phone .compose input { border-radius: 99px; }
.phone .compose button { border-radius: 50%; width: 42px; height: 42px; padding: 0; }

/* ================================================================ login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: #fff; }
.login-hero { background: radial-gradient(90% 60% at 10% 0%, rgba(255,255,255,.14), transparent 60%), linear-gradient(160deg, #E63946 0%, #C1121F 60%, #A0101C 100%); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-hero::after { content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(255,209,102,.9); right: -170px; bottom: -170px; }
.login-hero h1 { font-size: 32px; font-weight: 800; line-height: 1.1; letter-spacing: -.6px; position: relative; z-index: 1; }
.login-hero h2 { font-weight: 800; font-size: 28px; letter-spacing: -.5px; position: relative; z-index: 1; max-width: 480px; }
.login-hero ul { position: relative; z-index: 1; }
.login-form { display: grid; place-items: center; padding: 32px; }
@media (max-width: 860px) { .login-wrap { grid-template-columns: 1fr; } .login-hero { display: none; } }

.pill-ok, .pill-warn, .pill-off { white-space: nowrap; }
.form-switch .form-check-label { margin-left: 8px; }

/* ---- Pengaturan: API & Integrasi, Mesin AI ---- */
.sec-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 4px 0 12px; }
.sec-title h2 { font-size: 18px; font-weight: 800; margin: 0; }
.sec-title p { margin: 0; color: var(--muted); font-size: 14px; }
.api-card { height: 100%; display: flex; flex-direction: column; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.api-card:hover { border-color: #F3B7BD; box-shadow: 0 0 0 3px rgba(230,57,70,.06), var(--shadow); }
.api-card .top { display: flex; gap: 12px; align-items: flex-start; }
.api-card .logo, .brain-strip .logo { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 20px; flex: none; background: #F4F5F8; }
.api-card .who { min-width: 0; }
.api-card .who b { display: block; font-size: 15px; }
.api-card .who small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.api-card .state { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.api-card .state small { color: var(--muted); font-size: 12.5px; }
.brain-strip { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 18px; border-radius: var(--radius); background: linear-gradient(90deg, var(--red-softer), #fff); border: 1px solid #F6D3D7; }
.brain-strip .logo { color: var(--red); background: #fff; }
.brain-strip b { display: block; } .brain-strip small { color: var(--muted); }
.agent-badge { display: inline-grid; place-items: center; min-width: 54px; height: 32px; padding: 0 10px; border-radius: 10px; font-weight: 800; font-size: 13px; letter-spacing: .04em; color: #fff; background: var(--red); }
.agent-badge.luna { background: var(--violet); }
.agent-badge.sm { min-width: 0; height: 22px; padding: 0 8px; border-radius: 7px; font-size: 11px; }
.dropzone { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 26px 16px; border: 2px dashed #E2C3C7; border-radius: 14px; background: var(--red-softer); cursor: pointer; position: relative; margin: 0; }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone i { font-size: 30px; color: var(--red); }
.dropzone small { color: var(--muted); font-size: 12.5px; }
.dropzone.drag, .dropzone:hover { border-color: var(--red); background: var(--red-soft); }
.dropzone .picked { font-size: 13px; font-weight: 600; color: var(--ink); word-break: break-word; }
.src-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--line-2); }
.src-row:first-of-type { border-top: 0; }
.src-row.off { opacity: .55; }
.src-row .ficon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 19px; background: #F4F5F8; color: var(--ink-2); flex: none; }
.src-row .info { flex: 1; min-width: 0; }
.src-row .info b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src-row .info small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src-row .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.src-row .tags .pill-off, .src-row .tags .pill-warn { padding: 1px 9px; font-size: 11.5px; }
.src-row .tags .pill-off::before, .src-row .tags .pill-warn::before { display: none; }
.meter { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 99px; background: var(--green); }
.meter span.full { background: var(--yellow); }

/* ---- Mesin AI: anjuran & larangan, pelajaran dari chat ---- */
.rule-add { display: grid; grid-template-columns: 140px 1fr auto; gap: 8px; margin-bottom: 10px; }
@media (max-width: 576px) { .rule-add { grid-template-columns: 1fr; } }
.rule-row { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-top: 1px solid var(--line-2); }
.rule-row .mark { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; flex: none; }
.rule-row.anjuran .mark { background: var(--green-soft); color: var(--green); }
.rule-row.larangan .mark { background: var(--red-soft); color: var(--red); }
.rule-row .txt { flex: 1; min-width: 0; font-size: 14px; }
.rule-row.off { opacity: .5; }
.rule-row form { margin: 0; }
.run-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line-2); }
.lesson { padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.lesson + .lesson { margin-top: 10px; }
.lesson .content { font-size: 14px; color: var(--ink-2); }
.lesson .kind { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: var(--blue-soft); color: var(--blue); }
.lesson .kind.aturan { background: var(--violet-soft); color: var(--violet); }
.lesson .kind.insight { background: var(--yellow-soft); color: #7A5600; }
.lesson .evidence { font-size: 12.5px; color: var(--muted); background: var(--line-2); border-radius: 8px; padding: 6px 10px; margin-top: 6px; white-space: pre-wrap; }
.lesson form { margin: 0; }
.min-w-0 { min-width: 0; }

/* ---- Inbox: jalur WhatsApp LONA / LUNA dan sakelar LIVE/uji ---- */
.line-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; margin-bottom: 14px; }
.line-all { display: inline-flex; align-items: center; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-weight: 600; }
.line-all.active, .line-all:hover { border-color: #F3B7BD; background: var(--red-softer); color: var(--ink); }
.line-card { display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.line-card.active { border-color: #F3B7BD; box-shadow: 0 0 0 3px rgba(230,57,70,.08); }
.line-card .who { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.line-card .who b { display: block; font-size: 14px; line-height: 1.2; }
.line-card .who small { display: block; color: var(--muted); font-size: 12px; }
.line-card form { margin: 0; }
.mode-switch { position: relative; width: 78px; height: 32px; border-radius: 99px; border: 0; background: #E9EBF0; padding: 0; cursor: pointer; transition: background .2s; }
.mode-switch .knob { position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .2s; }
.mode-switch .lbl { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.mode-switch.on { background: var(--green); }
.mode-switch.on .knob { left: 50px; }
.mode-switch.on .lbl { right: auto; left: 12px; color: #fff; }

/* ---- micro menu (Mesin AI) ---- */
.micro-nav { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 18px; border-radius: 14px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); flex-wrap: wrap; }
.micro-nav a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 10px; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.micro-nav a:hover { background: var(--line-2); color: var(--ink); }
.micro-nav a.active { background: var(--red); color: #fff; }
.micro-nav .cnt { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: inline-grid; place-items: center; font-size: 11.5px; background: var(--line-2); color: var(--ink-2); }
.micro-nav a.active .cnt { background: rgba(255,255,255,.25); color: #fff; }
.micro-nav .cnt.hot { background: var(--yellow); color: #5A4000; }
.micro-hint { color: var(--muted); font-size: 13.5px; margin: -6px 0 12px; }
.eval-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.eval-bar .form-select { width: auto; min-width: 120px; }

/* ---- lampiran & suhu prospek ---- */
.att-img img { display: block; max-width: 260px; max-height: 260px; border-radius: 10px; margin-bottom: 6px; object-fit: cover; }
.att-video { display: block; max-width: 300px; border-radius: 10px; margin-bottom: 6px; }
.att-audio { display: block; max-width: 260px; margin-bottom: 6px; }
.att-file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 6px; border-radius: 10px; background: rgba(43,45,66,.06); color: inherit; max-width: 300px; }
.att-file span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.temp { display: inline-flex; align-items: center; padding: 1px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 700; vertical-align: middle; }
.temp.hot { background: #FDE2E4; color: #C1121F; }
.temp.warm { background: #FFF1D6; color: #8A5A00; }
.temp.cold { background: #E3EEFB; color: #1F5FAD; }
.src-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; }

/* ---- Mesin AI: pilih agen, Latih ---- */
.agent-switch { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.agent-switch a { display: grid; grid-template-columns: 22px auto; column-gap: 10px; align-items: center; padding: 10px 18px; border-radius: 14px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); min-width: 170px; box-shadow: var(--shadow); }
.agent-switch a i { grid-row: span 2; font-size: 18px; }
.agent-switch a b { font-size: 15px; } .agent-switch a small { color: var(--muted); font-size: 12px; }
.agent-switch a.active { color: #fff; border-color: transparent; }
.agent-switch a.active small { color: rgba(255,255,255,.8); }
.agent-switch a.active.lona { background: var(--red); } .agent-switch a.active.luna { background: var(--violet); } .agent-switch a.active.mata { background: var(--ink); }
.train { max-width: 880px; }
.train-log { height: 56vh; overflow-y: auto; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.tmsg { max-width: 78%; } .tmsg .b { padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; font-size: 14.5px; }
.tmsg.owner { align-self: flex-end; } .tmsg.owner .b { background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.tmsg.ai { align-self: flex-start; } .tmsg.ai .b { background: var(--line-2); border-bottom-left-radius: 4px; }
.lesson-tip { margin-top: 6px; padding: 10px; border-radius: 12px; background: var(--yellow-soft); display: grid; grid-template-columns: 20px 1fr; gap: 6px; align-items: start; }
.lesson-tip > i { color: #8A5A00; margin-top: 6px; } .lesson-tip textarea, .lesson-tip .btn, .lesson-tip .pill-ok { grid-column: 2; justify-self: start; }
.train-box { display: flex; gap: 8px; margin-top: 12px; }
.train-box textarea { flex: 1; resize: none; border-radius: 14px; border: 1px solid var(--line); padding: 12px 14px; }
/* ---- Jadwal Mitra ---- */
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1100px) { .cal-week { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cal-day { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-height: 260px; box-shadow: var(--shadow); }
.cal-day.today { border-color: #F3B7BD; box-shadow: 0 0 0 3px rgba(230,57,70,.08); }
.cal-day .hd { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.cal-day .hd span { color: var(--muted); font-size: 12.5px; }
.cal-day .none { color: var(--muted-2); text-align: center; padding-top: 30px; }
.appt { position: relative; border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; background: var(--violet-soft); border-left: 3px solid var(--violet); font-size: 13px; }
.appt.kunjungan { background: var(--green-soft); border-left-color: var(--green); }
.appt.meeting_offline { background: var(--yellow-soft); border-left-color: #C98A00; }
.appt.batal { opacity: .5; text-decoration: line-through; } .appt.selesai { opacity: .65; }
.appt .t { font-weight: 700; color: var(--ink-2); } .appt .t i { margin-right: 6px; }
.appt b { display: block; } .appt small { color: var(--muted); display: block; }
.appt .st { font-size: 11px; font-weight: 700; color: var(--muted); }
.appt .acts { display: flex; gap: 4px; margin-top: 6px; }
.appt .acts a, .appt .acts button { border: 0; background: rgba(255,255,255,.7); border-radius: 7px; width: 26px; height: 26px; display: grid; place-items: center; color: var(--ink-2); font-size: 12px; }
.appt .acts form { margin: 0; }
.cal-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 4px 12px; font-size: 13px; margin: 2px; }
.chip:hover { border-color: var(--violet); color: var(--violet); }

.tnote { align-self: flex-start; font-size: 12.5px; color: var(--muted); background: var(--line-2); border-radius: 8px; padding: 4px 10px; }
.lesson-tip .d-flex { grid-column: 2; }
.outlet-band { background: #F6F7F9; border-left-color: #8D99AE; }
.outlet-band b { font-size: 14px; }

/* ---------- side menu: full / icons only (body.nav-mini, remembered per browser) ---------- */
.lb-sidebar, .lb-main { transition: width .22s ease, margin-left .22s ease, transform .2s ease; }
.lb-brand-row { display: flex; align-items: center; padding-right: 12px; }
.lb-brand-row .lb-brand { flex: 1; min-width: 0; }
.nav-toggle { width: 30px; height: 30px; border-radius: 9px; border: 0; background: rgba(255,255,255,.14); color: #fff; place-items: center; font-size: 12px; flex: none; }
.nav-toggle:hover { background: rgba(255,255,255,.26); }
.nav-toggle i { transition: transform .22s ease; }
@media (min-width: 992px) {
    body.nav-mini { --sidebar: 76px; }
    body.nav-mini .lb-sidebar { width: 76px; }
    body.nav-mini .lb-sidebar .lbl, body.nav-mini .lb-sidebar .mode-label, body.nav-mini .lb-brand b { display: none !important; }
    body.nav-mini .lb-brand-row { flex-direction: column; gap: 10px; padding: 0 0 12px; }
    body.nav-mini .lb-brand { padding: 20px 0 0; justify-content: center; flex: none; }
    body.nav-mini .nav-toggle i { transform: rotate(180deg); }
    body.nav-mini .mode-picker { margin: 0 12px 10px; }
    body.nav-mini .mode-picker > button { justify-content: center; padding: 10px 0; }
    body.nav-mini .lb-nav { padding: 6px 12px; }
    body.nav-mini .lb-nav a, body.nav-mini .lb-side-foot .lb-nav-link { justify-content: center; padding-left: 0; padding-right: 0; position: relative; gap: 0; }
    body.nav-mini .lb-nav a .count { position: absolute; top: 3px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 10.5px; margin: 0; }
    body.nav-mini .lb-side-foot { padding: 10px 12px 14px; }
    body.nav-mini .lb-user { justify-content: center; padding: 8px 0; }
}

/* ---------- Tim & Akses ---------- */
.team-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); font-weight: 700; border-bottom-color: var(--line); }
.mod-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; background: var(--line-2); font-size: 12px; font-weight: 600; color: var(--ink-2); }
.mod-chip i { font-size: 11px; color: var(--muted); }
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.mod-opt { position: relative; margin: 0; cursor: pointer; }
.mod-opt input { position: absolute; opacity: 0; }
.mod-opt span { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line); font-size: 13.5px; font-weight: 500; transition: all .15s; }
.mod-opt span i { width: 18px; text-align: center; color: var(--muted); }
.mod-opt input:checked + span { border-color: var(--ink); background: var(--ink); color: #fff; }
.mod-opt input:checked + span i { color: #fff; }
.mod-opt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(230,57,70,.25); }

/* ---------- Analitik ---------- */
.an-head { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.an-tabs { display: flex; gap: 22px; }
.an-tabs a { color: var(--ink-2); font-weight: 600; font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; }
.an-tabs a.active { color: var(--ink); border-color: var(--ink); }
.an-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.an-field { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); margin: 0; font-size: 14px; }
.an-field i { color: var(--muted); }
.an-field select, .an-field input { border: 0; background: transparent; font-size: 14px; color: var(--ink); outline: 0; }
.an-quick { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--line-2); }
.an-quick a { padding: 6px 12px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.an-quick a.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(43,45,66,.12); }
.an-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; }
.an-card-head { display: flex; align-items: center; margin-bottom: 8px; }
.an-card-head h2 { font-size: 16.5px; font-weight: 650; margin: 0; color: var(--ink); }
.an-card-head h2 i { font-size: 12px; color: var(--muted-2); margin-left: 4px; cursor: help; }
.an-big { font-size: 24px; font-weight: 750; color: var(--ink); margin-bottom: 10px; letter-spacing: -.4px; }
.an-big small { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.an-chart { height: 220px; }
.an-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); }
.an-icon:hover { background: var(--line-2); color: var(--ink); }
.an-bar { display: grid; grid-template-columns: minmax(70px, 34%) 1fr 44px; align-items: center; gap: 10px; padding: 5px 0; font-size: 13.5px; }
.an-bar .l { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.an-bar .t { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.an-bar .t span { display: block; height: 100%; border-radius: 99px; background: #E63946; min-width: 2px; }
.an-bar b { text-align: right; font-weight: 650; }
.an-scroll { max-height: 250px; overflow-y: auto; padding-right: 4px; }
.an-split { height: 10px; border-radius: 99px; background: var(--line-2); overflow: hidden; margin: 8px 0 12px; }
.an-split span { display: block; height: 100%; background: #E63946; border-right: 2px solid #fff; }
.an-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--ink-2); }
.an-legend b { color: var(--ink); margin-left: 4px; }
.an-legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--line); margin-right: 6px; vertical-align: -1px; }
.an-legend .sw.solid { background: #E63946; }
.sw.sent-positif { background: #16A34A !important; } .sw.sent-netral { background: #8D99AE !important; } .sw.sent-negatif { background: #C1121F !important; }
.an-stats { display: grid; grid-template-columns: repeat(5, 1fr); }
.an-stats.three { grid-template-columns: repeat(3, 1fr); }
.an-stats > div { padding: 14px 10px; text-align: center; border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.an-stats > div:last-child { border-right: 0; }
.an-stats b { font-size: 22px; font-weight: 750; color: var(--ink); letter-spacing: -.3px; }
.an-stats span { font-size: 13px; color: var(--muted); }
.an-stats .an-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--line-2); display: grid; place-items: center; color: var(--ink-2); margin-bottom: 4px; }
.an-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.an-mini > div { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; min-height: 80px; }
.an-mini span { font-size: 12.5px; color: var(--muted); }
.an-mini b { font-size: 17px; font-weight: 700; color: var(--ink); }
.an-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.an-table th { background: var(--line-2); font-weight: 650; color: var(--ink); padding: 12px 14px; white-space: nowrap; }
.an-table th:first-child { border-radius: 10px 0 0 10px; } .an-table th:last-child { border-radius: 0 10px 10px 0; }
.an-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.an-table td small { display: block; color: var(--muted); font-size: 12px; }
.an-table:not(.static) tbody tr { cursor: pointer; }
.an-table:not(.static) tbody tr:hover td, .an-table tbody tr:focus td { background: var(--red-softer); outline: 0; }
.an-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 650; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.an-pill.ok, .an-pill.sent-positif { background: var(--green-soft); color: #15803D; }
.an-pill.hot, .an-pill.sent-negatif { background: var(--red-soft); color: var(--red-dark); }
.an-score { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; padding: 2px 8px; border-radius: 99px; font-size: 12.5px; background: var(--line-2); }
.an-score i { font-size: 10px; color: #F5A524; }
.an-score.s1, .an-score.s2 { background: var(--red-soft); color: var(--red-dark); }
.an-score.s4, .an-score.s5 { background: var(--green-soft); color: #15803D; }
.an-score-big { font-size: 52px; font-weight: 800; letter-spacing: -1.5px; color: var(--ink); line-height: 1; margin-bottom: 6px; }
.an-score-big small { font-size: 16px; color: var(--muted); font-weight: 500; margin-left: 4px; letter-spacing: 0; }
.an-empty { text-align: center; padding: 48px 16px; color: var(--muted); font-size: 14px; }
.an-empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.an-empty.sm { padding: 18px 8px; }
.an-notes { display: flex; flex-direction: column; }
.an-note { display: flex; gap: 12px; align-items: flex-start; padding: 12px 4px; border-top: 1px solid var(--line); color: var(--ink); }
.an-note:first-child { border-top: 0; }
.an-note small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.an-note:hover { background: var(--line-2); color: var(--ink); }
.an-back { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); margin-bottom: 10px; }
.an-dl { display: grid; grid-template-columns: 130px 1fr; gap: 8px 12px; font-size: 13.5px; margin: 0; }
.an-dl dt { color: var(--muted); font-weight: 500; } .an-dl dd { margin: 0; }
.an-chat { max-height: 75vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; background: #F7F8FA; }
.an-msg { display: flex; }
.an-msg > div { max-width: 78%; padding: 9px 13px; border-radius: 16px; font-size: 14px; white-space: pre-wrap; background: #fff; border: 1px solid var(--line); }
.an-msg .by { display: block; font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 2px; white-space: normal; }
.an-msg.bot, .an-msg.staff { justify-content: flex-end; }
.an-msg.staff > div { background: #171A2C; color: #fff; border-color: #171A2C; }
.an-msg.staff .by { color: rgba(255,255,255,.65); }
.an-sys { text-align: center; font-size: 11.5px; color: var(--muted); }
@media (max-width: 1100px) { .an-stats, .an-stats.three { grid-template-columns: repeat(2, 1fr); } .an-stats > div { border-right: 0; } .an-mini { grid-template-columns: repeat(2, 1fr); } }

/* ---------- side menu group heading (e.g. Sales & Marketing Agent) ---------- */
.lb-nav-group { margin: 14px 12px 4px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.55); font-weight: 700; }
body.nav-mini .lb-nav-group { margin: 10px auto 2px; width: 24px; border-top: 1px solid rgba(255,255,255,.25); }

/* ---------- health dots: Excellent (green) · Good (amber) · Bad (red) — circle only, label on hover ---------- */
.hdot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; vertical-align: middle; }
.hdot.lg { width: 16px; height: 16px; }
.hdot.excellent { background: #16a34a; box-shadow: 0 0 0 4px rgba(22,163,74,.16); }
.hdot.good { background: #f59e0b; box-shadow: 0 0 0 4px rgba(245,158,11,.18); }
.hdot.bad { background: #dc2626; box-shadow: 0 0 0 4px rgba(220,38,38,.18); animation: hdot-pulse 1.6s ease-in-out infinite; }
.hdot.none { background: #cbd5e1; }
@keyframes hdot-pulse { 50% { box-shadow: 0 0 0 7px rgba(220,38,38,.05); } }
@media (prefers-reduced-motion: reduce) { .hdot.bad { animation: none; } }
.hdots { display: inline-flex; align-items: center; gap: 14px; padding: 8px 14px; border-radius: 99px; background: #fff; border: 1px solid #eef0f3; text-decoration: none; }
.hdots:hover { border-color: #d7dbe2; }

/* ---------- Ringkasan > Waktu respons AI ---------- */
.rt-agents { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.rt-agent { border: 1px solid #eef0f3; border-radius: 14px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; }
.rt-agent .big { font-size: 26px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.rt-agent .big small { font-size: 13px; font-weight: 600; color: #6b7280; margin-left: 2px; }
.rt-agent .sub { font-size: 12px; color: #6b7280; }
.rt-bar { display: flex; height: 12px; border-radius: 99px; overflow: hidden; background: #f1f3f6; gap: 2px; }
.rt-bar span { display: block; height: 100%; min-width: 2px; }
.rt-legend { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 6px 18px; margin-top: 10px; font-size: 12.5px; }
.rt-legend div { display: flex; gap: 8px; align-items: baseline; }
.rt-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; transform: translateY(1px); }
.rt-legend b { margin-left: auto; font-variant-numeric: tabular-nums; }
.rt-factors { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.rt-factors li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: #f8f9fb; }
.rt-factors li .hdot { margin-top: 4px; }
.rt-factors b { display: block; font-size: 13.5px; }
.rt-factors p { margin: 2px 0 0; font-size: 12.5px; color: #4b5563; }
.rt-factors p.fix { color: #111827; }
.rt-wait { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.rt-wait input { width: 80px; }

/* ---------- Pemantau AI ---------- */
.mon-hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.mon-hero .panel { display: flex; align-items: center; gap: 16px; }
.mon-hero .state { font-size: 22px; font-weight: 800; }
.mon-checks { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.mon-checks td { padding: 10px 8px; border-top: 1px solid #f0f2f5; vertical-align: top; }
.mon-checks td:first-child { width: 28px; }
.mon-checks .val { white-space: nowrap; font-variant-numeric: tabular-nums; color: #374151; }
.mon-checks .hint { color: #6b7280; font-size: 12.5px; }
.mon-inc { border: 1px solid #eef0f3; border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.mon-inc.open { border-color: #fecaca; background: #fffafa; }
.mon-inc .meta { font-size: 12px; color: #6b7280; }
.mon-inc .diag { white-space: pre-line; font-size: 13px; background: #f8f9fb; border-radius: 10px; padding: 8px 10px; margin-top: 8px; }
.mon-inc ul { margin: 6px 0 0; padding-left: 18px; font-size: 12.5px; color: #374151; }

/* ---------- Sales & Marketing Agent frame ---------- */
/* The app page sits directly on the Hub background; the frame takes the page's height (one scroll bar). */
.mkt-frame { display: block; width: 100%; height: calc(100vh - 170px); min-height: 480px; border: 0; background: transparent; }

/* ---------- Marketing: one menu item, several pages (MarketingAgentController::TABS) ---------- */
.mkt-tabs { display: flex; gap: 4px; padding: 4px; margin: 2px 0 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px;
    width: fit-content; max-width: 100%; overflow-x: auto; scrollbar-width: none; box-shadow: var(--shadow); }
.mkt-tabs a { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border-radius: 10px; color: var(--ink-2);
    font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.mkt-tabs a:hover { background: var(--line-2); color: var(--ink); }
.mkt-tabs a.active { background: var(--ink); color: #fff; box-shadow: 0 6px 16px -6px rgba(23,26,44,.45); }
