/* Invoice Portal — refined look (UI only). Loaded after the app's own styles. */
body,button,input,select,textarea,.btn,.nav-tab,.doc-type-btn,.search-input,.filter-sel,.ssel,input[type=date],input[type=email],input[type=number],input[type=password],input[type=text],select.fi,textarea.fi{font-family:'IBM Plex Sans',system-ui,-apple-system,'Segoe UI',sans-serif}
body{font-size:14.5px}
.card-title,.hero-title,.modal-htitle,.chart-title,.nav-logo-text,[style*="Playfair"]{font-family:'IBM Plex Sans',system-ui,sans-serif!important;letter-spacing:0}

/* top bar */
.nav{height:auto;min-height:56px;box-shadow:none;border-bottom:2px solid var(--gold);gap:16px;padding-top:0;padding-bottom:0}
.nav-logo{flex-shrink:0}
.nav-logo-mark{width:28px;height:28px;border-radius:4px}
.nav-logo-text{font-size:16px;font-weight:600}
.nav-logo-text em{color:#fff}
.nav-tabs{background:none;border-radius:0;padding:0;gap:4px;flex:1 1 auto;min-width:0;margin-left:16px}
.nav-tab{border-radius:0;font-size:14px;font-weight:500;padding:17px 6px 15px;color:rgba(255,255,255,.72);border-bottom:2px solid transparent;margin-bottom:-2px}
.nav-tab:hover{background:none;color:#fff}
.nav-tab.active,.pt-tab.active{background:none;color:#fff;border-bottom-color:var(--gold)}
.nav-pill{border-radius:3px;background:none;border:1px solid rgba(255,255,255,.22);color:rgba(255,255,255,.75);padding:3px 10px;min-width:0}
.nav button[style*="border-radius"]{border-radius:4px!important}
.nav-dropdown-menu{border-radius:6px}
.nav-dot{border-radius:3px}
#pt-tabs{display:flex;flex-wrap:wrap;column-gap:18px;row-gap:0;min-width:0}
#pt-tabs::-webkit-scrollbar{display:none}
.pt-tab{white-space:nowrap;padding:17px 2px 15px}
.pt-count{display:inline-block;margin-left:6px;min-width:16px;padding:0 5px;border-radius:3px;background:#B42318;color:#fff;font-size:10.5px;font-weight:700;line-height:16px;text-align:center}
.pt-hide{display:none!important}

/* page header (was the dark banner) */
.hero{background:var(--white);border:1px solid var(--border);border-top:3px solid #0D1F35;border-radius:6px;padding:24px 28px;margin-bottom:1.5rem}
.hero::before,.hero::after{display:none}
.hero-chip{background:none;padding:0;border-radius:0;color:var(--text-mid);font-weight:600;margin-bottom:.4rem}
.hero-title{color:#0D1F35;font-size:26px;font-weight:600}
.hero-sub{color:var(--text-mid)}
.hero-note{background:#FBF7EE;border:1px solid #E3D3AE;border-radius:4px;color:#3D3424}
.hero-note strong{color:#1F1A10}
.hero-note-ttl{color:#8A6414}
body.dark .hero{background:var(--white);border-top-color:var(--gold)}
body.dark .hero-title{color:var(--text)}
body.dark .hero-note{background:rgba(184,137,42,.10);border-color:rgba(184,137,42,.4);color:var(--text)}
body.dark .hero-note strong{color:#fff}
body.dark .hero-note-ttl{color:var(--gold-light)}

/* panels */
.card,.tbl-wrapper,.chart-card,.metric,.vd-stat{border-radius:6px}
.card-head{padding:1rem 1.5rem}
.card-title{font-size:16px;font-weight:600}
.chart-title{font-size:15px;font-weight:600}
.metric.dark{background:var(--white);border-color:var(--border);border-top:3px solid #0D1F35}
.metric.dark .metric-lbl{color:var(--text-muted)}
.metric.dark .metric-val{color:var(--text)}
.metric.dark .metric-hint{color:var(--text-muted)}
body.dark .metric.dark{border-top-color:var(--gold)}
.modal{border-radius:8px;box-shadow:0 12px 40px rgba(0,0,0,.18)}
.modal-htitle{font-size:18px;font-weight:600}
.detail-block,.soa-card,.soa-pick-list,.ra-confirm-bar,.file-chip,#bulk-bar{border-radius:4px}
.sub-item{border-radius:4px}
.toast{border-radius:4px}
.empty-ico{display:none}
.drop-zone{border-radius:4px;border-width:1px;background:var(--bg)}
.dz-icon{border-radius:4px}

/* controls */
input[type=date],input[type=email],input[type=number],input[type=password],input[type=text],input[type=search],select,textarea,.fi,.search-input,.filter-sel{border-radius:4px;border-width:1px}
input:focus,select.fi:focus,textarea.fi:focus{border-color:#1F3A5F;box-shadow:0 0 0 1px #1F3A5F}
body.dark input:focus,body.dark select.fi:focus,body.dark textarea.fi:focus{border-color:var(--gold);box-shadow:0 0 0 1px var(--gold)}
.btn,.btn-sm{border-radius:4px;font-weight:600}
.btn:hover,.btn-gold:hover{transform:none;box-shadow:none}
.btn-gold{background:#0D1F35;border-color:#0D1F35;color:#fff}
.btn-gold:hover{background:#1F3A5F;border-color:#1F3A5F;color:#fff}
body.dark .btn-gold{background:var(--gold);border-color:var(--gold);color:#0D1F35}
body.dark .btn-gold:hover{background:#9e7520;border-color:#9e7520}
.doc-type-toggle{border-radius:4px;border-width:1px}
.icon-btn,.pa-btn,.pa-view,.pa-replace,.pa-chip,.ssel,.dl-drag,.file-chip-rm,.modal-close{border-radius:4px}

/* labels and chips: square instead of pills */
.badge,.org-tag,.cn-tag,.pay-chip,.match-chip,.mismatch-chip,.warn-chip,.new-tag,.role-badge-admin,.role-badge-reviewer,.role-badge-viewer,.nav-dropdown-item .nav-count{border-radius:3px}
.soa-bar,.soa-bar>div{border-radius:2px}

/* rounded corners written into the page itself */
[style*="border-radius:20px"],[style*="border-radius: 20px"],[style*="border-radius:18px"],[style*="border-radius: 18px"],[style*="border-radius:16px"],[style*="border-radius: 16px"],[style*="border-radius:14px"],[style*="border-radius: 14px"],[style*="border-radius:12px"],[style*="border-radius: 12px"],[style*="border-radius:11px"],[style*="border-radius:10px"],[style*="border-radius: 10px"]{border-radius:6px!important}
[style*="border-radius:9px"],[style*="border-radius:8px"],[style*="border-radius: 8px"],[style*="border-radius:7px"]{border-radius:4px!important}
#ra-modal .modal [style*="border-radius:0 0 20px 20px"]{border-radius:0 0 8px 8px!important}

/* keep the right-hand buttons on one line */
.nav>div:last-child{flex-shrink:0}
.nav>div:last-child>*{white-space:nowrap}
/* dark mode: table headers and read-only fields were still light */
body.dark table thead th{background:transparent;color:var(--text-mid)}
body.dark input[readonly]{background:#161924!important;color:var(--text-mid)!important;border-color:var(--border)!important}
.dz-icon{display:none}

/* phones: menu on its own row, buttons wrap instead of running off the screen */
@media (max-width:760px){
  .nav{flex-wrap:wrap;padding:0 1rem;row-gap:0}
  .nav-tabs{order:3;flex:1 1 100%;margin-left:0}
  .nav>div:last-child{flex-wrap:wrap;justify-content:flex-end;gap:6px;padding:8px 0}
  .nav-pill{display:none}
  .pt-tab{padding:12px 2px 10px}
  #pt-tabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
}

/* SOA action buttons/links: same look */
.soa-actions .btn{background:var(--white,#fff);border:1px solid var(--border-dark,#cfc9bb);color:var(--text,#1a1a1a);text-decoration:none;cursor:pointer}
.soa-actions .btn:hover{background:var(--bg,#f4f2ed)}
