/* SUCO CLIENT PORTAL — STYLES
   Brand Palette:
   - Background:  #0c100c (near black)
   - Surface:     #131813 (dark green-black)
   - Sage green:  #4d6b55
   - Mint:        #9ec4b0
   - Orange:      #d95f2a
   - Amber:       #e8a020
   - Cream:       #ede9e2
   Typography: Cormorant Garamond (headings) · DM Sans (body)
   Design system by Ty Danser — carried forward from the prototype. */

/* DESIGN TOKENS */
:root {
  --bg: #0c100c;
  --surface: #131813;
  --surface2: #1a221a;
  --surface3: #202820;
  --green: #4d6b55;
  --green-l: #6b8f74;
  --mint: #9ec4b0;
  --orange: #d95f2a;
  --amber: #e8a020;
  --cream: #ede9e2;
  --muted: #5e705e;
  --border: #1e281e;
  --border2: #28362a;
  --r: 8px;
  --r2: 12px;
}

/* RESET */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--cream);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
button { cursor: pointer; font-family: inherit; border: none; }
.hidden { display: none !important; }

/* ANIMATIONS */
@keyframes fadeUp  { from { opacity: 0; transform: translateY(16px) } to { opacity: 1; transform: translateY(0) } }
@keyframes fadeIn  { from { opacity: 0 } to { opacity: 1 } }

/* LOGIN PAGE */
#screen-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.login-deco {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.login-deco svg { width: 560px; height: 560px; opacity: .04; }
.login-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 380px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--r2);
  padding: 52px 44px;
  text-align: center;
  animation: fadeUp .7s ease both;
}
.lmark  { width: 54px; height: 54px; margin: 0 auto 20px; display: block; }
.leyebrow {
  font-size: 10px; letter-spacing: .32em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}
.ltitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px; font-weight: 300;
  color: var(--cream); line-height: 1.1; margin-bottom: 6px;
}
.lsub   { font-size: 12px; color: var(--muted); margin-bottom: 36px; line-height: 1.7; }
.lfield {
  width: 100%; background: var(--surface2);
  border: 1px solid var(--border2); border-radius: var(--r);
  padding: 13px 16px; color: var(--cream);
  font-size: 14px; font-family: 'DM Sans', sans-serif;
  outline: none; margin-bottom: 10px; transition: border-color .2s;
}
.lfield:focus { border-color: var(--green-l); }
.lfield::placeholder { color: var(--muted); }
.lbtn {
  width: 100%; margin-top: 4px; padding: 14px;
  background: var(--green); border-radius: var(--r);
  color: var(--cream); font-size: 12px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  transition: background .2s;
}
.lbtn:hover { background: var(--green-l); }
.lbtn:disabled { opacity: .6; cursor: wait; }
.lerr {
  font-size: 12px; color: #e88040;
  margin-top: 10px; opacity: 0; transition: opacity .2s;
}
.lerr.show { opacity: 1; }
.lfoot {
  margin-top: 28px; padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 11px; color: var(--muted);
  letter-spacing: .03em; line-height: 1.8;
}

/* Login steps & multi-step flow */
.lstep        { display: none; }
.lstep.active { display: block; animation: fadeUp .4s ease both; }
.llink {
  font-size: 12px; color: var(--green-l);
  cursor: pointer; transition: color .15s;
  background: none; border: none; font-family: inherit;
  padding: 0; margin-top: 14px; display: inline-block;
}
.llink:hover  { color: var(--mint); }
.lback {
  font-size: 11px; color: var(--muted);
  cursor: pointer; background: none; border: none;
  font-family: inherit; padding: 0; margin-bottom: 18px;
  display: inline-flex; align-items: center; gap: 5px;
  transition: color .15s;
}
.lback:hover  { color: var(--cream); }
.lcode-wrap {
  display: flex; justify-content: center; gap: 8px;
  margin-bottom: 14px;
}
.lcode-input {
  width: 42px; height: 50px;
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--r); color: var(--cream);
  font-size: 22px; font-family: 'Cormorant Garamond', serif;
  text-align: center; outline: none; transition: border-color .2s;
}
.lcode-input:focus { border-color: var(--green-l); }
.lresend {
  font-size: 11px; color: var(--muted); margin-top: 8px;
  margin-bottom: 14px; line-height: 1.8;
}
.lresend span {
  color: var(--green-l); cursor: pointer;
  transition: color .15s;
}
.lresend span:hover { color: var(--mint); }
.lsuccess {
  color: var(--mint); font-size: 13px;
  margin-top: 10px; opacity: 0; transition: opacity .3s;
}
.lsuccess.show { opacity: 1; }

