*,*::before,*::after{box-sizing:border-box;margin:0;padding:0;}
:root{
  --yellow:#FAB137;--yellow-light:#FEF3DC;--yellow-dark:#C8881A;
  --bg:#F7F6F3;--surface:#ffffff;--surface2:#F0EEE9;
  --border:rgba(0,0,0,0.09);--border-strong:rgba(0,0,0,0.18);
  --text:#111111;--text-muted:#6B6860;--text-light:#9B9890;
  --topbar-bg:#111111;--topbar-logo:var(--logo-black);
  --green:#1D9E75;--green-bg:#E8F7F2;--green-text:#0F6E56;
  --red:#E24B4A;--red-bg:#FCEBEB;--red-text:#A32D2D;
  --amber:#EF9F27;--amber-bg:#FAEEDA;--amber-text:#854F0B;
  --blue:#378ADD;--blue-bg:#E6F1FB;--blue-text:#185FA5;
  --giving:#8B5CF6;--giving-bg:#EDE9FE;--giving-text:#5B21B6;
  --radius:10px;--radius-lg:14px;
  --shadow:0 1px 3px rgba(0,0,0,0.07),0 4px 12px rgba(0,0,0,0.04);
}
[data-theme="dark"]{
  --bg:#0F0F0F;--surface:#1A1A1A;--surface2:#242424;
  --border:rgba(255,255,255,0.08);--border-strong:rgba(255,255,255,0.16);
  --text:#F0EEE9;--text-muted:#8A8880;--text-light:#5A5855;
  --topbar-bg:#000000;
  --green-bg:#0A2E22;--green-text:#4ECFA0;
  --red-bg:#2E0A0A;--red-text:#F08080;
  --amber-bg:#2E1F05;--amber-text:#F0B060;
  --blue-bg:#0A1E2E;--blue-text:#70B0F0;
  --giving-bg:#1A0E36;--giving-text:#B090F8;
  --yellow-light:#2E2000;--yellow-dark:#FAB137;
  --shadow:0 1px 3px rgba(0,0,0,0.3),0 4px 12px rgba(0,0,0,0.2);
}
body{font-family:'Montserrat',sans-serif;background:var(--bg);color:var(--text);min-height:100vh;font-size:14px;transition:background 0.2s,color 0.2s;}

/* LOGIN */
#loginScreen{min-height:100vh;display:flex;align-items:center;justify-content:center;background:#0a0a0a;}
.login-box{background:#1a1a1a;border-radius:var(--radius-lg);padding:48px 40px;width:100%;max-width:400px;text-align:center;box-shadow:0 24px 64px rgba(0,0,0,0.5);}
.login-logo-svg{height:36px;margin:0 auto 20px;display:flex;justify-content:center;align-items:center;overflow:hidden;}.login-logo-svg svg{height:36px!important;width:auto!important;display:block!important;max-width:220px!important;}
.login-title{font-size:16px;font-weight:700;color:rgba(255,255,255,0.6);letter-spacing:0.2px;}
.login-sub{font-size:12px;color:rgba(255,255,255,0.3);margin-top:4px;}
.login-divider{height:1px;background:rgba(255,255,255,0.08);margin:24px 0;}
.login-field{text-align:left;margin-bottom:16px;}
.login-field label{font-size:10px;font-weight:700;color:rgba(255,255,255,0.4);text-transform:uppercase;letter-spacing:0.6px;display:block;margin-bottom:6px;}
.login-field input{width:100%;padding:12px 14px;border:1.5px solid rgba(255,255,255,0.12);border-radius:var(--radius);font-family:inherit;font-size:15px;color:#fff;background:rgba(255,255,255,0.06);outline:none;transition:border-color 0.15s;}
.login-field input:focus{border-color:var(--yellow);}
.login-btn{width:100%;padding:13px;background:var(--yellow);color:#111;border:none;border-radius:var(--radius);font-family:inherit;font-size:14px;font-weight:700;cursor:pointer;transition:opacity 0.15s;}
.login-btn:hover{opacity:0.88;}
.login-error{color:var(--red);font-size:12px;margin-top:10px;display:none;font-weight:600;}
.login-tagline{font-size:13px;color:rgba(255,255,255,0.55);margin-top:14px;font-style:italic;font-weight:500;line-height:1.5;letter-spacing:0.1px;}

/* TOPBAR */
#app{display:none;min-height:100vh;}
.topbar{background:var(--topbar-bg);padding:0 28px;height:58px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:100;transition:background 0.2s;}
.topbar-logo{height:26px;object-fit:contain;display:block;border:none;text-decoration:none;text-decoration-line:none;outline:none;vertical-align:middle;-webkit-user-drag:none;}
.topbar-right{display:flex;align-items:center;gap:16px;}
.topbar-center{flex:1;display:flex;justify-content:center;align-items:center;}
.topbar-tagline{font-size:11px;color:rgba(255,255,255,0.28);font-weight:600;letter-spacing:1.2px;text-transform:uppercase;}
.topbar-period{font-size:11px;color:rgba(255,255,255,0.35);font-weight:500;}
.icon-btn{background:none;border:none;cursor:pointer;color:rgba(255,255,255,0.45);font-size:18px;line-height:1;padding:4px 6px;border-radius:6px;transition:all 0.15s;display:flex;align-items:center;}
.icon-btn:hover{color:var(--yellow);background:rgba(255,255,255,0.05);}
.logout-btn{font-size:11px;color:rgba(255,255,255,0.35);background:none;border:none;cursor:pointer;font-family:inherit;font-weight:600;transition:color 0.15s;padding:4px 6px;}
.logout-btn:hover{color:var(--yellow);}

/* NAV */
.nav-bar{background:var(--surface);border-bottom:1px solid var(--border);padding:0 24px;display:flex;gap:2px;transition:background 0.2s;}
.nav-btn{padding:13px 16px;font-size:12px;font-weight:600;color:var(--text-muted);background:none;border:none;border-bottom:2px solid transparent;cursor:pointer;font-family:inherit;margin-bottom:-1px;transition:all 0.15s;display:flex;align-items:center;gap:7px;white-space:nowrap;}
.nav-btn svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0;}
.nav-btn:hover{color:var(--text);}
.nav-btn.active{color:var(--yellow-dark);border-bottom-color:var(--yellow);}
.nav-btn.disabled{opacity:0.35;cursor:default;pointer-events:none;}
.soon-badge{font-size:9px;font-weight:700;background:var(--surface2);color:var(--text-light);padding:2px 5px;border-radius:4px;}

/* MAIN */
.main{padding:28px;max-width:1200px;margin:0 auto;}
.section{display:none;}
.section.active{display:block;}

/* CARDS */
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow);transition:background 0.2s;}
.card-pad{padding:20px 24px;}
.card-title{font-size:13px;font-weight:700;color:var(--text);margin-bottom:2px;}
.card-sub{font-size:11px;color:var(--text-muted);margin-bottom:16px;}

