:root{
  --bg:#0c0b0a;--panel:#161311;--panel2:#1c1612;--line:#3a2c24;
  --orange:#ff710c;--orange2:#ff8b25;--text:#f6f3f0;--muted:#a7a19d;
  --green:#00d58a;--red:#ff6262
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font:14px/1.45 Inter,system-ui,-apple-system,"Segoe UI",sans-serif}
button,input,select{font:inherit}button{cursor:pointer}
a{color:var(--orange2)}

.login-body{
  min-height:100vh;display:grid;place-items:center;padding:24px;
  background:
    radial-gradient(900px 420px at 80% -10%, #ff710c55, transparent 55%),
    linear-gradient(160deg,#1a100c,#0c0b0a 48%,#2a1408);
}
.login-card{
  width:min(440px,100%);background:#161311;border:1px solid #4a2f1d;border-radius:18px;
  padding:28px 26px 24px;box-shadow:0 24px 80px #000a
}
.login-brand{display:flex;gap:12px;align-items:center;margin-bottom:18px}
.login-mark{
  width:44px;height:44px;border-radius:12px;display:grid;place-items:center;
  background:linear-gradient(140deg,#ff7b12,#c2410c);font-weight:850;font-size:22px
}
.login-brand b{display:block;font-size:22px;letter-spacing:-.6px}
.login-brand span{color:var(--muted);font-size:12px}
.login-card h1{margin:0 0 6px;font-size:26px;letter-spacing:-.5px}
.login-card p.lead{margin:0 0 18px;color:var(--muted)}
.login-card label{display:grid;gap:6px;margin-bottom:12px;font-size:12px;color:#d2c6bc;font-weight:700}
.login-card input{
  width:100%;padding:12px 14px;border-radius:10px;border:1px solid #4a3d35;
  background:#241c18;color:#fff;outline:0
}
.login-card input:focus{border-color:var(--orange)}
.pass{display:flex;gap:8px}
.pass input{flex:1}
.pass button,.ghost{
  border:1px solid #55402f;background:#2a211b;color:#fff;padding:10px 12px;border-radius:10px
}
.login-card .primary,.btn.primary{
  background:linear-gradient(100deg,#ff7b12,#f15d00);border:0;color:#fff;font-weight:700
}
.login-actions{display:flex;flex-direction:column;gap:10px;margin-top:8px}
.login-actions .primary{padding:12px;border-radius:10px}
.login-status{min-height:20px;font-size:12px;margin-top:10px;color:#ffbf8a}
.login-foot{margin-top:14px;font-size:12px;color:var(--muted)}

.app{display:grid;grid-template-columns:245px minmax(0,1fr);min-height:100vh;background:linear-gradient(130deg,#171411,#101010 55%)}
.app.collapsed{grid-template-columns:72px minmax(0,1fr)}
.sidebar{background:#151719;border-right:1px solid #302923;padding:16px 12px;display:flex;flex-direction:column}
.brand{padding:0 7px 23px;border-bottom:1px solid #302b27;margin-bottom:16px}
.brand-name{font-size:31px;font-weight:850;letter-spacing:-1.3px}
.brand-name span{color:var(--orange)}
.brand-sub{font-size:12px;color:#c1bcb8}
.nav{display:grid;gap:4px}
.nav button{border:0;border-radius:9px;background:transparent;color:#e9e7e5;text-align:left;padding:12px;display:flex;gap:13px;align-items:center}
.nav button:hover{background:#29221d}
.nav button.active{background:linear-gradient(100deg,#ff7b12,#f15d00);color:white}
.ico{width:21px;text-align:center;font-size:18px}
.promo{margin-top:auto;border:1px solid #70401f;border-radius:12px;padding:16px;background:linear-gradient(140deg,#302016,#171717);line-height:1.8}
.promo strong{color:white}.promo .picon{font-size:28px;color:var(--orange)}
main{min-width:0}
.topbar{height:72px;display:flex;align-items:center;gap:18px;padding:0 24px;background:#171310;border-bottom:1px solid #30251f;position:sticky;top:0;z-index:3}
.hamb{background:none;border:0;color:#eee;font-size:24px}
.search{flex:1;max-width:550px;border:1px solid #40312a;border-radius:24px;padding:10px 16px;background:#29211d;color:#aaa;display:flex;gap:10px}
.search input{background:none;border:0;outline:0;color:white;width:100%}
.right{margin-left:auto;display:flex;align-items:center;gap:14px}
.right button{border:0;background:none;color:white;font-size:16px}
.avatar{background:linear-gradient(140deg,#ffd6a8,#8e4e27);border-radius:50%;width:38px;height:38px;display:grid;place-items:center;font-size:13px;font-weight:800;color:#3a1d0c;overflow:hidden;flex:0 0 auto}
.avatar.has-photo{padding:0;background:#29211d}
.avatar img{width:100%;height:100%;object-fit:cover;display:block}
.person{font-size:12px}.person small{display:block;color:#aaa}
.content{padding:20px 22px 30px;max-width:1800px;margin:auto}
.crumb{font-size:12px;color:var(--muted);margin-bottom:12px}.crumb b{color:var(--orange);font-weight:600}
.pagehead{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:20px}
.pagehead h1{font-size:28px;margin:0 0 4px;letter-spacing:-.6px}
.pagehead p{color:var(--muted);margin:0}
.btn{border:1px solid #55402f;background:#2a211b;color:white;padding:10px 14px;border-radius:8px}
.btn.primary{background:linear-gradient(100deg,#ff7b12,#f15d00);border:0;font-weight:650}
.btn:hover{filter:brightness(1.12)}
.export-setup{
  border:1px solid #3a2c24;border-radius:16px;padding:18px 18px 16px;margin:0 0 16px;
  background:linear-gradient(160deg,#241910,#171310 70%)
}
.export-kicker{font-size:10px;letter-spacing:.14em;text-transform:uppercase;color:#ffb36a;font-weight:800;margin-bottom:6px}
.export-setup h2{margin:0 0 6px;font-size:20px}
.export-grid{display:flex;flex-wrap:wrap;gap:12px;align-items:end;margin:14px 0 10px}
.export-grid label{display:flex;flex-direction:column;gap:6px;font-size:11px;font-weight:700;color:#d2c6bc}
.export-grid select{min-width:220px;background:#252525;color:#eee;border:1px solid #393939;border-radius:8px;padding:8px 10px}
.export-check{flex-direction:row !important;align-items:center;gap:8px !important;font-weight:650}
.export-check input{accent-color:#ff7b12}
.export-preview{display:flex;flex-wrap:wrap;gap:10px}
.export-preview .bit{
  min-width:110px;padding:10px 12px;border:1px solid #3a2c24;border-radius:12px;background:#1c1815
}
.export-preview small{display:block;color:#a7a19d;font-size:10px;letter-spacing:.06em;text-transform:uppercase;font-weight:700}
.export-preview b{display:block;margin-top:4px;font-size:18px}
@media(max-width:860px){
  .export-grid select{min-width:0;width:100%}
}
.hero-banner{
  position:relative;overflow:hidden;border-radius:16px;margin-bottom:16px;
  min-height:168px;padding:22px 24px;
  background:
    linear-gradient(105deg,#1a0c08 0%,#7c2d12cc 38%,#ea580ccc 68%,#9a3412 100%),
    radial-gradient(circle at 86% 20%,#ffb36a 0 2px,transparent 3px);
  border:1px solid #7c3a12;color:#fff
}
.hero-banner h2{margin:4px 0 0;font-size:34px;letter-spacing:-.8px}
.hero-banner .kicker{letter-spacing:.18em;font-size:11px;font-weight:800;color:#ffd7b0}
.hero-banner p{margin:8px 0 0;color:#ffe8d4;max-width:520px}
.hero-pills{position:absolute;right:22px;top:50%;transform:translateY(-50%);display:grid;gap:6px;text-align:right;font-size:11px;letter-spacing:.12em;font-weight:800;color:#ffd7b0}
.overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px}
.stat{border:1px solid var(--line);border-radius:12px;background:linear-gradient(135deg,#2a211b,#1b1b1b 80%);padding:17px;min-width:0}
.stat-top{display:flex;align-items:center;justify-content:space-between;color:#c4bfbb;font-size:12px}
.stat-icon{width:38px;height:38px;border-radius:10px;background:#593019;color:var(--orange2);display:grid;place-items:center;font-size:20px}
.stat-value{font-size:27px;font-weight:760;letter-spacing:-.6px;margin:11px 0 3px}
.stat-foot{color:var(--muted);font-size:11px}.up{color:var(--green)}.down{color:var(--red)}
.grid-main{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,.9fr);gap:15px;margin-bottom:15px}
.panel{min-width:0;border:1px solid #302d2a;background:linear-gradient(135deg,#1e1e1e,#191919);border-radius:12px;padding:17px}
.panel-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:15px}
.panel h2{font-size:16px;margin:0;font-weight:720}.muted{color:var(--muted)}
.panel select{background:#252525;color:#eee;border:1px solid #393939;border-radius:8px;padding:7px 10px;font-size:12px;max-width:150px}
.chart{height:245px;width:100%}
.chart svg{width:100%;height:100%;overflow:visible}
.gridline{stroke:#393939;stroke-width:1}.axis{fill:#bdb8b4;font-size:11px}
.line{fill:none;stroke:var(--orange);stroke-width:3;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 0 3px #ff710c55)}
.line2{fill:none;stroke:#fbbf24;stroke-width:2;stroke-dasharray:5 4;opacity:.9}
.point{fill:#ff8a20;stroke:#ffb05a;stroke-width:2}
.growth-summary{display:flex;gap:22px;flex-wrap:wrap;margin-top:4px}
.mini-label{font-size:11px;color:var(--muted)}.mini-value{font-weight:700;font-size:15px;margin-top:2px}
.balance-card{background:linear-gradient(135deg,#44220f,#201a16 72%);border:1px solid #70401f;border-radius:11px;padding:17px;margin-bottom:13px}
.balance-card .label{color:#d2c1b4;font-size:12px}
.balance-card .amount{font-size:30px;font-weight:800;margin:6px 0}
.balance-card .hint{font-size:11px;color:#c5b6aa}
.balance-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.balance-mini{background:#24211f;border:1px solid #39312c;border-radius:9px;padding:13px}
.balance-mini .num{font-size:19px;font-weight:750;margin:5px 0}
.balance-mini small{font-size:11px;color:var(--muted)}
.bottom-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(300px,1fr);gap:15px}
.filters{display:flex;gap:8px;flex-wrap:wrap}
.filters input,.filters select{background:#252525;color:#eee;border:1px solid #393939;border-radius:8px;padding:8px 10px;outline:0;min-width:0}
.table-wrap{overflow:auto}
table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:12px}
thead{background:#292929}
th{text-align:left;padding:10px;font-weight:550;color:#eae7e4}
td{padding:11px 10px;border-bottom:1px solid #2b2b2b}
tbody tr:hover{background:#24211e}
.investor{display:flex;align-items:center;gap:9px}
.initials{width:30px;height:30px;display:grid;place-items:center;border-radius:50%;background:#54301d;color:#ffb170;font-weight:700}
.name{font-weight:600}.subline{font-size:10px;color:var(--muted)}
.status{padding:4px 8px;border-radius:6px;background:#07583d;color:#b8ffe2;font-size:10px;text-transform:capitalize}
.status.pending,.status.paused{background:#68310f;color:#ffbf8a}
.status.paid_off{background:#3b3631;color:#d5ccc5}
.growth-cell{color:var(--green);font-weight:650}
.growth-cell.down{color:var(--red)}
.activity{display:grid;gap:14px}
.activity-row{display:flex;gap:11px;align-items:flex-start}
.activity-dot{width:9px;height:9px;border-radius:50%;background:var(--orange);margin-top:5px;box-shadow:0 0 0 4px #ff710c20;flex-shrink:0}
.activity-row strong{display:block;font-size:12px}
.activity-row small{color:var(--muted);font-size:11px}
.progress{height:7px;border-radius:9px;background:#3a2a20;overflow:hidden;margin-top:9px}
.progress span{display:block;height:100%;background:linear-gradient(90deg,#ff710c,#ff9a28);border-radius:9px}
.term-flex{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 16px}
.term-chip{
  flex:1 1 140px;display:flex;flex-direction:column;gap:2px;align-items:flex-start;
  text-align:left;padding:10px 12px;border-radius:12px;cursor:pointer;
  border:1px solid #3a2c24;background:#1c1815;color:var(--text)
}
.term-chip b{font-size:11px;color:var(--muted);font-weight:700}
.term-chip strong{font-size:20px;letter-spacing:-.4px}
.term-chip span{font-size:10px;color:var(--muted)}
.term-chip.active{border-color:#ff710c;background:linear-gradient(135deg,#3a2214,#1c1815);box-shadow:0 0 0 1px #ff710c55}
.plan-flex{display:flex;flex-direction:column;background:linear-gradient(135deg,#1e1e1e,#191919);border:1px solid #302d2a;border-radius:12px;overflow:hidden}
.plan-row{
  display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;
  padding:14px 16px;border-bottom:1px solid #2b2b2b
}
.plan-row:last-child{border-bottom:0}
.plan-term{flex:1 1 120px;font-weight:700}
.plan-row strong{font-size:22px;color:var(--orange2);min-width:64px}
.plan-note{flex:2 1 180px;color:var(--muted);font-size:12px}
.plan-grid{display:none}
.dock svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.plan-card{padding:14px;border:1px solid #3a2c24;border-radius:10px;background:#211a16}
.plan-card span{display:block;color:var(--muted);font-size:11px}
.plan-card strong{display:block;font-size:22px;margin:6px 0 2px}
.agree-preview{padding:12px 14px;border:1px solid #4b3527;border-radius:12px;background:#211a16}
.agree-kicker{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:700;margin-bottom:8px}
.agree-row{display:flex;justify-content:space-between;gap:12px;font-size:13px;padding:4px 0;color:#d2c6bc}
.agree-row.total{margin-top:6px;padding-top:8px;border-top:1px solid #3a2c24;color:#fff;font-size:15px}
.agree-row.benefit,.agree-row.benefit strong,.agree-row .up,.agree-row.total .up{color:var(--green);font-weight:800}
.agree-row.total strong{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.req-list{display:grid;gap:10px}
.req-card{display:grid;gap:8px;padding:12px;border:1px solid #3a2c24;border-radius:12px;background:#1c1815}
.plan-row.off{opacity:.45}
.pay-banner,.due-banner{margin:0 0 14px;padding:14px 16px;border-radius:14px;border:1px solid #4b3527}
.pay-banner{background:#2a1a12}
.due-banner{background:#1c1815}
.pay-banner .btn,.due-banner .btn{margin:8px 8px 0 0}
.pay-banner p,.due-banner p{margin:6px 0 0;color:#d2c6bc;font-size:13px}
.req-actions{display:flex;gap:8px;flex-wrap:wrap}
.check-early{display:flex;gap:8px;align-items:flex-start;font-size:12px;color:#d2c6bc;font-weight:600}
.status.approved{background:#07583d;color:#b8ffe2}
.status.declined{background:#4a2028;color:#ff9ba7}
.status.pending{background:#68310f;color:#ffbf8a}
.modal-backdrop{position:fixed;inset:0;background:#000a;display:none;align-items:center;justify-content:center;padding:18px;z-index:20}
.modal-backdrop.open{display:flex}
.modal{width:min(540px,100%);background:#1d1d1d;border:1px solid #4b3527;border-radius:14px;padding:22px;box-shadow:0 20px 70px #000a}
.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}
.modal-head h2{margin:0;font-size:20px}
.close{border:0;background:transparent;color:#ddd;font-size:24px}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}
.field{display:grid;gap:6px}.field.full{grid-column:1/-1}
.field label{color:#c8c1bc;font-size:12px}
.field input,.field select{width:100%;padding:11px;background:#282828;color:#fff;border:1px solid #49413b;border-radius:8px;outline:0}
.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}
.toast{display:none;position:fixed;right:20px;bottom:20px;background:#25201c;border:1px solid #70401f;border-radius:10px;padding:13px 17px;z-index:30;box-shadow:0 10px 30px #0008}
.logout-btn{border:0;background:none;color:#fff;font-size:13px;font-weight:700}
.nav-scrim{display:none}
.dock{display:none}
.collapsed .brand-name{font-size:0}
.collapsed .brand-name:after{content:"D";font-size:31px;color:var(--orange)}
.collapsed .brand-sub,.collapsed .nav-label,.collapsed .promo-copy,.collapsed .promo strong{display:none}
.collapsed .nav button{justify-content:center;padding:13px 3px}
.collapsed .promo{text-align:center;padding:8px}

@media(max-width:1150px){
  .app{grid-template-columns:215px minmax(0,1fr)}
  .overview{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid-main,.bottom-grid{grid-template-columns:1fr}
  .hero-pills{display:none}
}

@media(max-width:860px){
  .app,.app.collapsed{
    display:block;
    min-height:100dvh;
    padding-bottom:calc(68px + env(safe-area-inset-bottom));
  }
  .nav-scrim{
    display:block;position:fixed;inset:0;background:#0008;z-index:20;
  }
  .nav-scrim[hidden]{display:none !important}
  .sidebar{
    position:fixed;inset:0 auto 0 0;width:min(280px,86vw);z-index:21;
    transform:translateX(-105%);transition:transform .22s ease;
    box-shadow:none;height:100dvh;padding:18px 14px calc(18px + env(safe-area-inset-top));
  }
  .app.menu-open .sidebar{transform:translateX(0);box-shadow:18px 0 40px #0008}
  .topbar{
    height:auto;min-height:58px;padding:10px 12px;
    gap:8px;flex-wrap:wrap;position:sticky;top:0
  }
  .hamb{width:40px;height:40px;border-radius:10px;background:#29211d}
  .search{order:3;flex:1 1 100%;max-width:none;padding:8px 12px}
  .person{display:none}
  .logout-btn{font-size:12px;padding:6px 8px}
  .avatar{width:32px;height:32px;font-size:11px}
  .content{padding:12px 12px 18px}
  .crumb{margin-bottom:8px}
  .hero-banner{min-height:0;padding:16px;border-radius:14px}
  .hero-banner h2{font-size:22px;letter-spacing:-.4px}
  .hero-banner p{font-size:12px;line-height:1.45}
  .overview{grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px}
  .stat{padding:12px;border-radius:12px}
  .stat-top{font-size:11px;gap:6px}
  .stat-top span:first-child{line-height:1.2}
  .stat-icon{width:28px;height:28px;font-size:14px;border-radius:8px;flex-shrink:0}
  .stat-value{font-size:18px;margin:8px 0 2px;overflow-wrap:anywhere}
  .stat-foot{font-size:10px;line-height:1.3}
  .panel{padding:13px;border-radius:12px}
  .panel-head{align-items:flex-start;flex-wrap:wrap;margin-bottom:10px}
  .panel h2{font-size:15px}
  .panel select{max-width:100%}
  .chart{height:190px}
  .growth-summary{gap:12px}
  .balance-card .amount{font-size:24px}
  .balance-grid{gap:8px}
  .balance-mini{padding:10px}
  .balance-mini .num{font-size:16px;overflow-wrap:anywhere}
  .pagehead{flex-direction:column;align-items:stretch;margin-bottom:12px}
  .pagehead h1{font-size:22px}
  .head-actions{width:100%}
  .head-actions .btn{flex:1;text-align:center}
  .form-grid{grid-template-columns:1fr}
  .modal{padding:16px;max-height:92dvh;overflow:auto}
  .modal-actions{flex-direction:column-reverse}
  .modal-actions .btn{width:100%}
  .toast{left:12px;right:12px;bottom:calc(78px + env(safe-area-inset-bottom))}
  .dock{
    display:grid;grid-template-columns:repeat(5,1fr);
    position:fixed;left:0;right:0;bottom:0;z-index:15;
    background:#151210;border-top:1px solid #3a2c24;
    padding:6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .dock button{
    border:0;background:transparent;color:#9a918a;font-size:10px;font-weight:700;letter-spacing:.02em;
    display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 2px;border-radius:12px
  }
  .dock button svg{width:22px;height:22px}
  .dock button.active{color:#ff8b25;background:#ff710c1a}
  .table-wrap{overflow:visible}
  #investorTable thead{display:none}
  #investorTable,#investorTable tbody{display:block;width:100%}
  #investorTable tbody tr{
    display:block;background:#1c1815;border:1px solid #3a2c24;border-radius:12px;
    padding:10px 12px;margin-bottom:10px
  }
  #investorTable tbody tr.empty-row{background:transparent;border:0;padding:8px 0}
  #investorTable td{
    display:flex;justify-content:space-between;align-items:center;gap:10px;
    border:0;padding:6px 0;white-space:normal;text-align:right
  }
  #investorTable td:before{
    content:attr(data-label);color:#a7a19d;font-size:11px;font-weight:700;text-align:left;flex:0 0 42%
  }
  #investorTable td:first-child{display:block;text-align:left;padding-bottom:8px;border-bottom:1px solid #2b2b2b;margin-bottom:4px}
  #investorTable td:first-child:before{display:none}
  .term-flex{margin-bottom:12px}
  .plan-flex{display:flex}
  .page[data-page="reports"] td,.page[data-page="reports"] th{white-space:normal}
}

@media(max-width:420px){
  .overview{gap:7px}
  .stat-value{font-size:16px}
  .hero-banner h2{font-size:20px}
  .login-body{padding:16px;align-items:flex-start}
  .login-card{padding:20px 16px}
  .login-card h1{font-size:22px}
}