/* APP SHELL */
#screen-app { display: flex; flex-direction: column; min-height: 100vh; }

/* Header */
.app-hdr {
  height: 60px; background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; position: sticky; top: 0; z-index: 50;
}
.hdrl     { display: flex; align-items: center; gap: 11px; }
.hdrmark  { width: 26px; height: 26px; flex-shrink: 0; }
.hdrpipe  { width: 1px; height: 18px; background: var(--border2); }
.hdrbrand { font-size: 10px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.hdrclient { font-family: 'Cormorant Garamond', serif; font-size: 17px; color: var(--cream); }
.hdrr     { display: flex; align-items: center; gap: 10px; }
.hdrdate  { font-size: 11px; color: var(--muted); }
.btng {
  background: none; border: 1px solid var(--border2);
  border-radius: var(--r); color: var(--muted);
  font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; padding: 6px 13px;
  transition: all .2s;
}
.btng:hover { border-color: var(--green); color: var(--cream); }

/* Breadcrumb */
.bc {
  padding: 9px 28px; background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--muted);
}
.bclink { color: var(--muted); transition: color .15s; cursor: pointer; }
.bclink:hover { color: var(--cream); }
.bcsep  { color: var(--border2); }
.bccur  { color: var(--cream); }

/* Main content */
.app-main {
  flex: 1; padding: 32px 28px;
  max-width: 1160px; margin: 0 auto; width: 100%;
}
.view        { display: none; }
.view.active { display: block; animation: fadeUp .3s ease both; }

/* HOME VIEW */
.hgreet  { margin-bottom: 32px; }
.heye    { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; }
.hh1     { font-family: 'Cormorant Garamond', serif; font-size: 34px; font-weight: 300; color: var(--cream); line-height: 1.1; margin-bottom: 5px; }
.hsub    { font-size: 13px; color: var(--muted); }

/* Account Manager strip */
.am-strip {
  margin-top: 18px; padding: 16px 20px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
}
.am-info    { display: flex; align-items: center; gap: 12px; }
.am-avatar {
  width: 38px; height: 38px;
  background: var(--green); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 500; color: var(--cream);
  letter-spacing: .03em; flex-shrink: 0;
}
.am-name  { font-size: 13px; font-weight: 500; color: var(--cream); line-height: 1.3; }
.am-title { font-size: 11px; color: var(--muted); }
.am-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.am-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px; border-radius: var(--r);
  font-size: 11px; color: var(--muted);
  background: none; border: 1px solid var(--border2);
  text-decoration: none; transition: all .15s;
  white-space: nowrap;
}
.am-btn:hover { border-color: var(--green); color: var(--cream); }
.am-icon  { font-size: 13px; }
.am-inquiry {
  background: var(--green); border-color: var(--green);
  color: var(--cream); font-weight: 500;
  letter-spacing: .04em;
}
.am-inquiry:hover { background: var(--green-l); border-color: var(--green-l); }

/* Module cards */
.mgrid   { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.mc {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r2); padding: 26px 22px;
  position: relative; overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.mc.live { cursor: pointer; }
.mc.live:hover { border-color: var(--green); transform: translateY(-2px); }
.mc.dim  { opacity: .4; }
.macc    { position: absolute; top: 0; left: 0; right: 0; height: 2px; }
.macc.g  { background: var(--green); }
.macc.m  { background: var(--mint); }
.macc.a  { background: var(--amber); }
.macc.o  { background: var(--orange); }
.micon {
  width: 38px; height: 38px; background: var(--surface2);
  border-radius: var(--r); display: flex;
  align-items: center; justify-content: center;
  font-size: 17px; margin-bottom: 16px;
}
.mlbl    { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.mname   { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 400; color: var(--cream); margin-bottom: 7px; line-height: 1.2; }
.mdesc   { font-size: 12px; color: var(--muted); line-height: 1.6; }
.mfoot   { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); display: flex; align-items: flex-end; justify-content: space-between; }
.mstat   { font-family: 'Cormorant Garamond', serif; font-size: 20px; color: var(--cream); }
.mstatlbl { font-size: 10px; color: var(--muted); letter-spacing: .05em; }
.marrow  { color: var(--green-l); font-size: 16px; transition: transform .2s; }
.mc.live:hover .marrow { transform: translateX(4px); }
.msoon   { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--surface2); padding: 4px 10px; border-radius: 100px; }