/* METRICS */
.metrics-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin-bottom:20px;}
.metric{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:16px 18px;box-shadow:var(--shadow);transition:background 0.2s;}
.metric.giving-card{border-color:var(--giving);border-width:2px;background:var(--giving-bg);}
.metric-icon{margin-bottom:10px;color:var(--text-muted);}
.metric-icon svg{width:20px;height:20px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.metric.giving-card .metric-icon{color:var(--giving);}
.metric-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:0.6px;color:var(--text-muted);margin-bottom:6px;}
.metric.giving-card .metric-label{color:var(--giving-text);}
.metric-val{font-size:22px;font-weight:800;color:var(--text);letter-spacing:-0.5px;line-height:1;}
.metric.giving-card .metric-val{color:var(--giving);}
.metric-secondary{font-size:11px;color:var(--text-muted);margin-top:5px;font-weight:500;}
.waterfall-card{min-width:180px;}
.waterfall-row{display:flex;flex-direction:column;padding:6px 0;gap:3px;}
.waterfall-row-top{display:flex;align-items:center;justify-content:space-between;gap:6px;}
.waterfall-label{font-size:10px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:0.4px;display:flex;align-items:center;gap:3px;}
.waterfall-right{display:flex;align-items:baseline;gap:5px;flex-wrap:wrap;}
.waterfall-val{font-size:15px;font-weight:800;white-space:nowrap;}
.waterfall-val.green{color:var(--green);}
.waterfall-val.giving{color:var(--giving);}
.waterfall-val.retained{color:var(--text);}
.giving-row .waterfall-label{color:var(--giving-text);}
.retained-label{color:var(--text);font-weight:700;}
.waterfall-divider{height:1.5px;background:var(--border);margin:6px 0 4px;}
.retained-row .waterfall-val{font-size:16px;}
.waterfall-badge-row{margin-top:2px;}
.metric-badge{display:inline-block;font-size:10px;font-weight:700;padding:2px 7px;border-radius:5px;margin-top:5px;}
.badge-good{background:var(--green-bg);color:var(--green-text);}
.badge-warn{background:var(--amber-bg);color:var(--amber-text);}
.badge-bad{background:var(--red-bg);color:var(--red-text);}

/* SALES TARGETS */
.targets-table tfoot td{font-weight:700;background:var(--surface2);}

/* DECO SALES */
.sales-location-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px;}
.sales-loc-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:18px 20px;box-shadow:var(--shadow);border-top:4px solid transparent;}
.slc-title{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:0.6px;margin-bottom:6px;}
.slc-rev{font-size:26px;font-weight:800;color:var(--text);letter-spacing:-0.5px;margin-bottom:14px;}
.slc-metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;}
.slc-metric{text-align:center;}
.slc-val{font-size:14px;font-weight:800;color:var(--text);}
.slc-name{font-size:9px;font-weight:600;text-transform:uppercase;letter-spacing:0.4px;color:var(--text-muted);margin-top:2px;}
.turn-row{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--border);flex-wrap:wrap;}
.turn-row:last-child{border-bottom:none;}
.turn-loc{font-size:12px;font-weight:700;color:var(--text);width:110px;flex-shrink:0;}
.turn-val{font-size:18px;font-weight:800;flex-shrink:0;}
.turn-sub{font-size:11px;color:var(--text-muted);}
/* Date input — visible in both light and dark mode */
.date-input-styled{
  font-family:inherit;font-size:12px;padding:6px 8px;
  border:1px solid var(--border-strong);border-radius:var(--radius);
  background:var(--surface);color:var(--text);
  color-scheme:light;  /* forces light calendar picker so icon is always visible */
}
[data-theme="dark"] .date-input-styled{
  color-scheme:dark;   /* dark calendar in dark mode — icon renders white */
  background:var(--surface2);
  border-color:var(--border-strong);
  color:var(--text);
}
/* Fulfillment breakdown */
.fulfil-breakdown{margin-top:14px;padding-top:12px;border-top:1px solid var(--border);display:flex;flex-direction:column;gap:5px;}
.fulfil-row{display:flex;align-items:center;gap:6px;font-size:11px;}
.fulfil-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0;}
.fulfil-label{width:90px;font-weight:600;color:var(--text);flex-shrink:0;}
.fulfil-bar-wrap{flex:1;background:var(--border);border-radius:4px;height:5px;overflow:hidden;}
.fulfil-bar{display:block;height:5px;border-radius:4px;transition:width 0.4s;}
.fulfil-pct{width:32px;text-align:right;font-weight:700;color:var(--text);flex-shrink:0;}
.fulfil-count{color:var(--text-muted);flex-shrink:0;}

.hist-mode-toggle,.hist-loc-toggle,.hist-window-toggle{display:flex;gap:4px;background:var(--surface2);padding:4px;border-radius:var(--radius);flex-wrap:wrap;}

.comp-block{margin-bottom:16px;}
.comp-block:last-child{margin-bottom:0;}
.comp-block-title{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:0.6px;margin-bottom:8px;}
.comp-table{width:100%;border-collapse:collapse;font-size:12px;}
.comp-table th{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:0.4px;color:var(--text-muted);padding:6px 8px;border-bottom:2px solid var(--border);text-align:left;}
.comp-table td{padding:7px 8px;border-bottom:1px solid var(--border);}
.comp-table tr:last-child td{border-bottom:none;}
.comp-table td:last-child{font-size:13px;}

