
/* TRIDIGITAL FINANCE 0.2: official corporate palette from 7-page brand guide.
   Colors: ink #0C0C0C, lime #E1FF25, green #5CE251, yellow #FFE23B, ochre #E6B023.
   Brand heading uses an image of the exact official wordmark; no font files are bundled. */
:root {
  color-scheme:dark;
  --bg:#11120f;
  --surface:#1b1d18;
  --surface-raised:#21231e;
  --surface-hover:#292d23;
  --ink:#f5f6ee;
  --muted:#a9af9e;
  --stroke:#363a31;
  --line:var(--stroke);--text:var(--ink);--panel:var(--surface);--input:var(--surface);
  --accent:#E1FF25;
  --green:#5CE251;
  --yellow:#FFE23B;
  --ochre:#E6B023;
  --danger:#ff8981;
  font-family:Inter,'Segoe UI',Arial,sans-serif;
  background:var(--bg);
  color:var(--ink);
}
body {background:radial-gradient(circle at 93% 1%,rgba(225,255,37,.075),transparent 32%),var(--bg);}
::selection {background:var(--accent);color:#0C0C0C}
nav {background:#0C0C0C;color:var(--ink);border-right:1px solid #30342b;padding-top:24px}
.brand {padding:3px 11px 35px;display:flex;flex-direction:column;align-items:flex-start;gap:0;letter-spacing:normal;}
.brandLogo {display:block;width:202px;height:auto;object-fit:contain;}
.brandFin {font-size:13px;color:var(--accent);letter-spacing:4.4px;font-weight:800;padding-left:3px;margin-top:8px;}
.brand small {margin-top:8px;padding-left:3px;color:#999f8d;letter-spacing:1.1px;font-size:9px;font-weight:650;}
.navItem {color:#b9c0b1;font-weight:600;transition:background .16s,color .16s;}
.navItem:hover {background:#20251c;color:var(--accent)}
.navItem.active {background:#29331b;color:var(--accent);box-shadow:inset 3px 0 0 var(--accent)}
.navItem .ic {color:var(--accent)}
.navBottom {border-top-color:#30342b;color:#91998a}
main {background:transparent;}
.top {border-bottom:1px solid #2f332c;padding-bottom:18px;margin-bottom:24px}
.top h1 {color:var(--ink);font-weight:800;letter-spacing:-.8px}
.eyebrow {color:var(--accent);letter-spacing:1.7px}
.muted,.small.muted {color:var(--muted)}
.chip,.select {background:var(--surface);border:1px solid var(--stroke);color:#d8dfd0}
.select {min-width:150px}
.select:focus,.field input:focus,.field select:focus {outline:2px solid var(--accent);outline-offset:1px}
.btn {background:var(--accent);color:#0C0C0C;box-shadow:none;font-weight:800;transition:background .16s,transform .16s}
.btn:hover {background:#efff74;transform:translateY(-1px)}
.btn:active {transform:translateY(0)}
.btn.secondary {background:#2e361e;color:var(--accent);box-shadow:none}
.btn.secondary:hover {background:#3a4923}
.btn.outline {background:transparent;color:#dee6d4;border:1px solid #525d43;box-shadow:none}
.btn.outline:hover {background:#2e361e;color:var(--accent)}
.card,.panel {background:var(--surface);border:1px solid var(--stroke);box-shadow:0 7px 28px #00000018;border-radius:15px}
.card {border-top:2px solid #3a4626}
.card:first-child {border-top-color:var(--accent)}
.card .lbl {color:#b3b9ab;font-weight:700}
.card .value {color:#f4f5ef}
.card .value.good,.positive {color:var(--green)}
.card .value.danger,.highlight {color:var(--danger)}
.card .hint {color:#9ca696}
.panelhead h2 {color:#f5f6ee}
.seg {background:#10130c;border:1px solid #303628}
.seg button {color:#aeb5a3}
.seg button.on {background:var(--accent);color:#0C0C0C;box-shadow:none;font-weight:800}
.seg button:not(.on):hover {color:var(--accent)}
.chartgrid {stroke:#33382e}
.chartlabel {fill:#a1aa99}
.notice {background:#2b2519;border-color:#665326;}
.notice b {color:var(--yellow)}
.notice p {color:#e1d6b2}
.notice.ok {background:#1e3020;border-color:#3e6f36}
.notice.ok b {color:#89f17f}
.notice.ok p {color:#bfd6b9}
th {color:#a6b09f;border-bottom-color:#3c4137}
td {border-bottom-color:#30352c}
tbody tr:hover {background:#252922}
td.money {color:#f5f6ee}
td.money.positive {color:var(--green)}
td.money.highlight {color:var(--danger)}
.pill.confirmed {background:#263e20;color:#a4fa96}
.pill.likely {background:#333c20;color:#e5fd91}
.pill.possible {background:#40361c;color:var(--yellow)}
.pill.expense {background:#492b29;color:#ffb2aa}
.statline {border-bottom-color:#343a30}
.footerNote {background:#242b1b;border:1px dashed #647545;color:#ccd7bc}
.footerNote b {color:var(--accent)}
.modalOverlay {background:#050602c9;backdrop-filter:blur(4px)}
.modal {background:#20231d;color:#f2f5eb;border:1px solid #515b43;box-shadow:0 20px 85px #000a}
.field label {color:#c3cbbb}
.field input,.field select {background:#131612;border:1px solid #4a5143;color:#f4f7ef}
.field input::placeholder {color:#818c7e}
button:focus-visible,.navItem:focus-visible {outline:2px solid var(--accent);outline-offset:3px}
@media(max-width:760px){.brand {padding:3px 8px 12px}.brandLogo{width:174px}.top{padding-bottom:17px}.navItem.active{box-shadow:inset 0 -3px var(--accent)}}
/* Narrow screens: preserve desktop structure but scroll dense financial tables locally. */
.layout2 > div {min-width:0}
@media(max-width:760px){
  .layout2 {grid-template-columns:minmax(0,1fr)}
  .panel,.panelhead,.chart,.tablewrap {min-width:0;max-width:100%}
  .panelhead {flex-wrap:wrap;row-gap:12px}
  .seg {max-width:100%;flex-wrap:wrap}
  .seg button {padding:8px 9px;font-size:11px}
  .chart {overflow:hidden;height:205px}
  .chart svg {max-width:100%}
  .tablewrap {overflow-x:auto;overscroll-behavior-inline:contain}
}

.backupLink {display:inline-block;color:var(--accent);text-decoration:none;font-weight:800;margin-bottom:9px;}
.backupLink:hover {text-decoration:underline;}
.clearDemo {background:transparent;color:#d4cc9e;border:1px solid #6b6141;padding:7px 8px;border-radius:7px;font-size:11px;cursor:pointer;}
.clearDemo:hover {border-color:var(--accent);color:var(--accent);}

/* 0.3.2: expense request queue and inline validation */
.navBadge{margin-left:auto;border-radius:99px;background:#E1FF25;color:#0C0C0C;font-size:11px;padding:2px 6px;font-weight:800}
.roleLabel{color:#b4bcae;display:flex;flex-direction:column;gap:4px}
.roleLabel select{padding:7px;min-width:126px}
.inlineError{background:#3c2523;border:1px solid #be6a64;color:#ffd6d3;border-radius:8px;padding:11px;margin-top:15px;font-size:13px}
.statusPreview{border:1px dashed #8d8633;color:#FFE23B;border-radius:8px;padding:11px;font-size:12px;min-height:44px}
.reviewSummary{display:flex;flex-direction:column;gap:0;margin-top:12px}
.reviewLine{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;border-bottom:1px solid #454b3d;padding:11px 0}
.reviewLine strong{text-align:right;max-width:64%;overflow-wrap:anywhere}
.reviewReason{display:block;margin:9px 0 3px;width:100%;background:#131612;color:#f4f7ef;border:1px solid #4a5143;border-radius:8px;padding:10px;font:inherit;resize:vertical}
.reviewReason:focus{outline:2px solid #E1FF25}
.reviewModal{max-width:670px}
#expenseFields{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media(max-width:760px){#expenseFields{grid-template-columns:1fr}.roleLabel{flex-direction:row;align-items:center}}

/* 0.3.3 additions */
.goalPanel{border-color:#5e693d}.goalHeading{display:flex;justify-content:space-between;align-items:center;gap:18px;margin:18px 0}.goalValue{font-weight:800;font-size:clamp(18px,2.1vw,30px);color:#E1FF25}.goalValue .small{font-size:13px}.goalPercent{font-size:clamp(24px,3vw,40px);color:#E1FF25;font-weight:800}.goalBar{width:100%;height:15px;border-radius:50px;background:#363b28;overflow:hidden}.goalBar div{height:100%;background:linear-gradient(90deg,#5CE251,#E1FF25);border-radius:50px;transition:width .2s}.taxBox{padding:16px;border:1px solid #536128;background:#25291b;border-radius:10px;color:#E1FF25;line-height:1.8}.taxBox p{margin:8px 0 0}.attachList{margin:18px 0;padding:12px;border:1px solid #515b35;border-radius:10px}.attachList h3{font-size:13px;margin:0 0 10px}.attachList a{display:block;color:#E1FF25;word-break:break-all;padding:8px 0}.attachList a:hover{text-decoration:underline}
/* 0.3.4: secure local account entry, reports and cash register */
body.locked nav,body.locked main{display:none}
.authOverlay{position:fixed;inset:0;background:radial-gradient(circle at 75% 7%,#36471c 0,#0C0C0C 42%);display:flex;align-items:center;justify-content:center;padding:20px;z-index:100}
.authCard{width:min(100%,445px);background:#1b1d18;border:1px solid #4a5632;border-radius:20px;padding:34px;box-shadow:0 24px 80px #0009;display:grid;gap:16px}
.authCard img{max-width:225px;width:100%;height:auto;object-fit:contain;margin-bottom:7px}
.authCard h2{font-size:23px;margin:6px 0 0;color:#E1FF25}
.authCard .field label{display:block;color:#d3dcc6;font-size:12px;margin-bottom:8px;font-weight:700}
.authCard .field input{display:block;width:100%;border-radius:9px;border:1px solid #4a5143;padding:12px;background:#11140e;color:#fff}
.authCard .btn{width:100%}
.authCard .inlineError:empty{display:none}
#reportMonths,#requestStatusFilter{min-width:130px}
@media(max-width:760px){.authCard{padding:23px}.goalHeading{flex-wrap:wrap}.topRight{gap:7px}}

.fields.wide{grid-column:1/-1}

/* 0.3.5: two distinct operating indicators; same corporate palette */
.monthlyPanel{border-color:#485531}
.monthlyPanel .panelhead p{margin:7px 0 0}
.monthlyCards{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:16px}
.monthlyCard{border:1px solid #3e4934;background:#171a15;border-radius:13px;padding:20px;min-width:0}
.monthlyTitle{font-size:15px;color:#f3f5e8;font-weight:800;margin-bottom:15px}
.monthlyBig{font-size:clamp(19px,2.4vw,30px);font-weight:800;color:#E1FF25;margin:10px 0;line-height:1.2;overflow-wrap:anywhere}
.monthlyBig .small{font-size:12px;font-weight:500}
.monthlyBar{background:#343a2b;border-radius:100px;height:15px;overflow:hidden;margin:17px 0 10px}
.monthlyBar > div{background:linear-gradient(90deg,#5CE251,#E1FF25);border-radius:100px;height:100%}
.monthPositive{color:#5CE251!important}.monthNegative{color:#ff8981!important}.monthStatus{font-weight:750;padding:12px 0}
@media(max-width:950px){.monthlyCards{grid-template-columns:1fr}}

/* 0.3.6: contract payment tracking on each project */
.projectPaymentCell{min-width:184px;vertical-align:middle}
.projectProgress{min-width:0;margin:9px 0 12px}
.projectProgress.compact{margin:0 0 7px;min-width:175px}
.progressHeading{display:flex;align-items:center;justify-content:space-between;gap:14px;font-size:12px;font-weight:700;margin-bottom:8px;color:#d2dcc6}
.progressHeading strong{color:#E1FF25;font-size:14px;white-space:nowrap}
.projectProgressTrack{background:#3b4330;border:1px solid #535f3f;height:13px;width:100%;border-radius:99px;overflow:hidden}
.projectProgress.compact .projectProgressTrack{height:9px}
.projectProgressTrack>div{height:100%;background:linear-gradient(90deg,#5CE251,#E1FF25);border-radius:99px;transition:width .25s}
.projectDetailButton{font-size:11px;margin-top:10px;white-space:nowrap}
.projectDetailRow>td{padding:0!important;background:#151914;border-bottom:2px solid #586341}
.projectReceiptDetails{padding:22px;min-width:0;text-align:left}
.projectDetailHead{display:flex;align-items:center;justify-content:space-between;gap:15px;flex-wrap:wrap}
.projectDetailHead h3{font-size:17px;margin:0 0 6px}
.projectReceiptDetails>.projectProgress{max-width:790px}
.projectReceiptTotals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0}
.projectReceiptTotals>div{background:#22291d;border:1px solid #47523b;border-radius:11px;padding:15px;display:flex;flex-direction:column;gap:7px}
.projectReceiptTotals span{color:#aebba5;font-size:12px}
.projectReceiptTotals strong{color:#edf4e2;font-size:clamp(15px,1.5vw,21px)}
.projectReceiptTotals strong.positive{color:#5CE251}
.projectReceiptTotals strong.highlight{color:#ff8981}
.projectReceiptColumns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.projectReceiptColumns section{background:#1e241b;border:1px solid #3b4932;padding:14px;border-radius:10px;min-width:0}
.projectReceiptColumns h4{margin:0 0 7px;color:#e2edce;font-size:13px}
.projectReceiptEntry{border-top:1px solid #3c4832;padding:12px 0;display:flex;justify-content:space-between;gap:14px;align-items:flex-start}
.projectReceiptEntry>span{min-width:0;display:flex;flex-direction:column;gap:5px;overflow-wrap:anywhere}
.projectReceiptEntry strong{white-space:nowrap;font-size:13px}
.projectReceiptDisclaimer{margin-top:17px;line-height:1.5}
@media(max-width:850px){.projectReceiptTotals{grid-template-columns:1fr}.projectReceiptColumns{grid-template-columns:1fr}}

/* 0.4.8 · Bank organization filtering and summaries */
.bankSummaryGrid{grid-template-columns:repeat(3,minmax(0,1fr));margin:0 0 16px}
.bankSummaryActive{border-color:#E1FF25;box-shadow:0 0 0 1px rgba(225,255,37,.14) inset}
@media(max-width:1200px){.bankSummaryGrid{grid-template-columns:1fr}}
.bankSummaryClickable{cursor:pointer;transition:border-color .15s ease,transform .15s ease,background .15s ease}
.bankSummaryClickable:hover{border-color:#71814c;background:#1b2018;transform:translateY(-1px)}
/* 0.4.9 · Bank-powered company overview */
.bankOverviewCards .card .value{font-variant-numeric:tabular-nums}
/* 0.4.11 · Year opening balance and cash reconciliation */
.bankReconcileSummary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:14px 0 18px}.bankReconcileSummary>div{border:1px solid #424832;border-radius:10px;padding:12px;background:#171a14;display:flex;flex-direction:column;gap:5px}.bankReconcileSummary strong{font-size:16px}.bankAccountRecon{border-top:1px solid #343a2a;padding:10px 0}.bankAccountRecon:first-of-type{border-top:0}.bankFormula{display:flex;flex-wrap:wrap;gap:8px 18px;font-size:12px;color:#aeb39f;padding:5px 0 8px}.bankFormula b{color:#f4f5ef}.goalBankBreakdown{border-top:1px solid #424832;margin-top:14px;padding-top:8px}.goalBankBreakdown .btn{margin-top:8px}
@media(max-width:900px){.bankReconcileSummary{grid-template-columns:1fr 1fr}}@media(max-width:600px){.bankReconcileSummary{grid-template-columns:1fr}}

.financialAllocation{border:1px solid var(--stroke);padding:16px;border-radius:12px;margin:12px 0;background:var(--surface)}
.financialAllocation .fields{margin-top:12px}
.financialModal{max-width:820px}
#modalFields>.wide{grid-column:1/-1;min-width:0}
.financialAllocation .field{min-width:0}
.financialAllocation select{text-overflow:ellipsis}
#allocationRows,#operationAllocation,#cashAllocation{width:100%;grid-column:1/-1}

/* 0.5.1.1: theme selection, individual progress and readable audit. */
.themeControl{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted)}
.themeControl .select{min-width:108px;padding:9px}
.contributionStats{display:grid;grid-template-columns:2fr 1fr 1fr;gap:18px;margin:16px 0}
.contributionStats>div{display:flex;flex-direction:column;gap:10px;min-width:0}
.contributionStats strong{font-size:24px;overflow-wrap:anywhere}
.contributionPanel p,.goalNote{line-height:1.55}
.auditDetails{min-width:280px;max-width:720px;overflow-wrap:anywhere;line-height:1.55}
.auditDetails details{margin-top:9px;color:var(--muted)}
.auditDetails summary{cursor:pointer;font-size:11px}
.auditDetails code{display:block;white-space:pre-wrap;font-size:11px;margin-top:8px}
@media(max-width:760px){.contributionStats{grid-template-columns:1fr}.themeControl .select{min-width:96px}.goalPanel .panelhead{flex-wrap:wrap}}

/* Independent quarterly manager plans. */
.quarterPlans{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:12px 0 18px}.quarterPlan{padding:18px;border:1px solid var(--stroke);border-radius:14px;min-width:0}.quarterPlan h3{font-size:16px;margin:0 0 14px}.quarterPlansCell{min-width:320px;max-width:540px}.quarterPlansCell .quarterPlans{grid-template-columns:1fr}.quarterPlansCell .quarterPlan{padding:12px}.quarterPlan .statline{gap:10px;flex-wrap:wrap}.quarterPlan .small{line-height:1.5}@media(max-width:700px){.quarterPlans{grid-template-columns:1fr}.quarterPlan{padding:14px}.quarterPlan .progressHeading{flex-wrap:wrap}}

.reserveCards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:12px 0}.reserveCards .value{display:block;font-size:clamp(20px,2vw,30px);margin-top:8px;overflow-wrap:anywhere}.reserveDate{display:flex;flex-direction:column;gap:6px;font-size:12px;min-width:160px}.reserveDate input{width:100%;padding:9px 12px;border:1px solid var(--stroke,#464940);border-radius:9px;background:var(--surface,#191d18);color:inherit;color-scheme:dark}.reserveDays{margin-top:16px}.reserveDays summary{cursor:pointer;font-weight:600;padding:8px 0}.reserveDays .tablewrap{margin-top:8px}@media(max-width:680px){.reserveCards{grid-template-columns:1fr}.reserveDate{width:100%}.reservePanel .panelhead{flex-wrap:wrap}}