/* FINANCIALS MODULE */

/* Tab navigation */
.fnav    { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 26px; }
.ftab {
  padding: 12px 17px; font-size: 11px; letter-spacing: .1em;
  text-transform: uppercase; font-weight: 500; color: var(--muted);
  background: none; border-bottom: 2px solid transparent;
  transition: all .2s; white-space: nowrap;
}
.ftab:hover  { color: var(--cream); }
.ftab.active { color: var(--cream); border-bottom-color: var(--orange); }
.fpanel        { display: none; }
.fpanel.active { display: block; animation: fadeIn .25s ease both; }

/* KPI cards */
.kgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 26px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 18px 20px;
  position: relative; overflow: hidden;
}
.kpi::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; }
.kpi.g::before { background: var(--green); }
.kpi.m::before { background: var(--mint); }
.kpi.a::before { background: var(--amber); }
.kpi.o::before { background: var(--orange); }
.klbl  { font-size: 10px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }
.kval  { font-family: 'Cormorant Garamond', serif; font-size: 27px; font-weight: 300; color: var(--cream); line-height: 1; margin-bottom: 4px; }
.kval-secondary { font-family: 'Cormorant Garamond', serif; font-size: 21px; font-weight: 300; color: var(--mint); line-height: 1; margin-bottom: 4px; margin-top: 10px; }
.ksub  { font-size: 11px; color: var(--muted); }

/* Section headers */
.sechd    { display: flex; align-items: baseline; gap: 9px; margin-bottom: 13px; }
.sectitle { font-family: 'Cormorant Garamond', serif; font-size: 19px; font-weight: 400; color: var(--cream); }
.seccount { font-size: 11px; color: var(--muted); }
.twocol   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 26px; }

