/**
 * From justine/03_dashboard.html, scoped under [data-justine-dashboard].
 * Top bar uses .jd-topnav. Root layout: .justine-dashboard-root
 */


[data-justine-dashboard] *{box-sizing:border-box;margin:0;padding:0;}
[data-justine-dashboard]{
  --ink:#1A1A1A; --mid:#6B7280; --muted:#9CA3AF; --border:#E5E7EB;
  --cream:#FAFAFF; --paper:#F5F3FF; --white:#FFFFFF;
  --indigo:#6366F1; --indigo-dim:rgba(99,102,241,0.08); --indigo-border:rgba(99,102,241,0.18);
  --green:#059669; --green-dim:#D1FAE5;
  --amber:#F59E0B; --amber-dim:#FFFBEB; --amber-border:#FDE68A;
  --serif:var(--font-justine-jakarta),"Plus Jakarta Sans",sans-serif; --sans:var(--font-justine-jakarta),"Plus Jakarta Sans",sans-serif;
}
[data-justine-dashboard].justine-dashboard-root{font-family:var(--sans);background:#FAFAFA;min-height:100vh;display:flex;flex-direction:column;height:100vh;max-height:100vh;overflow:hidden;color:var(--ink);}
[data-justine-dashboard] .f{font-family:var(--serif);}
@keyframes pulse{0%,100%{opacity:1;}50%{opacity:0.35;}}

/* ── App shell ── */
.app-shell{display:flex;flex:1;overflow:hidden;}

/* ── Left panel ── */
.proj-nav{width:256px;flex-shrink:0;background:#EDECEA;border-right:1px solid rgba(0,0,0,0.08);display:flex;flex-direction:column;overflow:hidden;}

/* ── Nav item buttons (Dashboard, Clients, Invoices…) ── */
.nav-item-btn{display:flex;align-items:center;gap:9px;padding:7px 8px;border-radius:8px;border:none;background:transparent;cursor:pointer;width:100%;text-align:left;transition:background 0.18s ease;margin-bottom:1px;font-family:var(--sans);}
.nav-item-btn:hover{background:rgba(0,0,0,0.06);}
.nav-item-btn.active{background:rgba(99,102,241,0.12);}
.nav-icon{width:28px;height:28px;border-radius:7px;background:rgba(99,102,241,0.12);color:#3730A3;display:flex;align-items:center;justify-content:center;font-size:13px;flex-shrink:0;transition:background 0.18s ease;}
.nav-item-btn.active .nav-icon{background:var(--indigo-dim);}
.nav-label{font-size:13px;font-weight:500;color:var(--ink);line-height:1.3;}
.nav-item-btn.active .nav-label{color:var(--indigo);font-weight:600;}
.nav-sub{font-size:10.5px;color:var(--muted);}
.nav-group-label{font-size:10px;font-weight:700;letter-spacing:0.08em;text-transform:uppercase;color:var(--muted);padding:0 8px;margin-bottom:4px;}

/* ── Project rows ── */
.proj-list{max-height:168px;overflow-y:auto;padding:4px 8px 8px;flex-shrink:0;}
.proj-row{display:flex;align-items:flex-start;gap:10px;padding:9px 10px;border-radius:10px;cursor:pointer;border:1px solid transparent;transition:background 0.18s ease,border-color 0.18s ease;margin-bottom:2px;}
.proj-edit-btn{opacity:0;transition:opacity 0.18s ease;background:none;border:none;cursor:pointer;padding:3px;border-radius:5px;display:flex;align-items:center;color:var(--muted);flex-shrink:0;margin-left:2px;}
.proj-row:hover .proj-edit-btn{opacity:1;}
.proj-edit-btn:hover{color:var(--indigo);background:var(--indigo-dim);}

/* ── Project edit popover ── */
#proj-edit-popover{position:fixed;display:none;background:var(--white);border:1px solid var(--border);border-radius:12px;padding:14px;z-index:300;box-shadow:0 8px 28px rgba(0,0,0,0.14);width:206px;}
#proj-edit-name{width:100%;box-sizing:border-box;border:1px solid var(--border);border-radius:6px;padding:6px 9px;font-family:var(--sans);font-size:13px;color:var(--ink);background:var(--white);outline:none;transition:border-color 0.15s;}
#proj-edit-name:focus{border-color:var(--indigo);}
.color-swatch{width:24px;height:24px;border-radius:50%;cursor:pointer;border:2.5px solid transparent;transition:transform 0.12s ease,border-color 0.12s ease;}
.color-swatch:hover{transform:scale(1.18);}
.color-swatch.active{border-color:var(--ink);}
.proj-row:hover{background:rgba(0,0,0,0.05);}
.proj-row.active{background:rgba(99,102,241,0.12);border-color:var(--indigo-border);}
.proj-icon{width:30px;height:30px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-family:var(--serif);font-size:12px;font-weight:700;color:var(--white);flex-shrink:0;}
.proj-row-name{font-size:12.5px;font-weight:600;color:var(--ink);display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin-bottom:2px;}
.proj-row-metric{font-size:11.5px;color:var(--mid);margin-bottom:1px;font-weight:500;}
.proj-row-time{font-size:10px;color:var(--muted);}
.alert-dot{width:6px;height:6px;border-radius:50%;background:var(--amber);flex-shrink:0;margin-top:5px;}

/* ── Status pills ── */
.pill{display:inline-flex;align-items:center;gap:3px;font-size:10px;font-weight:600;padding:2px 7px;border-radius:4px;white-space:nowrap;}
.pill-live{background:var(--green-dim);color:var(--green);}
.pill-building{background:#EDE9FE;color:#4338CA;}
.pill-draft{background:#F3F4F6;color:var(--mid);}
.dot-live{width:5px;height:5px;border-radius:50%;background:var(--green);display:inline-block;flex-shrink:0;}
.dot-building{width:5px;height:5px;border-radius:50%;background:#6366F1;display:inline-block;flex-shrink:0;animation:pulse 1.8s ease infinite;}

/* ── Search ── */
.nav-search-wrap{position:relative;}
.nav-search{width:100%;border:1px solid rgba(0,0,0,0.1);border-radius:8px;padding:7px 10px 7px 30px;font-family:var(--sans);font-size:12px;color:var(--ink);background:rgba(0,0,0,0.05);outline:none;transition:border-color 0.18s ease,background 0.18s ease;}
.nav-search:focus{border-color:var(--indigo);background:rgba(255,255,255,0.7);}
.nav-search::placeholder{color:var(--muted);}

/* ── Buttons ── */
.btn-primary{background:linear-gradient(135deg,#2E2A5E,#4338CA);color:var(--white);border:none;border-radius:8px;padding:10px 20px;font-family:var(--sans);font-size:13px;font-weight:600;cursor:pointer;box-shadow:0 4px 14px rgba(30,27,75,0.14);transition:box-shadow 0.2s,transform 0.15s;white-space:nowrap;}
.btn-primary:hover{box-shadow:0 6px 20px rgba(30,27,75,0.22);transform:translateY(-1px);}
.btn-secondary{background:var(--white);color:var(--ink);border:1px solid var(--border);border-radius:8px;padding:9px 18px;font-family:var(--sans);font-size:13px;font-weight:500;cursor:pointer;transition:border-color 0.15s,background 0.15s,color 0.15s;white-space:nowrap;}
.btn-secondary:hover{border-color:var(--indigo);background:var(--cream);color:var(--indigo);}
.btn-ghost{background:none;color:var(--mid);border:none;font-family:var(--sans);font-size:12px;cursor:pointer;padding:6px 10px;border-radius:6px;transition:background 0.12s,color 0.12s;white-space:nowrap;}
.btn-ghost:hover{background:var(--cream);color:var(--ink);}
.btn-amber{background:var(--amber-dim);color:#92400E;border:1px solid var(--amber-border);border-radius:8px;padding:9px 16px;font-family:var(--sans);font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap;transition:background 0.15s;}
.btn-amber:hover{background:#FEF3C7;}

/* ── Nav footer ── */
.nav-footer{padding:12px 14px;border-top:1px solid var(--border);flex-shrink:0;}

/* ── Workspace ── */
.workspace{flex:1;overflow-y:auto;background:linear-gradient(160deg,#F4F3F0 0%,#EDE9FA 100%);}
.ws-inner{max-width:1140px;padding:32px 36px;margin:0 auto;}
.ws-section{display:none;}
.ws-section.active{display:block;}

/* ── Workspace header ── */
.ws-header{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:28px;padding-bottom:24px;border-bottom:1px solid var(--border);}
.ws-header-left{flex:1;min-width:0;}
.ws-header-identity{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:7px;}
.proj-name-heading{border-radius:6px;padding:2px 5px;margin:-2px -5px;}
.proj-name-input{font-size:22px;font-weight:700;color:var(--ink);letter-spacing:-0.02em;font-family:var(--serif);border:none;border-bottom:2px solid var(--indigo);background:transparent;outline:none;padding:2px 0;width:auto;min-width:60px;max-width:280px;}
.client-card-header{position:relative;}
.client-edit-btn{position:absolute;top:12px;right:12px;opacity:0;transition:opacity 0.18s ease;background:none;border:none;cursor:pointer;padding:4px;border-radius:5px;display:flex;align-items:center;color:var(--muted);}
.client-card-header:hover .client-edit-btn{opacity:1;}
.client-edit-btn:hover{color:var(--indigo);background:var(--indigo-dim);}
#client-edit-popover{position:fixed;display:none;background:var(--white);border:1px solid var(--border);border-radius:12px;padding:14px;z-index:300;box-shadow:0 8px 28px rgba(0,0,0,0.14);width:220px;}
.client-edit-field{width:100%;box-sizing:border-box;border:1px solid var(--border);border-radius:6px;padding:6px 9px;font-family:var(--sans);font-size:13px;color:var(--ink);background:var(--white);outline:none;transition:border-color 0.15s;margin-bottom:8px;}
.client-edit-field:last-of-type{margin-bottom:0;}
.client-edit-field:focus{border-color:var(--indigo);}
.ws-header-desc{font-size:13px;color:var(--mid);padding-left:48px;line-height:1.5;}
.ws-header-actions{display:flex;gap:8px;align-items:center;flex-shrink:0;padding-top:4px;}

/* ── Priority card ── */
.priority-card{background:var(--white);border:1px solid #E0E7FF;border-left:4px solid var(--indigo);border-radius:12px;padding:22px 24px;display:flex;align-items:flex-start;gap:18px;margin-bottom:24px;box-shadow:0 2px 16px rgba(99,102,241,0.07);}
.priority-icon{width:42px;height:42px;border-radius:10px;background:var(--indigo-dim);display:flex;align-items:center;justify-content:center;font-size:20px;flex-shrink:0;margin-top:2px;}
.priority-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:0.07em;color:var(--indigo);margin-bottom:5px;}
.priority-title{font-size:17px;font-weight:700;color:var(--ink);margin-bottom:7px;letter-spacing:-0.01em;}
.priority-desc{font-size:13px;color:var(--mid);line-height:1.65;margin-bottom:16px;}

/* ── Metric card states ── */
.metric-card-up{border-color:#6EE7B7!important;background:#ECFDF5!important;}
.metric-card-up .metric-label{color:#065F46!important;}
.metric-card-up .metric-value{color:#065F46!important;}
.metric-card-down{border-color:var(--amber-border)!important;background:var(--amber-dim)!important;}
.metric-card-down .metric-label{color:#92400E!important;}
.metric-card-down .metric-value{color:#92400E!important;}
.metric-card-flat{border-color:#BFDBFE!important;background:#EFF6FF!important;}
.metric-card-flat .metric-label{color:#1E40AF!important;}
.metric-card-flat .metric-value{color:#1E40AF!important;}
/* Dark mode overrides */
[data-justine-dashboard][data-theme="dark"] .metric-card-up{border-color:rgba(5,150,105,0.35)!important;background:rgba(5,150,105,0.12)!important;}
[data-justine-dashboard][data-theme="dark"] .metric-card-up .metric-label,[data-justine-dashboard][data-theme="dark"] .metric-card-up .metric-value{color:#6EE7B7!important;}
[data-justine-dashboard][data-theme="dark"] .metric-card-down{border-color:rgba(245,158,11,0.30)!important;background:rgba(245,158,11,0.12)!important;}
[data-justine-dashboard][data-theme="dark"] .metric-card-down .metric-label,[data-justine-dashboard][data-theme="dark"] .metric-card-down .metric-value{color:#FDE68A!important;}
[data-justine-dashboard][data-theme="dark"] .metric-card-flat{border-color:rgba(59,130,246,0.30)!important;background:rgba(59,130,246,0.10)!important;}
[data-justine-dashboard][data-theme="dark"] .metric-card-flat .metric-label,[data-justine-dashboard][data-theme="dark"] .metric-card-flat .metric-value{color:#93C5FD!important;}

/* ── Metrics ── */
.metrics-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;margin-bottom:24px;}
.metric-card{background:var(--white);border:1px solid #E0DDD8;border-radius:10px;padding:16px 18px;box-shadow:0 1px 4px rgba(0,0,0,0.05);}
.metric-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:0.07em;color:var(--muted);margin-bottom:6px;}
.metric-value{font-family:var(--serif);font-size:24px;font-weight:700;color:var(--ink);letter-spacing:-0.02em;margin-bottom:4px;}
.metric-sub{font-size:11.5px;color:var(--mid);}
.trend-up{font-size:11.5px;color:var(--green);font-weight:600;}
.trend-down{font-size:11.5px;color:var(--amber);font-weight:500;}
.trend-neutral{font-size:11.5px;color:#3B82F6;font-weight:500;}
[data-justine-dashboard][data-theme="dark"] .trend-neutral{color:#93C5FD;}

/* ── Progress ── */
.progress-bar{height:5px;background:#E5E7EB;border-radius:3px;overflow:hidden;margin-top:10px;}
.progress-fill{height:100%;border-radius:3px;background:linear-gradient(90deg,#6366F1,#8B5CF6);}
.progress-fill-gray{height:100%;border-radius:3px;background:linear-gradient(90deg,#9CA3AF,#6B7280);}

/* ── Content cards ── */
.cards-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.content-card{background:var(--white);border:1px solid #E0DDD8;border-radius:12px;overflow:hidden;box-shadow:0 1px 4px rgba(0,0,0,0.05);}
.card-head{padding:14px 20px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;}
.card-title{font-size:13px;font-weight:600;color:var(--ink);}
.card-body{padding:16px 20px;}

/* ── Rows inside cards ── */
.health-row{display:flex;align-items:flex-start;gap:12px;padding:10px 0;border-bottom:1px solid var(--border);}
.health-row:last-child{border-bottom:none;padding-bottom:0;}
.health-icon{font-size:15px;width:22px;text-align:center;flex-shrink:0;margin-top:1px;}
.health-title{font-size:13px;font-weight:500;color:var(--ink);margin-bottom:2px;}
.health-sub{font-size:11.5px;color:var(--muted);}
.activity-row{display:flex;align-items:flex-start;gap:10px;padding:10px 0;border-bottom:1px solid var(--border);}
.activity-row:last-child{border-bottom:none;padding-bottom:0;}
.activity-dot{width:6px;height:6px;border-radius:50%;flex-shrink:0;margin-top:5px;}
.fin-row{display:flex;align-items:center;justify-content:space-between;padding:9px 0;border-bottom:1px solid var(--border);}
.fin-row:last-child{border-bottom:none;}
.milestone-row{display:flex;align-items:flex-start;gap:12px;padding:11px 0;border-bottom:1px solid var(--border);}
.milestone-row:last-child{border-bottom:none;padding-bottom:0;}
.milestone-row.is-current{background:rgba(99,102,241,0.04);border-radius:8px;padding:11px 10px;margin:2px -10px;border-left:3px solid var(--indigo);border-bottom:none;padding-left:7px;}
.m-check{width:20px;height:20px;border-radius:50%;border:2px solid var(--border);flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:9px;font-weight:700;margin-top:1px;}
.m-check.done{background:var(--green);border-color:var(--green);color:var(--white);}
.m-check.current{background:var(--indigo);border-color:var(--indigo);color:var(--white);animation:pulse 2s ease infinite;}
.m-check.pending{opacity:0.35;}
.setup-row{display:flex;align-items:flex-start;gap:10px;padding:10px 0;border-bottom:1px solid var(--border);}
.setup-row:last-child{border-bottom:none;padding-bottom:0;}
.s-check{width:18px;height:18px;border-radius:5px;border:2px solid var(--border);flex-shrink:0;display:flex;align-items:center;justify-content:center;font-size:9px;font-weight:700;margin-top:1px;}
.s-check.done{background:var(--indigo);border-color:var(--indigo);color:var(--white);}
.rec-block{padding-bottom:14px;margin-bottom:14px;border-bottom:1px solid var(--border);}
.rec-block:last-child{padding-bottom:0;margin-bottom:0;border-bottom:none;}

/* ════════════════════════════════════
   DASHBOARD LANDING PAGE styles
════════════════════════════════════ */
.dash-section-title{font-family:var(--serif);font-size:14px;font-weight:600;color:var(--ink);margin-bottom:13px;letter-spacing:-0.01em;}


/* Attention cards */
.attn-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:36px;}
.attn-card{border-radius:12px;padding:22px;border:1px solid transparent;display:flex;flex-direction:column;}
.attn-card-amber{background:#FFFBEB;border-color:#FDE68A;}
.attn-card-indigo{background:#EDE9FE;border-color:#DDD6FE;}
.attn-card-slate{background:#F8FAFC;border-color:#E2E8F0;}
.attn-value{font-family:var(--serif);font-size:30px;font-weight:700;letter-spacing:-0.03em;margin-bottom:5px;}
.attn-value-amber{color:#92400E;}
.attn-value-indigo{color:#3730A3;}
.attn-value-slate{color:#334155;}
.attn-desc{font-size:13px;line-height:1.5;flex:1;}
.attn-desc-amber{color:#78350F;}
.attn-desc-indigo{color:#3730A3;}
.attn-desc-slate{color:#475569;}
.attn-cta{margin-top:18px;font-size:12.5px;font-weight:600;cursor:pointer;background:none;border:none;padding:0;display:inline-flex;align-items:center;gap:5px;transition:gap 0.15s;font-family:var(--sans);}
.attn-cta:hover{gap:9px;}
.attn-cta-amber{color:#92400E;}
.attn-cta-indigo{color:#4338CA;}
.attn-cta-slate{color:#475569;}

/* Snapshot cards */
.snap-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:36px;}
.snap-card{background:var(--white);border:1px solid #E0DDD8;border-radius:10px;padding:16px 18px;box-shadow:0 1px 4px rgba(0,0,0,0.05);}
.snap-value{font-family:var(--serif);font-size:24px;font-weight:700;color:var(--ink);letter-spacing:-0.02em;margin-bottom:4px;}
.snap-label{font-size:11.5px;color:var(--muted);}

/* Performance cards */
.perf-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:36px;}
.perf-card{background:var(--white);border:1px solid #E0DDD8;border-radius:12px;padding:22px;overflow:hidden;box-shadow:0 1px 4px rgba(0,0,0,0.05);}
.perf-value{font-family:var(--serif);font-size:32px;font-weight:700;color:var(--ink);letter-spacing:-0.03em;margin-bottom:4px;}
.perf-change{font-size:12px;font-weight:600;margin-bottom:3px;}
.perf-sublabel{font-size:11.5px;color:var(--muted);}
.perf-chart-wrap{margin-top:18px;}

/* Article cards */
.article-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;}
.article-card{background:var(--white);border:1px solid #E0DDD8;border-radius:12px;padding:22px;display:flex;flex-direction:column;box-shadow:0 1px 4px rgba(0,0,0,0.05);}
.article-emoji{font-size:22px;margin-bottom:12px;}
.article-title{font-family:var(--serif);font-size:15px;font-weight:600;color:var(--ink);margin-bottom:7px;}
.article-desc{font-size:12.5px;color:var(--mid);line-height:1.6;flex:1;}
.article-cta{margin-top:14px;font-size:12px;font-weight:600;color:var(--indigo);cursor:pointer;background:none;border:none;padding:0;font-family:var(--sans);display:inline-flex;align-items:center;gap:4px;transition:gap 0.15s;}
.article-cta:hover{gap:7px;}

/* ── Section table (Clients, Invoices, Costs) ── */
.sec-table{width:100%;border-collapse:collapse;}
.sec-table th{font-size:10.5px;font-weight:700;text-transform:uppercase;letter-spacing:0.06em;color:var(--muted);padding:10px 16px;border-bottom:2px solid var(--border);text-align:left;background:#FAFAFA;}
.sec-table td{font-size:13px;padding:13px 16px;border-bottom:1px solid var(--border);color:var(--ink);vertical-align:middle;}
.sec-table tr:last-child td{border-bottom:none;}
.sec-table tbody tr:hover td{background:var(--cream);}

/* ── Modal ── */
.modal-overlay{position:fixed;inset:0;background:rgba(15,14,26,0.45);display:none;align-items:center;justify-content:center;z-index:100;backdrop-filter:blur(2px);}
.modal-overlay.open{display:flex;}
.modal-card{background:var(--white);border-radius:16px;padding:28px;width:100%;max-width:420px;box-shadow:0 24px 64px rgba(30,27,75,0.18);}
.modal-input{width:100%;border:1px solid var(--border);border-radius:8px;padding:10px 13px;font-family:var(--sans);font-size:14px;color:var(--ink);background:#FAFAFA;outline:none;transition:border-color 0.15s;}
.modal-input:focus{border-color:var(--indigo);}
.modal-input::placeholder{color:var(--muted);}
.for-card{flex:1;border:1px solid var(--border);border-radius:9px;padding:14px;cursor:pointer;text-align:center;background:#FAFAFA;transition:all 0.15s;}
.for-card:hover,.for-card.sel{border-color:var(--indigo);background:var(--cream);}

/* ── Responsive ── */
@media(max-width:860px){
  .attn-grid,.perf-grid,.article-grid{grid-template-columns:1fr 1fr;}
  .snap-grid{grid-template-columns:1fr 1fr;}
  .cards-grid{grid-template-columns:1fr;}
  .ws-header{flex-direction:column;gap:12px;}
  .ws-header-actions{flex-wrap:wrap;}
  .ws-inner{padding:24px 20px;}
}
@media(max-width:600px){
  .proj-nav{display:none!important;}
  .workspace{padding-bottom:64px;}
  .attn-grid,.perf-grid,.article-grid,.snap-grid{grid-template-columns:1fr;}
  .ws-inner{padding:20px 16px;}
  .ws-header-actions{gap:6px;width:100%;}
  .ws-header-actions .btn-secondary,.ws-header-actions .btn-primary{font-size:12px;padding:10px 8px;flex:1;text-align:center;justify-content:center;}
  .dash-header-actions{flex-direction:column;gap:6px!important;padding-top:0!important;}
  .dash-header-actions .btn-secondary,.dash-header-actions .btn-primary{font-size:11.5px;padding:7px 12px;width:100%;}
  .clients-grid{grid-template-columns:1fr!important;}
  .content-card{overflow-x:auto;overflow-y:visible;-webkit-overflow-scrolling:touch;}
  .sec-table{min-width:460px;}
  .mob-col-hide{display:none!important;}
  .mob-hide{display:none!important;}
}

/* ── Mobile bottom tab bar ── */
.mob-tab-bar{display:none;position:fixed;bottom:0;left:0;right:0;height:60px;background:var(--white);border-top:1px solid var(--border);align-items:stretch;z-index:200;padding-bottom:env(safe-area-inset-bottom);}
.mob-tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:none;background:transparent;cursor:pointer;font-family:var(--sans);font-size:10px;font-weight:500;color:var(--muted);padding:8px 4px;transition:color 0.15s;}
.mob-tab.active{color:var(--indigo);}
.mob-tab svg{flex-shrink:0;transition:transform 0.15s;}
.mob-tab.active svg{transform:scale(1.1);}
@media(max-width:600px){.mob-tab-bar{display:flex;}}

/* ── Mobile project cards ── */
.mob-proj-card{background:var(--white);border:1px solid var(--border);border-radius:14px;padding:16px;display:flex;align-items:center;gap:14px;cursor:pointer;transition:border-color 0.15s,box-shadow 0.15s;}
.mob-proj-card:hover{border-color:var(--indigo);box-shadow:0 2px 12px rgba(99,102,241,0.1);}

/* ── Dark mode: mobile tab bar ── */
[data-justine-dashboard][data-theme="dark"] .mob-tab-bar{background:#212840;border-top-color:#3A4260;}
[data-justine-dashboard][data-theme="dark"] .mob-tab{color:#6A7490;}
[data-justine-dashboard][data-theme="dark"] .mob-tab.active{color:#A5B4FC;}
[data-justine-dashboard][data-theme="dark"] .mob-proj-card{background:#2A3250;border-color:#3A4260;}

/* ── Dark mode ── */
/* Surface hierarchy: body #1A1F2E → nav #212840 → cards #2A3250 → borders #3A4260 */
[data-justine-dashboard][data-theme="dark"]{
  --ink:#ECE9F5; --mid:#9AA3BC; --muted:#6A7490; --indigo:#A5B4FC;
  --border:#3A4260; --cream:#2A3250; --paper:#242B48; --white:#2A3250;
  --indigo-dim:rgba(99,102,241,0.18); --indigo-border:rgba(99,102,241,0.35);
  --green-dim:rgba(5,150,105,0.18);
  --amber-dim:rgba(245,158,11,0.14); --amber-border:rgba(245,158,11,0.30);
}
[data-justine-dashboard][data-theme="dark"].justine-dashboard-root{background:#1A1F2E;}
[data-justine-dashboard][data-theme="dark"] .jd-topnav{background:rgba(26,31,46,0.97)!important;border-bottom-color:#3A4260!important;}
[data-justine-dashboard][data-theme="dark"] .jd-topnav .f,[data-justine-dashboard][data-theme="dark"] .jd-topnav span{color:var(--ink)!important;}
[data-justine-dashboard][data-theme="dark"] .proj-nav{background:#212840;border-right-color:#3A4260;}
[data-justine-dashboard][data-theme="dark"] .proj-row:hover{background:rgba(255,255,255,0.06);}
[data-justine-dashboard][data-theme="dark"] .proj-row.active{background:rgba(99,102,241,0.18);}
[data-justine-dashboard][data-theme="dark"] .proj-row:hover .proj-edit-btn{color:#A5B4FC;}
[data-justine-dashboard][data-theme="dark"] .proj-edit-btn:hover{color:#A5B4FC!important;background:rgba(165,180,252,0.15)!important;}
[data-justine-dashboard][data-theme="dark"] #proj-edit-popover{background:#2A3250;border-color:#3A4260;}
[data-justine-dashboard][data-theme="dark"] #proj-edit-name{background:#1E2640;border-color:#3A4260;color:#ECE9F5;}
[data-justine-dashboard][data-theme="dark"] #proj-edit-name:focus{border-color:#A5B4FC;}
[data-justine-dashboard][data-theme="dark"] .color-swatch.active{border-color:#ECE9F5;}
[data-justine-dashboard][data-theme="dark"] .client-edit-btn{color:#6A7490;}
[data-justine-dashboard][data-theme="dark"] .client-card-header:hover .client-edit-btn{color:#A5B4FC;}
[data-justine-dashboard][data-theme="dark"] .client-edit-btn:hover{color:#A5B4FC!important;background:rgba(165,180,252,0.15)!important;}
[data-justine-dashboard][data-theme="dark"] #client-edit-popover{background:#2A3250;border-color:#3A4260;}
[data-justine-dashboard][data-theme="dark"] .client-edit-field{background:#1E2640;border-color:#3A4260;color:#ECE9F5;}
[data-justine-dashboard][data-theme="dark"] .client-edit-field:focus{border-color:#A5B4FC;}
[data-justine-dashboard][data-theme="dark"] .nav-item-btn:hover{background:rgba(255,255,255,0.07);}
[data-justine-dashboard][data-theme="dark"] .nav-item-btn.active{background:rgba(99,102,241,0.18);}
[data-justine-dashboard][data-theme="dark"] .nav-icon{background:#A5B4FC;color:#1E1B6E;}
[data-justine-dashboard][data-theme="dark"] #nav-dashboard{background:rgba(255,255,255,0.08)!important;}
[data-justine-dashboard][data-theme="dark"] #nav-dashboard:hover{background:rgba(255,255,255,0.12)!important;}
[data-justine-dashboard][data-theme="dark"] .nav-search{background:rgba(255,255,255,0.07);border-color:#3A4260;color:var(--ink);}
[data-justine-dashboard][data-theme="dark"] .nav-search:focus{background:rgba(255,255,255,0.10);}
[data-justine-dashboard][data-theme="dark"] .workspace{background:linear-gradient(160deg,#1C2235 0%,#212840 100%);}
[data-justine-dashboard][data-theme="dark"] .ws-header{border-bottom-color:#3A4260;}
[data-justine-dashboard][data-theme="dark"] .snap-card,[data-justine-dashboard][data-theme="dark"] .perf-card,[data-justine-dashboard][data-theme="dark"] .article-card,
[data-justine-dashboard][data-theme="dark"] .metric-card,[data-justine-dashboard][data-theme="dark"] .content-card{border-color:#3A4260;}
[data-justine-dashboard][data-theme="dark"] .card-head{border-bottom-color:#3A4260;}
[data-justine-dashboard][data-theme="dark"] .health-row,[data-justine-dashboard][data-theme="dark"] .activity-row,[data-justine-dashboard][data-theme="dark"] .fin-row,
[data-justine-dashboard][data-theme="dark"] .milestone-row,[data-justine-dashboard][data-theme="dark"] .setup-row,[data-justine-dashboard][data-theme="dark"] .rec-block{border-bottom-color:#3A4260;}
[data-justine-dashboard][data-theme="dark"] .attn-card-amber{background:rgba(245,158,11,0.12);border-color:rgba(245,158,11,0.30);}
[data-justine-dashboard][data-theme="dark"] .attn-card-indigo{background:rgba(99,102,241,0.15);border-color:rgba(99,102,241,0.32);}
[data-justine-dashboard][data-theme="dark"] .attn-card-slate{background:#242B48;border-color:#3A4260;}
[data-justine-dashboard][data-theme="dark"] .attn-value-slate{color:#B0BAD0;}
[data-justine-dashboard][data-theme="dark"] .attn-desc-slate{color:#8A96B0;}
[data-justine-dashboard][data-theme="dark"] .attn-cta-slate{color:#8A96B0;}
[data-justine-dashboard][data-theme="dark"] .pill-building{background:rgba(99,102,241,0.22);color:#A5B4FC;}
[data-justine-dashboard][data-theme="dark"] .pill-draft{background:rgba(255,255,255,0.10);color:var(--mid);}
[data-justine-dashboard][data-theme="dark"] .progress-bar{background:#3A4260;}
[data-justine-dashboard][data-theme="dark"] .btn-primary{color:#FFFFFF;}
[data-justine-dashboard][data-theme="dark"] .proj-icon{color:#FFFFFF;}
[data-justine-dashboard][data-theme="dark"] .btn-amber{color:#FDE68A;}
[data-justine-dashboard][data-theme="dark"] [style*="color:#92400E"]{color:#FDE68A!important;}
[data-justine-dashboard][data-theme="dark"] [style*="color:#4338CA"]{color:var(--indigo)!important;}
[data-justine-dashboard][data-theme="dark"] [style*="color:#6366F1"]{color:var(--indigo)!important;}
[data-justine-dashboard][data-theme="dark"] .btn-secondary{background:#2A3250;border-color:#3A4260;color:var(--ink);}
[data-justine-dashboard][data-theme="dark"] .btn-secondary:hover{background:#323C5E;border-color:var(--indigo);}
[data-justine-dashboard][data-theme="dark"] .btn-ghost:hover{background:#323C5E;color:var(--ink);}
[data-justine-dashboard][data-theme="dark"] .sec-table th{background:#212840;border-bottom-color:#3A4260;}
[data-justine-dashboard][data-theme="dark"] .sec-table td{border-bottom-color:#3A4260;}
[data-justine-dashboard][data-theme="dark"] .sec-table tbody tr:hover td{background:#242B48;}
[data-justine-dashboard][data-theme="dark"] .modal-overlay{background:rgba(10,12,24,0.65);}
[data-justine-dashboard][data-theme="dark"] .modal-input{background:#212840;border-color:#3A4260;}
[data-justine-dashboard][data-theme="dark"] .for-card{background:#212840;border-color:#3A4260;}
[data-justine-dashboard][data-theme="dark"] .for-card:hover,[data-justine-dashboard][data-theme="dark"] .for-card.sel{background:#2A3250;}
/* Inline-style hardcode overrides */
[data-justine-dashboard][data-theme="dark"] [style*="background:#EDE9FE"]{background:rgba(165,180,252,0.45)!important;}
[data-justine-dashboard][data-theme="dark"] [style*="background:#FAFAFA"]{background:#212840!important;}
[data-justine-dashboard][data-theme="dark"] [style*="background:#F3F4F6"]{background:rgba(255,255,255,0.08)!important;}
[data-justine-dashboard][data-theme="dark"] [style*="background:#E5E7EB"]{background:#3A4260!important;}
[data-justine-dashboard][data-theme="dark"] [style*="border-color:#E5E7EB"]{border-color:#3A4260!important;}
[data-justine-dashboard][data-theme="dark"] [style*="background:#F8FAFC"]{background:#242B48!important;}

/* Scrollbars */
[data-justine-dashboard][data-theme="dark"] ::-webkit-scrollbar{width:6px;height:6px;}
[data-justine-dashboard][data-theme="dark"] ::-webkit-scrollbar-track{background:#1A1F2E;}
[data-justine-dashboard][data-theme="dark"] ::-webkit-scrollbar-thumb{background:#3A4260;border-radius:3px;}
[data-justine-dashboard][data-theme="dark"] ::-webkit-scrollbar-thumb:hover{background:#5865A0;}
[data-justine-dashboard][data-theme="dark"] *{scrollbar-color:#3A4260 #1A1F2E;scrollbar-width:thin;}
