/* ===========================================================================
   SEO OS : AI SEO Command Center
   Recreated from the finished Claude Design template. Dark navy sidebar,
   light workspace, Plus Jakarta Sans + JetBrains Mono, green brand accent.
   =========================================================================== */

*{box-sizing:border-box;}
html,body{margin:0;padding:0;}
body{
  font-family:'Plus Jakarta Sans',ui-sans-serif,system-ui,sans-serif;
  background:#F4F6F8;
  color:#0E1414;
  -webkit-font-smoothing:antialiased;
}
::-webkit-scrollbar{width:10px;height:10px;}
::-webkit-scrollbar-thumb{background:#cdd5db;border-radius:9999px;border:2px solid transparent;background-clip:content-box;}
::-webkit-scrollbar-track{background:transparent;}
.mono{font-family:'JetBrains Mono',ui-monospace,monospace;}
.app-loading{display:flex;align-items:center;justify-content:center;height:100vh;color:#7E8C8A;font-size:14px;}

/* ---------- login screen ---------- */
.login-screen{min-height:100vh;display:flex;align-items:center;justify-content:center;background:#0F172A;padding:24px;}
.login-card{width:100%;max-width:380px;padding:32px 30px;}
.login-brand{display:flex;align-items:center;gap:11px;margin-bottom:22px;}
.login-brand .b-text{display:flex;flex-direction:column;line-height:1;}
.login-name{font-weight:800;font-size:19px;color:#0E1414;letter-spacing:-0.01em;line-height:1;}
.login-sub{font-size:11px;font-weight:600;color:#7E8C8A;letter-spacing:0.04em;margin-top:4px;line-height:1;}
.login-form{display:flex;flex-direction:column;gap:14px;}
.field{display:flex;flex-direction:column;gap:6px;}
.field-label{font-size:12px;font-weight:700;color:#5A6968;}
.input{width:100%;padding:10px 13px;border:1px solid #E4E8E6;border-radius:10px;font-family:inherit;font-size:13.5px;color:#1A2322;background:#fff;outline:none;transition:border-color .15s,box-shadow .15s;}
.input:focus{border-color:#1F7A43;box-shadow:0 0 0 3px rgba(31,122,67,0.12);}
.input::placeholder{color:#AAB5B3;}
.login-btn{margin-top:4px;width:100%;padding:11px;border-radius:10px;border:1px solid #1F7A43;background:#1F7A43;color:#fff;font-family:inherit;font-size:14px;font-weight:700;cursor:pointer;transition:background .15s,border-color .15s;}
.login-btn:hover{background:#166337;border-color:#166337;}
.login-btn:disabled{opacity:0.7;cursor:default;}
.login-error{font-size:12.5px;font-weight:600;color:#9E2B20;line-height:1.4;}
.login-hint{font-size:13px;color:#5A6968;line-height:1.5;margin:0 0 18px;}
.copy-row{display:flex;align-items:center;gap:8px;}
.copy-row code{flex:1;min-width:0;word-break:break-all;font-family:'JetBrains Mono',ui-monospace,monospace;font-size:12px;background:#F4F6F8;border:1px solid #E4E8E6;border-radius:8px;padding:8px 10px;color:#1A2322;}

/* ---------- avatar menu ---------- */
.avatar-wrap{position:relative;}
.avatar.avatar-btn{border:0;cursor:pointer;font-family:inherit;padding:0;}
.avatar-menu{position:absolute;top:44px;right:0;min-width:200px;background:#fff;border:1px solid #E4E8E6;border-radius:12px;box-shadow:0 12px 30px -10px rgba(14,20,20,0.22);padding:6px;z-index:60;}
.avatar-menu[hidden]{display:none;}
.am-name{padding:8px 10px 8px;font-size:11px;color:#7E8C8A;border-bottom:1px solid #EEF1F3;margin-bottom:4px;}
.am-name b{display:block;font-size:13px;font-weight:700;color:#1A2322;margin-top:3px;}
.am-item{width:100%;display:flex;align-items:center;gap:9px;padding:9px 10px;border-radius:8px;border:0;background:none;font-family:inherit;font-size:13px;font-weight:600;color:#9E2B20;cursor:pointer;text-align:left;}
.am-item:hover{background:#FBF1F0;}

/* ---------- layout shell ---------- */
.app{display:flex;height:100vh;min-height:760px;overflow:hidden;}
.main{flex:1;display:flex;flex-direction:column;min-width:0;}
.workspace{flex:1;overflow-y:auto;padding:24px 28px 56px;}

/* ---------- sidebar ---------- */
.sidebar{width:250px;flex-shrink:0;background:#0F172A;display:flex;flex-direction:column;padding:18px 14px 16px;gap:2px;}
.brand{display:flex;align-items:center;gap:10px;padding:4px 8px 16px;}
.brand .b-name{font-weight:800;font-size:16px;color:#fff;letter-spacing:-0.01em;line-height:1;}
.brand .b-sub{font-size:10.5px;font-weight:600;color:#64748B;letter-spacing:0.04em;margin-top:3px;line-height:1;}
.brand .b-text{display:flex;flex-direction:column;line-height:1;}
.nav{flex:1;overflow-y:auto;display:flex;flex-direction:column;gap:2px;margin:0 -4px;padding:0 4px;}
.nav-item{
  width:100%;display:flex;align-items:center;gap:11px;padding:9px 12px;border-radius:10px;
  font-size:13.5px;font-weight:500;cursor:pointer;border:0;font-family:inherit;text-align:left;
  background:transparent;color:#94A3B8;transition:background .15s,color .15s;
}
.nav-item .ico{display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;flex-shrink:0;}
.nav-item .nav-label{flex:1;}
.nav-item:hover{background:rgba(255,255,255,0.06);color:#CBD5E1;}
.nav-item.active{background:rgba(88,178,122,0.14);color:#7FCF9A;font-weight:600;}
.nav-item.active:hover{background:rgba(88,178,122,0.2);}
.nav-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border-radius:9999px;font-size:10.5px;font-weight:700;background:#7C3AED;color:#fff;}
.nav-item.active .nav-badge{background:rgba(124,58,237,0.45);}

.sys-status{margin-top:12px;padding:13px 14px;background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.07);border-radius:12px;}
.sys-status .ss-head{display:flex;align-items:center;justify-content:space-between;}
.sys-status .ss-label{font-size:10px;font-weight:700;letter-spacing:0.07em;color:#64748B;}
.sys-status .ss-state{font-size:13px;font-weight:800;color:#7FCF9A;}
.sys-status .ss-state.bad{color:#F0A4A4;}
.sys-status .ss-bar{height:5px;border-radius:9999px;background:rgba(255,255,255,0.08);margin-top:8px;overflow:hidden;}
.sys-status .ss-bar i{display:block;height:100%;background:linear-gradient(90deg,#2E9155,#58B27A);border-radius:9999px;}
.sys-status .ss-line{display:flex;align-items:center;gap:7px;margin-top:11px;}
.sys-status .ss-dot{width:7px;height:7px;border-radius:9999px;background:#34D399;box-shadow:0 0 0 3px rgba(52,211,153,0.18);flex-shrink:0;}
.sys-status .ss-text{font-size:11.5px;color:#94A3B8;}

.sidebar-version{margin-top:10px;padding:0 4px;font-size:10.5px;color:#64748B;line-height:1.5;}
.sidebar-version a{color:#7FCF9A;font-weight:600;text-decoration:none;}
.sidebar-version a:hover{text-decoration:underline;}

/* ---------- topbar ---------- */
.topbar{background:#fff;border-bottom:1px solid #E4E8E6;flex-shrink:0;}
.topbar-row{display:flex;align-items:center;gap:10px;padding:13px 28px 12px;}
.eyebrow{font-size:11px;font-weight:700;letter-spacing:0.06em;color:#7E8C8A;text-transform:uppercase;margin-right:4px;}
.client-pills{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.pill{display:inline-flex;align-items:center;gap:8px;padding:7px 14px;border-radius:9999px;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit;white-space:nowrap;border:1px solid #E4E8E6;background:#fff;color:#2C3837;}
.pill:hover{border-color:#C4CDD3;}
.pill.active{border-color:#0F172A;background:#0F172A;color:#fff;}
.pill.add{border:1px dashed #C4CDD3;color:#7E8C8A;background:#fff;}
.topbar-right{margin-left:auto;display:flex;align-items:center;gap:12px;}
.refreshed{font-size:11.5px;color:#AAB5B3;white-space:nowrap;}
.icon-btn{width:36px;height:36px;border-radius:9999px;border:1px solid #E4E8E6;background:#fff;display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative;color:#2C3837;}
.icon-btn .dot-badge{position:absolute;top:6px;right:7px;width:7px;height:7px;border-radius:9999px;background:#D9A021;border:1.5px solid #fff;}
.avatar{width:36px;height:36px;border-radius:9999px;background:#1F7A43;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;}

/* ---------- context bar ---------- */
.context{display:flex;align-items:center;gap:16px;padding:12px 28px;border-top:1px solid #EEF1F3;background:#FBFCFB;flex-wrap:wrap;}
.ctx-id{display:flex;align-items:center;gap:11px;min-width:0;}
.ctx-title{font-size:15px;font-weight:800;color:#0E1414;letter-spacing:-0.01em;line-height:1.15;}
.ctx-domain{font-size:12px;color:#7E8C8A;margin-top:2px;}
.ctx-divider{width:1px;height:30px;background:#E4E8E6;}
.ctx-chips{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.chip{display:inline-flex;align-items:center;gap:7px;padding:6px 11px;border-radius:9999px;background:#fff;border:1px solid #E4E8E6;font-size:12px;white-space:nowrap;}
.chip .ck{color:#7E8C8A;font-weight:500;}
.chip .cv{color:#1A2322;font-weight:700;}
.ctx-right{margin-left:auto;display:flex;align-items:center;gap:12px;flex-wrap:wrap;}
.ctx-status{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border-radius:9999px;font-size:12.5px;font-weight:700;background:#E7F5EC;color:#166337;white-space:nowrap;}
.ctx-status.setup{background:#FBF1DA;color:#8A6314;}
.ctx-status i{width:7px;height:7px;border-radius:9999px;background:currentColor;opacity:.85;}
.ctx-scoped{display:inline-flex;align-items:center;gap:6px;padding:5px 11px;border-radius:9999px;font-size:12px;font-weight:700;background:#EDF1F4;color:#54636B;white-space:nowrap;}
.ctx-appr{display:inline-flex;align-items:center;gap:7px;font-size:12.5px;font-weight:600;color:#6D28D9;}
.ctx-appr i{width:7px;height:7px;border-radius:9999px;background:#7C3AED;}
.ctx-refresh{display:inline-flex;align-items:center;gap:7px;padding:8px 14px;border-radius:9999px;font-size:12.5px;font-weight:700;font-family:inherit;cursor:pointer;border:1px solid #BFE0CC;background:#fff;color:#166337;white-space:nowrap;}
.ctx-refresh:hover{background:#F2F9F4;}

/* ---------- generic primitives ---------- */
.card{background:#fff;border:1px solid #E4E8E6;border-radius:14px;box-shadow:0 1px 2px rgba(14,20,20,.04);}
.dot{border-radius:9999px;flex-shrink:0;display:inline-block;}
.page-title{margin-bottom:18px;}
.page-title h1{margin:0;font-size:27px;font-weight:800;letter-spacing:-0.025em;color:#0E1414;}
.page-title p{margin:7px 0 0;font-size:14px;color:#5A6968;max-width:660px;line-height:1.5;}
.section-label{font-size:11px;font-weight:700;letter-spacing:0.06em;text-transform:uppercase;color:#7E8C8A;margin:4px 2px 12px;}

.badge{display:inline-flex;align-items:center;gap:6px;padding:3px 10px;border-radius:9999px;font-size:11px;font-weight:700;white-space:nowrap;}
.badge.green{background:#E7F5EC;color:#166337;}
.badge.amber{background:#FBF1DA;color:#8A6314;}
.badge.red{background:#FBE7E4;color:#9E2B20;}
.badge.blue{background:#E7EEFE;color:#1D4ED8;}
.badge.purple{background:#F1E9FB;color:#6D28D9;}
.badge.slate{background:#EDF1F4;color:#54636B;}

.client-cell{display:inline-flex;align-items:center;gap:8px;font-weight:600;color:#1A2322;white-space:nowrap;}

/* buttons */
.btn{padding:8px 16px;border-radius:9999px;font-size:12.5px;font-weight:700;font-family:inherit;cursor:pointer;border:1px solid transparent;white-space:nowrap;background:#fff;color:#2C3837;}
.btn.sm{padding:7px 14px;}
.btn.primary{background:#1F7A43;color:#fff;border-color:#1F7A43;}
.btn.primary:hover{background:#1A6B3A;}
.btn.ghost{background:#fff;color:#2C3837;border-color:#E4E8E6;font-weight:600;}
.btn.ghost:hover{border-color:#C4CDD3;}
.btn.danger{background:#fff;color:#9E2B20;border-color:#F0D7D3;font-weight:600;}
.btn.tg{background:#fff;color:#1D4ED8;border-color:#C9DBF8;font-weight:600;}
.link-action{font-size:12.5px;font-weight:700;background:none;border:0;cursor:pointer;font-family:inherit;white-space:nowrap;}
.link-action.green{color:#166337;}
.link-action.blue{color:#1D4ED8;}
.link-action.purple{color:#6D28D9;}

.fchip{padding:7px 14px;border-radius:9999px;font-size:12.5px;font-weight:600;cursor:pointer;font-family:inherit;white-space:nowrap;border:1px solid #E4E8E6;background:#fff;color:#5A6968;}
.fchip.active{border-color:#0F172A;background:#0F172A;color:#fff;}
.filters{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:18px;}

/* ---------- tables ---------- */
.table-wrap{overflow-x:auto;}
.seo-table{width:100%;border-collapse:collapse;}
.seo-table th{text-align:left;}
.seo-table tbody tr:last-child td{border-bottom:0;}
.th{padding:9px 14px 11px;font-size:10.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#7E8C8A;border-bottom:1px solid #E4E8E6;white-space:nowrap;}
.td{padding:11px 14px;border-bottom:1px solid #EEF1F3;font-size:12.5px;color:#2C3837;vertical-align:middle;}
.th.pl,.td.pl{padding-left:20px;}
.th.pr,.td.pr{padding-right:20px;}
.th.r,.td.r{text-align:right;}
.th.c,.td.c{text-align:center;}
.tnum{font-variant-numeric:tabular-nums;}
.td .url{font-size:11px;color:#AAB5B3;margin-top:2px;}
.td.page{font-weight:600;color:#1D4ED8;max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.td.why{color:#5A6968;max-width:300px;line-height:1.4;}
.td.muted{color:#5A6968;}
.empty-row{padding:28px 16px;text-align:center;color:#9AA6A4;font-size:13px;}

/* ---------- section card ---------- */
.sec-head{display:flex;align-items:center;gap:11px;padding:17px 20px 14px;}
.sec-head.bordered{border-bottom:1px solid #EEF1F3;}
.sec-icon{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:8px;flex-shrink:0;}
.sec-titles{min-width:0;flex:1;}
.sec-title{font-size:15.5px;font-weight:800;color:#0E1414;letter-spacing:-0.01em;}
.sec-sub{font-size:12.5px;color:#7E8C8A;margin-top:1px;}
.sec-count{margin-left:auto;font-size:12px;font-weight:700;padding:4px 10px;border-radius:9999px;}
.sec-count.red{color:#9E2B20;background:#FBE7E4;}
.sec-action{margin-left:auto;}
.card.section-card{overflow:hidden;margin-bottom:20px;}

/* ---------- command center ---------- */
.cc-head{display:flex;align-items:flex-start;gap:20px;flex-wrap:wrap;margin-bottom:22px;}
.arch{margin-left:auto;display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.arch-pill{display:inline-flex;align-items:center;gap:7px;padding:7px 12px;border-radius:9999px;font-size:12px;font-weight:600;}
.arch-pill i{width:7px;height:7px;border-radius:9999px;}
.arch-pill.blue{background:#E7EEFE;color:#1D4ED8;}
.arch-pill.blue i{background:#2563EB;}
.arch-pill.purple{background:#F1E9FB;color:#6D28D9;}
.arch-pill.purple i{background:#7C3AED;}
.arch-pill.dark{background:#0F172A;color:#fff;font-weight:700;}
.arch-pill.dark i{background:#58B27A;}
.arch-arrow{color:#AAB5B3;font-size:13px;}

.kpi-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:14px;margin-bottom:22px;}
.kpi{padding:16px;}
.kpi-top{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;}
.kpi-label{font-size:10.5px;font-weight:700;letter-spacing:0.04em;text-transform:uppercase;color:#7E8C8A;line-height:1.35;}
.kpi-ico{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:8px;flex-shrink:0;}
.kpi-value{font-size:30px;font-weight:800;color:#0E1414;letter-spacing:-0.02em;margin-top:10px;line-height:1;}
.kpi-sub{font-size:11.5px;font-weight:600;margin-top:6px;}

.perf-wrap{margin-bottom:20px;}
.perf-head{display:flex;align-items:baseline;gap:10px;margin-bottom:12px;}
.perf-head h2{margin:0;font-size:16px;font-weight:800;color:#0E1414;letter-spacing:-0.01em;}
.perf-head span{font-size:12px;color:#7E8C8A;}
.perf-grid{display:grid;gap:14px;}
.perf-card{padding:18px 20px;}
.perf-card h3{margin:0 0 14px;display:flex;align-items:center;gap:9px;font-size:14px;font-weight:800;color:#0E1414;}
.perf-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;}
.pm-label{font-size:10.5px;font-weight:700;letter-spacing:0.04em;text-transform:uppercase;color:#7E8C8A;}
.pm-value{font-size:21px;font-weight:800;color:#0E1414;margin-top:6px;letter-spacing:-0.01em;}
.pm-delta{font-size:12px;font-weight:700;margin-top:4px;}
.pm-delta.good{color:#166337;}
.pm-delta.bad{color:#C0392B;}

.two-col{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:20px;}
.preview-card{display:flex;flex-direction:column;}
.preview-list{padding:6px 8px;}
.preview-row{display:flex;align-items:center;gap:12px;padding:11px 12px;border-radius:10px;}
.preview-row:hover{background:#F4F6F8;}
.pr-main{flex:1;min-width:0;}
.pr-title{font-size:13px;font-weight:600;color:#1A2322;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.pr-sub{font-size:11.5px;color:#7E8C8A;margin-top:2px;}
.pr-time{text-align:right;white-space:nowrap;}
.pr-time b{font-size:12px;font-weight:700;color:#1A2322;display:block;}
.pr-time small{font-size:11px;color:#7E8C8A;}

/* ---------- clients ---------- */
.client-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;}
.cc-card{overflow:hidden;}
.cc-hd{padding:18px 20px;border-bottom:1px solid #EEF1F3;display:flex;align-items:center;gap:12px;}
.cc-name{font-size:16px;font-weight:800;color:#0E1414;}
.cc-domain{font-size:12px;color:#7E8C8A;}
.cc-fields{padding:6px 20px 14px;}
.cc-field{display:flex;align-items:center;gap:12px;padding:9px 0;border-bottom:1px solid #F4F6F8;}
.cc-field .fk{width:132px;flex-shrink:0;font-size:11.5px;font-weight:600;color:#7E8C8A;text-transform:uppercase;letter-spacing:0.03em;}
.cc-field .fv{flex:1;font-size:13px;color:#1A2322;font-weight:500;min-width:0;overflow:hidden;text-overflow:ellipsis;}
.cc-stats{padding:14px 20px;background:#FBFCFB;border-top:1px solid #EEF1F3;display:flex;gap:18px;flex-wrap:wrap;}
.cc-stat b{font-size:20px;font-weight:800;color:#0E1414;display:block;}
.cc-stat b.appr{color:#6D28D9;}
.cc-stat span{font-size:11px;color:#7E8C8A;margin-top:2px;display:block;}

/* ---------- approvals ---------- */
.warn-banner{display:flex;align-items:center;gap:10px;padding:13px 16px;border-radius:12px;background:#FBE7E4;border:1px solid #F2D2CC;margin-bottom:18px;}
.warn-banner .wt{flex:1;}
.warn-banner b{font-size:13px;font-weight:700;color:#9E2B20;}
.warn-banner span{font-size:13px;color:#7A2A22;}
.appr-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;}
.appr-card{overflow:hidden;}
.appr-body{padding:18px 20px;}
.appr-top{display:flex;align-items:center;gap:8px;margin-bottom:12px;flex-wrap:wrap;}
.appr-client{display:inline-flex;align-items:center;gap:7px;font-size:12px;font-weight:600;color:#5A6968;}
.appr-title{font-size:15px;font-weight:700;color:#0E1414;line-height:1.35;letter-spacing:-0.01em;}
.appr-req{margin-top:12px;font-size:13px;color:#2C3837;line-height:1.5;}
.appr-req b{font-weight:700;color:#0E1414;}
.appr-evidence{margin-top:10px;font-size:12.5px;color:#5A6968;line-height:1.5;background:#FBFCFB;border:1px solid #EEF1F3;border-radius:10px;padding:10px 12px;}
.appr-url{margin-top:10px;display:flex;align-items:center;gap:8px;font-size:11.5px;color:#7E8C8A;}
.appr-url .u{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.appr-actions{display:flex;align-items:center;gap:8px;margin-top:16px;padding-top:15px;border-top:1px solid #EEF1F3;flex-wrap:wrap;}
.appr-done{display:inline-flex;align-items:center;gap:7px;font-size:13px;font-weight:700;color:#166337;}
.appr-policy{display:inline-flex;align-items:center;gap:7px;font-size:13px;font-weight:600;color:#9E2B20;}
.ml-auto{margin-left:auto;}

/* ---------- task board (kanban) ---------- */
.board-head{display:flex;align-items:flex-start;gap:20px;flex-wrap:wrap;margin-bottom:18px;}
.board-note{margin-left:auto;display:flex;align-items:center;gap:7px;padding-top:6px;white-space:nowrap;font-size:12.5px;color:#7E8C8A;}
.kanban{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;align-items:start;}
.kcol{background:#EEF1F4;border-radius:12px;padding:10px;display:flex;flex-direction:column;gap:9px;min-width:0;}
.kcol-head{display:flex;align-items:center;gap:8px;padding:4px 6px 2px;}
.kcol-head .kname{font-size:12.5px;font-weight:700;color:#2C3837;letter-spacing:-0.01em;}
.kcol-count{margin-left:auto;display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:18px;padding:0 6px;border-radius:9999px;font-size:11px;font-weight:700;background:#fff;color:#5A6968;border:1px solid #E4E8E6;}
.kcard{background:#fff;border:1px solid #E4E8E6;border-radius:10px;padding:11px 12px;box-shadow:0 1px 2px rgba(14,20,20,.04);}
.kcard-top{display:flex;align-items:center;gap:7px;flex-wrap:wrap;}
.kcard-client{font-size:11px;font-weight:600;color:#5A6968;white-space:nowrap;}
.kcard-title{font-size:12.5px;font-weight:700;color:#1A2322;line-height:1.38;margin-top:8px;}
.kcard-page{font-size:10.5px;color:#AAB5B3;margin-top:6px;}
.kcol-empty{border:1px dashed #D6DDE1;border-radius:8px;padding:18px 8px;text-align:center;font-size:11.5px;color:#AAB5B3;}

/* ---------- stat chips ---------- */
.stat-chips{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px;}
.stat-chip{display:flex;align-items:center;gap:9px;padding:10px 15px;background:#fff;border:1px solid #E4E8E6;border-radius:12px;}
.stat-chip b{font-size:19px;font-weight:800;color:#0E1414;}
.stat-chip span{font-size:12.5px;color:#5A6968;}

/* ---------- ctr ---------- */
.ctr-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;}
.ctr-card{overflow:hidden;}
.ctr-body{padding:18px 20px;}
.ctr-page{font-size:14px;font-weight:700;color:#1D4ED8;}
.ctr-target{font-size:12px;color:#7E8C8A;margin-top:4px;}
.ctr-proposed{margin-top:14px;padding:12px 14px;background:#F4F6F8;border-radius:10px;border:1px solid #EAEEF1;}
.ctr-proposed .lbl{font-size:10.5px;font-weight:700;letter-spacing:0.05em;text-transform:uppercase;color:#7E8C8A;margin-bottom:5px;}
.ctr-proposed p{margin:0;font-size:13px;color:#2C3837;line-height:1.5;}
.ctr-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:14px;}
.ctr-metric{text-align:center;padding:10px;background:#FBFCFB;border-radius:10px;}
.ctr-metric b{font-size:18px;font-weight:800;color:#0E1414;display:block;}
.ctr-metric span{font-size:10.5px;color:#7E8C8A;margin-top:3px;display:block;}
.ctr-foot{margin-top:14px;padding-top:14px;border-top:1px solid #EEF1F3;display:flex;align-items:center;gap:10px;}
.ctr-foot .note{font-size:12px;color:#7E8C8A;flex:1;}

/* ---------- reviews / placeholders ---------- */
.lead-card{padding:28px 30px;display:flex;gap:18px;align-items:flex-start;margin-bottom:18px;}
.lead-icon{display:inline-flex;align-items:center;justify-content:center;width:46px;height:46px;border-radius:12px;flex-shrink:0;}
.lead-icon.slate{background:#EDF1F4;color:#54636B;}
.lead-icon.green{background:#E7F5EC;color:#166337;}
.lead-card h2{margin:0;font-size:16px;font-weight:800;color:#0E1414;}
.lead-card p{margin:6px 0 0;font-size:13.5px;color:#5A6968;line-height:1.55;max-width:600px;}
.how-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;}
.how-card{padding:18px 20px;}
.how-card .stars{display:inline-flex;color:#D9A021;letter-spacing:1px;}
.how-card h3{margin:10px 0 0;font-size:14px;font-weight:700;color:#0E1414;}
.how-card p{margin:6px 0 0;font-size:13px;color:#5A6968;line-height:1.5;}

/* ---------- schedule ---------- */
.overdue{display:flex;align-items:center;gap:10px;padding:11px 15px;border-radius:12px;background:#FBF1DA;border:1px solid #F0E0BD;margin-bottom:16px;font-size:13px;color:#7A5A12;}
.overdue b{color:#5C440D;}

/* ---------- settings ---------- */
.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:24px;}
.routing-card{padding:18px 20px;}
.routing-head{display:flex;align-items:center;gap:10px;margin-bottom:14px;}
.routing-icon{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:9px;background:#E7EEFE;color:#1D4ED8;flex-shrink:0;}
.routing-name{font-size:14px;font-weight:800;color:#0E1414;}
.routing-topic{font-size:11.5px;color:#7E8C8A;}
.routing-row{display:flex;gap:12px;padding:8px 0;border-bottom:1px solid #F4F6F8;}
.routing-row .rk{width:120px;flex-shrink:0;font-size:11.5px;font-weight:600;color:#7E8C8A;text-transform:uppercase;letter-spacing:0.03em;}
.routing-row .rv{flex:1;font-size:12.5px;color:#1A2322;min-width:0;overflow:hidden;text-overflow:ellipsis;}
.policy-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;}
.policy-card{padding:18px 20px;}
.policy-card h3{margin:0 0 8px;font-size:14px;font-weight:800;color:#0E1414;}
.policy-card p{margin:0;font-size:13px;color:#5A6968;line-height:1.55;}
.conn-line{display:inline-flex;align-items:center;gap:6px;font-weight:600;}

/* ---------- responsive ---------- */
@media (max-width:1280px){
  .kpi-grid{grid-template-columns:repeat(3,1fr);}
}
@media (max-width:1080px){
  .two-col,.client-grid,.appr-grid,.ctr-grid,.how-grid,.settings-grid,.policy-grid{grid-template-columns:1fr;}
  .kanban{grid-template-columns:repeat(2,1fr);}
}
@media (max-width:720px){
  .kpi-grid{grid-template-columns:repeat(2,1fr);}
  .sidebar{display:none;}
}

/* ---------- task detail slide-over (Phase A) ---------- */
.kcard{cursor:pointer;transition:box-shadow .12s,transform .12s;}
.kcard:hover{box-shadow:0 4px 14px rgba(16,33,20,.10);transform:translateY(-1px);}
.seo-table tr.rowlink{cursor:pointer;}
.seo-table tr.rowlink:hover td{background:#F4F8F5;}

.slideover-backdrop{position:fixed;inset:0;background:rgba(14,20,20,.38);display:flex;justify-content:flex-end;z-index:60;animation:so-fade .15s ease;}
@keyframes so-fade{from{opacity:0}to{opacity:1}}
.slideover{width:440px;max-width:92vw;height:100%;background:#fff;display:flex;flex-direction:column;box-shadow:-12px 0 32px rgba(16,33,20,.18);animation:so-slide .2s cubic-bezier(.2,.7,.3,1);}
@keyframes so-slide{from{transform:translateX(28px);opacity:.6}to{transform:translateX(0);opacity:1}}
.slideover-head{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid #EAEFEC;}
.so-badges{display:flex;gap:8px;flex-wrap:wrap;}
.slideover-x{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border:1px solid #E3E9E5;border-radius:9px;background:#fff;color:#54636B;cursor:pointer;}
.slideover-x:hover{background:#F4F8F5;color:#0E1414;}
.slideover-body{flex:1;overflow:auto;padding:20px;}
.so-client{display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:#54636B;margin-bottom:8px;}
.so-title{margin:0 0 16px;font-size:19px;font-weight:800;letter-spacing:-.02em;color:#0E1414;line-height:1.3;}
.so-next{background:#E7F5EC;border:1px solid #CDEBD8;border-radius:11px;padding:13px 15px;margin-bottom:18px;}
.so-next-v{font-size:14px;font-weight:600;color:#13502E;margin-top:3px;line-height:1.45;}
.so-rows{display:flex;flex-direction:column;gap:11px;}
.so-row{display:flex;justify-content:space-between;gap:16px;font-size:13px;border-bottom:1px solid #F0F3F1;padding-bottom:11px;}
.so-k{color:#7E8C8A;font-weight:600;white-space:nowrap;}
.so-v{color:#1A2322;text-align:right;word-break:break-word;overflow-wrap:anywhere;}
.so-v.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;}
.so-notes{margin-top:18px;}
.so-notes p{margin:5px 0 0;font-size:13.5px;color:#2C3837;line-height:1.5;}
.slideover-foot{display:flex;gap:10px;justify-content:flex-end;padding:16px 20px;border-top:1px solid #EAEFEC;}

/* ---------- queued pill + toasts ---------- */
.queued-pill{display:inline-flex;align-items:center;gap:7px;font-size:13px;font-weight:700;color:#6D28D9;background:#F1E9FB;border:1px solid #E2D4F7;border-radius:9px;padding:8px 13px;}
#toast-host{position:fixed;right:20px;bottom:20px;display:flex;flex-direction:column;gap:10px;z-index:80;max-width:380px;}
.toast{display:flex;align-items:flex-start;gap:10px;background:#fff;border:1px solid #E3E9E5;border-left:3px solid #7E8C8A;border-radius:11px;padding:13px 15px;box-shadow:0 8px 24px rgba(16,33,20,.14);font-size:13.5px;color:#1A2322;line-height:1.45;opacity:0;transform:translateY(8px);transition:opacity .25s,transform .25s;}
.toast.show{opacity:1;transform:translateY(0);}
.toast-dot{flex:none;width:9px;height:9px;border-radius:50%;margin-top:5px;}
.toast-msg{font-weight:500;}

@media (max-width:720px){
  .slideover{width:100vw;max-width:100vw;}
  #toast-host{left:14px;right:14px;max-width:none;}
}

/* ---------- Chat with Hermes (Phase C) ---------- */
.chat-toggle{color:#7C3AED;}
.chat-toggle .hermes-ico{width:30px;height:30px;object-fit:cover;border-radius:9999px;}
.chat-head-ico img.hermes-ico{width:32px;height:32px;object-fit:cover;border-radius:8px;}
.chat-empty img.hermes-ico{width:64px;height:64px;object-fit:contain;border-radius:12px;margin-bottom:10px;}
#chat-panel{position:fixed;top:0;right:0;height:100%;z-index:70;}
.chat-win{width:400px;max-width:94vw;height:100%;background:#fff;border-left:1px solid #E3E9E5;box-shadow:-12px 0 32px rgba(16,33,20,.14);display:flex;flex-direction:column;animation:so-slide .2s cubic-bezier(.2,.7,.3,1);}
.chat-head{display:flex;align-items:center;gap:11px;padding:16px 18px;border-bottom:1px solid #EAEFEC;}
.chat-head-ico{display:inline-flex;width:32px;height:32px;align-items:center;justify-content:center;background:#F1E9FB;color:#7C3AED;border-radius:9px;flex:none;}
.chat-head-t{flex:1;min-width:0;}
.chat-title{font-size:14px;font-weight:800;color:#0E1414;}
.chat-scope{font-size:12px;color:#7E8C8A;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.chat-body{flex:1;overflow:auto;padding:18px;display:flex;flex-direction:column;gap:12px;background:#F8FAFC;}
.chat-empty{margin:auto;text-align:center;color:#7E8C8A;max-width:290px;}
.chat-empty svg{color:#C3B4E6;margin-bottom:10px;}
.chat-empty p{font-size:13px;line-height:1.55;}
.chat-msg{display:flex;}
.chat-msg.o{justify-content:flex-end;}
.chat-msg.a{justify-content:flex-start;}
.chat-bubble{max-width:82%;padding:10px 13px;border-radius:13px;font-size:13.5px;line-height:1.5;white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere;}
.chat-msg.o .chat-bubble{background:#1F7A43;color:#fff;border-bottom-right-radius:4px;}
.chat-msg.a .chat-bubble{background:#fff;color:#1A2322;border:1px solid #E3E9E5;border-bottom-left-radius:4px;}
.chat-msg.failed .chat-bubble{background:#FBE7E4;color:#9E2B20;border-color:#F1C9C3;}
.chat-bubble.thinking{display:inline-flex;gap:4px;align-items:center;}
.chat-bubble.thinking i{width:6px;height:6px;border-radius:50%;background:#AAB5B3;animation:chat-blink 1.2s infinite;}
.chat-bubble.thinking i:nth-child(2){animation-delay:.2s;}
.chat-bubble.thinking i:nth-child(3){animation-delay:.4s;}
@keyframes chat-blink{0%,80%,100%{opacity:.3}40%{opacity:1}}
.chat-composer{display:flex;gap:8px;padding:12px;border-top:1px solid #EAEFEC;align-items:flex-end;}
.chat-input{flex:1;resize:none;max-height:120px;border:1px solid #E3E9E5;border-radius:10px;padding:9px 12px;font:inherit;font-size:13.5px;line-height:1.4;outline:none;}
.chat-input:focus{border-color:#1F7A43;box-shadow:0 0 0 3px rgba(31,122,67,.12);}
.chat-send{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;flex:none;background:#1F7A43;color:#fff;border:none;border-radius:10px;cursor:pointer;}
.chat-send:hover{background:#166337;}

/* ---------- reviews screen ---------- */
.kpi-grid-5{grid-template-columns:repeat(5,1fr);}
.dist{display:flex;flex-direction:column;gap:5px;margin-top:10px;}
.dr{display:flex;align-items:center;gap:8px;font-size:11px;color:#5A6968;font-weight:600;}
.dr b{width:8px;text-align:right;color:#1A2322;font-variant-numeric:tabular-nums;}
.dr .tr{flex:1;height:7px;background:#EDF1F4;border-radius:9999px;overflow:hidden;}
.dr .fl{display:block;height:100%;border-radius:9999px;background:#1F7A43;}
.dr .fl.low{background:#C4514A;}
.dr .n{width:16px;font-variant-numeric:tabular-nums;text-align:right;color:#7E8C8A;}
.feed{display:flex;flex-direction:column;gap:14px;max-width:860px;}
.rev{padding:18px 20px;}
.rev-head{display:flex;align-items:center;gap:12px;}
.avat{width:34px;height:34px;border-radius:9999px;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:13px;color:#fff;flex-shrink:0;}
.rev-who{flex:1;min-width:0;}
.rev-name{font-weight:700;font-size:13.5px;color:#0E1414;}
.rev-meta{font-size:11.5px;color:#7E8C8A;font-weight:600;margin-top:2px;}
.rev-meta .stars{color:#D9A021;letter-spacing:1.5px;}
.stars .off{color:#DDE3E1;}
.rev-text{margin:12px 0 0;font-size:13.5px;color:#1A2322;line-height:1.55;max-width:66ch;}
.tags{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px;}
.tag{font-size:10.5px;font-weight:700;padding:2px 9px;border-radius:9999px;background:#EDF1F4;color:#54636B;}
.reply{margin-top:14px;padding:12px 14px;border-radius:10px;background:#F4F6F8;border:1px solid #E4E8E6;}
.reply .rl{font-size:10.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#7E8C8A;}
.reply p{margin:6px 0 0;font-size:13px;color:#5A6968;line-height:1.5;}
.draft{margin-top:14px;padding:14px 16px;border-radius:12px;background:#F3FAF5;border:1px solid #BFE3CC;}
.draft .dl{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#166337;}
.draft .draft-text{margin:8px 0 0;font-size:13.5px;color:#1A2322;line-height:1.55;}
.draft-actions{display:flex;gap:10px;margin-top:13px;}
.draft-editor{width:100%;margin-top:8px;min-height:96px;padding:10px 12px;border:1px solid #1F7A43;border-radius:9px;font-family:inherit;font-size:13.5px;line-height:1.55;color:#1A2322;resize:vertical;background:#fff;outline:none;box-shadow:0 0 0 3px rgba(31,122,67,.10);}
.learn-note{display:flex;align-items:center;gap:7px;margin-top:9px;font-size:11.5px;font-weight:600;color:#5A6968;}
.waiting{margin-top:14px;font-size:12.5px;color:#7E8C8A;font-weight:600;display:flex;align-items:center;gap:8px;}
@media (max-width:1200px){.kpi-grid-5{grid-template-columns:repeat(3,1fr);}}
@media (max-width:760px){.kpi-grid-5{grid-template-columns:repeat(2,1fr);}}

/* ---------- reviews trend + themes ---------- */
.trend-label{display:flex;align-items:center;gap:12px;}
.range-chips{display:inline-flex;gap:6px;text-transform:none;letter-spacing:0;}
.rchip{padding:4px 12px;border-radius:9999px;border:1px solid #E4E8E6;background:#fff;font-family:inherit;font-size:11.5px;font-weight:700;color:#5A6968;cursor:pointer;}
.rchip.active{border-color:#1F7A43;background:#E7F5EC;color:#166337;}
.trend-card{padding:18px 20px 14px;max-width:860px;}
.trend-panel + .trend-panel{margin-top:14px;padding-top:14px;border-top:1px solid #EEF1F3;}
.tp-title{font-size:12px;font-weight:700;color:#1A2322;margin-bottom:8px;}
.tp-hint{font-weight:600;font-size:11px;color:#7E8C8A;margin-left:8px;}
.trend-card svg{display:block;width:100%;height:auto;}
.trend-card svg text{font-family:inherit;font-size:10px;font-weight:600;fill:#7E8C8A;}
.trend-card svg text.dl{font-size:10.5px;font-weight:700;fill:#1A2322;}
.trend-card .grid{stroke:#EDF1F4;stroke-width:1;}
.themes-card{padding:16px 20px 14px;max-width:860px;}
.theme-insight{display:flex;align-items:flex-start;gap:9px;font-size:13px;color:#1A2322;line-height:1.5;padding:11px 14px;border-radius:10px;background:#F4F6F8;border:1px solid #E4E8E6;margin-bottom:6px;}
.theme-insight .ti-ico{color:#166337;flex-shrink:0;}
.theme-row{display:grid;grid-template-columns:170px 1fr 84px 44px;gap:6px 14px;align-items:center;padding:11px 4px 12px;cursor:pointer;border-radius:10px;}
.theme-row + .theme-row{border-top:1px solid #EEF1F3;}
.theme-row:hover{background:#F4F6F8;}
.th-name{font-size:12.5px;font-weight:700;color:#0E1414;display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.th-bar{height:9px;background:#EDF1F4;border-radius:9999px;overflow:hidden;}
.th-fill{display:block;height:100%;border-radius:9999px;}
.th-fill.good{background:#1F7A43;} .th-fill.mid{background:#C08A17;} .th-fill.bad{background:#C4514A;}
.th-n{font-size:11px;font-weight:600;color:#7E8C8A;font-variant-numeric:tabular-nums;text-align:right;}
.th-rate{font-size:12.5px;font-weight:800;font-variant-numeric:tabular-nums;text-align:right;}
.th-rate.good{color:#166337;} .th-rate.mid{color:#8A6314;} .th-rate.bad{color:#9E2B20;}
.th-quote{grid-column:1 / -1;font-size:12px;color:#5A6968;line-height:1.45;font-style:italic;}
.chip-hint{font-size:11.5px;color:#7E8C8A;font-weight:600;margin-top:10px;}
@media (max-width:760px){.theme-row{grid-template-columns:120px 1fr 70px 40px;}}
@media (max-width:720px){.chat-win{width:100vw;max-width:100vw;}}