/* Tables */
.tbox {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); overflow: hidden; margin-bottom: 22px;
}
table { width: 100%; border-collapse: collapse; }
thead th {
  background: var(--surface2); padding: 10px 15px; text-align: left;
  font-size: 10px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--border);
}
tbody tr { border-bottom: 1px solid var(--border); transition: background .12s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface2); }
td     { padding: 11px 15px; font-size: 13px; color: var(--cream); }
td.r   { text-align: right; }
td.mu  { color: var(--muted); }
td.mo  { font-family: 'Courier New', monospace; font-size: 11px; color: var(--mint); }
.amt   { font-family: 'Cormorant Garamond', serif; font-size: 15px; }
.amt.dr { color: #e88040; }
.amt.cr { color: #7ec87e; }

/* Badges */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 100px;
  font-size: 10px; letter-spacing: .06em;
  text-transform: uppercase; font-weight: 500;
}
.badge.paid { background: #1a3a1a; color: #7ec87e; }
.badge.open { background: #3a1e0a; color: #e88040; }
.badge.bill { background: #3a0a0a; color: #e87070; }
.badge.conf { background: #0a2a3a; color: #70b8e8; }
.badge.other { background: #2a2a1a; color: #c8b870; }
.badge.exp  { background: #0a1428; color: #70a0e8; }
.badge.pmt  { background: #1a3a1a; color: #7ec87e; }

/* Filter bar */
.fbar { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; align-items: flex-end; }
.fgroup { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.flabel { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.fbtn {
  padding: 5px 13px; border-radius: 100px; cursor: pointer;
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  background: none; border: 1px solid var(--border2); color: var(--muted);
  transition: all .15s;
}
.fbtn:hover, .fbtn.active { background: var(--green); border-color: var(--green); color: var(--cream); }
.fselect {
  padding: 5px 10px; border-radius: 100px; cursor: pointer;
  font-size: 11px; letter-spacing: .04em;
  background: var(--surface); border: 1px solid var(--border2); color: var(--cream);
  font-family: 'DM Sans', sans-serif;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239ec4b0'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  padding-right: 26px;
}
.fselect:focus { outline: none; border-color: var(--green); }
/* Support sections (Overview) */
.support-section { margin-bottom: 18px; }
.support-label {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--mint); margin-bottom: 8px; font-weight: 500;
  padding-left: 2px;
}
.support-total {
  font-size: 12px; color: var(--muted); text-align: right;
  padding: 6px 8px 0; letter-spacing: .02em;
}
.support-tiles { grid-template-columns: repeat(2, 1fr); margin-bottom: 0; }

.inv-summary {
  display: flex; gap: 24px; padding: 12px 0; margin-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 12px; letter-spacing: .04em; color: var(--muted);
}

/* Supplier cards */
.sgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-bottom: 26px; }
.sc {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 17px 19px;
}
.scname    { font-size: 13px; font-weight: 500; color: var(--cream); margin-bottom: 2px; }
.sccontact { font-size: 11px; color: var(--muted); margin-bottom: 13px; }
.scamt     { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 300; color: var(--cream); margin-bottom: 9px; }
.scbar     { height: 3px; background: var(--surface2); border-radius: 2px; overflow: hidden; margin-bottom: 9px; }
.scfill    { height: 100%; border-radius: 2px; transition: width 1.2s cubic-bezier(.4, 0, .2, 1); }
.scfill.g  { background: var(--green); }
.scfill.m  { background: var(--mint); }
.scfill.o  { background: var(--orange); }
.scmeta    { display: flex; justify-content: space-between; align-items: center; }
.sctype    { font-size: 10px; color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }

/* Balance strip & alerts */
.balstrip {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); padding: 17px 21px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.ballbl    { font-size: 10px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.balval    { font-family: 'Cormorant Garamond', serif; font-size: 30px; font-weight: 300; color: var(--cream); }
.balr      { text-align: right; }
.balacct   { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.balconcept { font-family: 'Cormorant Garamond', serif; font-size: 15px; color: var(--mint); }
.alert {
  border-radius: var(--r); padding: 15px 20px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.alert.danger { background: #300a0a; border: 1px solid #5a1414; }
.albl { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.alert.danger .albl { color: #e87070; }
.asub { font-size: 11px; margin-top: 2px; }
.alert.danger .asub { color: #a07070; }
.aval { font-family: 'Cormorant Garamond', serif; font-size: 25px; font-weight: 300; }
.alert.danger .aval { color: #e87070; }

/* ── PRODUCTION ADDITIONS (auth + multi-account states) ─────────────────── */
/* Loading / no-account screen — reuses the login card look. */
#screen-wait {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center; padding: 24px;
}
.waitcard {
  width: 100%; max-width: 420px;
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--r2); padding: 44px 40px;
  text-align: center; animation: fadeUp .5s ease both;
}
.waitcard .lsub { margin-bottom: 20px; }
.waitcard .lbtn { max-width: 240px; margin: 0 auto; display: block; }

/* Header: data-freshness stamp + multi-account switcher */
.hdrdata {
  font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--border);
  border-radius: 100px; padding: 3px 10px; white-space: nowrap;
}
.hdracct {
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: var(--r); color: var(--cream);
  font-family: 'DM Sans', sans-serif; font-size: 12px;
  padding: 5px 9px; cursor: pointer; outline: none;
}
.hdracct:focus { border-color: var(--green-l); }

/* RESPONSIVE */
@media (max-width: 960px) {
  .kgrid  { grid-template-columns: repeat(2, 1fr); }
  .sgrid  { grid-template-columns: repeat(2, 1fr); }
  .twocol { grid-template-columns: 1fr; }
  .mgrid  { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .kgrid { grid-template-columns: 1fr 1fr; }
  .sgrid { grid-template-columns: 1fr; }
  .login-card { padding: 36px 22px; }
  .app-hdr, .app-main, .bc { padding-left: 16px; padding-right: 16px; }
  .fnav { overflow-x: auto; }
  .hdrdate { display: none; }
}