/* GIVING HERO */
.giving-hero{background:var(--topbar-bg);border-radius:var(--radius-lg);padding:28px 28px 24px;margin-bottom:20px;position:relative;overflow:hidden;border:1px solid var(--border);}
.giving-hero::before{content:'';position:absolute;top:-50px;right:-50px;width:200px;height:200px;background:var(--giving);border-radius:50%;opacity:0.1;}
.giving-hero-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:rgba(255,255,255,0.4);margin-bottom:6px;}
.giving-hero-total{font-size:44px;font-weight:800;color:#fff;letter-spacing:-1px;line-height:1;}
.giving-hero-total span{color:#A78BFA;}
.giving-hero-sub{font-size:13px;color:rgba(255,255,255,0.45);margin-top:8px;font-weight:500;}
.giving-hero-sub strong{color:rgba(255,255,255,0.8);}
.giving-stats{display:flex;gap:28px;margin-top:22px;flex-wrap:wrap;}
.giving-stat-val{font-size:18px;font-weight:800;color:#A78BFA;}
.giving-stat-label{font-size:10px;color:rgba(255,255,255,0.35);font-weight:600;text-transform:uppercase;letter-spacing:0.5px;margin-top:2px;}

/* CHARTS */
.chart-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:20px;}
.chart-grid .full{grid-column:1/-1;}
.chart-wrap{position:relative;}

/* TARGET BARS */
.target-list{display:flex;flex-direction:column;gap:14px;}
.target-item{display:grid;grid-template-columns:72px 1fr 48px 44px;align-items:center;gap:10px;}
.target-item-label{font-size:11px;font-weight:700;color:var(--text-muted);}
.bar-track{height:8px;background:var(--surface2);border-radius:4px;position:relative;overflow:visible;}
.bar-fill{height:100%;border-radius:4px;transition:width 0.7s cubic-bezier(.4,0,.2,1);}
.bar-goal-marker{position:absolute;top:-4px;width:2px;height:16px;background:var(--border-strong);border-radius:1px;}
.target-item-pct{font-size:12px;font-weight:800;text-align:right;}
.target-item-goal{font-size:10px;color:var(--text-light);text-align:right;}

/* PERIOD / LOCATION ROW */
.filter-row{display:flex;align-items:center;gap:12px;margin-bottom:20px;flex-wrap:wrap;}
.filter-row label{font-size:10px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:0.5px;}
.filter-row select{font-family:inherit;font-size:13px;font-weight:600;padding:7px 12px;border:1px solid var(--border-strong);border-radius:var(--radius);background:var(--surface);color:var(--text);cursor:pointer;outline:none;}

/* DATA ENTRY */
.entry-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:14px;margin-bottom:20px;}
.field{display:flex;flex-direction:column;gap:5px;}
.field label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:0.6px;color:var(--text-muted);display:flex;align-items:center;gap:5px;}
.field label svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
.field input,.field select,.field textarea{font-family:inherit;font-size:14px;font-weight:500;padding:10px 12px;border:1.5px solid var(--border-strong);border-radius:var(--radius);color:var(--text);background:var(--surface);outline:none;transition:border-color 0.15s;}
.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--yellow);}
.field.giving-field input{border-color:var(--giving);background:var(--giving-bg);}
.field.giving-field input:focus{box-shadow:0 0 0 3px rgba(139,92,246,0.12);}
.field-hint{font-size:10px;color:var(--text-light);margin-top:2px;}
.field.giving-field .field-hint{color:var(--giving-text);font-weight:600;}
.btn-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.btn-primary{background:var(--yellow);color:#111;border:none;border-radius:var(--radius);padding:11px 22px;font-family:inherit;font-size:13px;font-weight:700;cursor:pointer;transition:opacity 0.15s;}
.btn-primary:hover{opacity:0.88;}
.btn-secondary{background:none;border:1.5px solid var(--border-strong);border-radius:var(--radius);padding:10px 18px;font-family:inherit;font-size:13px;font-weight:600;color:var(--text-muted);cursor:pointer;transition:all 0.15s;}
.btn-secondary:hover{background:var(--surface2);}
.save-msg{font-size:12px;font-weight:600;padding:4px 0;}
.save-msg.ok{color:var(--green);}
.save-msg.err{color:var(--red);}
.edit-banner{background:var(--amber-bg);border:1px solid var(--amber);border-radius:var(--radius);padding:10px 14px;font-size:12px;color:var(--amber-text);font-weight:600;margin-bottom:16px;display:none;align-items:center;gap:8px;}

/* TABLE */
.table-wrap{overflow-x:auto;}
table{width:100%;border-collapse:collapse;font-size:12px;}
thead th{text-align:left;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:0.5px;color:var(--text-muted);padding:8px 12px;border-bottom:1px solid var(--border);white-space:nowrap;}
tbody td{padding:10px 12px;border-bottom:1px solid var(--border);color:var(--text);font-weight:500;}
tbody tr:last-child td{border-bottom:none;}
tbody tr:hover td{background:var(--surface2);}
.tbl-giving{color:var(--giving);font-weight:700;}
.tbl-actions{display:flex;gap:4px;}
.tbl-btn{background:none;border:none;cursor:pointer;padding:5px 7px;border-radius:6px;color:var(--text-muted);display:flex;align-items:center;}
.tbl-btn svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
.tbl-btn:hover{background:var(--surface2);}
.tbl-btn.del:hover{background:var(--red-bg);color:var(--red);}

/* IMPACT ROW */
.impact-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px;margin-bottom:20px;}
.impact-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:18px 20px;box-shadow:var(--shadow);position:relative;overflow:hidden;}
.impact-card::before{content:'';position:absolute;top:0;left:0;right:0;height:3px;border-radius:var(--radius-lg) var(--radius-lg) 0 0;}
.impact-card.tvc::before{background:linear-gradient(90deg,#FAB137,#8B5CF6);}
.impact-card.cost::before{background:linear-gradient(90deg,#378ADD,#1D9E75);}
.impact-card.retained::before{background:linear-gradient(90deg,#1D9E75,#FAB137);}
.impact-icon{color:var(--giving);margin-bottom:10px;}
.impact-icon svg{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;}
.impact-eyebrow{font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:var(--text-light);margin-bottom:3px;}
.impact-card.tvc .impact-eyebrow{color:#8B5CF6;opacity:0.7;}
.impact-card.cost .impact-eyebrow{color:#378ADD;opacity:0.7;}
.impact-card.retained .impact-eyebrow{color:var(--green);opacity:0.7;}
.impact-label{font-size:13px;font-weight:800;color:var(--text);margin-bottom:8px;letter-spacing:-0.2px;}
.impact-val{font-size:26px;font-weight:800;color:var(--text);letter-spacing:-0.5px;line-height:1;margin-bottom:8px;}
.tvc-val{background:linear-gradient(90deg,#1D9E75,#8B5CF6);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;}
.impact-story{font-size:12px;color:var(--text);line-height:1.65;margin-bottom:10px;font-weight:500;}
.impact-story strong{color:var(--text);}
.impact-explain{font-size:11px;color:var(--text-light);line-height:1.6;font-style:italic;border-top:1px solid var(--border);padding-top:8px;margin-top:4px;}
/* Per-dollar breakdown */
.impact-perdollar{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:10px;padding-top:10px;border-top:1px solid var(--border);}
.pdl-item{display:flex;flex-direction:column;align-items:center;gap:2px;}
.pdl-item span:first-child{font-size:15px;font-weight:800;letter-spacing:-0.3px;}
.pdl-item span:last-child{font-size:9px;font-weight:600;text-transform:uppercase;letter-spacing:0.4px;color:var(--text-muted);}
.profit-pdl span:first-child{color:var(--green);}
.giving-pdl span:first-child{color:var(--giving);}
.total-pdl span:first-child{color:var(--yellow-dark);}
.pdl-plus{font-size:14px;font-weight:700;color:var(--text-light);padding:0 2px;}
/* Giving bar in targets */
.target-giving-divider{height:1px;background:var(--border);margin:12px 0 10px;}
.giving-bar-item{}
.giving-bar-label{font-size:10px;font-weight:700;color:#8B5CF6;line-height:1.3;}
.giving-bar-fill{background:linear-gradient(90deg,#8B5CF6,#A78BFA)!important;}
.giving-no-ceiling{font-size:10px;color:#8B5CF6;font-weight:700;text-align:right;width:44px;}
.giving-bar-story{font-size:11px;color:var(--giving-text);background:var(--giving-bg);border-radius:var(--radius);padding:8px 10px;margin-top:8px;line-height:1.6;font-style:italic;}

/* PROJECTIONS */
.slider-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:18px;margin-top:8px;}
.slider-field{display:flex;flex-direction:column;gap:5px;}
.slider-label{font-size:11px;font-weight:700;color:var(--text);display:flex;justify-content:space-between;align-items:center;}
.slider-val{font-size:13px;font-weight:800;color:var(--yellow-dark);}
.slider-hint{font-size:10px;color:var(--text-light);}
.slider-hint span{font-weight:700;color:var(--text-muted);}
input[type=range]{-webkit-appearance:none;width:100%;height:5px;border-radius:3px;background:var(--surface2);outline:none;cursor:pointer;}
input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;background:var(--yellow);cursor:pointer;border:2px solid var(--surface);box-shadow:0 1px 4px rgba(0,0,0,0.2);}
input[type=range]::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:var(--yellow);cursor:pointer;border:2px solid var(--surface);}
.proj-scenarios{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin-bottom:20px;}
.proj-scenario-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:18px 20px;box-shadow:var(--shadow);position:relative;overflow:hidden;}
.proj-scenario-card::before{content:'';position:absolute;top:0;left:0;right:0;height:3px;}
.proj-scenario-card.low::before{background:#888780;}
.proj-scenario-card.mid::before{background:var(--yellow);}
.proj-scenario-card.high::before{background:var(--green);}
.proj-scenario-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:0.6px;color:var(--text-muted);margin-bottom:4px;}
.proj-scenario-card.mid .proj-scenario-label{color:var(--yellow-dark);}
.proj-scenario-card.high .proj-scenario-label{color:var(--green-text);}
.proj-scenario-title{font-size:13px;font-weight:800;color:var(--text);margin-bottom:12px;}
.proj-metric{display:flex;justify-content:space-between;align-items:center;padding:5px 0;border-bottom:1px solid var(--border);font-size:12px;}
.proj-metric:last-child{border-bottom:none;}
.proj-metric-label{color:var(--text-muted);font-weight:500;}
.proj-metric-val{font-weight:700;color:var(--text);}
.proj-metric-val.green{color:var(--green);}
.proj-metric-val.giving{color:var(--giving);}
.proj-metric-val.warn{color:var(--amber);}
.proj-metric-val.bad{color:var(--red);}

/* IMPLIED PROFIT ROW */
.implied-profit-row{display:flex;align-items:center;gap:10px;margin-top:12px;padding:10px 14px;background:var(--surface2);border-radius:var(--radius);flex-wrap:wrap;}
.implied-profit-label{font-size:11px;font-weight:700;color:var(--text-muted);flex-shrink:0;}
.implied-profit-val{font-size:16px;font-weight:800;}
.implied-profit-target{font-size:11px;font-weight:600;}

/* COMPARISON LAYOUT */
.proj-comparison-wrap{display:grid;grid-template-columns:3fr 2fr;gap:16px;margin-bottom:20px;align-items:start;}
.comp-side{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:20px;box-shadow:var(--shadow);}
.comp-side-header{margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid var(--border);}
.comp-side-title{font-size:14px;font-weight:800;color:var(--text);letter-spacing:-0.2px;}
.comp-side-sub{font-size:11px;color:var(--text-muted);margin-top:3px;}
.model-side .comp-side-title{color:var(--yellow-dark);}
.manual-side .comp-side-title{color:#378ADD;}
/* Three scenarios side by side inside model */
.comp-scenarios{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;}
.comp-scenario{background:var(--surface2);border-radius:var(--radius);padding:10px 12px;border:1px solid var(--border);}
.comp-scenario.main{border-color:var(--yellow);background:var(--yellow-light);}
.manual-side .comp-scenario.main{border-color:#378ADD;background:var(--blue-bg);}
.comp-scenario.low{opacity:0.8;}
.comp-scenario.high{opacity:0.9;}
.comp-scenario-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:0.6px;color:var(--text-muted);margin-bottom:4px;}
.comp-scenario.main .comp-scenario-label{color:var(--yellow-dark);}
.manual-side .comp-scenario.main .comp-scenario-label{color:var(--blue-text);}
.manual-side .csm-row{font-size:12px;}
.comp-scenario-rev{font-size:19px;font-weight:800;color:var(--text);letter-spacing:-0.5px;line-height:1.2;}
.comp-scenario-growth{font-size:12px;color:var(--text-muted);font-weight:600;margin-bottom:10px;margin-top:3px;}
.comp-scenario-metrics{display:flex;flex-direction:column;gap:3px;}
.csm-row{display:flex;justify-content:space-between;font-size:12px;padding:3px 0;border-bottom:1px solid var(--border);}
.csm-row:last-child{border-bottom:none;}
.csm-row span:first-child{color:var(--text-muted);font-weight:500;}
.csm-row span:last-child{font-weight:700;color:var(--text);}
.csm-good{color:var(--green)!important;}
.csm-bad{color:var(--red)!important;}
.csm-profit-row{border-top:1.5px solid var(--border)!important;margin-top:3px;padding-top:5px!important;flex-wrap:nowrap;}
.csm-profit-row small{opacity:0.6;font-size:9px;margin-left:3px;}
.manual-input-wrap{margin-bottom:12px;padding:10px 12px;background:var(--surface2);border-radius:var(--radius);}
.manual-rev-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:0.5px;color:var(--text-muted);display:block;margin-bottom:8px;}
.manual-rev-input-row{display:flex;align-items:center;gap:5px;}
.manual-dollar{font-size:15px;font-weight:800;color:var(--text-muted);}
.manual-rev-input{font-family:inherit;font-size:15px;font-weight:700;padding:7px 9px;border:2px solid #378ADD;border-radius:var(--radius);color:var(--text);background:var(--surface);outline:none;width:100%;transition:border-color 0.15s;}
.manual-rev-input:focus{border-color:#378ADD;box-shadow:0 0 0 2px rgba(55,138,221,0.12);}
.manual-rev-hint{font-size:10px;color:var(--text-light);margin-top:5px;}
.comp-empty{text-align:center;padding:32px 16px;color:var(--text-muted);}
.comp-empty svg{width:32px;height:32px;margin:0 auto 10px;display:block;opacity:0.3;}
.comp-empty div{font-size:12px;font-weight:500;}
@media(max-width:900px){.comp-scenarios{grid-template-columns:1fr;}}
@media(max-width:700px){.proj-comparison-wrap{grid-template-columns:1fr;}}

/* P&L TABLE TOGGLE */
.proj-table-toggle{display:flex;gap:4px;background:var(--surface2);padding:4px;border-radius:var(--radius);flex-wrap:wrap;}
.ptoggle{font-family:inherit;font-size:11px;font-weight:600;padding:5px 12px;border:none;border-radius:6px;cursor:pointer;background:transparent;color:var(--text-muted);transition:all 0.15s;}
.ptoggle:hover{color:var(--text);}
.ptoggle.active{background:var(--surface);color:var(--text);box-shadow:0 1px 3px rgba(0,0,0,0.1);}
.ptoggle[data-scenario="low"].active{color:#888780;}
.ptoggle[data-scenario="mid"].active{color:var(--yellow-dark);}
.ptoggle[data-scenario="high"].active{color:var(--green);}
.ptoggle[data-scenario="manual"].active{color:#378ADD;}

/* IMPACT SECTION */
.impact-heroes-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin-bottom:20px;}
.impact-hero-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:20px;box-shadow:var(--shadow);position:relative;overflow:hidden;text-align:center;}
.impact-hero-card::before{content:'';position:absolute;top:0;left:0;right:0;height:4px;}
.impact-hero-card.youth::before{background:linear-gradient(90deg,#FAB137,#F87315);}
.impact-hero-card.coop::before{background:linear-gradient(90deg,#8B5CF6,#6D28D9);}
.impact-hero-card.hours::before{background:linear-gradient(90deg,#1D9E75,#059669);}
.ihc-icon{margin-bottom:12px;color:var(--text-muted);}
.ihc-icon svg{width:28px;height:28px;stroke:currentColor;fill:none;display:block;margin:0 auto;}
.impact-hero-card.youth .ihc-icon{color:#F87315;}
.impact-hero-card.coop .ihc-icon{color:#8B5CF6;}
.impact-hero-card.hours .ihc-icon{color:#1D9E75;}
.ihc-number{font-size:48px;font-weight:800;letter-spacing:-2px;line-height:1;color:var(--text);margin-bottom:6px;}
.impact-hero-card.youth .ihc-number{color:#F87315;}
.impact-hero-card.coop .ihc-number{color:#8B5CF6;}
.impact-hero-card.hours .ihc-number{color:#1D9E75;}
.ihc-label{font-size:12px;font-weight:700;color:var(--text);margin-bottom:4px;}
.ihc-sub{font-size:11px;color:var(--text-muted);font-weight:500;}
/* Proprietary metrics */
.prop-metrics-list{display:flex;flex-direction:column;gap:0;}
.prop-metric{display:grid;grid-template-columns:32px 1fr;gap:14px;align-items:start;padding:16px 0;border-bottom:1px solid var(--border);}
.prop-metric:last-child{border-bottom:none;}
.prop-metric.featured{background:var(--giving-bg);border-radius:var(--radius);padding:16px;margin-top:8px;border:1px solid var(--giving);grid-template-columns:32px 1fr;}
.prop-icon{font-size:18px;color:var(--giving);margin-top:2px;text-align:center;line-height:1;}
.prop-metric.featured .prop-icon{color:var(--giving);}
.prop-val{font-size:26px;font-weight:800;color:var(--text);letter-spacing:-0.5px;line-height:1;margin-bottom:3px;}
.prop-metric.featured .prop-val{color:var(--giving);}
.prop-label{font-size:12px;font-weight:700;color:var(--text);margin-bottom:5px;}
.prop-explain{font-size:11px;color:var(--text-muted);line-height:1.65;font-style:italic;}

/* PASS 2 — TREND & ANALYTICS */
.metric-icon-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px;}
.trend-arrow{font-size:14px;font-weight:800;line-height:1;}
.trend-up{color:var(--green);}
.trend-down{color:var(--red);}
.trend-neutral{color:var(--text-muted);}
.status-pill{display:inline-block;font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:0.5px;padding:2px 7px;border-radius:20px;margin-top:5px;}
.status-good{background:var(--green-bg);color:var(--green-text);}
.status-warn{background:var(--amber-bg);color:var(--amber-text);}
.status-bad{background:var(--red-bg);color:var(--red-text);}
.sparkline-canvas{display:block;width:100%;height:28px;margin-top:8px;opacity:0.8;}
/* Rolling 12 banner */
.rolling12-banner{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);padding:14px 20px;box-shadow:var(--shadow);display:flex;align-items:center;gap:20px;flex-wrap:wrap;}
.r12-label{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:0.6px;color:var(--text-muted);white-space:nowrap;flex-shrink:0;}
.r12-stats{display:flex;align-items:center;gap:16px;flex-wrap:wrap;flex:1;}
.r12-stat{text-align:center;}
.r12-val{font-size:16px;font-weight:800;color:var(--text);letter-spacing:-0.3px;}
.r12-name{font-size:10px;color:var(--text-muted);font-weight:500;margin-top:2px;}
.r12-divider{width:1px;height:32px;background:var(--border);flex-shrink:0;}

/* PROJ VERDICT */
.proj-profit-verdict{margin-top:10px;padding:8px 12px;border-radius:var(--radius);font-size:12px;font-weight:700;text-align:center;}
.verdict-good{background:var(--green-bg);color:var(--green-text);}
.verdict-bad{background:var(--red-bg);color:var(--red-text);}

/* GROWTH CHART */
.growth-divider{height:1px;background:var(--border);margin:20px 0 14px;}
.growth-header{display:flex;align-items:flex-start;justify-content:space-between;}
.growth-summary{margin-top:14px;padding:12px 16px;background:var(--surface2);border-radius:var(--radius);font-size:12px;color:var(--text);line-height:1.7;font-style:italic;}
.growth-summary strong{font-style:normal;color:var(--yellow-dark);}
.growth-summary .growth-highlight{font-style:normal;font-weight:700;color:var(--green);}

/* PLACEHOLDER */
.placeholder{text-align:center;padding:64px 24px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:var(--shadow);}
.placeholder-icon svg{width:48px;height:48px;stroke:var(--text-light);fill:none;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round;opacity:0.4;margin-bottom:14px;}
.placeholder-title{font-size:17px;font-weight:800;color:var(--text);margin-bottom:8px;}
.placeholder-desc{font-size:13px;color:var(--text-muted);max-width:340px;margin:0 auto;line-height:1.7;}
.coming-pill{display:inline-block;background:var(--yellow-light);color:var(--yellow-dark);font-size:10px;font-weight:700;padding:3px 10px;border-radius:20px;margin-top:14px;letter-spacing:0.4px;text-transform:uppercase;}

/* EXCEL UPLOAD */
.excel-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;flex-wrap:wrap;gap:10px;}
.btn-excel-download{display:flex;align-items:center;gap:7px;background:var(--green-bg);color:var(--green-text);border:1.5px solid var(--green);border-radius:var(--radius);padding:9px 16px;font-family:inherit;font-size:12px;font-weight:700;cursor:pointer;transition:all 0.15s;}
.btn-excel-download:hover{background:var(--green);color:#fff;}
.btn-excel-download svg{width:15px;height:15px;flex-shrink:0;}
.upload-zone{border:2px dashed var(--border-strong);border-radius:var(--radius-lg);padding:32px 20px;text-align:center;cursor:pointer;transition:all 0.2s;background:var(--surface2);}
.upload-zone:hover,.upload-zone.drag-over{border-color:var(--yellow);background:var(--yellow-light);}
.upload-icon{margin-bottom:10px;}
.upload-icon svg{width:32px;height:32px;stroke:var(--text-muted);margin:0 auto;display:block;}
.upload-label{font-size:13px;font-weight:700;color:var(--text);margin-bottom:4px;}
.upload-sub{font-size:11px;color:var(--text-muted);}
.preview-header{display:flex;align-items:center;justify-content:space-between;padding:14px 0 10px;flex-wrap:wrap;gap:8px;}
.preview-title{font-size:13px;font-weight:700;color:var(--text);}
.preview-table-wrap{overflow-x:auto;max-height:280px;overflow-y:auto;border:1px solid var(--border);border-radius:var(--radius);}
.preview-table-wrap table{font-size:11px;}
.preview-table-wrap thead th{position:sticky;top:0;background:var(--surface2);z-index:1;}
.preview-errors{margin-top:8px;}
.preview-error-row{font-size:11px;color:var(--red-text);background:var(--red-bg);border-radius:5px;padding:5px 10px;margin-top:4px;}
.preview-warn-row{font-size:11px;color:var(--amber-text);background:var(--amber-bg);border-radius:5px;padding:5px 10px;margin-top:4px;}

/* MISC */
.loading{text-align:center;padding:40px;color:var(--text-muted);font-size:13px;}
.spinner{display:inline-block;width:18px;height:18px;border:2px solid var(--border);border-top-color:var(--yellow);border-radius:50%;animation:spin 0.7s linear infinite;margin-right:8px;vertical-align:middle;}
@keyframes spin{to{transform:rotate(360deg);}}
.no-data-msg{text-align:center;padding:36px;color:var(--text-muted);font-size:13px;}
.section-header{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:20px;flex-wrap:wrap;gap:12px;}
.section-title{font-size:20px;font-weight:800;color:var(--text);letter-spacing:-0.4px;}
.section-sub{font-size:12px;color:var(--text-muted);margin-top:3px;font-weight:500;}
.legend{display:flex;flex-wrap:wrap;gap:12px;margin-bottom:12px;}
.legend-item{display:flex;align-items:center;gap:5px;font-size:11px;color:var(--text-muted);font-weight:600;}
.legend-dot{width:9px;height:9px;border-radius:2px;flex-shrink:0;}

@media(max-width:600px){
  .main{padding:14px;}
  .chart-grid{grid-template-columns:1fr;}
  .chart-grid .full{grid-column:1;}
  .topbar{padding:0 14px;}
  .nav-bar{padding:0 6px;overflow-x:auto;}
  .metrics-row{grid-template-columns:repeat(2,1fr);}
}

/* ── Accounts & roles ── */
.topbar-user{font-size:11px;color:rgba(255,255,255,0.55);font-weight:600;}
/* View-only accounts: hide every editing control (the server enforces this too). */
body.role-viewer .nav-btn[onclick="switchTab('entry')"],
body.role-viewer #tab-entry,
body.role-viewer [data-edit-only],
body.role-viewer [onclick^="editEntry"],
body.role-viewer [onclick^="deleteEntry"],
body.role-viewer [onclick^="editImpactEntry"],
body.role-viewer [onclick^="deleteImpactEntry"],
body.role-viewer [onclick^="refreshDecoSnapshot"]{display:none!important;}

/* ── Admin / account overlay ── */
.tt-overlay{position:fixed;inset:0;z-index:1000;background:rgba(0,0,0,0.55);display:flex;align-items:flex-start;justify-content:center;padding:48px 16px;overflow-y:auto;}
.tt-panel{width:100%;max-width:980px;background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-lg);box-shadow:0 20px 60px rgba(0,0,0,0.35);padding:24px;}
.tt-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px;}
.tt-tabs{display:flex;gap:4px;margin-bottom:16px;border-bottom:1px solid var(--border);}
.tt-tab{background:none;border:none;border-bottom:2px solid transparent;padding:8px 14px;font-family:inherit;font-size:13px;font-weight:600;color:var(--text-muted);cursor:pointer;margin-bottom:-1px;}
.tt-tab.active{color:var(--text);border-bottom-color:var(--yellow);}
.tt-form-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px;}
.tt-panel table select{font-family:inherit;font-size:12px;padding:4px 6px;border:1px solid var(--border-strong);border-radius:6px;background:var(--surface);color:var(--text);}
.btn-secondary.tt-small{padding:4px 10px;font-size:11px;}
@media (max-width:600px){.tt-panel{padding:16px;}.tt-overlay{padding:16px 8px;}}
.tt-warning{background:var(--amber-bg);color:var(--amber-text);border:1px solid var(--amber);border-radius:var(--radius);padding:12px 16px;font-size:12px;line-height:1.5;margin-bottom:16px;}
.tt-panel button:disabled{opacity:0.45;cursor:not-allowed;}
.login-invite-intro{color:rgba(255,255,255,0.75);font-size:13px;line-height:1.5;text-align:left;margin-bottom:18px;}
.login-invite-email{color:var(--yellow);font-weight:600;margin-top:4px;}
.tt-note{background:var(--green-bg);color:var(--green-text);border:1px solid var(--green);border-radius:var(--radius);padding:12px 16px;font-size:12px;line-height:1.5;margin-bottom:16px;}
.login-link{display:inline-block;margin-top:14px;font-size:12px;font-weight:600;color:rgba(255,255,255,0.5);text-decoration:none;}
.login-link:hover{color:var(--yellow);}
.btn-secondary.tt-danger{color:var(--red);border-color:var(--red);}
.btn-secondary.tt-danger:hover{background:var(--red-bg);}
.sales-fetched{font-size:11px;color:var(--text-light);margin-top:2px;}
.sales-fetch-btn{background:none;border:none;padding:0;font-family:inherit;font-size:11px;font-weight:600;color:var(--yellow-dark);cursor:pointer;text-decoration:underline;}
.sales-fetch-btn:hover{color:var(--yellow);}

/* ── Batch delete ── */
th.row-select,td.row-select{width:28px;padding-right:0;}
.row-select input{width:15px;height:15px;cursor:pointer;accent-color:var(--yellow-dark);}
.bulk-bar{align-items:center;gap:10px;flex-wrap:wrap;padding:8px 12px;margin-bottom:10px;border-radius:var(--radius);background:var(--surface2);font-size:12px;}
.bulk-bar>span:first-child{margin-right:auto;}
body.role-viewer .row-select,body.role-viewer .bulk-bar{display:none!important;}
.tt-panel.tt-panel-sm{max-width:480px;}
.tt-confirm-list{margin:0;padding-left:20px;font-size:13px;line-height:1.8;color:var(--text);max-height:280px;overflow-y:auto;}
.tt-confirm-more{color:var(--text-muted);list-style:none;margin-left:-20px;}
.btn-primary.tt-danger-solid{background:var(--red);color:#fff;}

/* ── Sales targets ── */
.targets-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;}
.targets-notes{display:block;margin-top:2px;font-style:italic;}
.targets-legend{display:flex;gap:14px;flex-wrap:wrap;}
.targets-plan-row{display:grid;grid-template-columns:130px 1fr 170px;gap:16px;align-items:start;padding:14px 0;border-top:1px solid var(--border);}
.targets-plan-name{font-weight:700;font-size:13px;padding-top:2px;}
.targets-plan-why{font-size:12px;color:var(--text-muted);line-height:1.6;}
.targets-plan-why strong{color:var(--text);}
.targets-plan-base{font-size:11px;margin-top:4px;}
.targets-plan-input .field input{width:100%;}
.targets-plan-annual{font-size:16px;font-weight:800;margin-top:6px;}
.targets-chips{display:flex;flex-wrap:wrap;gap:4px;margin-top:4px;}
.targets-chip{font-size:10px;font-weight:700;padding:1px 6px;border-radius:5px;background:var(--surface2);}
.targets-chip.up{color:var(--green-text);}
.targets-chip.down{color:var(--red-text);}
.targets-plan-total{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;padding-top:14px;border-top:2px solid var(--border);font-size:13px;}
.targets-plan-total strong{font-size:20px;}
.targets-now{font-size:9px;font-weight:700;background:var(--yellow-dark);color:#000;padding:1px 6px;border-radius:8px;}
@media (max-width:700px){.targets-plan-row{grid-template-columns:1fr;}}

/* ── Bonuses (compensation access only) ── */
body:not(.can-comp) .comp-only{display:none!important;}
.bonus-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.bonus-ladder{position:relative;height:44px;margin:34px 0 44px;}
.bonus-band{position:absolute;top:0;bottom:0;display:flex;align-items:center;justify-content:center;overflow:hidden;border-right:1px solid var(--surface);}
.bonus-band span{font-size:10px;font-weight:700;white-space:nowrap;}
.bonus-band.b0{background:var(--surface2);color:var(--text-muted);border-radius:var(--radius) 0 0 var(--radius);}
.bonus-band.b1{background:var(--amber-bg);color:var(--amber-text);}
.bonus-band.b2{background:var(--yellow-light);color:#000;}
.bonus-band.b3{background:var(--green-bg);color:var(--green-text);}
.bonus-band.b4{background:var(--blue-bg);color:var(--blue-text);border-radius:0 var(--radius) var(--radius) 0;}
.bonus-tick{position:absolute;top:100%;transform:translateX(-50%);padding-top:4px;font-size:10px;color:var(--text-muted);white-space:nowrap;}
.bonus-marker{position:absolute;top:-8px;bottom:-8px;width:0;border-left:2px solid var(--text);}
.bonus-marker span{position:absolute;bottom:100%;left:0;transform:translateX(-50%);font-size:10px;font-weight:700;white-space:nowrap;background:var(--surface);padding:0 4px;}
.bonus-marker.projected{border-left-style:dashed;border-left-color:var(--text-muted);}
.bonus-marker.projected span{bottom:auto;top:100%;margin-top:14px;color:var(--text-muted);font-weight:600;}
.bonus-adj-form{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;margin-top:14px;padding-top:14px;border-top:1px solid var(--border);}
.bonus-tier-row{display:flex;gap:10px;align-items:flex-end;margin-bottom:8px;}
.bonus-tier-row .field{flex:1;}
@media (max-width:800px){.bonus-grid{grid-template-columns:1fr;}}

/* ── Projections ── */
.proj-cards{grid-template-columns:repeat(auto-fit,minmax(170px,1fr));margin-bottom:16px;}
.proj-cards .metric-secondary{margin-top:4px;}
.badge-blue{background:var(--blue-bg);color:var(--blue-text);}
.proj-grid{display:grid;grid-template-columns:3fr 2fr;gap:16px;align-items:start;}
.proj-table td{white-space:nowrap;}
.proj-pct{font-size:10px;color:var(--text-muted);margin-left:2px;}
.proj-pct.over{color:var(--red);font-weight:700;}
.proj-sofar{font-size:10px;color:var(--amber-text);}
.proj-row-forecast td{background:var(--surface2);}
.proj-total td{font-weight:800;border-top:2px solid var(--border-strong);}
.proj-ly td{color:var(--text-muted);font-weight:600;}
.proj-ly.proj-total td{border-top:1px solid var(--border);}
.proj-method{margin:0;padding-left:18px;font-size:12px;line-height:1.7;}
.proj-method li{margin-bottom:4px;}
.proj-backtest{margin-top:12px;padding:12px 14px;background:var(--surface2);border-radius:var(--radius);font-size:12px;line-height:1.6;}
.proj-bt-table{margin:8px 0;font-size:12px;}
.proj-bt-table td{padding:3px 14px 3px 0;border:none;}
.proj-goal{display:flex;flex-direction:column;gap:8px;margin-top:12px;font-size:12px;line-height:1.6;}
.proj-assumptions summary{cursor:pointer;list-style:none;display:flex;align-items:center;gap:10px;}
.proj-assumptions summary::-webkit-details-marker{display:none;}
.proj-assumptions summary::before{content:'▸';font-size:12px;color:var(--text-muted);transition:transform 0.15s;}
.proj-assumptions[open] summary::before{transform:rotate(90deg);}
.proj-assume-state{font-size:11px;color:var(--text-muted);font-weight:600;}
@media (max-width:900px){.proj-grid{grid-template-columns:1fr;}}
.proj-plan-input{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:12px 0;}
.proj-plan-input label{font-size:11px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:0.4px;}
.proj-plan-input .manual-rev-input{width:180px;}
.proj-plan-table td,.proj-plan-table th{white-space:nowrap;}
.proj-col-split{border-left:2px solid var(--border);padding-left:14px!important;}
.proj-gap-notes{margin-top:14px;}
.proj-footnote{font-size:11px;color:var(--text-muted);margin-top:8px;line-height:1.5;}
.comp-th-month{font-size:11px;font-weight:800;color:var(--text);text-transform:none;letter-spacing:0;margin-top:2px;}

/* ── Giving ── */
.gv-goal-head{display:flex;justify-content:space-between;align-items:baseline;font-size:13px;}
.gv-goal-given{font-size:22px;font-weight:800;color:var(--giving);}
.gv-goal-pct{font-size:18px;font-weight:800;color:var(--giving-text);}
.gv-progress{position:relative;height:12px;background:var(--surface2);border-radius:8px;margin:10px 0;overflow:visible;}
.gv-progress-fill{height:100%;background:var(--giving);border-radius:8px;}
.gv-progress-proj{position:absolute;top:-4px;bottom:-4px;width:0;border-left:2px dashed var(--text-muted);}
.gv-goal-pace{font-size:12px;line-height:1.6;}
.gv-goal-edit{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px;}
.gv-goal-edit label{font-size:11px;font-weight:700;color:var(--text-muted);text-transform:uppercase;letter-spacing:0.4px;}
.gv-goal-edit .manual-rev-input{width:160px;border-color:var(--giving);}
.gv-milestones{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;}
.gv-milestone{font-size:11px;font-weight:700;padding:3px 9px;border-radius:12px;background:var(--giving-bg);color:var(--giving-text);}
.gv-milestone small{font-weight:500;opacity:0.8;margin-left:3px;}
.gv-milestone.next{background:var(--surface2);color:var(--text-muted);}
.gv-rec-row{display:grid;grid-template-columns:minmax(140px,1.2fr) 3fr minmax(110px,auto);gap:12px;align-items:center;padding:6px 0;font-size:13px;}
.gv-rec-name{font-weight:700;}
.gv-rec-main{font-size:9px;font-weight:700;padding:1px 6px;border-radius:8px;background:var(--giving-bg);color:var(--giving-text);text-transform:uppercase;}
.gv-rec-bar{height:10px;background:var(--surface2);border-radius:6px;overflow:hidden;}
.gv-rec-bar div{height:100%;background:var(--giving);border-radius:6px;}
.gv-rec-amt{font-weight:700;text-align:right;}
.gv-rec-amt small{color:var(--text-muted);font-weight:500;}
.gv-gift-form{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;margin-top:14px;padding-top:14px;border-top:1px solid var(--border);}
@media (max-width:600px){.gv-rec-row{grid-template-columns:1fr auto;}.gv-rec-bar{grid-column:1 / -1;}}

/* Giving report: shown over the app, printed on its own */
.gv-report-wrap{position:fixed;inset:0;z-index:1000;background:rgba(0,0,0,0.55);overflow-y:auto;padding:24px 16px;}
.gv-report-tools{max-width:820px;margin:0 auto 12px;display:flex;gap:10px;align-items:center;justify-content:flex-end;flex-wrap:wrap;color:#fff;font-size:12px;}
.gv-report-tools label{margin-right:auto;display:flex;gap:6px;align-items:center;}
.gv-report{max-width:820px;margin:0 auto;background:#fff;color:#111;border-radius:12px;overflow:hidden;font-family:Montserrat,Helvetica,Arial,sans-serif;padding-bottom:28px;}
.gv-report-band{background:#111;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:22px 32px;font-size:20px;font-weight:800;letter-spacing:-0.3px;-webkit-print-color-adjust:exact;print-color-adjust:exact;}
.gv-report-band img{height:34px;}
.gv-report-period{padding:16px 32px 0;font-size:13px;font-weight:700;color:#6B6860;text-transform:uppercase;letter-spacing:0.6px;}
.gv-report-hero{display:flex;gap:36px;flex-wrap:wrap;padding:14px 32px 8px;}
.gv-report-big{font-size:34px;font-weight:800;color:#7C3AED;letter-spacing:-1px;}
.gv-report-label{font-size:12px;color:#6B6860;}
.gv-report-pct{display:none;}
.gv-report-wrap.show-pct .gv-report-pct{display:block;}
.gv-report-h{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:0.6px;color:#6B6860;margin:20px 32px 8px;}
.gv-report-charts{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
.gv-report-chart{height:190px;margin:0 32px;}
.gv-report-charts .gv-report-chart{margin:0 16px 0 32px;}
.gv-report-charts > div:last-child .gv-report-chart{margin:0 32px 0 16px;}
.gv-report-milestones{display:flex;flex-wrap:wrap;gap:6px;margin:0 32px;}
.gv-report-milestones span{font-size:12px;font-weight:700;padding:4px 10px;border-radius:12px;background:#EDE9FE;color:#5B21B6;-webkit-print-color-adjust:exact;print-color-adjust:exact;}
.gv-report-milestones small{font-weight:500;margin-left:3px;}
.gv-report-table{margin:0 32px;width:calc(100% - 64px);border-collapse:collapse;font-size:13px;}
.gv-report-table td{padding:6px 0;border-bottom:1px solid #E5E2DA;}
.gv-report-table td:last-child{text-align:right;font-weight:700;}
.gv-report-notes{margin:0 32px;padding-left:18px;font-size:13px;line-height:1.7;}
.gv-report-message{margin:24px 32px 0;padding:16px 18px;background:#FFF7E6;border-left:4px solid #FAB137;font-size:14px;line-height:1.6;border-radius:6px;outline:none;-webkit-print-color-adjust:exact;print-color-adjust:exact;}
@media (max-width:700px){.gv-report-charts{grid-template-columns:1fr;}.gv-report-charts .gv-report-chart,.gv-report-charts > div:last-child .gv-report-chart{margin:0 16px;}}
@media print{
  body.gv-report-open > *:not(#givingReport){display:none!important;}
  body.gv-report-open{background:#fff!important;}
  .gv-report-wrap{position:static;background:none;padding:0;overflow:visible;}
  .gv-report{border-radius:0;max-width:none;}
  .no-print{display:none!important;}
}
.ship-note{font-size:10px;font-weight:500;color:var(--text-muted);margin-top:3px;text-transform:none;letter-spacing:0;line-height:1.4;}
.fin-card-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;}
.fin-dollars{font-weight:600;margin-right:4px;}
