:root {
  --bg: #0b1020;
  --panel: #ffffff;
  --panel-2: #f4f7fb;
  --line: #dbe4f0;
  --text: #172033;
  --muted: #62708a;
  --primary: #4f46e5;
  --primary-2: #7c3aed;
  --success: #0f9d6c;
  --warning: #c28706;
  --danger: #c73b3b;
  --info: #2563eb;
  --shadow: 0 18px 60px rgba(15, 23, 42, .08);
  --radius: 22px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: Inter, Arial, sans-serif; background: linear-gradient(180deg, #eff4fb 0%, #eef2f9 100%); color: var(--text); height: 100%; }
a { color: inherit; text-decoration: none; }
body { min-height: 100vh; }
body.app-shell { min-height: 100vh; height: 100vh; overflow: hidden; }
body.app-shell > .shell { height: 100vh; overflow: hidden; }
.shell { min-height: 100vh; display: block; }
.sidebar { --sidebar-width: 288px; background: linear-gradient(180deg, #0b1020 0%, #141e35 100%); color: #fff; padding: 22px; display: grid; grid-template-rows: auto minmax(0,1fr) auto; gap: 22px; position: fixed; inset: 0 auto 0 0; top: 0; left: 0; width: var(--sidebar-width); height: 100vh; overflow: hidden; z-index: 25; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-badge { width: 48px; height: 48px; border-radius: 16px; background: linear-gradient(135deg, #7c3aed, #4f46e5); display: grid; place-items: center; font-weight: 800; }
.brand-title { font-weight: 700; font-size: 20px; }
.brand-sub { font-size: 13px; color: rgba(255,255,255,.68); }
.nav { display: grid; gap: 8px; align-content: start; overflow-y: auto; min-height: 0; padding-right: 6px; padding-bottom: 18px; }
.nav-link { padding: 12px 14px; border-radius: 14px; color: rgba(255,255,255,.82); transition: .2s ease; }
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,.12); color: #fff; }
.sidebar-foot { display: grid; gap: 14px; margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.10); background: linear-gradient(180deg, rgba(20,30,53,0) 0%, rgba(20,30,53,.96) 24%); position: relative; z-index: 2; }
.user-mini { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.08); }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.14); display: grid; place-items: center; font-weight: 700; }
.user-name { font-weight: 700; }
.user-role { font-size: 12px; color: rgba(255,255,255,.7); text-transform: capitalize; }
.main { margin-left: 288px; padding: 24px 24px 32px; min-width: 0; height: 100vh; max-height: 100vh; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scroll-padding-top: 118px; }
.topbar { display: flex; justify-content: space-between; align-items: start; gap: 18px; margin-bottom: 18px; position: sticky; top: 0; z-index: 20; }
.topbar h1 { margin: 0 0 6px; font-size: 32px; }
.topbar p { margin: 0; color: var(--muted); }
.topbar-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.card { background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; border: 1px solid rgba(219,228,240,.9); }
.card.mini { padding: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.card-head h3 { margin: 0; font-size: 20px; }
.metric .meta, .mini .meta { color: var(--muted); font-size: 14px; }
.metric .value { margin-top: 8px; font-weight: 800; font-size: 34px; }
.metric .value.sm, .mini .value.sm { font-size: 28px; }
.metric .sub { color: var(--muted); margin-top: 8px; }
.grid { display: grid; gap: 18px; }
.metrics-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.two-col { grid-template-columns: 1.35fr 1fr; }
.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.align-start { align-items: start; }
.mt-16 { margin-top: 18px; }
.form-grid { display: grid; gap: 14px; }
.form-grid.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
label { display: grid; gap: 8px; font-size: 14px; color: var(--muted); }
input, select, textarea, button { font: inherit; }
input, select, textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--text); }
textarea { min-height: 110px; resize: vertical; }
.form-actions { display: flex; gap: 10px; align-items: center; grid-column: 1 / -1; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 11px 16px; cursor: pointer; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; }
.btn-secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.btn-dark { background: #fff; color: #111827; }
.btn-danger { background: rgba(199,59,59,.12); color: var(--danger); border: 1px solid rgba(199,59,59,.2); }
.btn-small { padding: 8px 12px; border-radius: 12px; font-size: 13px; }
.w-full { width: 100%; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.success { background: rgba(15,157,108,.12); color: var(--success); }
.badge.warning { background: rgba(194,135,6,.12); color: var(--warning); }
.badge.danger { background: rgba(199,59,59,.12); color: var(--danger); }
.badge.info { background: rgba(37,99,235,.12); color: var(--info); }
.badge.muted { background: rgba(98,112,138,.12); color: var(--muted); }
.pill, .pill-stack { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; background: rgba(79,70,229,.12); color: var(--primary); padding: 8px 12px; border-radius: 999px; font-weight: 700; font-size: 12px; }
.alert { padding: 14px 16px; border-radius: 16px; margin-bottom: 16px; font-weight: 600; }
.alert.success { background: rgba(15,157,108,.12); color: var(--success); }
.alert.danger { background: rgba(199,59,59,.12); color: var(--danger); }
.muted, small.muted { color: var(--muted); }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
th { color: var(--muted); font-weight: 700; background: #fbfcff; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.actions form { margin: 0; }
.chart-bars { display: flex; gap: 12px; align-items: end; min-height: 250px; padding-top: 10px; overflow: auto; }
.bar-item { min-width: 88px; display: grid; gap: 8px; justify-items: center; }
.bar { width: 54px; border-radius: 18px 18px 8px 8px; background: linear-gradient(180deg, #7c3aed, #4f46e5); box-shadow: inset 0 -12px 30px rgba(255,255,255,.12); }
.list-row { display: flex; justify-content: space-between; gap: 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; padding-bottom: 0; }
.stack-list.compact .list-row { padding: 12px 0; }
.right { text-align: right; }
.callout { padding: 16px; border-radius: 18px; background: linear-gradient(180deg, #f6f8ff, #eef2ff); border: 1px solid #dbe2ff; }
.callout code, td code { display: inline-block; padding: 7px 10px; border-radius: 10px; background: #0f172a; color: #e5efff; font-size: 12px; }
.empty { color: var(--muted); padding: 20px 0; text-align: center; }
.field-error { color: var(--danger); }
.checkbox-inline { display: flex; align-items: center; gap: 8px; padding-top: 28px; }
.checkbox-inline input { width: 18px; height: 18px; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: radial-gradient(circle at top left, rgba(124,58,237,.22), transparent 30%), radial-gradient(circle at bottom right, rgba(79,70,229,.2), transparent 28%), linear-gradient(180deg, #edf2ff, #eff5ff); }
.auth-card { width: min(560px, 100%); padding: 34px; }
.glass { background: rgba(255,255,255,.84); backdrop-filter: blur(18px); border: 1px solid rgba(255,255,255,.75); box-shadow: 0 30px 80px rgba(31,41,55,.14); border-radius: 28px; }
.auth-card h1 { margin: 12px 0 8px; font-size: 38px; }
.auth-card p { margin: 0 0 20px; color: var(--muted); }
.prose-doc pre { white-space: pre-wrap; word-break: break-word; background: #0f172a; color: #dbeafe; padding: 20px; border-radius: 16px; overflow: auto; }
@media (max-width: 1180px) {
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col, .three-col { grid-template-columns: 1fr; }
}
@media (max-width: 920px) {
  .shell { min-height: 100vh; }
  .topbar { flex-direction: column; }
  .main { margin-left: 0; }
}
@media (max-width: 640px) {
  .metrics-grid, .form-grid.two-up { grid-template-columns: 1fr; }
  .main { padding: 16px; }
  .sidebar { padding: 18px; }
}

.mobile-toolbar{display:none;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;background:#0b1020;color:#fff;position:sticky;top:0;z-index:30}
.mobile-toolbar-title{font-weight:700}
.mobile-nav-toggle{display:inline-flex;align-items:center;justify-content:center;padding:10px 14px;border-radius:12px;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.12);color:#fff;font-weight:700}
@media (max-width: 920px) {
  .mobile-toolbar{display:flex}
  .shell{grid-template-columns:1fr}
  .sidebar{position:fixed;inset:58px auto 0 0;width:min(320px,88vw);transform:translateX(-105%);transition:transform .22s ease;z-index:40;height:calc(100vh - 58px);overflow:hidden;box-shadow:0 18px 60px rgba(15,23,42,.24)}
  body.sidebar-open .sidebar{transform:translateX(0)}
  .main{padding-top:16px;margin-left:0;height:calc(100vh - 58px)}
}

.compact-metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.mini-stat{padding:14px;border:1px solid var(--line);border-radius:16px;background:#f8fbff}.mini-stat span{display:block;color:var(--muted);font-size:13px;margin-bottom:6px}.mini-stat strong{font-size:24px}.inline-form{display:flex;gap:8px;align-items:center;justify-content:flex-end;flex-wrap:wrap}.inline-form select{min-width:110px}.table-wrap code{display:inline-block;padding:4px 8px;border-radius:8px;background:#0f172a;color:#e2e8f0}.table-wrap strong{white-space:nowrap}@media (max-width:1180px){.compact-metrics{grid-template-columns:1fr}}

.copy-block{display:flex;flex-direction:column;gap:.45rem;margin:.35rem 0}.copy-block code{display:block;white-space:pre-wrap;word-break:break-all;background:#0f172a;color:#e2e8f0;padding:.55rem .65rem;border-radius:.6rem;font-size:.78rem}.stack-sm{margin-top:.55rem}.btn.mini{padding:.38rem .6rem;font-size:.78rem;align-self:flex-start}


.client-picker-form{align-items:end}.picker-actions{display:flex;align-items:end;justify-content:flex-start}.client-choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.client-choice-card{display:grid;gap:8px;padding:18px;border:1px solid var(--line);border-radius:18px;background:#f8fbff;transition:.18s ease;box-shadow:var(--shadow)}.client-choice-card:hover{transform:translateY(-2px);border-color:#cbd7ee}.platform-config-card{display:none}.platform-callout strong{display:block;margin-bottom:4px}.button-row.wrap{display:flex;gap:8px;flex-wrap:wrap}.button-row.wrap form{margin:0}.btn-secondary{background:var(--panel-2);color:var(--text);border:1px solid var(--line)}
@media (max-width: 920px){.client-choice-grid{grid-template-columns:1fr}}

.platform-tabs{display:flex;gap:10px;flex-wrap:wrap}.platform-tab{display:inline-flex;align-items:center;justify-content:center;padding:10px 14px;border-radius:999px;border:1px solid var(--line);background:#f8fbff;color:var(--text);font-weight:600}.platform-tab.active{background:linear-gradient(135deg,var(--primary),var(--primary-2));color:#fff;border-color:transparent}.platform-tab:hover{border-color:#cdd7f7}

.dashboard-main-grid{align-items:start}
.wrap-mobile{flex-wrap:wrap}
.client-dashboard-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}.client-dashboard-grid .span-2{grid-column:span 2}.client-hero-card{background:linear-gradient(135deg,#0f172a,#1e293b);color:#fff}.client-hero-card .meta,.client-hero-card .sub{color:rgba(255,255,255,.8)}.client-hero-card .value{font-size:36px}
.platform-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.platform-card{padding:18px;border:1px solid var(--line);border-radius:18px;background:#fbfcff;display:grid;gap:14px}.platform-card-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.platform-card-head h4{margin:0 0 4px;font-size:18px}.platform-card-head p{margin:0;color:var(--muted);font-size:13px}.platform-main-value{font-size:28px;font-weight:800;line-height:1.1}.platform-main-value.small{font-size:26px}.platform-meta-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.platform-meta-grid div{padding:12px;border-radius:14px;background:#fff;border:1px solid #edf1f7}.platform-meta-grid span{display:block;font-size:12px;color:var(--muted);margin-bottom:6px}.platform-meta-grid strong{font-size:14px;word-break:break-word}
.client-info-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.info-tile{padding:14px;border-radius:16px;background:#f8fbff;border:1px solid var(--line)}.info-tile span{display:block;color:var(--muted);font-size:13px;margin-bottom:8px}.info-tile strong{font-size:22px}
.filter-chips{display:flex;gap:8px;flex-wrap:wrap}.filter-chip{display:inline-flex;align-items:center;justify-content:center;padding:9px 12px;border-radius:999px;background:#f4f7ff;border:1px solid var(--line);font-size:13px;font-weight:700;color:var(--text)}.filter-chip.active{background:linear-gradient(135deg,var(--primary),var(--primary-2));border-color:transparent;color:#fff}
.transaction-card-list{display:grid;gap:12px}.transaction-card{padding:16px;border-radius:18px;background:#fbfcff;border:1px solid var(--line);display:grid;gap:10px}.transaction-card-top,.transaction-card-bottom{display:flex;justify-content:space-between;align-items:center;gap:10px}.transaction-card p{margin:0;color:var(--muted)}
.toolbar-filters{display:flex;gap:10px;flex-wrap:wrap}.toolbar-filters select{min-width:150px}.compact-callout{display:grid;gap:6px}.desktop-only{display:block}.mobile-only{display:none}
@media (max-width: 1180px){.client-dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.platform-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width: 760px){.client-dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.client-dashboard-grid .span-2{grid-column:1/-1}.platform-card-grid,.client-info-grid,.platform-meta-grid{grid-template-columns:1fr}.desktop-only{display:none}.mobile-only{display:grid}.toolbar-filters{width:100%}.toolbar-filters select{flex:1;min-width:0}.card-head{align-items:flex-start}.platform-main-value{font-size:24px}.client-hero-card .value{font-size:30px}}
@media (max-width: 520px){.client-dashboard-grid{grid-template-columns:1fr}.client-dashboard-grid .span-2{grid-column:auto}.mobile-toolbar-title{font-size:15px}.transaction-card{padding:14px}.platform-card{padding:16px}}

.filter-toolbar{display:flex;gap:12px;align-items:end;flex-wrap:wrap;margin-top:16px}.filter-toolbar label{display:flex;flex-direction:column;gap:6px}.toolbar-filters input[type=date]{min-width:150px}.compact-metrics .mini-stat{background:#f8fafc;border:1px solid #e2e8f0;border-radius:16px;padding:14px}.platform-card{border:1px solid #e5e7eb;border-radius:18px;padding:16px;background:#fff;box-shadow:0 8px 24px rgba(15,23,42,.04)}.platform-card-head{display:flex;justify-content:space-between;gap:8px;align-items:start}.platform-meta-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px}.platform-meta-grid div{background:#f8fafc;border-radius:12px;padding:10px}.client-info-grid,.platform-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.wrap-mobile{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}@media (max-width:768px){.platform-meta-grid,.client-info-grid,.platform-card-grid{grid-template-columns:1fr}.filter-toolbar,.toolbar-filters{flex-direction:column;align-items:stretch}.table-wrap{overflow:auto}}

.section-hero{background:linear-gradient(135deg,#eef4ff,#ffffff);border:1px solid #d8e5ff}.section-hero h3{font-size:22px}.summary-chip-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:14px}.summary-chip{padding:14px 16px;border-radius:16px;border:1px solid #dfe7f4;background:#fff}.summary-chip span{display:block;color:var(--muted);font-size:13px;margin-bottom:6px}.summary-chip strong{font-size:24px}.report-hero-card{background:linear-gradient(135deg,#f7f9ff,#ffffff);border:1px solid #dbe5ff}.report-pill-row{display:flex;gap:10px;flex-wrap:wrap;margin-top:6px}.premium-metric{background:linear-gradient(180deg,#fff,#fbfcff)}.premium-metric .value{font-size:32px}@media (max-width: 768px){.summary-chip-grid{grid-template-columns:1fr}}


.readiness-list{display:grid;gap:16px}
.readiness-card{border:1px solid #e5e7eb;border-radius:18px;padding:16px;background:#fff}
.readiness-top{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}
.text-danger{color:#b91c1c}
@media (max-width: 768px){
  .readiness-top{flex-direction:column}
}


/* polish ui */
.app-shell{color-scheme:light}
.sidebar-backdrop{display:none}
.topbar{background:linear-gradient(135deg,#ffffff,#f7faff);border:1px solid #dde7f4;border-radius:24px;padding:20px 22px;box-shadow:0 18px 40px rgba(15,23,42,.06)}
.topbar h1{font-size:30px;line-height:1.1}
.topbar-right .badge{box-shadow:inset 0 0 0 1px rgba(37,99,235,.08)}
.nav-link{font-weight:600}
.nav-link.active{box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)}
.card{position:relative;overflow:hidden}
.card::after{content:'';position:absolute;inset:auto 0 0 0;height:1px;background:linear-gradient(90deg,transparent,rgba(79,70,229,.12),transparent)}
.card-head{margin-bottom:16px}
.card-head .muted{max-width:62ch;line-height:1.5}
.metric .meta,.mini .meta{text-transform:uppercase;letter-spacing:.04em;font-size:12px}
.metric .sub{line-height:1.55}
.summary-chip strong,.metric .value,.mini .value{letter-spacing:-.02em}
.table-wrap{border:1px solid #e6edf7;border-radius:18px;background:#fff}
table{min-width:720px}
th{position:sticky;top:0;z-index:1}
tbody tr:hover td{background:#fafcff}
.actions .btn,.button-row.wrap .btn{white-space:nowrap}
.platform-card{transition:transform .18s ease, box-shadow .18s ease,border-color .18s ease}
.platform-card:hover,.client-choice-card:hover,.readiness-card:hover{transform:translateY(-2px);box-shadow:0 16px 36px rgba(15,23,42,.08)}
.info-tile strong,.mini-stat strong{letter-spacing:-.02em}
.transaction-card strong,.platform-main-value{word-break:break-word}
.section-hero,.report-hero-card{box-shadow:0 18px 40px rgba(59,130,246,.06)}
.filter-toolbar,.toolbar-filters{padding:12px 14px;border:1px solid #e5edf7;border-radius:18px;background:#fbfdff}
.filter-toolbar .btn,.toolbar-filters .btn{align-self:end}
.empty{padding:28px 12px}
.text-danger{font-weight:600}
.code-muted{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}
.connection-card-list,.admin-card-list{display:grid;gap:12px}
.connection-card,.admin-data-card{padding:16px;border:1px solid #e6edf7;border-radius:18px;background:#fff;display:grid;gap:10px}
.connection-card-top,.admin-data-top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.connection-meta{display:grid;gap:6px}
.connection-actions{display:flex;gap:8px;flex-wrap:wrap}
.kv-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.kv-grid div{padding:10px 12px;border-radius:14px;background:#f8fbff;border:1px solid #ecf1f7}
.kv-grid span{display:block;color:var(--muted);font-size:12px;margin-bottom:6px}
.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.status-stack{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.page-note{padding:14px 16px;border-radius:18px;background:#f7fbff;border:1px solid #dce8ff;color:#43526d}
@media (max-width: 920px){
  .sidebar-backdrop{display:block;position:fixed;inset:58px 0 0 0;background:rgba(15,23,42,.38);opacity:0;pointer-events:none;transition:opacity .2s ease;z-index:35}
  body.sidebar-open .sidebar-backdrop{opacity:1;pointer-events:auto}
  .topbar{padding:16px 16px 18px}
  .topbar h1{font-size:26px}
}
@media (max-width: 760px){
  .table-wrap.desktop-only{display:none}
  .connection-card-list.mobile-only,.admin-card-list.mobile-only{display:grid}
  .card{padding:18px}
  .card-head{flex-direction:column;align-items:flex-start}
  .summary-chip strong{font-size:21px}
  .btn{width:100%}
  .button-row.wrap .btn,.actions .btn,.connection-actions .btn,.form-actions .btn,.topbar-right .btn{width:auto}
  .kv-grid{grid-template-columns:1fr}
}
@media (min-width: 761px){
  .connection-card-list.mobile-only,.admin-card-list.mobile-only{display:none}
}

.connection-form-stack{display:grid;gap:18px}
.platform-tabs.compact{gap:8px}
.platform-section{display:none;padding:18px;border:1px solid #e5edf7;border-radius:18px;background:#fcfdff}
.platform-section.active{display:block}
.inline-status{display:inline-flex;align-items:center;gap:8px}
.inline-status span{font-size:13px;color:var(--muted)}
.table-wrap table .mono.small{font-size:12px;line-height:1.4;word-break:break-all}
.table-wrap td .button-row{justify-content:flex-start}
.table-wrap td .button-row .btn{width:auto}
.connections-toolbar{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;flex-wrap:wrap}
.readiness-grid{display:grid;gap:16px}
.reconciliation-table td.negative{color:#b91c1c;font-weight:700}
.reconciliation-table td.positive{color:#047857;font-weight:700}
@media (max-width: 760px){
  .platform-tabs.compact{display:grid;grid-template-columns:1fr;}
  .inline-status{width:100%;justify-content:space-between}
}

.dashboard-kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.dashboard-filter-toolbar{margin-top:0}
.balance-hero-top{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}
.balance-hero-top .btn{width:auto;align-self:center}
.code-block{white-space:pre-wrap;word-break:break-word;background:#0f172a;color:#e2e8f0;padding:12px 14px;border-radius:14px;font-size:12px;line-height:1.5;margin-top:8px}
.reconciliation-table .badge{min-width:72px;justify-content:center}
@media (max-width:900px){.dashboard-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.balance-hero-top{flex-direction:column}.balance-hero-top .btn{width:100%}}
@media (max-width:600px){.dashboard-kpi-grid{grid-template-columns:1fr}}

.nav::-webkit-scrollbar{width:8px}
.nav::-webkit-scrollbar-thumb{background:rgba(255,255,255,.14);border-radius:999px}
.nav::-webkit-scrollbar-track{background:transparent}
.main > *:last-child{padding-bottom:24px}


.form-grid label span,.filter-toolbar label span{font-weight:600;color:#48566f}
input:focus,select:focus,textarea:focus{outline:none;border-color:#8aa4ff;box-shadow:0 0 0 4px rgba(79,70,229,.10)}
.btn{font-weight:700;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}
.btn:hover{transform:translateY(-1px);box-shadow:0 12px 28px rgba(15,23,42,.08)}
.btn:active{transform:translateY(0)}
.table-wrap table{min-width:760px}
.table-wrap thead th{box-shadow:inset 0 -1px 0 var(--line)}
.table-wrap tbody td{background:#fff}
.table-wrap tbody tr:nth-child(even) td{background:#fcfdff}
.page-section + .page-section{margin-top:18px}
.summary-chip,.mini-stat,.info-tile,.platform-card,.transaction-card,.connection-card,.admin-data-card{box-shadow:0 10px 26px rgba(15,23,42,.04)}
.sidebar .btn-dark{background:rgba(255,255,255,.96)}
.sidebar .badge{width:max-content}
.topbar{backdrop-filter:blur(12px)}



/* admin final layout fix */
@media (min-width: 921px){
  .shell{height:100vh;overflow:hidden}
  .sidebar{display:flex!important;flex-direction:column!important;justify-content:flex-start!important;position:fixed!important;top:0;bottom:0;left:0;inset:0 auto 0 0;width:288px;height:100vh;transform:none!important}
  .nav{flex:1 1 auto!important;min-height:0;overflow-y:auto}
  .sidebar-foot{flex:0 0 auto!important;margin-top:0!important;position:relative;bottom:auto}
  .main{margin-left:288px;height:100vh!important;max-height:100vh!important;overflow-y:auto!important;overflow-x:hidden!important;overscroll-behavior:contain;scrollbar-gutter:stable}
}
@media (max-width: 920px){
  body.app-shell{min-height:100vh;height:auto;overflow-x:hidden;overflow-y:auto}
  body.app-shell > .shell{height:auto;overflow:visible}
  .shell{height:auto;overflow:visible}
  .sidebar{display:grid!important;position:fixed!important;inset:58px auto 0 0;width:min(320px,88vw);height:calc(100vh - 58px);transform:translateX(-105%)!important;overflow:hidden;z-index:40}
  body.sidebar-open .sidebar{transform:translateX(0)!important}
  .nav{overflow-y:auto}
  .sidebar-foot{position:relative;bottom:auto;margin-top:auto!important}
  .main{margin-left:0;height:auto!important;max-height:none!important;min-height:calc(100vh - 58px);overflow-y:visible!important;overflow-x:hidden;padding-top:16px}
}
.field-help{display:block;font-size:12px;line-height:1.45;color:var(--muted)}.field-error{display:block;font-size:12px;color:var(--danger);font-weight:700}.checkbox-row{align-items:flex-start;grid-template-columns:auto 1fr;column-gap:10px}.checkbox-row input[type=checkbox]{width:18px;height:18px;margin-top:2px}.checkbox-row span{grid-column:2}.checkbox-row .field-help{grid-column:2}.page-section{scroll-margin-top:120px}

.simple-platform-intro{display:grid;gap:6px;padding:14px 16px;border-radius:18px;background:#f7fbff;border:1px solid #dce8ff;color:#43526d}
.simple-platform-intro strong{font-size:15px;color:#0f172a}
.admin-details{border:1px solid #e4ebf5;border-radius:18px;background:#fbfdff;padding:0}
.admin-details summary{cursor:pointer;list-style:none;padding:14px 16px;font-weight:700;color:#0f172a}
.admin-details summary::-webkit-details-marker{display:none}
.admin-details[open] summary{border-bottom:1px solid #e4ebf5}
.admin-details .details-body{padding:0 16px 16px}


.setup-step-strip{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:12px}
.setup-step-strip.compact{margin-bottom:4px}
.setup-step{display:grid;gap:4px;padding:14px 16px;border-radius:18px;border:1px solid #e5edf7;background:#fbfdff}
.setup-step span{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:999px;background:#e8f0ff;color:#1d4ed8;font-weight:800}
.setup-step strong{font-size:15px;color:#0f172a}
.setup-step small{color:var(--muted);line-height:1.4}
.setup-step.active{background:linear-gradient(135deg,#eef4ff,#ffffff);border-color:#cfe0ff}
.platform-choice-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.platform-choice-card{display:grid;gap:10px;padding:18px;border-radius:20px;border:1px solid #dfe8f5;background:#fff;color:inherit;box-shadow:0 12px 30px rgba(15,23,42,.05);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.platform-choice-card:hover{transform:translateY(-2px);box-shadow:0 18px 36px rgba(15,23,42,.08);border-color:#c8d8f7}
.platform-choice-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.platform-choice-card p{margin:0;color:var(--muted);line-height:1.55}
.platform-choice-cta{display:inline-flex;align-items:center;font-weight:700;color:var(--primary)}
.table-subline{margin-top:4px;font-size:12px;color:var(--muted)}
@media (max-width: 920px){.platform-choice-grid{grid-template-columns:1fr}.setup-step-strip{grid-template-columns:1fr}}

.quick-connect-note{padding:14px 16px;border-radius:18px;background:#fff8e8;border:1px solid #f3df9a;color:#7a5b00}
.quick-connect-note strong{display:block;margin-bottom:6px;color:#5f4600}
.advanced-lock{display:grid;gap:8px;padding:14px 16px;border-radius:18px;background:#f8fbff;border:1px dashed #cfe0ff;color:#43526d}
.advanced-lock strong{color:#0f172a}


/* final sidebar behavior fix */
@media (min-width: 921px){
  html,body{height:100%;overflow:hidden}
  body.app-shell{height:100vh;overflow:hidden}
  body.app-shell>.shell,.shell{height:100vh;overflow:hidden}
  .sidebar{
    position:fixed !important;
    top:0 !important;
    left:0 !important;
    bottom:0 !important;
    width:288px !important;
    height:100vh !important;
    padding:22px !important;
    display:block !important;
    overflow:hidden !important;
    transform:none !important;
    z-index:30 !important;
  }
  .brand{margin-bottom:22px}
  .nav{
    position:absolute !important;
    top:94px !important;
    left:22px !important;
    right:22px !important;
    bottom:170px !important;
    display:grid !important;
    align-content:start !important;
    overflow-y:auto !important;
    padding-right:6px !important;
    padding-bottom:18px !important;
  }
  .sidebar-foot{
    position:absolute !important;
    left:22px !important;
    right:22px !important;
    bottom:22px !important;
    margin-top:0 !important;
    padding-top:16px !important;
    z-index:2 !important;
  }
  .main{
    margin-left:288px !important;
    height:100vh !important;
    max-height:100vh !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    overscroll-behavior:contain !important;
  }
}
@media (max-width: 920px){
  html,body{height:auto;overflow-x:hidden;overflow-y:auto}
  body.app-shell{height:auto;overflow-x:hidden;overflow-y:auto}
  body.app-shell>.shell,.shell{height:auto;overflow:visible}
  .mobile-toolbar{display:flex;position:sticky;top:0;z-index:45}
  .sidebar{
    position:fixed !important;
    top:0 !important;
    left:0 !important;
    right:auto !important;
    bottom:0 !important;
    width:100vw !important;
    max-width:100vw !important;
    height:100vh !important;
    inset:0 auto 0 0 !important;
    transform:translateX(-105%) !important;
    transition:transform .22s ease !important;
    z-index:50 !important;
    padding-top:76px !important;
    box-shadow:none !important;
  }
  body.sidebar-open .sidebar{transform:translateX(0) !important}
  .sidebar-backdrop{
    display:block !important;
    position:fixed !important;
    inset:0 !important;
    background:rgba(15,23,42,.38) !important;
    opacity:0;
    pointer-events:none;
    transition:opacity .2s ease;
    z-index:46 !important;
  }
  body.sidebar-open .sidebar-backdrop{opacity:1;pointer-events:auto}
  body.sidebar-open{overflow:hidden}
  .brand{margin-bottom:18px}
  .nav{
    position:static !important;
    top:auto !important;
    left:auto !important;
    right:auto !important;
    bottom:auto !important;
    overflow-y:auto !important;
    padding-right:4px !important;
    padding-bottom:18px !important;
  }
  .sidebar-foot{
    position:static !important;
    left:auto !important;
    right:auto !important;
    bottom:auto !important;
    margin-top:auto !important;
  }
  .main{
    margin-left:0 !important;
    min-height:calc(100vh - 58px) !important;
    height:auto !important;
    max-height:none !important;
    overflow:visible !important;
    padding-top:16px !important;
  }
}


/* authoritative desktop/mobile sidebar lock */
@media (min-width: 921px){
  html,body{height:100%;overflow:hidden !important;}
  body.app-shell{height:100vh !important;overflow:hidden !important;}
  body.app-shell>.shell{position:relative !important;height:100vh !important;overflow:hidden !important;display:block !important;}
  body.app-shell .mobile-toolbar,
  body.app-shell .sidebar-backdrop{display:none !important;}
  body.app-shell .sidebar{
    position:fixed !important;
    inset:0 auto 0 0 !important;
    top:0 !important;
    left:0 !important;
    bottom:0 !important;
    width:288px !important;
    height:100vh !important;
    max-height:100vh !important;
    transform:none !important;
    overflow:hidden !important;
    display:block !important;
    z-index:50 !important;
  }
  body.app-shell .sidebar .brand{
    position:absolute !important;
    top:22px !important;
    left:22px !important;
    right:22px !important;
    margin:0 !important;
  }
  body.app-shell .sidebar .nav{
    position:absolute !important;
    top:112px !important;
    left:22px !important;
    right:16px !important;
    bottom:170px !important;
    margin:0 !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    min-height:0 !important;
    padding-right:6px !important;
    padding-bottom:16px !important;
  }
  body.app-shell .sidebar .sidebar-foot{
    position:absolute !important;
    left:22px !important;
    right:22px !important;
    bottom:22px !important;
    margin:0 !important;
    z-index:3 !important;
  }
  body.app-shell .main{
    position:relative !important;
    margin-left:288px !important;
    width:calc(100% - 288px) !important;
    height:100vh !important;
    max-height:100vh !important;
    min-height:100vh !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    overscroll-behavior:contain !important;
  }
}

@media (max-width: 920px){
  html,body{height:auto !important;overflow-x:hidden !important;overflow-y:auto !important;}
  body.app-shell{height:auto !important;overflow-x:hidden !important;overflow-y:auto !important;}
  body.app-shell>.shell{height:auto !important;overflow:visible !important;display:block !important;}
  body.app-shell .mobile-toolbar{display:flex !important;position:sticky !important;top:0 !important;z-index:70 !important;}
  body.app-shell .sidebar-backdrop{
    display:block !important;
    position:fixed !important;
    inset:0 !important;
    background:rgba(15,23,42,.45) !important;
    opacity:0 !important;
    pointer-events:none !important;
    transition:opacity .2s ease !important;
    z-index:78 !important;
  }
  body.app-shell .sidebar{
    position:fixed !important;
    inset:0 auto 0 0 !important;
    width:100vw !important;
    max-width:100vw !important;
    height:100vh !important;
    max-height:100vh !important;
    padding:22px !important;
    padding-top:78px !important;
    transform:translateX(-105%) !important;
    transition:transform .22s ease !important;
    z-index:79 !important;
    overflow:hidden !important;
    display:grid !important;
    grid-template-rows:auto minmax(0,1fr) auto !important;
    box-shadow:0 18px 60px rgba(15,23,42,.28) !important;
  }
  body.app-shell.sidebar-open{overflow:hidden !important;height:100vh !important;}
  body.app-shell.sidebar-open .sidebar{transform:translateX(0) !important;}
  body.app-shell.sidebar-open .sidebar-backdrop{opacity:1 !important;pointer-events:auto !important;}
  body.app-shell .sidebar .brand,
  body.app-shell .sidebar .nav,
  body.app-shell .sidebar .sidebar-foot{position:static !important;left:auto !important;right:auto !important;top:auto !important;bottom:auto !important;}
  body.app-shell .sidebar .nav{overflow-y:auto !important;overflow-x:hidden !important;min-height:0 !important;padding-right:6px !important;}
  body.app-shell .sidebar .sidebar-foot{margin-top:auto !important;}
  body.app-shell .main{
    margin-left:0 !important;
    width:100% !important;
    min-height:calc(100vh - 58px) !important;
    height:auto !important;
    max-height:none !important;
    overflow:visible !important;
    padding-top:16px !important;
  }
}


/* FINAL SIDEBAR BEHAVIOR */
@media (min-width: 921px) {
  body.app-shell { overflow: hidden; }
  .shell { min-height: 100vh; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 288px;
    height: 100vh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
  }
  .nav {
    min-height: 0;
    overflow-y: auto;
    align-content: start;
  }
  .sidebar-foot {
    margin-top: 0;
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
  }
  .main {
    margin-left: 288px;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
  }
  .sidebar-backdrop,
  .mobile-toolbar {
    display: none !important;
  }
}

@media (max-width: 920px) {
  html, body {
    height: auto;
    min-height: 100%;
  }
  body.app-shell {
    min-height: 100vh;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
  }
  body.app-shell > .shell {
    height: auto;
    overflow: visible;
  }
  .shell {
    min-height: 100vh;
  }
  .mobile-toolbar {
    display: flex;
  }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 35;
  }
  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }
  .sidebar {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    border-radius: 0;
    transform: translateX(-100%);
    transition: transform .22s ease;
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-top: max(18px, env(safe-area-inset-top));
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    box-shadow: 0 18px 60px rgba(15,23,42,.24);
  }
  body.sidebar-open .sidebar {
    transform: translateX(0);
  }
  .nav {
    overflow: visible;
    min-height: auto;
    padding-right: 0;
    padding-bottom: 0;
  }
  .sidebar-foot {
    margin-top: 0;
    position: static;
    border-top: 1px solid rgba(255,255,255,.10);
  }
  .main {
    margin-left: 0;
    height: auto;
    max-height: none;
    min-height: calc(100vh - 58px);
    overflow: visible;
    padding-top: 16px;
  }
  .topbar {
    position: static;
  }
}


/* DEFINITIVE SIDEBAR FIX */
@media (min-width: 921px) {
  html, body { height: 100%; }
  body.app-shell { height: 100vh !important; overflow: hidden !important; }
  body.app-shell .shell { display: block !important; height: 100vh !important; min-height: 100vh !important; overflow: hidden !important; }
  body.app-shell .sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    top: 0 !important;
    left: 0 !important;
    width: 288px !important;
    height: 100vh !important;
    max-height: 100vh !important;
    display: grid !important;
    grid-template-rows: auto minmax(0,1fr) auto !important;
    overflow: hidden !important;
    transform: none !important;
    z-index: 40 !important;
  }
  body.app-shell .sidebar .nav {
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    align-content: start !important;
    padding-right: 6px !important;
  }
  body.app-shell .sidebar .sidebar-foot {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    top: auto !important;
    margin-top: 0 !important;
    align-self: stretch !important;
  }
  body.app-shell .main {
    position: relative !important;
    margin-left: 288px !important;
    width: calc(100% - 288px) !important;
    height: 100vh !important;
    max-height: 100vh !important;
    min-height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
  body.app-shell .sidebar-backdrop,
  body.app-shell .mobile-toolbar {
    display: none !important;
  }
}

@media (max-width: 920px) {
  html, body { min-height: 100%; height: auto; }
  body.app-shell { min-height: 100vh !important; height: auto !important; overflow-x: hidden !important; overflow-y: auto !important; }
  body.app-shell .shell { min-height: 100vh !important; height: auto !important; overflow: visible !important; }
  body.app-shell .mobile-toolbar { display: flex !important; }
  body.app-shell .sidebar-backdrop {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: 35 !important;
  }
  body.app-shell.sidebar-open .sidebar-backdrop {
    opacity: 1 !important;
    pointer-events: auto !important;
  }
  body.app-shell .sidebar {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    transform: translateX(-100%) !important;
    transition: transform .22s ease !important;
    z-index: 40 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 0 !important;
  }
  body.app-shell.sidebar-open .sidebar { transform: translateX(0) !important; }
  body.app-shell .sidebar .nav { overflow: visible !important; min-height: auto !important; padding-right: 0 !important; }
  body.app-shell .sidebar .sidebar-foot { position: static !important; margin-top: 0 !important; }
  body.app-shell .main {
    margin-left: 0 !important;
    width: 100% !important;
    min-height: calc(100vh - 58px) !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}


/* final sidebar footer correction */
@media (min-width: 921px) {
  body.app-shell {
    overflow: hidden !important;
  }
  body.app-shell .shell {
    height: 100vh !important;
    overflow: hidden !important;
  }
  body.app-shell .sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    width: 288px !important;
    height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    overflow: hidden !important;
    padding: 22px !important;
    gap: 22px !important;
  }
  body.app-shell .sidebar .brand {
    flex: 0 0 auto !important;
  }
  body.app-shell .sidebar .nav {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-right: 6px !important;
    margin: 0 !important;
  }
  body.app-shell .sidebar .sidebar-foot {
    flex: 0 0 auto !important;
    margin-top: auto !important;
    position: static !important;
    inset: auto !important;
    transform: none !important;
    z-index: 1 !important;
  }
  body.app-shell .main {
    margin-left: 288px !important;
    width: calc(100% - 288px) !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
}

@media (max-width: 920px) {
  body.app-shell .sidebar {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 22px !important;
    gap: 22px !important;
  }
  body.app-shell .sidebar .brand {
    flex: 0 0 auto !important;
  }
  body.app-shell .sidebar .nav {
    flex: 0 0 auto !important;
    min-height: auto !important;
    overflow: visible !important;
    padding-right: 0 !important;
    margin: 0 !important;
  }
  body.app-shell .sidebar .sidebar-foot {
    flex: 0 0 auto !important;
    margin-top: 24px !important;
    position: static !important;
    inset: auto !important;
    transform: none !important;
    z-index: 1 !important;
  }
}

.nav-link{display:flex;align-items:center;justify-content:space-between;gap:10px;}
.nav-notify{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 7px;border-radius:999px;background:#ef4444;color:#fff;font-size:12px;font-weight:700;line-height:1;}

.table-enhance-controls{display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin:0 0 12px;padding:10px 12px;border:1px solid #e5edf7;border-radius:16px;background:#fbfdff}
.table-enhance-size,.table-enhance-meta{font-size:13px;color:var(--muted)}
.table-enhance-size select{margin:0 6px;border:1px solid var(--line);border-radius:10px;padding:8px 10px;background:#fff}
.table-enhance-search{min-width:240px;max-width:360px;width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:#fff}
.table-enhance-pager{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.table-enhance-pageinfo{font-size:13px;color:var(--muted)}
.table-row-no{font-weight:700;color:#43526d;white-space:nowrap}
@media (max-width:760px){.table-enhance-controls{display:none}}

.credential-guide-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:16px;margin-top:16px}
.credential-guide-card{border:1px solid #e5edf7;border-radius:18px;background:#fbfdff;padding:18px;display:flex;flex-direction:column;gap:14px}
.credential-guide-top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.credential-guide-section{display:flex;flex-direction:column;gap:8px}
.credential-guide-section>span{font-size:12px;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:#5b6b86}
.credential-guide-section p,.credential-guide-section li{font-size:14px;line-height:1.6;color:#243247}
.credential-guide-section ol,.credential-guide-section ul{margin:0;padding-left:20px}


.json-preview{white-space:pre-wrap;word-break:break-word;background:#0f172a;color:#e2e8f0;padding:12px;border-radius:12px;max-height:320px;overflow:auto;font-size:12px}.pagination-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.align-start{align-items:flex-start}

/* final sidebar lock overrides */
@media (min-width: 921px) {
  body.app-shell { overflow: hidden; }
  body.app-shell .shell { min-height: 100vh; height: 100vh; }
  body.app-shell .sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: 280px; display: flex; flex-direction: column; overflow: hidden; }
  body.app-shell .sidebar .brand { flex: 0 0 auto; }
  body.app-shell .sidebar .nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
  body.app-shell .sidebar .sidebar-foot { flex: 0 0 auto; margin-top: auto !important; position: static !important; }
  body.app-shell .main { margin-left: 280px; height: 100vh; overflow-y: auto; }
}
@media (max-width: 920px) {
  body.app-shell .sidebar { width: 100vw; height: 100dvh; position: fixed; top: 0; left: 0; display: flex; flex-direction: column; overflow-y: auto; }
  body.app-shell .sidebar .nav { overflow: visible; }
  body.app-shell .sidebar .sidebar-foot { position: static !important; margin-top: auto !important; }
}


.file-input-inline{position:relative;display:inline-flex;align-items:center;gap:8px;overflow:hidden}.file-input-inline input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer}.btn-warning{background:#8a5a00;color:#fff;border-color:#8a5a00}

/* Reports page hardening */
.reports-page{display:block}
.report-toolbar{display:flex;flex-wrap:wrap;gap:12px;align-items:end}
.report-toolbar > *{flex:0 0 auto}
.report-pill-row .pill{display:inline-flex;align-items:center;padding:8px 12px;border:1px solid var(--border,#dfe7f4);border-radius:999px;background:#fff}
.reports-page .table-wrap{overflow:auto;border:1px solid rgba(15,23,42,.08);border-radius:16px;background:#fff}
.reports-page table{width:100%;border-collapse:collapse}
.reports-page th,.reports-page td{vertical-align:top}
.reports-page .metrics-grid{align-items:stretch}
.reports-page .platform-card-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.reports-page .platform-card{padding:16px;border:1px solid rgba(15,23,42,.08);border-radius:16px;background:#fff}
.reports-page .platform-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.reports-page .platform-main-value.small{font-size:28px;font-weight:700;margin:10px 0}
.reports-page .platform-meta-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.reports-page .platform-meta-grid span{display:block;color:var(--muted);font-size:12px;margin-bottom:4px}
@media (max-width: 920px){.report-toolbar{display:grid;grid-template-columns:1fr}.reports-page .platform-meta-grid{grid-template-columns:1fr}}

.inline-check{display:flex;align-items:center;gap:8px;white-space:nowrap;margin-top:22px}.inline-check input{margin:0}


.nav-section-label{margin:.85rem 0 .35rem;font-size:.72rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#6b7280;padding:0 .35rem}.summary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:.75rem;margin:0 0 1rem}.btn-sm{padding:.4rem .7rem;font-size:.85rem}
/* final clean dashboard/admin polish */
.shell{gap:0}
.sidebar{border-right:1px solid rgba(255,255,255,.08)}
.nav-section-label{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:rgba(255,255,255,.58);margin:18px 0 8px;padding:0 4px}
.topbar{display:flex;justify-content:space-between;gap:16px;align-items:flex-start}
.topbar p{max-width:62ch}
.client-dashboard-grid-compact{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.client-balance-hero{background:linear-gradient(135deg,#eef5ff,#ffffff);border:1px solid #d7e5ff}
.hero-inline-stats{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.hero-pill{display:inline-flex;align-items:center;padding:8px 12px;border-radius:999px;background:#fff;border:1px solid #d7e3f3;font-size:12px;font-weight:700;color:#234}
.hero-actions-stack{display:grid;gap:8px;justify-items:end}
.dashboard-kpi-card{min-height:110px}
.compact-account-card .card-head{margin-bottom:10px}
.compact-account-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.compact-account-item{padding:14px;border-radius:16px;background:#fbfdff;border:1px solid #e6edf7;display:grid;gap:6px}
.compact-account-item span{font-size:12px;color:var(--muted)}
.compact-account-item strong{font-size:16px;line-height:1.35;word-break:break-word}
.compact-account-wide{grid-column:span 2}
.client-platform-card-grid{grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}
.client-platform-card{display:grid;gap:12px;padding:18px}
.platform-card-subtitle{font-size:13px;color:var(--muted);line-height:1.45}
.compact-platform-meta-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.platform-inline-notes{display:flex;gap:8px;flex-wrap:wrap}
.platform-inline-notes span{display:inline-flex;align-items:center;padding:7px 10px;border-radius:999px;background:#f8fbff;border:1px solid #e4edf7;font-size:12px;font-weight:600;color:#44536b}
.compact-total-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
@media (max-width:1100px){.client-platform-card-grid{grid-template-columns:1fr 1fr}.compact-account-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:760px){
  .topbar{flex-direction:column}
  .client-dashboard-grid-compact{grid-template-columns:repeat(2,minmax(0,1fr))}
  .client-dashboard-grid-compact .span-2{grid-column:1/-1}
  .hero-actions-stack{justify-items:stretch;width:100%}
  .hero-actions-stack .btn{width:100%}
  .client-platform-card-grid,.compact-account-grid,.compact-total-grid,.compact-platform-meta-grid{grid-template-columns:1fr}
  .compact-account-wide{grid-column:auto}
  .platform-inline-notes{display:grid;grid-template-columns:1fr;gap:6px}
}
@media (max-width:520px){
  .client-dashboard-grid-compact{grid-template-columns:1fr}
  .client-dashboard-grid-compact .span-2{grid-column:auto}
  .hero-inline-stats{display:grid;grid-template-columns:1fr;gap:6px}
}


/* Clean dashboard / reports / manual overview refinements */
.compact-insight-card{padding:14px 16px}
.compact-inline-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.compact-inline-item{padding:12px 14px;border:1px solid rgba(15,23,42,.08);border-radius:16px;background:#fbfcff;display:grid;gap:4px}
.compact-inline-item span{font-size:12px;color:var(--muted)}
.compact-inline-item strong{font-size:18px;line-height:1.2}
.clean-section-card,.compact-account-card,.compact-insight-card{border:1px solid rgba(15,23,42,.06);box-shadow:0 10px 30px rgba(15,23,42,.04)}
.clean-kpi-grid .metric,.clean-two-col .card,.compact-account-item,.compact-inline-item,.transaction-card,.platform-card{box-shadow:none}
.clean-two-col{align-items:start}
.clean-two-col>.card{height:100%}
.reports-page .card,.reports-page .metric{border:1px solid rgba(15,23,42,.06)}
.reports-page .report-pill-row{display:flex;flex-wrap:wrap;gap:8px}
.reports-page .pill{background:#f3f6fb;border:1px solid rgba(15,23,42,.08);padding:8px 12px;border-radius:999px;color:#334155;font-size:12px}
.report-toolbar,.toolbar-filters{gap:10px}
.topbar-right .badge{padding:8px 12px;border-radius:999px}
.nav-section-label{margin:14px 12px 8px;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:rgba(255,255,255,.5)}
.sidebar a{border-radius:14px}
.dashboard-main-grid .table-wrap{overflow:auto}
.platform-card-subtitle{color:var(--muted);font-size:12px;line-height:1.5;margin-bottom:8px}
.platform-inline-notes{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.platform-inline-notes span{background:#f7f9fc;border:1px solid rgba(15,23,42,.08);border-radius:999px;padding:6px 10px;font-size:12px;color:#334155}
@media (max-width: 920px){
  .compact-inline-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .report-toolbar,.toolbar-filters{display:grid;grid-template-columns:1fr}
  .reports-page .report-pill-row{display:grid;grid-template-columns:1fr 1fr}
  .dashboard-main-grid,.clean-two-col{grid-template-columns:1fr}
  .card-head.wrap-mobile{gap:10px}
}
@media (max-width: 560px){
  .compact-inline-grid,.compact-account-grid,.reports-page .report-pill-row{grid-template-columns:1fr}
  .client-dashboard-grid-compact{grid-template-columns:1fr 1fr}
  .dashboard-kpi-card .value.sm{font-size:24px}
  .hero-inline-stats{display:grid;grid-template-columns:1fr;gap:8px}
  .platform-meta-grid,.compact-platform-meta-grid{grid-template-columns:1fr 1fr}
  .platform-card{padding:14px}
  .topbar{padding:12px 14px}
}


/* continued clean ui */
.panel-stack{display:grid;gap:16px}
.compact-hero{padding:18px 20px}
.compact-hero .card-head{margin-bottom:10px}
.compact-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.compact-summary-card{padding:14px 16px;border-radius:16px;border:1px solid #e6edf7;background:#fbfdff}
.compact-summary-card span{display:block;color:var(--muted);font-size:12px;margin-bottom:6px;text-transform:uppercase;letter-spacing:.04em}
.compact-summary-card strong{font-size:24px;letter-spacing:-.02em}
.compact-summary-card small{display:block;color:var(--muted);margin-top:6px}
.explorer-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.explorer-summary-card{padding:16px;border:1px solid #e6edf7;border-radius:18px;background:#fff;display:grid;gap:8px}
.explorer-summary-card .label{font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
.explorer-summary-card .value{font-size:26px;font-weight:800;letter-spacing:-.02em}
.explorer-summary-card .sub{font-size:13px;color:var(--muted)}
.compact-table-card .card-head{margin-bottom:12px}
.sticky-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.mobile-grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.clean-list{display:grid;gap:12px}
.clean-list-item{padding:14px 16px;border:1px solid #e6edf7;border-radius:16px;background:#fff}
.clean-list-item .top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.clean-list-item .meta{color:var(--muted);font-size:13px;margin-top:6px}
.clean-list-item .body{margin-top:10px}
.compact-json summary{cursor:pointer;color:var(--primary);font-weight:700}
.compact-json .code-block{margin-top:10px}
.section-title-row{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;flex-wrap:wrap}
.section-title-row .muted{max-width:68ch}
@media (max-width: 1100px){.compact-summary-grid,.explorer-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width: 760px){.compact-summary-grid,.explorer-summary-grid,.mobile-grid-2{grid-template-columns:1fr}.compact-hero{padding:16px}.compact-summary-card strong,.explorer-summary-card .value{font-size:22px}.sticky-actions{width:100%}.sticky-actions .btn{width:auto}}


/* final clean mobile/admin overrides */
body{background:#eef3f9;color:#0f172a}
.shell{background:transparent}
.main{background:transparent}
.card{background:#fff;border:1px solid #dce4ef;box-shadow:0 10px 30px rgba(15,23,42,.04)}
.badge.info,.hero-pill,.summary-chip,.compact-account-item,.compact-inline-item{background:#f6f8fc;color:#32435f;border-color:#dde6f3}
.topbar{gap:12px}
.topbar p{max-width:820px;color:#60708a}
.client-dashboard-grid,.dashboard-main-grid,.compact-platform-grid{gap:14px}
.compact-platform-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
.compact-platform-card{border:1px solid #dde6f3;border-radius:18px;padding:16px;background:linear-gradient(180deg,#ffffff 0%,#f9fbff 100%);display:grid;gap:10px}
.compact-platform-card .top{display:flex;justify-content:space-between;align-items:center;gap:10px}
.compact-platform-card .metric-lg{font-size:28px;font-weight:800;color:#0f254d;line-height:1.1}
.compact-platform-meta{display:grid;gap:8px;color:#5e6f87;font-size:13px}
.compact-platform-meta strong{display:block;color:#0f172a;font-size:14px;margin-top:2px}
.compact-inline-grid{align-items:stretch}
.compact-inline-grid-5{grid-template-columns:repeat(5,minmax(0,1fr))}
.compact-inline-item small{display:block;margin-top:4px;color:#6b7b92}
.compact-account-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
.dashboard-kpi-card,.compact-inline-item,.compact-account-item{min-height:88px}
.filter-toolbar,.toolbar-filters{background:#f8fbff;border:1px solid #dbe5f2;border-radius:18px;padding:12px;gap:10px}
.filter-toolbar input,.filter-toolbar select,.toolbar-filters input,.toolbar-filters select,.toolbar-filters textarea{background:#fff}
.filter-chip{background:#f6f8fc;border:1px solid #dbe5f2;color:#334155}
.filter-chip.active{background:#0f172a;color:#fff;border-color:#0f172a}
.transaction-card,.clean-list-item{border:1px solid #dde6f3;background:#fff;border-radius:18px}
.card-head.wrap-mobile.compact-heading-row{align-items:flex-start}
.page-stack,.reports-page,.clean-page-stack{gap:14px}
.table-wrap{border-radius:18px;overflow:auto}
.table-wrap table thead th{background:#f4f7fb;color:#5f7088;position:sticky;top:0}
.sidebar .nav-link{border-radius:14px}
.sidebar .nav-section-label{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:#7f8ca6;margin:12px 0 6px}
.sidebar-foot{padding-top:12px;border-top:1px solid rgba(255,255,255,.08)}
.user-mini{background:rgba(255,255,255,.08)}
@media (max-width: 1024px){
  .compact-inline-grid-5,.compact-account-grid,.compact-platform-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 720px){
  .topbar{padding:14px 14px 16px}
  .topbar h1{font-size:24px}
  .topbar p{font-size:14px;line-height:1.45}
  .client-dashboard-grid{grid-template-columns:1fr 1fr}
  .client-dashboard-grid .span-2{grid-column:auto}
  .client-balance-hero{grid-column:1/-1}
  .compact-inline-grid,.compact-inline-grid-5,.compact-account-grid,.compact-platform-grid,.dashboard-kpi-grid{grid-template-columns:1fr 1fr}
  .compact-platform-card .metric-lg{font-size:22px}
  .card{padding:16px}
  .table-wrap table{min-width:720px}
  .toolbar-filters,.filter-toolbar{grid-template-columns:1fr 1fr;display:grid}
  .toolbar-filters .btn,.filter-toolbar .btn{width:100%}
}
@media (max-width: 520px){
  .client-dashboard-grid,.compact-inline-grid,.compact-inline-grid-5,.compact-account-grid,.compact-platform-grid,.dashboard-kpi-grid{grid-template-columns:1fr}
  .hero-inline-stats{display:grid;grid-template-columns:1fr;gap:8px}
  .balance-hero-top{gap:12px}
  .hero-actions-stack{width:100%}
  .hero-actions-stack .btn{width:100%}
  .toolbar-filters,.filter-toolbar{grid-template-columns:1fr}
  .compact-account-item,.compact-inline-item,.dashboard-kpi-card{min-height:auto}
}

/* ui fix: balance hero contrast + calmer color hierarchy */
.client-balance-hero{
  background:linear-gradient(180deg,#f8fbff 0%,#eef4ff 100%);
  border:1px solid #d9e4f3;
  box-shadow:0 10px 28px rgba(15,23,42,.04);
  color:#142033;
}
.client-balance-hero .meta{
  color:#5f708a;
}
.client-balance-hero .value{
  color:#16233a;
  letter-spacing:-.03em;
}
.client-balance-hero .sub,
.client-balance-hero .muted{
  color:#64748b;
}
.client-balance-hero .hero-pill{
  background:#ffffff;
  border-color:#d7e3f1;
  color:#334155;
}
.client-balance-hero .btn-primary{
  background:linear-gradient(135deg,#5b6df7,#6d3df0);
  box-shadow:0 10px 24px rgba(91,109,247,.18);
}
.client-balance-hero .btn-primary:hover{
  filter:brightness(.98);
}
@media (max-width:760px){
  .client-balance-hero .value{font-size:32px}
  .client-balance-hero .hero-pill{justify-content:center}
}


/* mobile collapsible sections */
.mobile-collapse-toggle{
  display:none;
  align-items:center;
  gap:8px;
  border:1px solid #dbe4f0;
  background:#fff;
  color:#334155;
  border-radius:999px;
  padding:8px 12px;
  font-weight:700;
  font-size:12px;
  line-height:1;
  box-shadow:0 4px 14px rgba(15,23,42,.05);
}
.mobile-collapse-toggle::after{
  content:'▾';
  font-size:12px;
  transition:transform .2s ease;
}
.mobile-collapse-ready.is-collapsed .mobile-collapse-toggle::after{
  transform:rotate(-90deg);
}
.mobile-collapse-body{
  display:block;
}
.mobile-collapse-inline-head{
  display:none;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.mobile-collapse-inline-head h3{
  margin:0;
  font-size:16px;
}
.mobile-collapse-inline-head .muted{
  margin-top:4px;
}
@media (max-width:760px){
  .mobile-collapse-ready .mobile-collapse-toggle{display:inline-flex}
  .mobile-collapse-ready.is-collapsed .mobile-collapse-body{display:none}
  .mobile-collapse-ready .card-head{gap:12px;align-items:flex-start}
  .mobile-collapse-ready .card-head .button-row{width:100%}
  .mobile-collapse-ready .card-head .button-row .btn{flex:1 1 auto}
  .mobile-collapse-ready.grid .card-head{display:none}
  .mobile-collapse-ready.grid .mobile-collapse-inline-head{display:flex}
  .mobile-collapse-ready.grid.is-collapsed > .mobile-collapse-body{display:none}
}

.client-dashboard-stats-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.client-dashboard-stats-row .dashboard-kpi-card{height:100%}
.client-dashboard-grid-compact .client-balance-hero{grid-column:1/-1}
.compact-inline-grid-5{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
@media (max-width: 1100px){
  .client-dashboard-stats-row{grid-template-columns:repeat(2,minmax(0,1fr))}
  .compact-inline-grid-5{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 640px){
  .client-dashboard-stats-row,.compact-inline-grid-5{grid-template-columns:1fr}
}


.work-board-summary-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
.work-board-columns-main{grid-template-columns:repeat(4,minmax(0,1fr))}
.work-board-filter-bar{align-items:center}
.app-modal{position:fixed;inset:0;display:none;z-index:80}
.app-modal.is-open{display:block}
.app-modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.48);backdrop-filter:blur(2px)}
.app-modal-dialog{position:relative;max-width:720px;margin:5vh auto;background:#fff;border:1px solid #dbe4f0;border-radius:24px;box-shadow:0 24px 70px rgba(15,23,42,.22);overflow:hidden}
.app-modal-sm{max-width:460px}.app-modal-lg{max-width:860px}
.app-modal-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;padding:18px 22px;border-bottom:1px solid #e8eef7;background:#fbfdff}
.app-modal-head h3{margin:0}.app-modal-body{padding:20px 22px;max-height:78vh;overflow:auto}
.app-modal-close{appearance:none;border:0;background:transparent;color:#475569;font-size:28px;line-height:1;cursor:pointer;text-decoration:none}
.app-modal-open{overflow:hidden}
@media (max-width:1180px){.work-board-summary-grid,.work-board-columns-main{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:760px){.work-board-summary-grid,.work-board-columns-main{grid-template-columns:1fr}.app-modal-dialog{margin:2vh 12px;max-width:none}.app-modal-body{max-height:82vh;padding:16px}.app-modal-head{padding:16px}}


.work-status-pills{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.work-status-pill{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:140px;padding:10px 14px;border:1px solid #dbe4f0;border-radius:14px;background:#f8fbff;color:#20324f;text-decoration:none;box-shadow:0 6px 18px rgba(15,23,42,.04)}
.work-status-pill strong{font-size:15px}
.work-status-pill.is-selected{border-color:#7c9cff;background:#eef4ff;color:#17305f}
.work-status-pill.is-all{background:#f8fafc}
.work-status-section{scroll-margin-top:88px}
.work-card-grid-status{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.work-card{padding:0;gap:0;overflow:hidden}
.work-card-header{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;padding:12px 14px;border-bottom:1px solid rgba(255,255,255,.22)}
.work-card-header h4{margin:2px 0 0;font-size:15px;line-height:1.3;color:#fff}
.work-card-group{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;opacity:.88;color:rgba(255,255,255,.92)}
.work-card .badge-soft-light{background:rgba(255,255,255,.16);color:#fff;border-color:rgba(255,255,255,.28)}
.work-card-meta-tight{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:10px 14px 0}
.work-card-order{font-size:12px;font-weight:700;color:#64748b}
.work-card p{padding:6px 14px 0;line-height:1.4;font-size:13px}
.work-card-foot.compact{padding:10px 14px 12px;align-items:center}
.work-card .connection-actions.compact-actions{gap:6px}
.theme-ocean{background:linear-gradient(135deg,#1d4ed8,#0f766e)}
.theme-violet{background:linear-gradient(135deg,#6d28d9,#4338ca)}
.theme-amber{background:linear-gradient(135deg,#b45309,#ea580c)}
.theme-emerald{background:linear-gradient(135deg,#047857,#0f766e)}
.theme-rose{background:linear-gradient(135deg,#be185d,#e11d48)}
.theme-slate{background:linear-gradient(135deg,#334155,#475569)}
@media (max-width:1180px){.work-card-grid-status{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:760px){.work-status-pill{width:100%}.work-card-grid-status{grid-template-columns:1fr}}


.work-status-switcher{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.work-status-tab{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:150px;padding:10px 14px;border:1px solid #dbe4f0;border-radius:14px;background:#f8fbff;color:#20324f;font-weight:700;cursor:pointer}
.work-status-tab strong{font-size:14px}
.work-status-tab.is-active{background:#0f766e;color:#fff;border-color:#0f766e;box-shadow:0 10px 24px rgba(15,118,110,.18)}
.work-status-panel{display:none}
.work-status-panel.is-visible{display:block}
.work-card-grid-status{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.work-card{padding:0;gap:0;overflow:hidden;border:1px solid #dbe4f0;border-radius:22px;background:#fff}
.work-card-header{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;padding:10px 14px;border-bottom:1px solid rgba(255,255,255,.2)}
.work-card-header h4{margin:1px 0 0;font-size:15px;line-height:1.25;color:#fff}
.work-card-group{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;opacity:.88;color:rgba(255,255,255,.92)}
.work-card-meta-tight{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:8px 14px 0}
.work-card p,.work-card-notes{padding:4px 14px 0;line-height:1.3;font-size:13px;margin:0;white-space:pre-line;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.work-card-foot.compact{padding:8px 14px 12px;align-items:center}
.work-full-meta{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.work-full-notes{line-height:1.45;white-space:pre-line;color:#1e293b}
.work-inline-filter input[type=search]{min-width:260px}
@media (max-width:1180px){.work-card-grid-status{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:760px){.work-status-tab{width:100%}.work-card-grid-status{grid-template-columns:1fr}.work-inline-filter input[type=search]{min-width:0;width:100%}}

/* Final UI cleanup */
.modal-backdrop,.modal{backdrop-filter:blur(2px)}
.modal-panel,.modal-content,.modal-card{border-radius:18px;box-shadow:0 20px 60px rgba(15,23,42,.18)}
.modal-body,.modal-panel .body{display:block}
.modal-body .form-grid,.modal-panel .form-grid,.card .form-grid{gap:14px}
.modal-body label,.modal-panel label,.card label{display:flex;flex-direction:column;gap:6px}
.modal-body label span,.modal-panel label span,.card label span{line-height:1.2}
input,select,textarea{line-height:1.35}
textarea{min-height:110px}
.card .muted,.table-wrap td,.table-wrap th,.compact-platform-meta span,.hero-inline-stats span{line-height:1.35}
.card .meta,.summary-chip span,.compact-inline-item span{margin-bottom:4px}
.card h3,.card h4,.card strong{line-height:1.2}
.table-wrap table{border-collapse:separate;border-spacing:0}
.table-wrap th,.table-wrap td{padding:10px 12px;vertical-align:top}
.table-wrap tbody tr:nth-child(even){background:rgba(148,163,184,.06)}
.table-wrap tbody tr:hover{background:rgba(59,130,246,.06)}
.summary-chip-grid,.compact-inline-grid,.compact-account-grid,.compact-platform-grid{gap:12px}
.hero-inline-stats{gap:8px}
.hero-pill,.badge,.pill{line-height:1.2}
.work-card,.work-board-card,.compact-platform-card{padding:14px}
.work-card p,.work-board-card p,.compact-platform-card p,.work-card .notes,.work-board-card .notes{margin:4px 0;line-height:1.3}
.work-card .meta,.work-board-card .meta,.work-card .sub,.work-board-card .sub{margin:0;line-height:1.2}
.card-head{gap:10px}
.filter-toolbar{gap:10px;align-items:end}
.filter-toolbar label{gap:6px}
@media (max-width: 768px){
  .summary-chip-grid,.compact-inline-grid,.compact-account-grid,.compact-platform-grid,.grid,.client-dashboard-stats-row{gap:10px}
  .table-wrap th,.table-wrap td{padding:9px 10px}
  .card,.summary-chip,.compact-inline-item,.compact-platform-card{padding:12px}
}


/* final cleanup overrides */
.card{overflow:hidden}
.card-head{margin-bottom:12px;gap:10px}
.card-head h3{line-height:1.25}
.card-head .muted{line-height:1.4}
.form-grid{gap:12px}
.form-grid label{gap:5px}
.form-grid textarea,.form-grid input,.form-grid select{margin-top:0}
.table-wrap th,.table-wrap td{padding:9px 11px;line-height:1.35}
.badge{line-height:1.2}
.button-row{gap:8px;flex-wrap:wrap}
.app-modal-body .form-grid,.card .form-grid{gap:12px}
.app-modal-head{padding:16px 20px}
.app-modal-body{padding:18px 20px}
.work-card{overflow:hidden}
.work-card-header{padding:10px 12px}
.work-card-body{padding:10px 12px}
.work-card h4,.work-card p,.work-card .muted,.work-card small{margin:0;line-height:1.25}
.work-card .stack-compact > * + *{margin-top:6px}
@media (max-width:760px){.card-head{margin-bottom:10px}.app-modal-head{padding:14px 16px}.app-modal-body{padding:14px 16px}.table-wrap th,.table-wrap td{padding:8px 9px}}

/* minimal UI refresh */
:root{
  --panel:#ffffff;
  --panel-2:#f8fafc;
  --line:#e7edf5;
  --text:#0f172a;
  --muted:#64748b;
  --primary:#334155;
  --primary-2:#0f172a;
  --shadow:0 8px 24px rgba(15,23,42,.05);
  --radius:18px;
}
html,body{background:#f6f8fb}
a{transition:color .16s ease, opacity .16s ease}
.sidebar{background:#0f172a;padding:18px;gap:16px;box-shadow:inset -1px 0 0 rgba(255,255,255,.05)}
.brand-badge{width:42px;height:42px;border-radius:12px;background:#111827}
.brand-title{font-size:18px;letter-spacing:-.01em}
.brand-sub{font-size:12px;color:rgba(255,255,255,.58)}
.nav{gap:4px;padding-right:2px}
.nav-link{padding:10px 12px;border-radius:12px;font-size:14px;color:rgba(255,255,255,.72)}
.nav-link:hover,.nav-link.active{background:rgba(255,255,255,.08);box-shadow:none}
.sidebar-foot{gap:10px;padding-top:12px;border-top-color:rgba(255,255,255,.08);background:none}
.user-mini{padding:10px 12px;border-radius:14px;background:rgba(255,255,255,.06)}
.avatar{width:38px;height:38px}
.main{padding:20px 20px 28px}
.topbar{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px 18px;box-shadow:0 4px 16px rgba(15,23,42,.04);margin-bottom:14px}
.topbar h1{font-size:28px;letter-spacing:-.02em;margin-bottom:4px}
.topbar p{font-size:14px;line-height:1.45}
.card,.platform-card,.readiness-card,.connection-card,.admin-data-card,.transaction-card,.summary-chip,.info-tile,.mini-stat,.work-card,.work-board-card{background:#fff;border:1px solid var(--line)!important;border-radius:16px!important;box-shadow:0 4px 14px rgba(15,23,42,.04)!important}
.card{padding:18px}
.card::after{display:none}
.card-head{margin-bottom:12px}
.card-head h3{font-size:18px;letter-spacing:-.01em}
.metric .meta,.mini .meta,.summary-chip span,.info-tile span,.mini-stat span,label{font-size:12px;letter-spacing:0;text-transform:none;color:var(--muted)}
.metric .value{font-size:30px;margin-top:4px}
.metric .value.sm,.mini .value.sm,.summary-chip strong,.mini-stat strong{font-size:24px}
.metric .sub,.card-head .muted,.muted,small.muted{line-height:1.45;color:var(--muted)}
.grid,.form-grid,.connection-form-stack,.readiness-grid,.readiness-list,.transaction-card-list,.connection-card-list,.admin-card-list{gap:14px}
.metrics-grid{gap:14px}
input,select,textarea{padding:11px 12px;border-radius:12px;border-color:var(--line);background:#fff;box-shadow:none}
input:focus,select:focus,textarea:focus{outline:none;border-color:#cbd5e1;box-shadow:0 0 0 3px rgba(148,163,184,.12)}
textarea{min-height:96px}
.btn{padding:10px 14px;border-radius:12px;font-weight:600;box-shadow:none}
.btn-primary{background:#0f172a;color:#fff}
.btn-secondary,.btn-dark{background:#fff;color:#0f172a;border:1px solid var(--line)}
.btn-danger{background:#fff5f5;color:#b91c1c;border:1px solid #fecaca}
.badge,.pill,.filter-chip{padding:6px 10px;border-radius:999px;font-size:12px;font-weight:600;box-shadow:none}
.badge.success{background:#ecfdf5;color:#047857}
.badge.warning{background:#fffbeb;color:#b45309}
.badge.danger{background:#fef2f2;color:#b91c1c}
.badge.info{background:#eff6ff;color:#1d4ed8}
.badge.muted,.pill,.filter-chip{background:#f8fafc;color:#334155;border:1px solid var(--line)}
.filter-chip.active,.btn-primary.filter-chip{background:#0f172a;color:#fff;border-color:#0f172a}
.filter-toolbar,.toolbar-filters,.page-note,.callout,.section-hero,.report-hero-card{background:#fff!important;border:1px solid var(--line)!important;box-shadow:none!important}
.table-wrap{border:1px solid var(--line);border-radius:16px;background:#fff}
table{min-width:680px}
th,td{padding:11px 12px;font-size:13px}
th{background:#f8fafc;color:#475569}
tbody tr:hover td{background:#fafafa}
.list-row{padding:11px 0}
.app-modal-backdrop{background:rgba(15,23,42,.42);backdrop-filter:blur(1px)}
.app-modal-dialog{border-radius:18px;border:1px solid var(--line);box-shadow:0 20px 60px rgba(15,23,42,.12)}
.app-modal-head{padding:14px 18px;background:#fff;border-bottom:1px solid var(--line)}
.app-modal-head h3{font-size:18px;letter-spacing:-.01em}
.app-modal-body{padding:16px 18px}
.app-modal-close{color:#64748b}
.work-card,.work-board-card{padding:14px!important;gap:8px!important}
.work-card h4,.work-board-card h4,.transaction-card strong{margin:0;line-height:1.3}
.work-card p,.work-board-card p,.transaction-card p{margin:0;line-height:1.35}
.work-card .meta,.work-board-card .meta{font-size:12px;color:var(--muted)}
.work-card-header,.work-board-card-header,.platform-card-head{margin-bottom:8px}
.platform-main-value{font-size:26px;letter-spacing:-.02em}
.kv-grid div,.platform-meta-grid div{padding:10px 11px;border-radius:12px;background:#fafbfc;border:1px solid #eef2f7}
.empty{padding:18px 10px;font-size:14px}
.alert{padding:12px 14px;border-radius:14px;font-weight:600}
.mobile-toolbar{padding:12px 14px;background:#0f172a}
.mobile-nav-toggle{padding:9px 12px;border-radius:10px}
@media (max-width:920px){.topbar{padding:14px 15px}.topbar h1{font-size:24px}.main{padding:14px 14px 24px}}
@media (max-width:760px){.card,.platform-card,.readiness-card,.connection-card,.admin-data-card,.transaction-card,.summary-chip,.info-tile,.mini-stat,.work-card,.work-board-card{border-radius:14px!important}.card{padding:16px}.btn{width:100%}.actions .btn,.form-actions .btn,.topbar-right .btn,.connection-actions .btn{width:auto}.topbar-right{width:100%}.topbar-right .badge{order:2}}

/* ultra minimal refinement */
:root{
  --panel:#ffffff;
  --panel-2:#f8fafc;
  --line:#e5eaf1;
  --text:#111827;
  --muted:#6b7280;
  --primary:#111827;
  --primary-2:#111827;
  --shadow:none;
  --radius:14px;
}
html,body{background:#f5f7fa}
.sidebar{background:#111827;gap:14px;padding:16px}
.brand{gap:12px}.brand-badge{width:38px;height:38px;border-radius:10px;background:#0b1220;font-size:13px}
.brand-title{font-size:17px;font-weight:700}.brand-sub{font-size:11px;color:rgba(255,255,255,.56)}
.nav{gap:3px}.nav-link{padding:9px 11px;border-radius:10px;font-size:13px}.nav-link:hover,.nav-link.active{background:rgba(255,255,255,.07)}
.user-mini{padding:9px 10px;border-radius:12px}.avatar{width:34px;height:34px;font-size:12px}
.main{padding:16px 16px 24px}
.topbar{padding:14px 16px;border-radius:14px;box-shadow:none}.topbar h1{font-size:24px}.topbar p{font-size:13px;max-width:56ch}
.card,.platform-card,.readiness-card,.connection-card,.admin-data-card,.transaction-card,.summary-chip,.info-tile,.mini-stat,.work-card,.work-board-card,.app-modal-dialog{box-shadow:none!important;border-radius:14px!important}
.card,.platform-card,.readiness-card,.connection-card,.admin-data-card,.transaction-card,.summary-chip,.info-tile,.mini-stat{padding:16px!important}
.card-head{margin-bottom:10px}.card-head h3{font-size:17px}
.grid,.metrics-grid,.form-grid,.connection-form-stack,.readiness-grid,.readiness-list,.transaction-card-list,.connection-card-list,.admin-card-list{gap:12px}
.metrics-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.metric .meta,.mini .meta,.summary-chip span,.info-tile span,.mini-stat span,label{font-size:11px}
.metric .value{font-size:28px}.metric .value.sm,.mini .value.sm,.summary-chip strong,.mini-stat strong{font-size:22px}
input,select,textarea{padding:10px 11px;border-radius:10px;background:#fff}
textarea{min-height:88px}
.form-actions,.actions,.toolbar-filters,.filter-toolbar,.sticky-actions{gap:8px}
.btn{padding:9px 12px;border-radius:10px;font-size:13px}
.btn-primary{background:#111827}.btn-secondary,.btn-dark{background:#fff}
.badge,.pill,.filter-chip{padding:5px 9px;font-size:11px}
.alert{padding:11px 12px;border-radius:12px}
.table-wrap{border-radius:14px;box-shadow:none}.table-wrap th,.table-wrap td,th,td{padding:10px 11px;font-size:13px;line-height:1.35}
th{font-weight:600}
.callout,.section-hero,.report-hero-card,.client-balance-hero,.compact-hero{background:#fff!important;background-image:none!important}
.hero-pill,.platform-inline-notes span,.kv-grid div,.platform-meta-grid div,.compact-account-item,.compact-inline-item,.compact-summary-card,.explorer-summary-card{background:#fafbfc!important;border-color:#e9eef5!important;box-shadow:none!important}
.work-card,.work-board-card{padding:12px!important;gap:6px!important}.work-card-header,.work-board-card-header{margin-bottom:6px}.work-card p,.work-board-card p{line-height:1.28}
.app-modal-head{padding:12px 16px}.app-modal-body{padding:14px 16px}
.mobile-toolbar{padding:11px 12px}.mobile-nav-toggle{padding:8px 10px;border-radius:9px}
@media (max-width:1100px){.metrics-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:760px){.main{padding:12px 12px 20px}.topbar{padding:12px 13px}.topbar h1{font-size:22px}.metrics-grid{grid-template-columns:1fr}.card,.platform-card,.readiness-card,.connection-card,.admin-data-card,.transaction-card,.summary-chip,.info-tile,.mini-stat{padding:14px!important}}

/* ultra-minimal design system pass */
:root{
  --bg:#f5f7fb !important;
  --panel:#ffffff !important;
  --panel-2:#f8fafc !important;
  --line:#e7ebf2 !important;
  --text:#111827 !important;
  --muted:#6b7280 !important;
  --primary:#111827 !important;
  --primary-2:#1f2937 !important;
  --success:#047857 !important;
  --warning:#b45309 !important;
  --danger:#b91c1c !important;
  --info:#1d4ed8 !important;
  --shadow:none !important;
  --radius:14px !important;
}
html,body{
  background:#f5f7fb !important;
  color:var(--text) !important;
}
body.app-shell{
  background:#f5f7fb !important;
}
.sidebar{
  background:#ffffff !important;
  color:var(--text) !important;
  border-right:1px solid var(--line) !important;
  box-shadow:none !important;
}
.brand-badge{
  background:#111827 !important;
  color:#fff !important;
  border-radius:12px !important;
}
.brand-sub,
.user-role,
.sidebar .nav-section-label{
  color:#6b7280 !important;
}
.nav-link{
  color:#374151 !important;
  border-radius:10px !important;
  padding:10px 12px !important;
  font-weight:600 !important;
}
.nav-link:hover{
  background:#f3f4f6 !important;
  color:#111827 !important;
}
.nav-link.active{
  background:#111827 !important;
  color:#fff !important;
  box-shadow:none !important;
}
.user-mini{
  background:#f9fafb !important;
  border:1px solid var(--line) !important;
}
.avatar{
  background:#111827 !important;
  color:#fff !important;
}
.sidebar-foot{
  border-top:1px solid var(--line) !important;
  background:#fff !important;
}
.mobile-toolbar{
  background:#fff !important;
  color:var(--text) !important;
  border-bottom:1px solid var(--line) !important;
}
.mobile-nav-toggle{
  background:#111827 !important;
  border-color:#111827 !important;
  color:#fff !important;
}
.main{
  background:#f5f7fb !important;
}
.topbar{
  position:sticky;
  top:0;
  background:rgba(245,247,251,.92) !important;
  backdrop-filter:blur(10px);
  border:0 !important;
  border-bottom:1px solid var(--line) !important;
  border-radius:0 !important;
  box-shadow:none !important;
  padding:12px 0 14px !important;
  margin:0 0 20px !important;
}
.topbar h1{
  font-size:28px !important;
  font-weight:700 !important;
  letter-spacing:-.025em !important;
}
.topbar p{
  max-width:72ch;
  line-height:1.5;
}
.card,
.platform-card,
.readiness-card,
.connection-card,
.admin-data-card,
.transaction-card,
.summary-chip,
.info-tile,
.mini-stat,
.work-card,
.work-board-card,
.app-modal-dialog,
.table-wrap,
.callout,
.section-hero,
.report-hero-card{
  background:#fff !important;
  border:1px solid var(--line) !important;
  border-radius:14px !important;
  box-shadow:none !important;
}
.card::after,
.platform-card::after,
.work-card::after,
.work-board-card::after{
  display:none !important;
}
.card,
.platform-card,
.readiness-card,
.connection-card,
.admin-data-card,
.transaction-card,
.work-card,
.work-board-card{
  padding:16px !important;
}
.card-head,
.platform-card-head,
.readiness-top,
.connection-card-top,
.admin-data-top,
.transaction-card-top,
.transaction-card-bottom{
  gap:10px !important;
}
.card-head{
  margin-bottom:12px !important;
}
.card-head h3,
.app-modal-head h3{
  font-size:18px !important;
  font-weight:700 !important;
  letter-spacing:-.02em !important;
}
.metric .meta,
.mini .meta,
.summary-chip span,
.info-tile span,
.mini-stat span,
label,
th,
.muted,
small.muted{
  color:var(--muted) !important;
}
.metric .meta,
.mini .meta,
.sidebar .nav-section-label{
  letter-spacing:.08em !important;
}
.metric .value{
  font-size:30px !important;
  margin-top:6px !important;
}
.metric .sub,
.topbar p,
.list-row,
.connection-meta,
.page-note,
.empty{
  line-height:1.5 !important;
}
input,select,textarea{
  background:#fff !important;
  border:1px solid var(--line) !important;
  border-radius:10px !important;
  padding:10px 12px !important;
  box-shadow:none !important;
}
input:focus,select:focus,textarea:focus{
  outline:none !important;
  border-color:#cbd5e1 !important;
  box-shadow:0 0 0 3px rgba(17,24,39,.06) !important;
}
textarea{min-height:100px !important;}
.btn{
  border-radius:10px !important;
  padding:10px 14px !important;
  font-weight:600 !important;
  box-shadow:none !important;
}
.btn-primary,
.filter-chip.active,
.nav-link.active,
.mobile-nav-toggle,
.btn-dark{
  background:#111827 !important;
  color:#fff !important;
  border:1px solid #111827 !important;
}
.btn-secondary,
.filter-chip,
.pill,
.badge.muted,
.badge.info,
.badge.success,
.badge.warning,
.badge.danger{
  background:#fff !important;
  color:#374151 !important;
  border:1px solid var(--line) !important;
}
.badge,
.pill,
.filter-chip{
  border-radius:999px !important;
  font-size:12px !important;
  padding:6px 10px !important;
  box-shadow:none !important;
}
.alert{
  border-radius:12px !important;
  padding:12px 14px !important;
  border:1px solid var(--line) !important;
}
.alert.success{background:#f0fdf4 !important;color:#166534 !important}
.alert.danger{background:#fef2f2 !important;color:#991b1b !important}
.table-wrap{
  overflow:auto;
}
table{
  min-width:680px;
}
th,td{
  padding:12px 10px !important;
  border-bottom:1px solid var(--line) !important;
  line-height:1.45 !important;
}
th{
  background:#f9fafb !important;
  font-size:12px !important;
  text-transform:uppercase !important;
  letter-spacing:.06em !important;
}
tbody tr:hover td{
  background:#fafafa !important;
}
.list-row{
  padding:12px 0 !important;
}
.kv-grid div,
.platform-meta-grid div,
.info-tile,
.summary-chip,
.mini-stat,
.page-note,
.connection-card,
.admin-data-card,
.transaction-card,
.work-card,
.work-board-card{
  background:#fff !important;
}
.filter-toolbar,
.toolbar-filters,
.connections-toolbar{
  background:transparent !important;
  border:0 !important;
  padding:0 !important;
  gap:10px !important;
}
.app-modal-backdrop{
  background:rgba(17,24,39,.42) !important;
  backdrop-filter:blur(6px) !important;
}
.app-modal-dialog{
  max-width:820px;
}
.app-modal-head{
  padding:14px 16px !important;
  background:#fff !important;
  border-bottom:1px solid var(--line) !important;
}
.app-modal-body{
  padding:16px !important;
}
.app-modal-close{
  color:#6b7280 !important;
}
.form-grid,
.app-modal-body .form-grid,
.card .form-grid{
  gap:12px !important;
}
.work-board-status-tabs,
.status-tabs,
.filter-chips,
.platform-tabs.compact{
  gap:8px !important;
}
.work-card p,
.work-card .muted,
.work-board-card p,
.work-board-card .muted{
  margin:0 !important;
  line-height:1.4 !important;
}
.work-card .actions,
.work-board-card .actions{
  margin-top:10px !important;
}
.section-hero,
.report-hero-card,
.callout{
  background:#fff !important;
}
.code-block,
.callout code,
td code{
  background:#f3f4f6 !important;
  color:#111827 !important;
  border:1px solid var(--line) !important;
}
@media (max-width:920px){
  .topbar{padding:10px 0 12px !important}
  .topbar h1{font-size:24px !important}
}
@media (max-width:760px){
  .card,
  .platform-card,
  .readiness-card,
  .connection-card,
  .admin-data-card,
  .transaction-card,
  .work-card,
  .work-board-card{padding:14px !important}
  .btn{width:100%}
  .button-row.wrap .btn,.actions .btn,.connection-actions .btn,.form-actions .btn,.topbar-right .btn{width:auto}
  th,td{padding:10px 9px !important}
}


/* ===== manual-only UI collision fixes ===== */
.button-row{display:flex;align-items:center}
.card-header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin:0 0 12px}
.card-header h2,.card-header h3{margin:0}
.info-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}
.info-grid.compact{grid-template-columns:repeat(auto-fit,minmax(160px,1fr))}
.mt-8{margin-top:8px}
.mt-12{margin-top:12px}
.toolbar-inline-danger{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-start;justify-content:flex-end;min-width:0}
.toolbar-inline-danger > form,
.toolbar-inline-danger > a,
.toolbar-inline-danger > label{margin:0}
.toolbar-inline-danger form{display:flex;flex-wrap:wrap;gap:10px;align-items:center;min-width:0}
.file-input-inline{position:relative;display:inline-flex;align-items:center;min-height:38px;min-width:0}
.file-input-inline .btn{pointer-events:none}
.file-input-inline input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}
.page-note{padding:16px 18px}
.page-note.danger{background:#fff7f7 !important;border-color:#fecaca !important}
.page-note.danger .muted{color:#7c2d12}
.toolbar-filters{display:flex;flex-wrap:wrap;align-items:end;gap:10px}
.toolbar-filters > *{min-width:0}
.toolbar-filters input[type=search]{min-width:220px;flex:1 1 240px}
.toolbar-filters input[type=date],
.toolbar-filters select{flex:0 1 180px}
.toolbar-filters .inline-check{margin-top:0;align-self:center;padding:0 2px 10px 2px}
.work-board-control-card{overflow:visible}
.work-board-filter-bar{display:grid;grid-template-columns:minmax(280px,2fr) minmax(180px,1fr) auto auto auto;gap:12px;align-items:end}
.work-board-filter-bar > *{min-width:0}
.work-inline-filter{display:flex;flex-direction:column;gap:6px;min-width:0;margin:0}
.work-inline-filter input[type=search],
.work-inline-filter select{width:100%;min-width:0}
.work-status-switcher{margin-top:16px}
.work-status-tab{min-height:48px}
.work-card{padding:0 !important;display:flex;flex-direction:column}
.work-card-header{margin-bottom:0 !important}
.work-card-meta-tight,.work-card-foot.compact{display:flex}
.work-card-foot.compact{justify-content:space-between;gap:10px;flex-wrap:wrap;align-items:center}
.work-card-foot.compact .connection-actions{display:flex;flex-wrap:wrap;justify-content:flex-end}
.notes-cell{max-width:420px;white-space:normal;word-break:break-word}
.table-wrap{max-width:100%}
.table-wrap table{width:100%}
@media (max-width: 1180px){
  .work-board-filter-bar{grid-template-columns:minmax(220px,1fr) minmax(180px,220px) auto auto auto}
}
@media (max-width: 920px){
  .toolbar-inline-danger{justify-content:flex-start}
  .toolbar-inline-danger form{width:100%}
}
@media (max-width: 760px){
  .toolbar-filters,.work-board-filter-bar{display:grid;grid-template-columns:1fr}
  .toolbar-filters input[type=search],
  .toolbar-filters input[type=date],
  .toolbar-filters select,
  .work-inline-filter input[type=search],
  .work-inline-filter select{min-width:0;width:100%}
  .toolbar-filters .inline-check{padding-bottom:0}
  .toolbar-inline-danger,
  .toolbar-inline-danger form,
  .work-card-foot.compact,
  .work-card-foot.compact .connection-actions{display:grid;grid-template-columns:1fr}
  .toolbar-inline-danger .btn,
  .work-card-foot.compact .btn{width:100%}
  .info-grid,.info-grid.compact{grid-template-columns:1fr}
}

/* ui sweep v2 */
.mt-12{margin-top:12px}
.mt-8{margin-top:8px}
.page-note.danger{background:#fff7f7!important;border:1px solid #f3d3d3!important;color:#7f1d1d}
.notes-cell{max-width:360px;white-space:pre-wrap;word-break:break-word}
.table-wrap td,.table-wrap th{word-break:break-word}
.table-wrap td .badge{white-space:nowrap}
.card-head.wrap-mobile,.section-title-row,.sticky-actions,.connections-toolbar,.balance-hero-top{align-items:flex-start}
.section-title-row > *,.sticky-actions > *{min-width:0}
.sticky-actions form,.sticky-actions .toolbar-filters{max-width:100%}
.summary-grid,.compact-summary-grid,.compact-inline-grid,.compact-inline-grid-5,.info-grid{align-items:stretch}
.info-grid .info-tile,.compact-summary-card,.compact-inline-item,.summary-chip{min-height:100%}
.info-grid .info-tile strong,.compact-summary-card strong,.compact-inline-item strong{display:block;line-height:1.15}
.toolbar-inline-danger{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;justify-content:flex-end;width:100%}
.toolbar-inline-danger > *{min-width:0}
.toolbar-inline-danger form,.toolbar-inline-danger label{margin:0}
.toolbar-inline-danger .btn{width:auto}
.file-input-inline{position:relative;display:inline-flex;align-items:center;min-width:180px;max-width:100%}
.file-input-inline .btn{width:auto;pointer-events:none}
.file-input-inline input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}
.file-input-inline + .btn,.toolbar-inline-danger .btn + .btn{margin-left:0}
.work-board-control-card{overflow:visible}
.work-board-filter-bar{display:grid!important;grid-template-columns:minmax(260px,2fr) minmax(180px,1fr) auto auto auto;gap:12px;align-items:end}
.work-board-filter-bar > *{min-width:0}
.work-inline-filter{display:flex;flex-direction:column;gap:6px;margin:0;min-width:0}
.work-inline-filter span,.work-board-filter-bar label span{font-size:12px;color:var(--muted);line-height:1.3}
.work-inline-filter input[type=search],.work-board-filter-bar select{width:100%;min-width:0}
.work-status-switcher{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px}
.work-status-tab{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;border-radius:16px;border:1px solid var(--line);background:#fff;color:var(--text);min-height:56px}
.work-status-tab span,.work-status-tab strong{line-height:1.2}
.work-status-tab strong{font-size:18px}
.work-status-tab.is-active{background:#0f172a;color:#fff;border-color:#0f172a}
.work-board-grid-shell{overflow:visible}
.work-status-panel{display:none}
.work-status-panel.is-visible{display:block}
.work-status-panel-head .button-row{align-items:center}
.work-card-grid-status{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.work-card{padding:0!important;display:flex;flex-direction:column;min-width:0}
.work-card-header{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;padding:12px 14px!important;margin-bottom:0!important}
.work-card-headline{min-width:0}
.work-card-headline h4{word-break:break-word}
.work-card-meta-tight{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:10px 14px 0}
.work-card-notes{display:block!important;padding:8px 14px 0!important;white-space:pre-wrap;word-break:break-word;min-height:72px}
.work-card-foot.compact{display:flex!important;justify-content:space-between;align-items:flex-start;gap:10px;flex-wrap:wrap;padding:10px 14px 14px}
.work-card-foot.compact .connection-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.work-card-foot.compact .btn{width:auto}
.compact-actions .btn{white-space:nowrap}
.clean-list-item .top,.clean-list-item .actions,.button-row,.actions,.connection-actions{display:flex;flex-wrap:wrap;gap:8px}
.clean-list-item .top{justify-content:space-between;align-items:flex-start}
.inline-form{justify-content:flex-start}
.hero-actions-stack{justify-items:start}
@media (max-width: 1280px){
  .work-card-grid-status{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media (max-width: 920px){
  .section-title-row,.card-head.wrap-mobile,.sticky-actions,.toolbar-inline-danger,.balance-hero-top{display:grid;grid-template-columns:1fr;width:100%}
  .sticky-actions .btn,.toolbar-inline-danger .btn,.sticky-actions form,.toolbar-inline-danger form{width:100%}
  .work-board-filter-bar{grid-template-columns:1fr 1fr auto auto auto!important}
  .compact-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 760px){
  .toolbar-filters,.filter-toolbar,.work-board-filter-bar,.toolbar-inline-danger,.toolbar-inline-danger form{display:grid!important;grid-template-columns:1fr!important}
  .toolbar-filters .btn,.filter-toolbar .btn,.toolbar-inline-danger .btn,.work-card-foot.compact .btn,.work-status-panel-head .btn{width:100%}
  .toolbar-filters input[type=search],.toolbar-filters input[type=date],.toolbar-filters select,.file-input-inline,.work-inline-filter input[type=search],.work-board-filter-bar select{width:100%;min-width:0}
  .toolbar-filters .inline-check{padding:0;display:flex;align-items:center}
  .compact-summary-grid,.summary-grid,.info-grid,.compact-inline-grid,.compact-inline-grid-5,.work-card-grid-status{grid-template-columns:1fr!important}
  .work-status-switcher{grid-template-columns:1fr}
  .work-card-foot.compact,.work-card-foot.compact .connection-actions{display:grid!important;grid-template-columns:1fr}
  .clean-list-item .top{display:grid;grid-template-columns:1fr}
  .notes-cell{max-width:none}
}

/* === Minimal Professional Theme Refresh === */
:root{
  --bg:#f5f7fb;
  --bg-soft:#eef2f7;
  --panel:#ffffff;
  --panel-2:#f8fafc;
  --line:#e5eaf2;
  --line-strong:#d7dee8;
  --text:#0f172a;
  --muted:#64748b;
  --primary:#111827;
  --primary-2:#334155;
  --success:#15803d;
  --warning:#b45309;
  --danger:#b91c1c;
  --info:#2563eb;
  --shadow:0 10px 30px rgba(15,23,42,.05);
  --shadow-lg:0 20px 45px rgba(15,23,42,.08);
  --radius:18px;
  --radius-sm:14px;
}
html,body{font-family:Inter,Arial,sans-serif;background:linear-gradient(180deg,#f8fafc 0%,#f3f6fb 100%);color:var(--text)}
body.app-shell{background:linear-gradient(180deg,#f7f9fc 0%,#f2f5fa 100%)}
a{transition:color .18s ease,opacity .18s ease}
a:hover{opacity:.92}
.sidebar{--sidebar-width:274px;background:#ffffff;color:var(--text);border-right:1px solid var(--line);padding:20px;box-shadow:none}
.brand{padding:8px 4px 12px;border-bottom:1px solid var(--line)}
.brand-badge{width:42px;height:42px;border-radius:12px;background:#111827;color:#fff;font-size:13px;letter-spacing:.08em}
.brand-title{font-size:16px;letter-spacing:.04em}
.brand-sub{font-size:12px;color:var(--muted)}
.nav{gap:4px;padding-right:2px;padding-top:6px}
.nav-section-label{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#94a3b8;padding:14px 12px 6px}
.nav-link{display:flex;align-items:center;justify-content:space-between;padding:11px 12px;border-radius:12px;color:#334155;font-size:14px;font-weight:600}
.nav-link:hover{background:#f8fafc;color:#0f172a}
.nav-link.active{background:#111827;color:#fff;box-shadow:none}
.nav-notify{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:rgba(255,255,255,.16);font-size:11px}
.sidebar-foot{border-top:1px solid var(--line);padding-top:14px;background:transparent}
.user-mini{background:#f8fafc;border:1px solid var(--line);border-radius:16px}
.avatar{background:#e2e8f0;color:#0f172a}
.user-role{color:var(--muted)}
.btn-dark{background:#111827;color:#fff;border:1px solid #111827}
.main{margin-left:274px;padding:28px 28px 40px;background:transparent}
.topbar{position:sticky;top:0;z-index:15;background:rgba(247,249,252,.9);backdrop-filter:blur(10px);border:0;border-radius:0;padding:0 0 18px;margin:0 0 22px;box-shadow:none}
.topbar h1{font-size:28px;font-weight:800;letter-spacing:-.03em;margin-bottom:8px}
.topbar p{max-width:72ch;line-height:1.6;font-size:14px;color:var(--muted)}
.card,.platform-card,.readiness-card,.connection-card,.admin-data-card,.transaction-card,.summary-chip,.info-tile,.compact-account-item,.compact-inline-item,.compact-platform-card,.client-choice-card,.work-card,.platform-section{background:#fff;border:1px solid var(--line);box-shadow:var(--shadow);border-radius:18px}
.card,.platform-card,.readiness-card,.connection-card,.admin-data-card,.transaction-card,.platform-section{padding:20px}
.card::after,.platform-card::after,.readiness-card::after{display:none}
.card-head,.card-header{margin-bottom:18px}
.card-head h3,.card-header h2{font-size:18px;letter-spacing:-.02em}
.metric .meta,.mini .meta,.summary-chip span,.compact-inline-item span,.compact-account-item span,.info-tile span,.compact-platform-meta span,.kv-grid span{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:#94a3b8}
.metric .value{font-size:32px;font-weight:800}
.metric .value.sm,.mini .value.sm,.summary-chip strong,.compact-inline-item strong,.compact-account-item strong,.platform-main-value,.metric-lg{font-size:24px;font-weight:800;letter-spacing:-.03em}
.metric .sub,.muted,.page-note,.compact-platform-meta span strong+text{line-height:1.6}
.section-hero,.report-hero-card,.balance-hero-card{background:linear-gradient(180deg,#ffffff 0%,#fbfcfe 100%);border:1px solid var(--line);box-shadow:var(--shadow-lg)}
.summary-chip-grid,.compact-inline-grid,.compact-account-grid,.client-dashboard-stats-row,.compact-platform-grid,.work-board-summary-grid{gap:14px}
.summary-chip,.compact-inline-item,.compact-account-item,.info-tile{padding:16px 18px;background:#fff}
.btn{border-radius:12px;padding:10px 14px;font-weight:700;border:1px solid transparent;box-shadow:none;transition:transform .15s ease,background .18s ease,border-color .18s ease,color .18s ease}
.btn:hover{transform:translateY(-1px)}
.btn-primary{background:#111827;border-color:#111827;color:#fff}
.btn-primary:hover{background:#0b1220}
.btn-secondary{background:#fff;border-color:var(--line-strong);color:#0f172a}
.btn-secondary:hover{background:#f8fafc}
.btn-danger{background:#fff;color:var(--danger);border-color:#fecaca}
.btn-danger:hover{background:#fef2f2}
.btn-small{padding:8px 11px;border-radius:10px}
input,select,textarea{padding:11px 13px;border-radius:12px;border:1px solid var(--line-strong);background:#fff;transition:border-color .18s ease,box-shadow .18s ease,background .18s ease}
input:focus,select:focus,textarea:focus{outline:none;border-color:#94a3b8;box-shadow:0 0 0 4px rgba(148,163,184,.12)}
label{font-size:13px;color:#475569;font-weight:600}
.toolbar-filters,.filter-toolbar,.work-board-filter-bar{display:grid;grid-template-columns:minmax(280px,2fr) minmax(180px,1fr) auto auto auto;gap:10px;align-items:end;padding:0;background:transparent;border:0;border-radius:0}
.work-inline-filter{min-width:0}
.work-inline-filter input,.work-inline-filter select{width:100%}
.work-status-switcher{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:18px}
.work-status-tab{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:13px 14px;border-radius:14px;border:1px solid var(--line);background:#fff;color:#0f172a;font-weight:700}
.work-status-tab:hover{background:#f8fafc}
.work-status-tab.is-active{background:#111827;border-color:#111827;color:#fff}
.work-status-tab .badge{margin-left:auto}
.work-card-grid,.platform-card-grid,.client-dashboard-grid,.client-info-grid{gap:14px}
.work-card{padding:0;overflow:hidden}
.work-card-header{padding:16px 16px 12px;background:#f8fafc;border-bottom:1px solid var(--line)}
.work-card-body{padding:16px}
.work-card-actions,.board-item-actions,.button-row,.actions,.connection-actions,.topbar-right,.form-actions{display:flex;flex-wrap:wrap;gap:8px}
.badge{padding:6px 10px;border-radius:999px;font-size:11px;letter-spacing:.06em;text-transform:uppercase}
.badge.info{background:#eff6ff;color:#1d4ed8}
.badge.success{background:#ecfdf3;color:#15803d}
.badge.warning{background:#fff7ed;color:#b45309}
.badge.danger{background:#fef2f2;color:#b91c1c}
.badge.muted{background:#f1f5f9;color:#475569}
.badge-soft-light{background:rgba(255,255,255,.9);color:#0f172a;border:1px solid rgba(148,163,184,.25)}
.table-wrap{border-radius:16px;border:1px solid var(--line);background:#fff;box-shadow:none}
table{min-width:760px}
th,td{padding:13px 14px;border-bottom:1px solid #edf2f7}
th{background:#f8fafc;color:#64748b;font-size:12px;letter-spacing:.06em;text-transform:uppercase}
tbody tr:hover td{background:#fbfdff}
.callout,.page-note{background:#f8fafc;border:1px solid var(--line);color:#475569;border-radius:16px}
.page-note.danger{background:#fef2f2;border-color:#fecaca;color:#991b1b}
.alert{border-radius:14px;padding:13px 15px;border:1px solid transparent;font-size:14px}
.alert.success{background:#ecfdf3;border-color:#bbf7d0;color:#166534}
.alert.danger{background:#fef2f2;border-color:#fecaca;color:#991b1b}
.auth-wrap{background:linear-gradient(180deg,#f8fafc 0%,#eef2f7 100%)}
.glass{background:rgba(255,255,255,.92);border:1px solid var(--line);box-shadow:var(--shadow-lg);backdrop-filter:blur(12px);border-radius:24px}
.auth-card{padding:34px 32px}
.auth-card h1{font-size:34px;letter-spacing:-.04em}
.auth-card .pill{background:#111827;color:#fff;font-size:11px;letter-spacing:.08em;text-transform:uppercase}
.mobile-toolbar{background:#fff;color:#0f172a;border-bottom:1px solid var(--line)}
.mobile-nav-toggle{background:#fff;color:#111827;border:1px solid var(--line-strong)}
.sidebar-backdrop{background:rgba(15,23,42,.32)}
@media (max-width: 1280px){
  .toolbar-filters,.filter-toolbar,.work-board-filter-bar{grid-template-columns:minmax(220px,1.5fr) minmax(180px,1fr) auto auto auto}
}
@media (max-width: 1080px){
  .sidebar{--sidebar-width:250px}
  .main{margin-left:250px;padding:24px}
  .work-status-switcher{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 920px){
  .sidebar{background:#fff;border-right:1px solid var(--line);box-shadow:0 22px 50px rgba(15,23,42,.12)}
  .main{margin-left:0;padding:18px 18px 28px}
  .topbar{padding-bottom:14px;margin-bottom:18px}
}
@media (max-width: 760px){
  .toolbar-filters,.filter-toolbar,.work-board-filter-bar{grid-template-columns:1fr}
  .toolbar-filters .btn,.filter-toolbar .btn,.work-board-filter-bar .btn{width:100%}
  .work-status-switcher{grid-template-columns:1fr}
  .summary-chip-grid,.compact-inline-grid,.compact-account-grid,.client-dashboard-stats-row,.compact-platform-grid{grid-template-columns:1fr!important}
  .card,.platform-card,.readiness-card,.connection-card,.admin-data-card,.transaction-card,.platform-section{padding:16px}
  .topbar h1{font-size:24px}
  .auth-card{padding:28px 22px}
}

/* === 2026 Professional Minimal Redesign Override === */
:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-2: #f7f9fc;
  --line: #e6ebf2;
  --line-strong: #d7dfeb;
  --text: #182132;
  --muted: #6d7890;
  --primary: #1f4ed8;
  --primary-2: #315ee7;
  --primary-soft: #eef4ff;
  --success: #0f9f6e;
  --warning: #b7791f;
  --danger: #cf3f4f;
  --info: #2563eb;
  --shadow: 0 10px 30px rgba(15, 23, 42, .06);
  --shadow-lg: 0 22px 60px rgba(15, 23, 42, .10);
  --radius: 20px;
  --radius-sm: 14px;
}
html, body {
  background:
    radial-gradient(circle at top left, rgba(31, 78, 216, .05), transparent 22%),
    radial-gradient(circle at right 20%, rgba(49, 94, 231, .04), transparent 24%),
    linear-gradient(180deg, #f8fafc 0%, #f4f7fb 100%);
  color: var(--text);
}
body.app-shell { overflow: hidden; }
.mobile-toolbar {
  background: rgba(255,255,255,.95);
  color: var(--text);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.mobile-nav-toggle {
  border-color: var(--line);
  background: var(--panel);
  color: var(--text);
  box-shadow: var(--shadow);
}
.sidebar {
  --sidebar-width: 302px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: var(--text);
  border-right: 1px solid var(--line);
  box-shadow: 6px 0 28px rgba(15, 23, 42, .04);
}
.brand {
  padding: 8px 4px 16px;
  border-bottom: 1px solid var(--line);
}
.brand-badge {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: linear-gradient(135deg, #0f172a, #1f4ed8);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
.brand-title { font-size: 18px; letter-spacing: -.02em; }
.brand-sub { color: var(--muted); }
.nav-section-label {
  margin-top: 10px;
  padding: 10px 12px 4px;
  color: #8a94a8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid transparent;
  color: #44506a;
  font-weight: 600;
}
.nav-link:hover {
  background: #f8faff;
  border-color: var(--line);
  color: var(--text);
}
.nav-link.active {
  background: linear-gradient(180deg, #eef4ff, #f8fbff);
  border-color: #d8e4ff;
  color: #14326e;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}
.nav-notify {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 11px;
}
.sidebar-foot {
  background: linear-gradient(180deg, rgba(248,250,252,0) 0%, rgba(248,250,252,.96) 18%);
  border-top-color: var(--line);
}
.user-mini {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.avatar {
  background: linear-gradient(135deg, #eef4ff, #e8efff);
  color: #17336d;
  border: 1px solid #d9e5ff;
}
.btn-dark {
  background: #0f172a;
  color: #fff;
}
.main {
  margin-left: 302px;
  padding: 28px 28px 40px;
  background: transparent;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 18;
  margin: -6px 0 22px;
  padding: 14px 0 18px;
  background: linear-gradient(180deg, rgba(245,247,251,.96) 0%, rgba(245,247,251,.90) 72%, rgba(245,247,251,0) 100%);
  backdrop-filter: blur(10px);
}
.topbar-heading { max-width: 820px; }
.eyebrow-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: #264b9b;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.topbar h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.1;
  letter-spacing: -.03em;
}
.topbar p {
  margin-top: 10px;
  max-width: 760px;
  line-height: 1.65;
}
.topbar-right { justify-content: flex-end; }
.topbar-stat {
  min-width: 168px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.88);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.topbar-stat span {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #8b95aa;
  margin-bottom: 6px;
  font-weight: 800;
}
.topbar-stat strong {
  display: block;
  font-size: 15px;
  color: var(--text);
}
.card,
.app-modal-dialog,
.auth-card,
.transaction-card,
.clean-list-item,
.work-card,
.info-tile,
.compact-summary-card,
.compact-insight-card,
.platform-card,
.compact-platform-card,
.modern-platform-card,
.dashboard-kpi-card,
.client-hero-card,
.client-platform-card,
.balance-hero-card,
.report-hero-card,
.stat-card,
.runtime-check-item {
  background: rgba(255,255,255,.94);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.card,
.auth-card,
.report-hero-card,
.platform-card,
.work-card,
.app-modal-dialog {
  border-radius: 22px;
}
.card-head,
.card-header,
.section-title-row,
.section-head,
.compact-heading-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.card-head h2,
.card-head h3,
.card-header h2,
.card-header h3,
.section-title-row h2,
.section-title-row h3,
.section-head h2,
.section-head h3,
.compact-heading-row h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.02em;
}
.card-head p,
.card-header p { margin: 6px 0 0; }
.metric .meta,
.mini .meta,
.meta,
small,
.muted,
small.muted,
.tiny,
.mini-text,
.field-help { color: var(--muted); }
.metric .value,
.value,
.compact-summary-card strong,
.info-tile strong,
.dashboard-kpi-card .value,
.premium-metric .value {
  letter-spacing: -.03em;
}
.metric .value,
.value { font-weight: 800; }
.clean-kpi-grid,
.metrics-grid,
.summary-chip-grid,
.compact-summary-grid,
.info-grid,
.work-board-summary-grid,
.platform-card-grid,
.client-platform-card-grid,
.compact-platform-grid,
.compact-report-kpis {
  gap: 16px;
}
.metrics-grid,
.clean-kpi-grid,
.compact-report-kpis,
.compact-summary-grid,
.summary-chip-grid,
.info-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.dashboard-main-grid,
.two-col,
.clean-two-col,
.client-dashboard-grid {
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, .95fr);
  gap: 18px;
}
.three-col { gap: 18px; }
.pill,
.badge,
.summary-chip,
.hero-pill,
.filter-chip {
  border-radius: 999px;
  font-weight: 700;
}
.pill,
.filter-chip,
.summary-chip,
.hero-pill {
  background: #f6f8fc;
  border: 1px solid var(--line);
  color: #46546f;
}
.badge.success { background: rgba(15,159,110,.10); }
.badge.warning { background: rgba(183,121,31,.12); }
.badge.danger { background: rgba(207,63,79,.10); }
.badge.info { background: rgba(37,99,235,.10); }
.btn {
  min-height: 44px;
  border-radius: 14px;
  padding: 11px 16px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(180deg, var(--primary-2), var(--primary));
  box-shadow: 0 10px 24px rgba(31, 78, 216, .18);
}
.btn-secondary {
  background: #fff;
  color: #20304e;
  border-color: var(--line-strong);
}
.btn-warning {
  background: rgba(183,121,31,.12);
  color: #965d13;
  border: 1px solid rgba(183,121,31,.16);
}
.btn-danger {
  background: rgba(207,63,79,.10);
  color: var(--danger);
  border-color: rgba(207,63,79,.16);
}
.btn-small {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 12px;
}
input,
select,
textarea {
  min-height: 46px;
  border-radius: 14px;
  border-color: var(--line-strong);
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, .02);
}
textarea { min-height: 120px; }
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #9cb8ff;
  box-shadow: 0 0 0 4px rgba(49, 94, 231, .10);
}
label > span:first-child,
label .label,
.form-grid label span:first-child {
  color: #4b5872;
  font-size: 13px;
  font-weight: 700;
}
.toolbar-filters,
.filter-toolbar,
.report-toolbar,
.dashboard-filter-toolbar,
.work-board-filter-bar,
.work-inline-filter,
.connection-actions,
.button-row,
.sticky-actions,
.toolbar-inline-danger {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar-filters,
.filter-toolbar,
.report-toolbar,
.dashboard-filter-toolbar,
.work-board-filter-bar {
  padding: 14px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid var(--line);
}
.file-input-inline {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.file-input-inline input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}
table { min-width: 100%; }
thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #5d6981;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
tbody tr:hover { background: #fafcff; }
th, td { padding: 15px 14px; border-bottom-color: #edf1f7; }
.notes-cell,
code,
pre,
.code-block,
.compact-json {
  word-break: break-word;
}
.code-block,
.compact-json,
.prose-doc pre {
  background: #0f172a;
  color: #e5efff;
  border-radius: 18px;
  padding: 18px;
}
.info-grid.compact,
.compact-inline-grid,
.compact-inline-grid-5,
.compact-account-grid,
.client-info-grid,
.platform-meta-grid,
.compact-platform-meta-grid,
.hero-inline-stats {
  display: grid;
  gap: 12px;
}
.info-tile,
.compact-summary-card,
.compact-inline-item,
.compact-account-item,
.summary-chip,
.dashboard-kpi-card,
.mini-stat {
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #fbfcfe);
  border: 1px solid var(--line);
}
.info-tile span,
.compact-summary-card span,
.compact-inline-item span,
.compact-account-item span,
.mini-stat span,
.platform-meta-grid span,
.client-info-grid span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: #78839a;
  text-transform: uppercase;
}
.info-tile strong,
.compact-summary-card strong,
.compact-inline-item strong,
.compact-account-item strong,
.mini-stat strong,
.platform-meta-grid strong,
.client-info-grid strong {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
}
.compact-summary-card small,
.info-tile small,
.compact-inline-item small,
.mini-stat small { color: var(--muted); }
.section-hero,
.report-hero-card,
.client-hero-card,
.balance-hero-card,
.compact-hero,
.compact-report-hero {
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(49, 94, 231, .08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}
.report-pill-row,
.filter-chips,
.pill-stack,
.hero-actions-stack {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.platform-card,
.compact-platform-card,
.client-platform-card,
.modern-platform-card,
.work-card {
  padding: 18px;
}
.platform-card-head,
.work-card-header,
.work-status-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.platform-card h4,
.work-card-headline,
.work-card-header h4,
.work-card-header h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.02em;
}
.platform-card-head p,
.platform-card-subtitle,
.work-card-meta-tight,
.work-card-group,
.work-card-order,
.work-full-meta { color: var(--muted); }
.platform-main-value,
.work-card .value,
.work-card strong {
  font-size: clamp(28px, 2.4vw, 34px);
  font-weight: 800;
  line-height: 1.1;
}
.platform-main-value.small.compact { font-size: 26px; }
.platform-meta-grid,
.client-info-grid,
.compact-platform-meta-grid,
.compact-inline-grid,
.compact-inline-grid-5 {
  grid-template-columns: repeat(3, minmax(0,1fr));
}
.compact-inline-grid-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.work-board-grid-shell,
.work-card-grid,
.work-card-grid-status {
  display: grid;
  gap: 16px;
}
.work-board-grid-shell,
.work-card-grid-status { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.work-status-switcher {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.work-status-tab {
  min-height: 54px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: #44506a;
  font-weight: 700;
}
.work-status-tab.is-active {
  background: linear-gradient(180deg, #eef4ff, #f9fbff);
  border-color: #d7e3ff;
  color: #15367a;
}
.work-card-foot,
.compact-actions,
.actions,
.inline-form,
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.list-row,
.clean-list-item,
.transaction-card {
  border-radius: 18px;
}
.list-row {
  padding: 14px 2px;
  border-bottom-color: #edf1f7;
}
.transaction-card,
.clean-list-item {
  padding: 16px;
  border: 1px solid var(--line);
  background: #fff;
}
.transaction-card-list,
.clean-list,
.stack-list {
  display: grid;
  gap: 12px;
}
.transaction-card-top,
.transaction-card-bottom,
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.page-note,
.callout {
  padding: 16px 18px;
  border-radius: 18px;
  background: #f8fafc;
  border: 1px solid var(--line);
}
.page-note.danger {
  background: rgba(207,63,79,.04);
  border-color: rgba(207,63,79,.14);
}
.auth-wrap {
  background:
    radial-gradient(circle at top left, rgba(31, 78, 216, .12), transparent 28%),
    radial-gradient(circle at 80% 20%, rgba(49, 94, 231, .08), transparent 22%),
    linear-gradient(180deg, #f6f8fc, #eef3f9);
}
.auth-card {
  width: min(520px, 100%);
  padding: 34px;
}
.auth-card h1 {
  font-size: clamp(34px, 5vw, 44px);
  letter-spacing: -.04em;
}
.auth-card .pill {
  background: var(--primary-soft);
  color: #204697;
  border-color: #d8e4ff;
}
.app-modal-backdrop {
  background: rgba(15, 23, 42, .44);
  backdrop-filter: blur(5px);
}
.app-modal-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.app-modal-body { max-height: min(76vh, 900px); overflow: auto; }
.pagination-row { display: flex; gap: 8px; flex-wrap: wrap; }
.desktop-only { display: block; }
.mobile-only { display: none; }
@media (max-width: 1280px) {
  .metrics-grid,
  .clean-kpi-grid,
  .compact-summary-grid,
  .info-grid,
  .summary-chip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-board-grid-shell,
  .work-card-grid-status,
  .platform-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-inline-grid-5,
  .platform-meta-grid,
  .client-info-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 920px) {
  .sidebar {
    width: min(320px, 90vw);
    height: calc(100vh - 58px);
    box-shadow: var(--shadow-lg);
  }
  .main {
    margin-left: 0;
    padding: 18px 16px 34px;
    height: calc(100vh - 58px);
  }
  .topbar {
    padding-top: 4px;
    margin-bottom: 16px;
  }
  .topbar-right {
    width: 100%;
    justify-content: flex-start;
  }
  .topbar-stat { min-width: 0; flex: 1 1 180px; }
  .dashboard-main-grid,
  .two-col,
  .clean-two-col,
  .client-dashboard-grid,
  .three-col,
  .work-board-grid-shell,
  .work-card-grid-status,
  .work-status-switcher,
  .platform-card-grid,
  .client-platform-card-grid,
  .compact-platform-grid,
  .platform-meta-grid,
  .compact-inline-grid,
  .compact-inline-grid-5,
  .client-info-grid,
  .compact-account-grid,
  .hero-inline-stats,
  .form-grid.two-up,
  .summary-chip-grid,
  .metrics-grid,
  .clean-kpi-grid,
  .compact-report-kpis,
  .compact-summary-grid,
  .info-grid { grid-template-columns: 1fr; }
  .desktop-only { display: none !important; }
  .mobile-only { display: block !important; }
  .toolbar-filters,
  .filter-toolbar,
  .report-toolbar,
  .dashboard-filter-toolbar,
  .work-board-filter-bar,
  .toolbar-inline-danger,
  .button-row,
  .sticky-actions,
  .actions,
  .form-actions,
  .section-title-row,
  .card-head,
  .card-header,
  .compact-heading-row,
  .work-card-header,
  .work-card-foot,
  .topbar,
  .transaction-card-top,
  .transaction-card-bottom,
  .top { flex-direction: column; align-items: stretch; }
  .toolbar-filters > *,
  .filter-toolbar > *,
  .report-toolbar > *,
  .dashboard-filter-toolbar > *,
  .work-board-filter-bar > *,
  .toolbar-inline-danger > * { width: 100%; }
  .file-input-inline,
  .file-input-inline .btn { width: 100%; }
}
@media (max-width: 640px) {
  .card,
  .report-hero-card,
  .platform-card,
  .work-card,
  .clean-list-item,
  .transaction-card,
  .auth-card { padding: 16px; border-radius: 18px; }
  .topbar h1 { font-size: 28px; }
  .eyebrow-label { margin-bottom: 8px; }
  th, td { padding: 12px 10px; }
}

/* === final vivid clean theme override === */
:root {
  --bg: #0a1630;
  --panel: #ffffff;
  --panel-2: #f3f8ff;
  --line: #d8e4f2;
  --text: #14233b;
  --muted: #6b7c93;
  --primary: #1d6fff;
  --primary-2: #06b6d4;
  --success: #0f9f6e;
  --warning: #d98a07;
  --danger: #d64545;
  --info: #2563eb;
  --shadow: 0 16px 44px rgba(19, 38, 74, .08);
  --radius: 20px;
}

html, body {
  background:
    radial-gradient(circle at top right, rgba(29,111,255,.08), transparent 28%),
    radial-gradient(circle at top left, rgba(6,182,212,.06), transparent 24%),
    linear-gradient(180deg, #f4f8fd 0%, #eef4fb 100%);
  color: var(--text);
}

body {
  background-attachment: fixed;
}

.sidebar {
  background: linear-gradient(180deg, #0b1830 0%, #12284a 52%, #183765 100%) !important;
  border-right: 1px solid rgba(255,255,255,.07);
}

.brand-badge {
  background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%) !important;
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(29,111,255,.28);
}

.brand-sub,
.user-role,
.nav-section-label {
  color: rgba(255,255,255,.72) !important;
}

.nav-link {
  color: rgba(255,255,255,.84) !important;
  border: 1px solid transparent;
}

.nav-link:hover {
  background: rgba(255,255,255,.1) !important;
  border-color: rgba(255,255,255,.08);
}

.nav-link.active {
  background: linear-gradient(135deg, rgba(59,130,246,.95), rgba(6,182,212,.9)) !important;
  color: #ffffff !important;
  border-color: rgba(255,255,255,.08);
  box-shadow: 0 12px 24px rgba(17, 95, 194, .26) !important;
}

.user-mini {
  background: rgba(255,255,255,.09) !important;
  border: 1px solid rgba(255,255,255,.08);
}

.avatar {
  background: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.08));
}

.topbar {
  background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(244,249,255,.95)) !important;
  border: 1px solid rgba(177, 201, 228, .8) !important;
  box-shadow: 0 18px 44px rgba(27, 59, 108, .08) !important;
}

.topbar h1,
.card-head h3,
.metric .value,
.mini .value,
.summary-chip strong,
.platform-main-value,
.metric-lg {
  color: #0f274f;
}

.card,
.platform-card,
.readiness-card,
.connection-card,
.admin-data-card,
.transaction-card,
.summary-chip,
.info-tile,
.compact-account-item,
.compact-inline-item,
.compact-platform-card,
.client-choice-card,
.work-card,
.platform-section,
.app-modal-dialog {
  border-color: rgba(199, 214, 232, .95) !important;
  box-shadow: 0 16px 40px rgba(26, 52, 91, .06) !important;
}

.card::after {
  background: linear-gradient(90deg, transparent, rgba(29,111,255,.22), transparent) !important;
}

.btn {
  transition: transform .16s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #1d6fff 0%, #06b6d4 100%) !important;
  color: #fff !important;
  box-shadow: 0 14px 28px rgba(29,111,255,.24);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #165fe0 0%, #0891b2 100%) !important;
  box-shadow: 0 18px 32px rgba(29,111,255,.28);
}

.btn-secondary,
.btn-dark {
  background: #f8fbff !important;
  color: #173154 !important;
  border: 1px solid #d7e5f4 !important;
}

.btn-danger {
  background: #fff4f4 !important;
  color: #c53434 !important;
  border: 1px solid #f3c9c9 !important;
}

input,
select,
textarea {
  background: #fbfdff;
  border-color: #d7e3f1;
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #6aa9ff;
  box-shadow: 0 0 0 4px rgba(29,111,255,.12);
  background: #ffffff;
}

.badge.info,
.hero-pill,
.summary-chip,
.compact-account-item,
.compact-inline-item {
  background: linear-gradient(180deg, #ffffff 0%, #f6fbff 100%) !important;
  color: #224266 !important;
  border-color: #d9e7f4 !important;
}

.badge.success {
  background: rgba(15,159,110,.12) !important;
  color: #0f8e63 !important;
}

.badge.warning {
  background: rgba(217,138,7,.12) !important;
  color: #bc7706 !important;
}

.badge.danger {
  background: rgba(214,69,69,.12) !important;
  color: #c63737 !important;
}

.badge.muted {
  background: rgba(107,124,147,.1) !important;
  color: #5f7088 !important;
}

.section-hero,
.report-hero-card,
.client-hero-card,
.compact-platform-card,
.client-balance-hero {
  background: linear-gradient(135deg, #f8fbff 0%, #eef7ff 100%) !important;
  border: 1px solid #d8e5f4 !important;
}

.client-hero-card,
.client-balance-hero {
  color: #13345d !important;
}

.client-hero-card .meta,
.client-hero-card .sub,
.client-balance-hero .meta,
.client-balance-hero .sub {
  color: #58718f !important;
}

.summary-chip,
.info-tile,
.mini-stat,
.compact-summary-card,
.explorer-summary-card,
.platform-meta-grid div,
.kv-grid div,
.compact-platform-meta div {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  border-color: #dbe6f3 !important;
}

.table-wrap,
.table-card,
table {
  background: transparent;
}

thead th {
  background: #f1f7ff !important;
  color: #365274;
}

tbody tr:hover td {
  background: #f8fbff !important;
}

.work-status-tab.active,
.work-status-pill.active {
  background: linear-gradient(135deg, #1d6fff 0%, #06b6d4 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 14px 28px rgba(29,111,255,.2);
}

.work-card-header {
  background: linear-gradient(135deg, #edf5ff 0%, #f6fbff 100%) !important;
  border-bottom: 1px solid #dce8f5 !important;
}

.work-card-header h4,
.work-card-group {
  color: #113761 !important;
}

.work-card .badge-soft-light {
  background: rgba(29,111,255,.08) !important;
  color: #1e4f8d !important;
  border-color: rgba(29,111,255,.14) !important;
}

.alert.success {
  background: linear-gradient(180deg, #effcf6 0%, #e8fbf3 100%);
}

.alert.error,
.alert.danger {
  background: linear-gradient(180deg, #fff4f4 0%, #fff0f0 100%);
  color: #c53434;
}

.alert.warning {
  background: linear-gradient(180deg, #fff8e9 0%, #fff4df 100%);
  color: #ad6f03;
}

.alert.info {
  background: linear-gradient(180deg, #eef6ff 0%, #e8f2ff 100%);
  color: #1f5fb8;
}

/* final premium palette unify */
:root {
  --bg: #07111f;
  --panel: #ffffff;
  --panel-2: #f4f8fd;
  --line: #d8e4f2;
  --text: #112033;
  --muted: #61748d;
  --primary: #2457ff;
  --primary-2: #5b3df5;
  --success: #0f9f78;
  --warning: #c78911;
  --danger: #d14343;
  --info: #1f7ae0;
  --accent-soft: #eef4ff;
  --accent-soft-2: #f5f8ff;
  --gold-soft: #fff6df;
  --gold-line: #f3df9f;
  --shadow: 0 18px 44px rgba(10, 23, 44, .08);
}

html, body {
  background:
    radial-gradient(circle at top left, rgba(36, 87, 255, .08), transparent 28%),
    radial-gradient(circle at bottom right, rgba(91, 61, 245, .06), transparent 24%),
    linear-gradient(180deg, #f4f8fc 0%, #edf3f9 100%);
  color: var(--text);
}

.sidebar,
.mobile-toolbar {
  background: linear-gradient(180deg, #081426 0%, #0e1d34 55%, #132746 100%) !important;
}

.brand-badge {
  background: linear-gradient(135deg, #2457ff 0%, #5b3df5 68%, #7b61ff 100%) !important;
  box-shadow: 0 12px 28px rgba(52, 85, 255, .30);
}

.brand-sub,
.user-role,
.nav-section-label {
  color: rgba(233, 241, 255, .62) !important;
}

.nav-link {
  color: rgba(239, 245, 255, .78) !important;
  border: 1px solid transparent;
}

.nav-link:hover {
  background: rgba(255, 255, 255, .08) !important;
  border-color: rgba(255, 255, 255, .07);
}

.nav-link.active {
  background: linear-gradient(135deg, rgba(36, 87, 255, .24), rgba(91, 61, 245, .24)) !important;
  border-color: rgba(131, 165, 255, .18) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 10px 24px rgba(0,0,0,.10);
}

.user-mini {
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.05)) !important;
  border: 1px solid rgba(255,255,255,.08);
}

.topbar {
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(247,250,255,.98)) !important;
  border: 1px solid #d9e6f2 !important;
  box-shadow: 0 14px 34px rgba(10, 23, 44, .06) !important;
}

.topbar h1,
.card-head h3,
.section-hero h3 {
  color: #10233b;
}

.topbar p,
.card-head .muted,
.muted,
small.muted,
.page-note {
  color: #60748d !important;
}

.card,
.platform-card,
.readiness-card,
.connection-card,
.admin-data-card,
.transaction-card,
.summary-chip,
.info-tile,
.mini-stat,
.compact-summary-card,
.explorer-summary-card,
.clean-list-item,
.work-card,
.work-board-card,
.app-modal-dialog {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
  border: 1px solid #dbe5f1 !important;
  box-shadow: 0 14px 34px rgba(10, 23, 44, .05) !important;
}

.card::after {
  background: linear-gradient(90deg, transparent, rgba(36, 87, 255, .20), transparent) !important;
}

.section-hero,
.report-hero-card,
.callout,
.page-note,
.filter-toolbar,
.toolbar-filters {
  background: linear-gradient(180deg, #f8fbff 0%, #f2f7ff 100%) !important;
  border: 1px solid #dce7f5 !important;
}

input,
select,
textarea {
  background: #ffffff !important;
  border: 1px solid #d7e2ef !important;
  color: #14243a !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #83a5ff !important;
  box-shadow: 0 0 0 4px rgba(36, 87, 255, .10) !important;
}

.btn {
  font-weight: 700;
}

.btn-primary {
  background: linear-gradient(135deg, #2457ff 0%, #5b3df5 68%, #7148ff 100%) !important;
  color: #ffffff !important;
  box-shadow: 0 14px 28px rgba(45, 86, 255, .22);
}

.btn-primary:hover {
  filter: saturate(1.04) brightness(1.02);
  transform: translateY(-1px);
}

.btn-secondary,
.btn-dark {
  background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%) !important;
  color: #173152 !important;
  border: 1px solid #d8e4f2 !important;
}

.btn-danger {
  background: linear-gradient(180deg, #fff6f6 0%, #fff1f1 100%) !important;
  color: #c23838 !important;
  border: 1px solid #f3c5c5 !important;
}

.badge,
.pill,
.filter-chip,
.hero-pill,
.compact-inline-item,
.compact-account-item {
  border: 1px solid transparent;
}

.badge.info,
.pill,
.filter-chip,
.hero-pill {
  background: #eef4ff !important;
  color: #21457d !important;
  border-color: #d8e4fb !important;
}

.badge.success {
  background: #eafaf4 !important;
  color: #0f8f6c !important;
  border-color: #cbeee0 !important;
}

.badge.warning {
  background: var(--gold-soft) !important;
  color: #a66a02 !important;
  border-color: var(--gold-line) !important;
}

.badge.danger {
  background: #fff1f1 !important;
  color: #c03a3a !important;
  border-color: #f0c8c8 !important;
}

.badge.muted {
  background: #f2f6fb !important;
  color: #64758b !important;
  border-color: #dde6f1 !important;
}

.filter-chip.active,
.platform-tab.active,
.work-status-tab.is-active,
.work-status-tab.active,
.work-status-pill.is-selected,
.work-status-pill.active {
  background: linear-gradient(135deg, #2457ff 0%, #5b3df5 72%, #6a44ff 100%) !important;
  color: #ffffff !important;
  border-color: transparent !important;
  box-shadow: 0 12px 24px rgba(45, 86, 255, .20) !important;
}

.table-wrap {
  border: 1px solid #dce6f2 !important;
  background: linear-gradient(180deg, #ffffff 0%, #fcfdff 100%) !important;
}

thead th,
table thead th {
  background: #f3f7fd !important;
  color: #58708e !important;
  border-bottom-color: #dbe5f1 !important;
}

tbody tr:nth-child(even) {
  background: rgba(90, 123, 168, .025);
}

tbody tr:hover td {
  background: #f7faff !important;
}

.summary-chip,
.info-tile,
.mini-stat,
.kv-grid div,
.platform-meta-grid div,
.compact-platform-card,
.client-choice-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  border-color: #dbe6f3 !important;
}

.client-hero-card,
.client-balance-hero {
  background: linear-gradient(135deg, #0f2140 0%, #15325e 55%, #1c4583 100%) !important;
  color: #ffffff !important;
  border-color: rgba(255,255,255,.08) !important;
  box-shadow: 0 18px 36px rgba(16, 41, 82, .22) !important;
}

.client-hero-card .meta,
.client-hero-card .sub,
.client-balance-hero .meta,
.client-balance-hero .sub {
  color: rgba(234, 242, 255, .78) !important;
}

.work-card {
  border-color: #d9e6f3 !important;
}

.work-card-header {
  background: linear-gradient(135deg, #edf4ff 0%, #f8fbff 100%) !important;
  border-bottom: 1px solid #dce7f4 !important;
}

.work-card-header h4,
.work-card-group {
  color: #14345b !important;
}

.work-card .badge-soft-light {
  background: rgba(36, 87, 255, .08) !important;
  color: #21467b !important;
  border-color: rgba(36, 87, 255, .14) !important;
}

.theme-ocean,
.theme-violet,
.theme-amber,
.theme-emerald,
.theme-rose,
.theme-slate {
  background: linear-gradient(135deg, #2457ff 0%, #5b3df5 72%, #764cff 100%) !important;
}

.alert.success {
  background: linear-gradient(180deg, #ecfbf5 0%, #e7faf1 100%) !important;
  color: #0d8f69 !important;
  border: 1px solid #cfeee2 !important;
}

.alert.warning {
  background: linear-gradient(180deg, #fff8e8 0%, #fff3df 100%) !important;
  color: #aa6b03 !important;
  border: 1px solid #f1dfaa !important;
}

.alert.danger,
.alert.error {
  background: linear-gradient(180deg, #fff5f5 0%, #fff0f0 100%) !important;
  color: #c23939 !important;
  border: 1px solid #f2cccc !important;
}

.alert.info {
  background: linear-gradient(180deg, #eef5ff 0%, #eaf2ff 100%) !important;
  color: #235fb4 !important;
  border: 1px solid #d2e3ff !important;
}

/* Final compact premium cleanup */
.topbar,
.filter-toolbar,
.toolbar-filters,
.connections-toolbar,
.section-hero,
.report-hero-card,
.page-note,
.callout {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  padding: 0 !important;
}

.topbar {
  margin-bottom: 18px !important;
  border-radius: 0 !important;
}

.topbar-right {
  gap: 8px !important;
}

.topbar-right .badge,
.topbar-right .pill,
.topbar-right .hero-pill {
  background: #ffffff !important;
  border: 1px solid #e4eaf3 !important;
  box-shadow: 0 2px 10px rgba(15,23,42,.04) !important;
  min-height: 56px;
  padding: 10px 16px !important;
}

input,
select,
textarea {
  min-height: 40px !important;
  height: 40px;
  padding: 8px 12px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
}

textarea {
  height: auto;
  min-height: 100px !important;
}

.btn {
  min-height: 40px !important;
  padding: 8px 14px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
}

.inline-check {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  align-self: center !important;
  min-height: 40px !important;
  padding: 0 !important;
  margin: 0 !important;
}

.inline-check input[type=checkbox] {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
}

.inline-check span {
  font-size: 14px !important;
  font-weight: 600;
  color: #475569;
}

.filter-toolbar label,
.toolbar-filters label,
.work-inline-filter {
  gap: 4px !important;
}

.filter-toolbar label span,
.toolbar-filters label span,
.work-inline-filter span,
label {
  font-size: 12px !important;
  line-height: 1.2;
}

.filter-toolbar {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: end !important;
  gap: 10px !important;
}

.filter-toolbar > *,
.toolbar-filters > * {
  min-width: 0;
}

.filter-toolbar input[type=date],
.filter-toolbar select,
.toolbar-filters input[type=date],
.toolbar-filters input[type=search],
.toolbar-filters select {
  flex: 0 1 auto !important;
}

.filter-toolbar input[type=date] {
  width: 140px !important;
}

.toolbar-filters input[type=search] {
  flex: 1 1 280px !important;
  min-width: 220px !important;
}

.toolbar-filters select {
  width: 120px !important;
}

.work-board-filter-bar {
  grid-template-columns: minmax(220px,1.7fr) minmax(150px,180px) auto auto auto !important;
  gap: 10px !important;
}

.card-head.wrap-mobile,
.section-title-row,
.connections-toolbar,
.balance-hero-top {
  gap: 12px !important;
}

.table-enhance-search {
  min-height: 38px !important;
  padding: 7px 11px !important;
}

.table-enhance-size select,
.dataTables_length select,
.dataTables_filter input {
  min-height: 36px !important;
  height: 36px !important;
  padding: 6px 10px !important;
}

@media (max-width: 920px) {
  .work-board-filter-bar,
  .filter-toolbar,
  .toolbar-filters {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  .filter-toolbar input[type=date],
  .toolbar-filters input[type=search],
  .toolbar-filters select {
    width: 100% !important;
    min-width: 0 !important;
  }

  .topbar-right .badge,
  .topbar-right .pill,
  .topbar-right .hero-pill {
    min-height: 0;
    width: auto;
  }
}

/* final topbar and sidebar color sync */
:root{
  --navy-1:#081426;
  --navy-2:#0e1d34;
  --navy-3:#132746;
  --navy-4:#19345d;
  --soft-white:rgba(255,255,255,.10);
  --soft-white-2:rgba(255,255,255,.16);
}

.sidebar,
.mobile-toolbar,
.topbar{
  background:linear-gradient(180deg,var(--navy-1) 0%, var(--navy-2) 58%, var(--navy-3) 100%) !important;
}

.topbar{
  border:1px solid rgba(255,255,255,.08) !important;
  border-radius:24px !important;
  padding:22px 24px !important;
  margin:0 0 22px !important;
  box-shadow:0 20px 46px rgba(7,17,31,.24) !important;
}

.topbar h1,
.topbar p,
.topbar .muted,
.topbar .page-note,
.topbar-heading,
.topbar-heading h1,
.topbar-heading p{
  color:#f4f8ff !important;
}

.topbar p{
  color:rgba(233,241,255,.74) !important;
}

.eyebrow-label{
  background:rgba(255,255,255,.10) !important;
  color:#dce8ff !important;
  border:1px solid rgba(255,255,255,.10) !important;
  box-shadow:none !important;
}

.topbar-stat{
  background:linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.08)) !important;
  border:1px solid rgba(255,255,255,.10) !important;
  box-shadow:none !important;
}

.topbar-stat span{
  color:rgba(220,232,255,.72) !important;
}

.topbar-stat strong{
  color:#ffffff !important;
}

.sidebar{
  border-right:1px solid rgba(255,255,255,.08) !important;
}

.user-mini{
  background:linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.07)) !important;
  border:1px solid rgba(255,255,255,.10) !important;
  box-shadow:none !important;
}

.avatar{
  background:rgba(7,17,31,.72) !important;
  color:#ffffff !important;
  border:1px solid rgba(255,255,255,.12) !important;
}

.user-name{
  color:#ffffff !important;
}

.user-role{
  color:rgba(220,232,255,.70) !important;
}

.sidebar .btn-dark{
  background:linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.08)) !important;
  color:#ffffff !important;
  border:1px solid rgba(255,255,255,.10) !important;
  box-shadow:none !important;
}

.sidebar .btn-dark:hover{
  background:linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.10)) !important;
  color:#ffffff !important;
}

@media (max-width: 860px){
  .topbar{
    padding:18px 18px 16px !important;
    border-radius:20px !important;
  }
}


/* premium sidebar user card color fix */
.sidebar-foot{
  background:transparent !important;
  border-top:1px solid rgba(255,255,255,.08) !important;
}

.user-mini{
  background:linear-gradient(180deg, rgba(43,98,214,.30), rgba(20,51,111,.46)) !important;
  border:1px solid rgba(122,162,255,.22) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.08), 0 10px 24px rgba(2,8,23,.22) !important;
}

.user-mini .avatar,
.avatar{
  background:linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.08)) !important;
  border:1px solid rgba(255,255,255,.18) !important;
  color:#ffffff !important;
}

.user-name{
  color:#eaf2ff !important;
}

.user-role{
  color:rgba(207,225,255,.78) !important;
}

.sidebar .btn-dark{
  background:linear-gradient(180deg, rgba(39,88,191,.96), rgba(24,56,128,.98)) !important;
  border:1px solid rgba(139,178,255,.22) !important;
  color:#f7fbff !important;
  box-shadow:0 10px 22px rgba(3,10,26,.24) !important;
}

.sidebar .btn-dark:hover{
  background:linear-gradient(180deg, rgba(52,108,227,.98), rgba(28,66,149,.98)) !important;
}


/* Work Board compact cleanup */
.work-board-control-card,
.work-board-grid-shell {
  padding: 16px !important;
}
.work-board-control-card .card-head,
.work-status-panel-head {
  margin-bottom: 12px !important;
}
.work-board-control-card h3,
.work-status-panel-head h3 {
  font-size: 18px !important;
}
.work-board-control-card .muted,
.work-status-panel-head .muted {
  font-size: 13px;
  line-height: 1.5;
}
.work-board-filter-bar {
  display: grid !important;
  grid-template-columns: minmax(320px, 1.8fr) minmax(180px, 220px) auto auto auto !important;
  gap: 10px !important;
  align-items: end !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
}
.work-inline-filter {
  gap: 4px !important;
  align-items: stretch !important;
}
.work-inline-filter > span {
  font-size: 12px !important;
  font-weight: 700;
  color: #5e6d87 !important;
  margin: 0 0 2px !important;
}
.work-inline-filter input[type="search"],
.work-inline-filter select,
.work-board-filter-bar .btn {
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
}
.work-inline-filter input[type="search"],
.work-inline-filter select {
  padding: 0 14px !important;
  font-size: 14px !important;
  border-radius: 14px !important;
}
.work-inline-filter input[type="search"] {
  width: 100% !important;
  appearance: none;
  -webkit-appearance: none;
}
.work-board-filter-bar .btn {
  padding: 0 16px !important;
  border-radius: 14px !important;
  font-size: 14px !important;
  white-space: nowrap;
}
.work-status-switcher {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin-top: 14px !important;
}
.work-status-tab {
  min-height: 48px !important;
  padding: 10px 12px !important;
  border-radius: 14px !important;
  font-size: 13px !important;
}
.work-status-tab strong {
  font-size: 14px !important;
}
.work-status-panel-head .badge,
.work-status-panel-head .btn {
  height: 38px;
  min-height: 38px;
}
.work-card-grid-status {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
}
.work-card {
  padding: 0 !important;
  border-radius: 18px !important;
  overflow: hidden;
}
.work-card-header {
  padding: 12px 14px !important;
  gap: 8px !important;
}
.work-card-headline {
  min-width: 0;
}
.work-card-group {
  font-size: 10px !important;
  letter-spacing: .08em !important;
  margin-bottom: 4px !important;
  word-break: normal !important;
  overflow-wrap: anywhere;
}
.work-card-header h4,
.work-card-headline h4 {
  font-size: 13px !important;
  line-height: 1.28 !important;
  letter-spacing: 0 !important;
  word-break: normal !important;
  overflow-wrap: anywhere;
}
.work-card .badge-soft-light,
.work-card-meta-tight .badge {
  font-size: 10px !important;
  padding: 6px 9px !important;
}
.work-card-meta-tight {
  padding: 10px 14px 0 !important;
}
.work-card-order {
  font-size: 12px !important;
}
.work-card-notes {
  padding: 8px 14px 0 !important;
  min-height: 60px !important;
  font-size: 12px !important;
  line-height: 1.6 !important;
  color: #334155 !important;
}
.work-card-foot.compact {
  padding: 10px 14px 14px !important;
  align-items: stretch !important;
  gap: 10px !important;
}
.work-card-foot.compact small {
  display: block;
  font-size: 12px !important;
  line-height: 1.5 !important;
}
.work-card-foot .connection-actions.compact-actions {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px !important;
  width: 100%;
}
.work-card-foot .connection-actions.compact-actions .btn {
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 10px !important;
  font-size: 13px !important;
  border-radius: 12px !important;
  justify-content: center;
}
@media (max-width: 1400px) {
  .work-card-grid-status {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 1080px) {
  .work-board-filter-bar {
    grid-template-columns: minmax(240px, 1fr) minmax(160px, 200px) auto auto auto !important;
  }
  .work-status-switcher {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .work-card-grid-status {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 760px) {
  .work-board-filter-bar,
  .work-card-foot .connection-actions.compact-actions {
    grid-template-columns: 1fr !important;
  }
  .work-status-switcher,
  .work-card-grid-status {
    grid-template-columns: 1fr !important;
  }
  .work-board-filter-bar > *,
  .work-card-foot .connection-actions.compact-actions .btn {
    width: 100% !important;
  }
}


/* Final polish: work board readability + compact report metrics */
.work-card-grid-status {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)) !important;
  align-items: start;
}
.work-status-panel {
  grid-column: 1 / -1;
}
.work-card,
.work-board-card {
  min-width: 0;
}
.work-card-header {
  display: grid !important;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 10px !important;
}
.work-card-headline {
  min-width: 0;
}
.work-card-group,
.work-card-header h4,
.work-card-headline h4 {
  word-break: keep-all !important;
  overflow-wrap: break-word !important;
  white-space: normal !important;
}
.work-card-group {
  font-size: 10px !important;
  line-height: 1.35 !important;
}
.work-card-header h4,
.work-card-headline h4 {
  font-size: 18px !important;
  line-height: 1.28 !important;
  max-width: 100%;
}
.work-card .badge-soft-light {
  align-self: start;
  white-space: nowrap;
}
.work-card-notes {
  min-height: 0 !important;
}
.work-card .value,
.work-card strong {
  font-size: inherit !important;
  line-height: inherit !important;
  font-weight: inherit !important;
}
.work-card-meta-tight .badge,
.work-card .badge-soft-light,
.work-card-order {
  font-size: 11px !important;
}
.work-card-foot .connection-actions.compact-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.work-card-foot .connection-actions.compact-actions .btn {
  font-size: 12px !important;
}

.reports-page .platform-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
}
.reports-page .platform-main-value,
.platform-main-value {
  font-size: clamp(18px, 1.6vw, 22px) !important;
  line-height: 1.2 !important;
}
.reports-page .platform-main-value.small,
.platform-main-value.small,
.platform-main-value.small.compact {
  font-size: clamp(17px, 1.45vw, 20px) !important;
}
.reports-page .platform-meta-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}
.reports-page .platform-meta-grid div,
.platform-meta-grid div {
  padding: 10px 12px !important;
}
.reports-page .platform-meta-grid strong,
.platform-meta-grid strong {
  display: block;
  font-size: clamp(14px, 1.25vw, 17px) !important;
  line-height: 1.28 !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
}
.reports-page .platform-card h4 {
  font-size: 15px !important;
}
.reports-page .platform-card-head p,
.reports-page .platform-card-subtitle {
  font-size: 12px !important;
  line-height: 1.45 !important;
}

@media (max-width: 1200px) {
  .work-card-grid-status {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) !important;
  }
}
@media (max-width: 760px) {
  .work-card-grid-status,
  .reports-page .platform-card-grid,
  .reports-page .platform-meta-grid {
    grid-template-columns: 1fr !important;
  }
  .work-card-header {
    grid-template-columns: 1fr !important;
  }
}

/* Final work board horizontal header + balanced metrics */
.work-card-grid-status {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
  gap: 16px !important;
}
.work-card {
  min-width: 0 !important;
}
.work-card-header {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 14px 16px !important;
}
.work-card-headline {
  display: flex !important;
  flex-direction: column !important;
  gap: 4px !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}
.work-card-group {
  display: inline-flex !important;
  align-items: center !important;
  width: auto !important;
  max-width: 100% !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.work-card-header h4,
.work-card-headline h4 {
  display: block !important;
  margin: 0 !important;
  font-size: 24px !important;
  font-weight: 800 !important;
  line-height: 1.12 !important;
  letter-spacing: -.02em !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: anywhere !important;
  color: inherit !important;
}
.work-card .badge-soft-light {
  flex: 0 0 auto !important;
  align-self: flex-start !important;
  border-radius: 999px !important;
  padding: 7px 10px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  letter-spacing: .08em !important;
  white-space: nowrap !important;
  border: 1px solid rgba(255,255,255,.2) !important;
  background: rgba(255,255,255,.18) !important;
  color: rgba(255,255,255,.96) !important;
}

/* Distinct premium header colors with safe contrast */
.work-card-header.theme-ocean {
  background: linear-gradient(135deg, #0f4c81 0%, #1570ef 55%, #33b1ff 100%) !important;
  color: #f8fbff !important;
}
.work-card-header.theme-violet {
  background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 55%, #8b5cf6 100%) !important;
  color: #faf7ff !important;
}
.work-card-header.theme-amber {
  background: linear-gradient(135deg, #92400e 0%, #c2410c 55%, #f59e0b 100%) !important;
  color: #fffaf2 !important;
}
.work-card-header.theme-emerald {
  background: linear-gradient(135deg, #065f46 0%, #0f766e 55%, #14b8a6 100%) !important;
  color: #f4fffd !important;
}
.work-card-header.theme-rose {
  background: linear-gradient(135deg, #9f1239 0%, #be185d 55%, #f43f5e 100%) !important;
  color: #fff7f9 !important;
}
.work-card-header.theme-slate {
  background: linear-gradient(135deg, #1e293b 0%, #334155 55%, #475569 100%) !important;
  color: #f8fafc !important;
}
.work-card-header.theme-ocean .work-card-group,
.work-card-header.theme-violet .work-card-group,
.work-card-header.theme-amber .work-card-group,
.work-card-header.theme-emerald .work-card-group,
.work-card-header.theme-rose .work-card-group,
.work-card-header.theme-slate .work-card-group {
  color: rgba(255,255,255,.76) !important;
}
.work-card-header.theme-amber .badge-soft-light {
  background: rgba(255,255,255,.24) !important;
  color: #fffdf8 !important;
}

/* Report metrics more balanced */
.reports-page .platform-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
}
.reports-page .platform-card {
  padding: 18px 18px 16px !important;
}
.reports-page .platform-card-head h4 {
  font-size: 15px !important;
}
.reports-page .platform-main-value,
.platform-main-value {
  font-size: clamp(16px, 1.3vw, 20px) !important;
  font-weight: 800 !important;
  line-height: 1.18 !important;
  letter-spacing: -.01em !important;
}
.reports-page .platform-main-value.small,
.platform-main-value.small,
.platform-main-value.small.compact {
  font-size: clamp(15px, 1.15vw, 18px) !important;
}
.reports-page .platform-meta-grid {
  gap: 10px !important;
}
.reports-page .platform-meta-grid div,
.platform-meta-grid div {
  padding: 10px 12px !important;
  border-radius: 14px !important;
}
.reports-page .platform-meta-grid span,
.platform-meta-grid span {
  display: block !important;
  margin-bottom: 6px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
}
.reports-page .platform-meta-grid strong,
.platform-meta-grid strong {
  font-size: clamp(13px, 1vw, 16px) !important;
  line-height: 1.22 !important;
  font-weight: 800 !important;
  word-break: keep-all !important;
  overflow-wrap: anywhere !important;
}

@media (max-width: 1280px) {
  .work-card-grid-status {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
  }
  .work-card-header h4,
  .work-card-headline h4 {
    font-size: 21px !important;
  }
}
@media (max-width: 760px) {
  .work-card-grid-status,
  .reports-page .platform-card-grid,
  .reports-page .platform-meta-grid {
    grid-template-columns: 1fr !important;
  }
  .work-card-header {
    flex-direction: column !important;
  }
  .work-card-header h4,
  .work-card-headline h4 {
    font-size: 18px !important;
  }
}

/* Work Board final polish: horizontal title/group and side-by-side priority grid */
.work-card{
  min-width:0;
}
.work-card-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.work-card-headline{
  min-width:0;
  flex:1 1 auto;
  display:flex;
  align-items:flex-start;
  gap:10px;
}
.work-card-group{
  flex:0 0 auto;
  font-size:11px;
  line-height:1.1;
  letter-spacing:.14em;
  text-transform:uppercase;
  font-weight:800;
  opacity:.9;
  max-width:110px;
  white-space:normal;
}
.work-card h4,
.work-board-card h4{
  flex:1 1 auto;
  min-width:0;
  font-size:15px !important;
  line-height:1.2 !important;
  letter-spacing:.01em;
  white-space:normal;
  word-break:normal;
  overflow-wrap:anywhere;
}
.work-card .badge-soft-light{
  flex:0 0 auto;
  align-self:flex-start;
}
.work-card-notes-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin-top:4px;
}
.work-card-note-item{
  min-height:40px;
  padding:9px 10px;
  border:1px solid rgba(191,211,245,.85);
  border-radius:12px;
  background:#f8fbff;
  font-size:12px;
  line-height:1.35;
  color:#1e355c;
  font-weight:600;
}
.work-card-notes{
  font-size:13px;
  line-height:1.45;
}
.work-card-grid.work-card-grid-status{
  grid-template-columns:repeat(auto-fit,minmax(290px,1fr));
  align-items:start;
}
@media (max-width: 760px){
  .work-card-headline{
    flex-direction:column;
    gap:6px;
  }
  .work-card-group{
    max-width:none;
  }
  .work-card-notes-grid{
    grid-template-columns:1fr;
  }
}

/* Final override: work board cards 4 across desktop, then wrap */
.work-status-panel{
  width:100% !important;
}
.work-card-grid.work-card-grid-status,
.work-card-grid-status{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  gap:18px !important;
  align-items:start !important;
  width:100% !important;
}
.work-card,
.work-board-card{
  width:100% !important;
  min-width:0 !important;
  max-width:none !important;
}
.work-card-header,
.work-board-card-header{
  padding:14px 16px !important;
}
.work-card-headline{
  display:flex !important;
  flex-direction:column !important;
  gap:4px !important;
  min-width:0 !important;
}
.work-card-group{
  display:block !important;
  margin:0 0 2px 0 !important;
  max-width:none !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
.work-card h4,
.work-board-card h4,
.work-card-headline h4{
  margin:0 !important;
  font-size:14px !important;
  line-height:1.3 !important;
  white-space:normal !important;
  word-break:normal !important;
  overflow-wrap:anywhere !important;
}
.work-card-notes-grid{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:10px !important;
  padding:0 16px !important;
  margin-top:2px !important;
}
.work-card-note-item{
  padding:10px 12px !important;
  min-height:44px !important;
}
.work-card-notes{
  padding:0 16px !important;
}
.work-card-meta-tight,
.work-card-foot.compact{
  padding-left:16px !important;
  padding-right:16px !important;
}
.work-card-foot .connection-actions.compact-actions{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:8px !important;
}
.platform-main-value,
.reports-page .platform-main-value{
  font-size:clamp(16px,1.25vw,20px) !important;
  line-height:1.22 !important;
}
.platform-meta-grid strong,
.reports-page .platform-meta-grid strong{
  font-size:clamp(13px,1.05vw,16px) !important;
  line-height:1.24 !important;
}
@media (max-width: 1380px){
  .work-card-grid.work-card-grid-status,
  .work-card-grid-status{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
}
@media (max-width: 1080px){
  .work-card-grid.work-card-grid-status,
  .work-card-grid-status{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }
}
@media (max-width: 760px){
  .work-card-grid.work-card-grid-status,
  .work-card-grid-status{
    grid-template-columns:1fr !important;
  }
  .work-card-notes-grid{
    grid-template-columns:1fr !important;
  }
}


/* 2026-04 responsive work board sizing fix */
.work-status-panel{
  width:100% !important;
}
.work-card-grid.work-card-grid-status,
.work-card-grid-status{
  display:grid !important;
  grid-template-columns:repeat(4, minmax(260px, 1fr)) !important;
  gap:20px !important;
  align-items:start !important;
  width:100% !important;
}
.work-card,
.work-board-card{
  width:100% !important;
  min-width:0 !important;
  max-width:none !important;
  overflow:hidden !important;
}
.work-card-header,
.work-board-card-header{
  padding:16px 18px !important;
  min-height:112px !important;
}
.work-card-headline{
  display:flex !important;
  flex-direction:column !important;
  align-items:flex-start !important;
  justify-content:flex-start !important;
  gap:6px !important;
  min-width:0 !important;
}
.work-card-group{
  display:block !important;
  margin:0 !important;
  max-width:100% !important;
  white-space:nowrap !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
}
.work-card h4,
.work-board-card h4,
.work-card-headline h4{
  width:100% !important;
  margin:0 !important;
  font-size:16px !important;
  line-height:1.28 !important;
  letter-spacing:.01em !important;
  word-break:normal !important;
  overflow-wrap:break-word !important;
  white-space:normal !important;
}
.work-card-meta-tight,
.work-card-foot.compact,
.work-card-notes,
.work-card-notes-grid{
  padding-left:18px !important;
  padding-right:18px !important;
}
.work-card-note-item{
  min-height:46px !important;
  padding:12px 14px !important;
  line-height:1.4 !important;
}
.work-card-foot .connection-actions.compact-actions{
  display:grid !important;
  grid-template-columns:repeat(3, minmax(0, 1fr)) !important;
  gap:10px !important;
}
.work-card-foot .connection-actions.compact-actions .btn{
  min-width:0 !important;
  white-space:nowrap !important;
}
.platform-main-value,
.reports-page .platform-main-value{
  font-size:clamp(14px, 1.6vw, 18px) !important;
  line-height:1.2 !important;
}
.platform-meta-grid strong,
.reports-page .platform-meta-grid strong{
  font-size:clamp(12px, 1.2vw, 15px) !important;
  line-height:1.22 !important;
}
@media (max-width: 1480px){
  .work-card-grid.work-card-grid-status,
  .work-card-grid-status{
    grid-template-columns:repeat(3, minmax(250px, 1fr)) !important;
  }
}
@media (max-width: 1180px){
  .work-card-grid.work-card-grid-status,
  .work-card-grid-status{
    grid-template-columns:repeat(2, minmax(250px, 1fr)) !important;
  }
}
@media (max-width: 760px){
  .work-card-grid.work-card-grid-status,
  .work-card-grid-status{
    grid-template-columns:1fr !important;
  }
  .work-card-header,
  .work-board-card-header{
    min-height:auto !important;
  }
  .work-card-foot .connection-actions.compact-actions,
  .work-card-notes-grid{
    grid-template-columns:1fr !important;
  }
}

/* reports polish */
.reports-page .clean-two-col{grid-template-columns:minmax(0,1.7fr) minmax(320px,1fr);align-items:start}
.reports-page .clean-two-col > .card{height:100%}
.reports-page .clean-two-col .card-head{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;align-items:start}
.reports-page .clean-two-col .card-head .muted{max-width:none}
.reports-page .platform-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:stretch}
.reports-page .platform-card{padding:18px 18px 16px;border-radius:20px;background:linear-gradient(180deg,#ffffff,#fbfdff);border:1px solid #dce7f5;box-shadow:0 10px 28px rgba(15,23,42,.04);min-height:100%}
.reports-page .platform-card-head{margin-bottom:12px;align-items:flex-start}
.reports-page .platform-card-head h4{font-size:16px;line-height:1.2;margin:0 0 2px}
.reports-page .platform-card-head p{margin:0;color:#64748b;font-size:13px}
.reports-page .platform-main-value{font-size:22px !important;line-height:1.2;letter-spacing:-.02em;margin:8px 0 12px;word-break:normal;overflow-wrap:anywhere}
.reports-page .muted.tiny{font-size:12px;line-height:1.45;margin-top:-2px}
.reports-page .platform-meta-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:14px}
.reports-page .platform-meta-grid > div{padding:12px 12px 11px;border-radius:14px;background:#f8fbff;border:1px solid #dbe7f7}
.reports-page .platform-meta-grid > div:last-child{grid-column:1 / -1}
.reports-page .platform-meta-grid span{font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:#6b7a90;margin-bottom:6px}
.reports-page .platform-meta-grid strong{display:block;font-size:16px;line-height:1.2;letter-spacing:-.01em;word-break:normal;overflow-wrap:anywhere}
.reports-page .stack-list.compact{display:grid;gap:10px}
.reports-page .list-row.compact{padding:12px 14px;border:1px solid #e3ebf7;border-radius:16px;background:#fbfdff}
@media (max-width: 1180px){
  .reports-page .clean-two-col{grid-template-columns:1fr}
  .reports-page .platform-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 760px){
  .reports-page .platform-card-grid{grid-template-columns:1fr}
  .reports-page .platform-main-value{font-size:20px !important}
  .reports-page .platform-meta-grid{grid-template-columns:1fr}
  .reports-page .platform-meta-grid > div:last-child{grid-column:auto}
}


/* hard-clean final: reports + currency differentiation */
.reports-page .platform-card-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.reports-page .platform-card{padding:18px;gap:12px}
.reports-page .platform-main-value.small.compact{font-size:20px!important;line-height:1.18!important;letter-spacing:-.01em}
.reports-page .platform-meta-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:2px}
.reports-page .platform-meta-grid div{padding:12px 13px}
.currency-badge{display:inline-flex;align-items:center;justify-content:center;min-width:56px;padding:6px 10px;border-radius:999px;font-size:11px;font-weight:800;letter-spacing:.12em}
.currency-badge.currency-idr{background:#e8f7ee;color:#136c3f;border:1px solid #b9e7c9}
.currency-badge.currency-usd{background:#eef4ff;color:#1f4fd1;border:1px solid #c8d8ff}
.currency-card.currency-idr{background:linear-gradient(180deg,#ffffff 0%,#f8fcf9 100%)}
.currency-card.currency-usd{background:linear-gradient(180deg,#ffffff 0%,#f7faff 100%)}
.secondary-currency-row{padding-top:2px;font-size:12px}
.currency-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.currency-summary-card{border:1px solid var(--line);border-radius:18px;padding:18px;background:#fff;display:grid;gap:12px}
.currency-summary-card.currency-idr{background:linear-gradient(180deg,#fbfffc 0%,#f5fbf7 100%)}
.currency-summary-card.currency-usd{background:linear-gradient(180deg,#fbfdff 0%,#f5f8ff 100%)}
.currency-summary-top{display:flex;align-items:center;justify-content:space-between;gap:12px}
.currency-summary-metric{font-size:24px;font-weight:800;line-height:1.15;color:#0f254d}
.currency-summary-list{display:grid;grid-template-columns:1fr;gap:10px}
.currency-summary-list div,.manual-finance-items div{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:10px 12px;border-radius:14px;background:#fff;border:1px solid #e8edf5}
.currency-summary-list span,.manual-finance-items span{font-size:12px;color:var(--muted);font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.currency-summary-list strong,.manual-finance-items strong{font-size:15px;line-height:1.25;text-align:right}
.manual-finance-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.manual-finance-card{border:1px solid var(--line);border-radius:18px;padding:16px;background:#fff;display:grid;gap:12px}
.manual-finance-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.manual-finance-items{display:grid;gap:10px}
.doc-pre{white-space:pre-wrap;line-height:1.55;font:500 13px/1.55 ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;color:#344054;background:#fafcff;border:1px solid #e7eef8;border-radius:16px;padding:14px}
@media (max-width:1100px){.reports-page .platform-card-grid,.manual-finance-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:760px){.currency-summary-grid,.reports-page .platform-card-grid,.manual-finance-grid,.reports-page .platform-meta-grid{grid-template-columns:1fr}}

/* reports polish: calmer hierarchy for client reports */
.reports-page .clean-two-col.compact-report-grid{align-items:start}
.reports-page .card-head h3{font-size:15px;font-weight:700;letter-spacing:-.01em}
.reports-page .card-head .muted{font-size:13px;line-height:1.55;max-width:52ch;color:#63708a}
.reports-page .platform-card-grid{gap:18px}
.reports-page .platform-card{padding:20px;border-radius:20px;background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);border:1px solid #dfe7f2;box-shadow:0 8px 24px rgba(15,37,77,.04)}
.reports-page .currency-card.currency-idr{background:linear-gradient(180deg,#ffffff 0%,#fbfefb 100%)}
.reports-page .currency-card.currency-usd{background:linear-gradient(180deg,#ffffff 0%,#fbfcff 100%)}
.reports-page .platform-card-head{align-items:center;margin-bottom:4px}
.reports-page .platform-card-head h4{font-size:15px;font-weight:700;margin:0 0 3px;color:#0f254d}
.reports-page .platform-card-head p{font-size:12px;color:#6c7a92}
.reports-page .currency-badge{padding:7px 12px;border-radius:999px;font-size:11px;font-weight:700;letter-spacing:.08em}
.reports-page .platform-main-value,.reports-page .platform-main-value.small,.reports-page .platform-main-value.small.compact{font-size:19px!important;font-weight:800;line-height:1.28;letter-spacing:-.015em;margin:6px 0 8px;color:#10284f}
.reports-page .secondary-currency-row{font-size:12px;line-height:1.5;color:#6c7a92;margin-top:-2px}
.reports-page .platform-meta-grid,.reports-page .compact-platform-meta-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:8px}
.reports-page .platform-meta-grid > div,.reports-page .compact-platform-meta-grid > div{padding:13px 14px;border-radius:16px;background:#ffffff;border:1px solid #e4ebf5;box-shadow:inset 0 1px 0 rgba(255,255,255,.7)}
.reports-page .platform-meta-grid > div:last-child,.reports-page .compact-platform-meta-grid > div:last-child{grid-column:1/-1}
.reports-page .platform-meta-grid span,.reports-page .compact-platform-meta-grid span{font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:#7c88a0;margin-bottom:7px}
.reports-page .platform-meta-grid strong,.reports-page .compact-platform-meta-grid strong{font-weight:inherit}
.reports-page .platform-meta-grid .subvalue,.reports-page .compact-platform-meta-grid .subvalue{font-size:15px;line-height:1.45;font-weight:600;color:#183153;letter-spacing:-.005em}
.reports-page .currency-summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.reports-page .currency-summary-card{padding:20px;border-radius:20px;border:1px solid #dfe7f2;box-shadow:0 8px 24px rgba(15,37,77,.04)}
.reports-page .currency-summary-card.currency-idr{background:linear-gradient(180deg,#f8fdf9 0%,#f3faf5 100%)}
.reports-page .currency-summary-card.currency-usd{background:linear-gradient(180deg,#f8fbff 0%,#f2f7ff 100%)}
.reports-page .currency-summary-top{align-items:center}
.reports-page .currency-summary-top strong{font-size:15px;font-weight:700;color:#142b4d}
.reports-page .currency-summary-metric{font-size:20px;font-weight:800;line-height:1.25;color:#10284f;letter-spacing:-.015em}
.reports-page .currency-summary-list{gap:10px}
.reports-page .currency-summary-list div{padding:12px 14px;border-radius:16px;background:rgba(255,255,255,.82);border:1px solid #e4ebf5}
.reports-page .currency-summary-list span{font-size:11px;font-weight:600;letter-spacing:.08em;color:#7c88a0}
.reports-page .currency-summary-list .subvalue{font-size:15px;font-weight:600;line-height:1.4;color:#183153;text-align:right}
@media (max-width: 1100px){
  .reports-page .currency-summary-grid,.reports-page .platform-card-grid{grid-template-columns:1fr}
}
@media (max-width: 760px){
  .reports-page .platform-meta-grid,.reports-page .compact-platform-meta-grid{grid-template-columns:1fr}
  .reports-page .platform-meta-grid > div:last-child,.reports-page .compact-platform-meta-grid > div:last-child{grid-column:auto}
  .reports-page .platform-card,.reports-page .currency-summary-card{padding:16px}
}


/* Admin transactions maintenance panel polish */
.admin-maintenance-panel{
  padding:22px 22px 18px !important;
  border-radius:22px !important;
  background:linear-gradient(180deg,#fffafb 0%,#fffdfd 100%) !important;
  border:1px solid #f5d8dd !important;
  box-shadow:0 10px 26px rgba(148,163,184,.08) !important;
}
.admin-maintenance-head{
  display:grid;
  grid-template-columns:minmax(0,1.4fr) minmax(320px,0.95fr);
  gap:22px;
  align-items:start;
}
.admin-maintenance-copy{
  padding:2px 2px 0;
}
.admin-maintenance-eyebrow{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-bottom:10px;
  padding:6px 10px;
  border-radius:999px;
  background:#fff;
  border:1px solid #f0d3d8;
  color:#b45309;
  font-size:11px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.admin-maintenance-copy strong{
  display:block;
  margin-bottom:10px;
  font-size:26px;
  line-height:1.2;
  color:#1e293b;
}
.admin-maintenance-copy .muted,
.admin-maintenance-note{
  max-width:72ch;
  font-size:14px;
  line-height:1.75;
  color:#64748b !important;
}
.admin-maintenance-actions{
  display:grid;
  gap:12px;
  justify-items:stretch;
}
.admin-maintenance-actions > .btn,
.admin-maintenance-form,
.admin-maintenance-form .btn,
.admin-file-picker{
  width:100%;
}
.admin-maintenance-form{
  display:grid;
  grid-template-columns:1fr;
  gap:12px;
  margin:0;
  padding:14px;
  border-radius:18px;
  background:rgba(255,255,255,.78);
  border:1px solid #edd5db;
}
.admin-maintenance-form.single-action{
  padding:0;
  background:transparent;
  border:0;
}
.admin-file-picker{
  display:block;
}
.admin-file-picker .btn{
  justify-content:center;
}
.admin-maintenance-actions > .btn,
.admin-maintenance-form .btn{
  min-height:44px;
  padding:11px 16px;
  border-radius:14px;
  font-weight:700;
}
.admin-maintenance-form .btn-warning{
  background:#fff7ed;
  border-color:#fdba74;
  color:#b45309;
}
.admin-maintenance-form .btn-warning:hover{
  background:#ffedd5;
}
.admin-maintenance-actions .btn-danger{
  background:#fff5f5;
  border-color:#fecaca;
  color:#dc2626;
}
.admin-maintenance-actions .btn-danger:hover{
  background:#fee2e2;
}
.admin-maintenance-note{
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid #f4dde1;
}
.admin-maintenance-grid{
  margin-top:18px !important;
  gap:14px !important;
  grid-template-columns:repeat(auto-fit,minmax(160px,1fr));
}
.admin-maintenance-grid .info-tile{
  padding:16px 18px;
  border-radius:18px;
  background:#ffffff;
  border:1px solid #e8edf5;
  box-shadow:0 6px 18px rgba(148,163,184,.06);
}
.admin-maintenance-grid .info-tile span{
  margin-bottom:10px;
  font-size:11px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#64748b;
}
.admin-maintenance-grid .info-tile strong{
  font-size:18px;
  line-height:1.1;
  color:#0f172a;
}
@media (max-width: 980px){
  .admin-maintenance-head{
    grid-template-columns:1fr;
  }
}
@media (max-width: 640px){
  .admin-maintenance-panel{
    padding:18px 16px 16px !important;
  }
  .admin-maintenance-copy strong{
    font-size:22px;
  }
  .admin-maintenance-actions,
  .admin-maintenance-form{
    gap:10px;
  }
  .admin-maintenance-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width: 480px){
  .admin-maintenance-grid{
    grid-template-columns:1fr;
  }
}


/* Reports polish: manual summary + 14 day trend */
.reports-page .manual-finance-grid{gap:18px;align-items:stretch}
.reports-page .manual-finance-grid > *{min-width:0}
.reports-page .manual-finance-card{padding:18px 18px 16px;border-radius:20px;background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);border:1px solid #dfe7f2;box-shadow:0 8px 22px rgba(15,37,77,.04);min-width:0;overflow:hidden}
.reports-page .manual-finance-head strong{font-size:16px;line-height:1.25;color:#0f254d}
.reports-page .manual-finance-items{display:grid;gap:12px;margin-top:2px}
.reports-page .manual-finance-items div{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:12px;padding:13px 14px;border-radius:16px;background:#fff;border:1px solid #e4ebf5;min-width:0}
.reports-page .manual-finance-items span{display:block;font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:#7c88a0;line-height:1.35}
.reports-page .manual-finance-items strong{display:block;font-size:17px;font-weight:700;line-height:1.28;color:#183153;text-align:right;letter-spacing:-.01em;white-space:normal;overflow-wrap:anywhere;word-break:normal;min-width:0}
.reports-page .manual-finance-card .muted.tiny{margin-top:2px;padding:0 4px 2px;font-size:12px;line-height:1.5}
.reports-page .stack-list.compact{gap:14px;padding-inline:6px}
.reports-page .report-trend-row{padding:15px 18px;border-radius:18px;background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);border:1px solid #e3ebf7;box-shadow:0 6px 18px rgba(15,37,77,.03);gap:18px;margin-inline:2px}
.reports-page .report-trend-main,.reports-page .report-trend-side{min-width:0}
.reports-page .report-trend-day{font-size:13px;font-weight:600;color:#63708a;margin-bottom:4px}
.reports-page .report-trend-gross strong{display:inline-block;font-size:18px;font-weight:800;line-height:1.3;color:#10284f;letter-spacing:-.01em}
.reports-page .report-trend-talents{margin-top:4px;padding-right:12px;line-height:1.45;overflow-wrap:anywhere}
.reports-page .report-trend-side{display:grid;justify-items:end;align-content:center;text-align:right;padding-left:14px}
.reports-page .report-trend-client{font-size:20px;font-weight:800;line-height:1.2;color:#10284f;letter-spacing:-.015em}
.reports-page .report-trend-side small{margin-top:5px;font-size:13px;line-height:1.45;color:#63708a}
@media (max-width:1100px){.reports-page .manual-finance-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:760px){.reports-page .manual-finance-grid{grid-template-columns:1fr}.reports-page .report-trend-row{padding:14px 14px;gap:12px}.reports-page .report-trend-gross strong{font-size:16px}.reports-page .report-trend-client{font-size:18px}.reports-page .report-trend-side{padding-left:0}}



.manual-input-split{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:24px;
  align-items:start;
  width:100%;
}
.manual-input-split > .card{
  min-width:0;
  height:100%;
  padding:20px;
}
.manual-input-split .card-head{
  margin-bottom:12px;
}
.manual-input-split .form-grid{
  gap:14px;
}
.manual-input-split textarea{
  min-height:120px;
}
@media (max-width: 980px){
  .manual-input-split{
    grid-template-columns:1fr !important;
  }
}



/* Work board summary: keep 5 tiles in one row on desktop */
.work-board-summary-grid.work-board-summary-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:16px;
}
.work-board-summary-grid > .summary-chip{
  min-width:0;
}
@media (max-width: 1180px){
  .work-board-summary-grid.work-board-summary-grid{
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
  }
}
@media (max-width: 920px){
  .work-board-summary-grid.work-board-summary-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media (max-width: 640px){
  .work-board-summary-grid.work-board-summary-grid{
    grid-template-columns:1fr!important;
  }
}


/* Reports equal split polish */
.reports-page .reports-split-half{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:start}
.reports-page .reports-split-half > .card{min-width:0;height:100%;padding:18px 18px 20px;border-radius:22px}
.reports-page .reports-trend-card .card-head,.reports-page .reports-manual-card .card-head{padding:0 8px 10px;margin-bottom:4px}
.reports-page .reports-trend-card .stack-list.compact{display:grid;gap:14px;padding:4px 6px 2px}
.reports-page .report-trend-row{grid-template-columns:minmax(0,1fr) auto;align-items:center;padding:18px 22px;border-radius:20px;margin-inline:0}
.reports-page .report-trend-main{padding-left:4px;padding-right:18px}
.reports-page .report-trend-gross strong{font-size:17px;font-weight:800}
.reports-page .report-trend-client{font-size:17px;font-weight:800}
.reports-page .report-trend-side{padding-left:18px;padding-right:4px;gap:4px}
.reports-page .compact-manual-finance-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;padding:4px 6px 2px;align-items:stretch}
.reports-page .manual-finance-card{min-width:0;padding:18px 18px 16px;border-radius:22px;overflow:hidden}
.reports-page .manual-finance-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px;padding:2px 2px 0}
.reports-page .manual-finance-head strong{font-size:15px;line-height:1.35;min-width:0;overflow-wrap:anywhere}
.reports-page .manual-finance-items{display:grid;gap:12px}
.reports-page .manual-finance-items > div{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:14px 16px;border-radius:18px;background:#fff;border:1px solid #e3ebf7;min-width:0}
.reports-page .manual-finance-items span{font-size:12px;line-height:1.25;letter-spacing:.12em;text-transform:uppercase;color:#73819b}
.reports-page .manual-finance-items strong{font-size:15px;line-height:1.3;font-weight:700;color:#10284f;text-align:right;overflow-wrap:anywhere;word-break:break-word}
.reports-page .manual-finance-card .muted.tiny{margin-top:12px;padding:0 4px;line-height:1.6}
@media (max-width:1200px){.reports-page .reports-split-half{grid-template-columns:1fr}.reports-page .compact-manual-finance-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:760px){.reports-page .reports-split-half > .card{padding:16px}.reports-page .reports-trend-card .stack-list.compact,.reports-page .compact-manual-finance-grid{padding:2px 0 0}.reports-page .compact-manual-finance-grid{grid-template-columns:1fr}.reports-page .report-trend-row{grid-template-columns:1fr;padding:16px}.reports-page .report-trend-main{padding:0}.reports-page .report-trend-side{justify-items:start;text-align:left;padding:4px 0 0}}

/* topbar cleanup: remove gray clipped edge */
.topbar{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:start !important;
  gap:16px !important;
  overflow:hidden !important;
  isolation:isolate;
  background:linear-gradient(180deg,var(--navy-1) 0%, var(--navy-2) 58%, var(--navy-3) 100%) !important;
  border-radius:22px !important;
}
.topbar-heading,
.topbar-right{
  position:relative;
  z-index:1;
}
@media (max-width: 920px){
  .topbar{
    grid-template-columns:1fr !important;
  }
}

/* final polish: member dashboard cards + sidebar brand visibility */
body[data-page="dashboard"] .dashboard-main-grid{
  grid-template-columns:minmax(0,1.55fr) minmax(340px,0.95fr);
  gap:22px;
  align-items:start;
}
body[data-page="dashboard"] .dashboard-main-grid > .card{
  padding:24px 26px;
  border-radius:24px;
  border:1px solid #dbe4f2;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);
  box-shadow:0 18px 40px rgba(15,23,42,.06);
}
body[data-page="dashboard"] .dashboard-main-grid > .card::after{
  background:linear-gradient(90deg,transparent,rgba(37,99,235,.10),transparent);
}
body[data-page="dashboard"] .dashboard-main-grid .card-head{
  margin-bottom:18px;
  gap:14px;
}
body[data-page="dashboard"] .dashboard-main-grid .card-head h3{
  font-size:20px;
  letter-spacing:-.02em;
  color:#102544;
}
body[data-page="dashboard"] .dashboard-main-grid .card-head .muted{
  color:#5c6f8f;
  line-height:1.55;
  max-width:58ch;
}
body[data-page="dashboard"] .compact-platform-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  margin-top:8px;
}
body[data-page="dashboard"] .compact-platform-card{
  padding:18px;
  border-radius:20px;
  border:1px solid #dce5f2;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
  box-shadow:0 10px 24px rgba(15,23,42,.04);
  gap:12px;
}
body[data-page="dashboard"] .compact-platform-card .top strong{
  font-size:18px;
  line-height:1.2;
  color:#11284a;
}
body[data-page="dashboard"] .compact-platform-card .top .badge{
  border-radius:999px;
  padding:7px 12px;
  font-size:11px;
  letter-spacing:.12em;
}
body[data-page="dashboard"] .compact-platform-card .metric-lg{
  font-size:28px;
  line-height:1.12;
  color:#0c2347;
  margin-top:4px;
}
body[data-page="dashboard"] .compact-platform-card p,
body[data-page="dashboard"] .compact-platform-meta span{
  color:#5c6f8f;
  font-size:13px;
  line-height:1.5;
}
body[data-page="dashboard"] .compact-platform-meta{
  display:grid;
  gap:8px;
  margin-top:2px;
}
body[data-page="dashboard"] .compact-platform-meta strong{
  color:#102544;
  font-weight:700;
}
body[data-page="dashboard"] .compact-platform-card .compact-account-item,
body[data-page="dashboard"] .compact-platform-card .compact-inline-item,
body[data-page="dashboard"] .compact-platform-card .mini-stat{
  border-radius:14px;
}
body[data-page="dashboard"] .compact-total-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  align-content:start;
}
body[data-page="dashboard"] .compact-total-grid .info-tile{
  padding:18px 18px 16px;
  border-radius:18px;
  border:1px solid #dce5f2;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
  box-shadow:0 10px 24px rgba(15,23,42,.04);
}
body[data-page="dashboard"] .compact-total-grid .info-tile span{
  font-size:12px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#7081a0;
  margin-bottom:10px;
}
body[data-page="dashboard"] .compact-total-grid .info-tile strong{
  display:block;
  font-size:24px;
  line-height:1.15;
  color:#102544;
  letter-spacing:-.03em;
}
.sidebar .brand-title,
.sidebar .brand-sub,
.sidebar-foot .user-name,
.sidebar-foot .user-role{
  color:#ffffff !important;
}
.sidebar .brand-sub,
.sidebar-foot .user-role{
  opacity:.82;
}
@media (max-width: 1180px){
  body[data-page="dashboard"] .dashboard-main-grid{
    grid-template-columns:1fr;
  }
  body[data-page="dashboard"] .compact-platform-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width: 760px){
  body[data-page="dashboard"] .dashboard-main-grid > .card{
    padding:18px;
    border-radius:20px;
  }
  body[data-page="dashboard"] .compact-platform-grid,
  body[data-page="dashboard"] .compact-total-grid{
    grid-template-columns:1fr;
  }
  body[data-page="dashboard"] .compact-platform-card .metric-lg,
  body[data-page="dashboard"] .compact-total-grid .info-tile strong{
    font-size:22px;
  }
}

/* Member dashboard final polish */
body[data-page="dashboard"] .client-balance-hero{
  padding:20px 22px !important;
  border-radius:22px !important;
}
body[data-page="dashboard"] .client-balance-hero .value{
  color:#ffffff !important;
  font-size:44px !important;
  line-height:1.05 !important;
  letter-spacing:-.03em;
  margin-top:6px;
  margin-bottom:10px;
  text-shadow:0 4px 12px rgba(0,0,0,.18);
}
body[data-page="dashboard"] .client-balance-hero .meta{
  color:rgba(255,255,255,.78) !important;
}
body[data-page="dashboard"] .client-balance-hero .sub{
  color:rgba(239,245,255,.92) !important;
  max-width:1100px;
  line-height:1.55;
}
body[data-page="dashboard"] .balance-hero-top{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:20px;
  align-items:start;
}
body[data-page="dashboard"] .hero-inline-stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-top:16px;
}
body[data-page="dashboard"] .hero-pill{
  display:flex;
  align-items:center;
  min-height:46px;
  padding:12px 14px;
  border-radius:14px;
  background:rgba(255,255,255,.12) !important;
  border:1px solid rgba(255,255,255,.16) !important;
  color:#ffffff !important;
  font-weight:700;
  backdrop-filter:blur(6px);
}
body[data-page="dashboard"] .hero-actions-stack{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:10px;
  min-width:220px;
}
body[data-page="dashboard"] .btn-withdraw-hero{
  min-width:164px;
  padding:12px 18px;
  border-radius:14px;
  box-shadow:0 12px 24px rgba(60,83,255,.24);
}
body[data-page="dashboard"] .hero-withdraw-note{
  padding:10px 12px;
  border-radius:12px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.14);
  color:rgba(244,248,255,.92);
  font-size:13px;
  text-align:right;
}
body[data-page="dashboard"] .hero-withdraw-note strong{
  color:#ffffff;
  font-weight:800;
}
body[data-page="dashboard"] .dashboard-main-grid{
  grid-template-columns:minmax(0,1.6fr) minmax(360px,1fr);
  gap:22px;
  align-items:start;
}
body[data-page="dashboard"] .dashboard-main-grid > .card{
  padding:18px 18px 20px !important;
}
body[data-page="dashboard"] .dashboard-main-grid > .card .card-head{
  margin-bottom:14px;
}
body[data-page="dashboard"] .dashboard-main-grid > .card .card-head h3{
  margin-bottom:6px;
}
body[data-page="dashboard"] .dashboard-main-grid > .card .card-head .muted{
  max-width:680px;
  line-height:1.5;
}
body[data-page="dashboard"] .client-platform-card-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}
body[data-page="dashboard"] .client-platform-card{
  padding:16px !important;
  border-radius:18px !important;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%) !important;
}
body[data-page="dashboard"] .client-platform-card .platform-card-head h4{
  font-size:17px;
  line-height:1.25;
  color:#0f2548;
}
body[data-page="dashboard"] .client-platform-card .platform-card-head p{
  margin-top:4px;
  font-size:13px;
  line-height:1.45;
  color:#64748b;
}
body[data-page="dashboard"] .client-platform-card .platform-main-value{
  font-size:24px;
  line-height:1.15;
  margin:14px 0 10px;
  color:#102544;
}
body[data-page="dashboard"] .compact-platform-meta-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:10px;
}
body[data-page="dashboard"] .compact-platform-meta-grid > div{
  min-width:0;
  padding:11px 12px;
  border-radius:14px;
  background:#f8fbff !important;
  border:1px solid #deebf6 !important;
}
body[data-page="dashboard"] .compact-platform-meta-grid span{
  display:block;
  margin-bottom:6px;
  font-size:11px;
  line-height:1.35;
}
body[data-page="dashboard"] .compact-platform-meta-grid strong{
  display:block;
  font-size:16px;
  line-height:1.2;
  word-break:break-word;
}
body[data-page="dashboard"] .platform-inline-notes{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
}
body[data-page="dashboard"] .platform-inline-notes span{
  margin:0;
  padding:7px 11px;
  border-radius:999px;
  background:#f8fbff !important;
  border:1px solid #dfe8f4 !important;
  color:#42546f;
  font-size:12px;
  line-height:1.35;
}
body[data-page="dashboard"] .compact-total-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
body[data-page="dashboard"] .compact-total-grid .info-tile{
  min-height:116px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:18px 20px !important;
  border-radius:18px !important;
  background:linear-gradient(180deg,#ffffff 0%,#f9fbff 100%) !important;
}
body[data-page="dashboard"] .compact-total-grid .info-tile span{
  font-size:12px;
  line-height:1.45;
  margin-bottom:10px;
}
body[data-page="dashboard"] .compact-total-grid .info-tile strong{
  font-size:22px;
  line-height:1.15;
  word-break:break-word;
}
.sidebar .brand-title,
.sidebar .brand-sub{
  color:#ffffff !important;
  opacity:1 !important;
}
@media (max-width: 1240px){
  body[data-page="dashboard"] .client-platform-card-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  body[data-page="dashboard"] .hero-inline-stats{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width: 980px){
  body[data-page="dashboard"] .balance-hero-top,
  body[data-page="dashboard"] .dashboard-main-grid{
    grid-template-columns:1fr;
  }
  body[data-page="dashboard"] .hero-actions-stack{
    align-items:stretch;
    min-width:0;
  }
  body[data-page="dashboard"] .hero-withdraw-note{
    text-align:left;
  }
}
@media (max-width: 760px){
  body[data-page="dashboard"] .hero-inline-stats,
  body[data-page="dashboard"] .client-platform-card-grid,
  body[data-page="dashboard"] .compact-platform-meta-grid,
  body[data-page="dashboard"] .compact-total-grid{
    grid-template-columns:1fr;
  }
  body[data-page="dashboard"] .client-balance-hero .value{
    font-size:34px !important;
  }
}

/* Member dashboard hero and compact cards polish */
body[data-page="dashboard"] .client-balance-hero{
  background:linear-gradient(135deg,#17376d 0%,#214989 100%) !important;
  border:1px solid rgba(255,255,255,.08) !important;
  box-shadow:0 18px 40px rgba(13,31,66,.18) !important;
}
body[data-page="dashboard"] .client-balance-hero .meta,
body[data-page="dashboard"] .client-balance-hero .sub{
  color:rgba(255,255,255,.88) !important;
}
body[data-page="dashboard"] .client-balance-hero .value{
  color:#ffffff !important;
  text-shadow:none !important;
}
body[data-page="dashboard"] .balance-hero-top{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:18px;
  align-items:start;
}
body[data-page="dashboard"] .hero-actions-stack{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:flex-start;
  gap:12px;
  min-width:220px;
  margin-top:2px;
}
body[data-page="dashboard"] .btn-withdraw-hero{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:164px;
  min-height:44px;
  padding:10px 18px;
  border-radius:14px;
  font-weight:800;
}
body[data-page="dashboard"] .hero-withdraw-note{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:0 14px;
  border-radius:12px;
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.14);
  color:rgba(244,248,255,.92);
  font-size:13px;
  line-height:1;
  text-align:center;
  white-space:nowrap;
}
body[data-page="dashboard"] .hero-withdraw-note strong{
  margin-left:6px;
}
body[data-page="dashboard"] .hero-inline-stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-top:18px;
}
body[data-page="dashboard"] .hero-pill{
  min-width:0;
  padding:12px 14px;
  border-radius:14px;
  background:rgba(255,255,255,.12) !important;
  border:1px solid rgba(255,255,255,.16) !important;
  color:#ffffff !important;
  font-weight:700;
  line-height:1.35;
}
body[data-page="dashboard"] .dashboard-main-grid{
  grid-template-columns:minmax(0,1.6fr) minmax(340px,1fr);
  gap:22px;
  align-items:start;
}
body[data-page="dashboard"] .dashboard-main-grid > .card{
  padding:20px !important;
  border-radius:22px !important;
}
body[data-page="dashboard"] .client-platform-card-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}
body[data-page="dashboard"] .client-platform-card{
  min-width:0;
  padding:18px !important;
  border-radius:20px !important;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%) !important;
}
body[data-page="dashboard"] .client-platform-card .platform-card-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}
body[data-page="dashboard"] .client-platform-card .platform-card-head > div:first-child{
  min-width:0;
  flex:1;
}
body[data-page="dashboard"] .client-platform-card .platform-card-head h4{
  font-size:17px;
  line-height:1.3;
  margin:0;
  word-break:break-word;
}
body[data-page="dashboard"] .client-platform-card .platform-card-head p{
  margin-top:4px;
  font-size:13px;
  line-height:1.45;
  color:#64748b;
}
body[data-page="dashboard"] .client-platform-card .platform-main-value{
  font-size:22px;
  line-height:1.2;
  margin:14px 0 10px;
  color:#102544;
}
body[data-page="dashboard"] .compact-platform-meta-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}
body[data-page="dashboard"] .compact-platform-meta-grid > div{
  min-width:0;
  min-height:92px;
  padding:12px 13px;
  border-radius:16px;
  background:#f8fbff !important;
  border:1px solid #deebf6 !important;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
body[data-page="dashboard"] .compact-platform-meta-grid span{
  display:block;
  margin-bottom:8px;
  font-size:11px;
  line-height:1.35;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#7b88a1;
}
body[data-page="dashboard"] .compact-platform-meta-grid strong{
  display:block;
  font-size:15px;
  line-height:1.28;
  word-break:break-word;
  color:#142642;
}
body[data-page="dashboard"] .platform-inline-notes{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:14px;
}
body[data-page="dashboard"] .platform-inline-notes span{
  margin:0;
  padding:8px 12px;
  border-radius:999px;
  background:#f8fbff !important;
  border:1px solid #dfe8f4 !important;
  color:#42546f;
  font-size:12px;
  line-height:1.35;
}
body[data-page="dashboard"] .compact-total-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
body[data-page="dashboard"] .compact-total-grid .info-tile{
  min-width:0;
  min-height:112px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:18px 20px !important;
  border-radius:18px !important;
  background:linear-gradient(180deg,#ffffff 0%,#f9fbff 100%) !important;
}
body[data-page="dashboard"] .compact-total-grid .info-tile span{
  font-size:12px;
  line-height:1.45;
  margin-bottom:10px;
  letter-spacing:.08em;
  text-transform:uppercase;
}
body[data-page="dashboard"] .compact-total-grid .info-tile strong{
  font-size:20px;
  line-height:1.2;
  word-break:break-word;
  color:#142642;
}
@media (max-width:1240px){
  body[data-page="dashboard"] .client-platform-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  body[data-page="dashboard"] .hero-inline-stats{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:980px){
  body[data-page="dashboard"] .balance-hero-top,
  body[data-page="dashboard"] .dashboard-main-grid{grid-template-columns:1fr;}
  body[data-page="dashboard"] .hero-actions-stack{align-items:flex-start;min-width:0;}
  body[data-page="dashboard"] .hero-withdraw-note{text-align:left;}
}
@media (max-width:760px){
  body[data-page="dashboard"] .hero-inline-stats,
  body[data-page="dashboard"] .client-platform-card-grid,
  body[data-page="dashboard"] .compact-platform-meta-grid,
  body[data-page="dashboard"] .compact-total-grid{grid-template-columns:1fr;}
  body[data-page="dashboard"] .btn-withdraw-hero,
  body[data-page="dashboard"] .hero-withdraw-note{width:100%;}
}


/* member dashboard hero withdraw cleanup */
body[data-page="dashboard"] .hero-inline-stats{
  align-items:stretch;
}
body[data-page="dashboard"] .hero-pill-action{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:0 18px;
  border-radius:16px;
  font-weight:800;
  letter-spacing:.01em;
  text-decoration:none;
  color:#ffffff !important;
  background:linear-gradient(135deg,#8b5cf6 0%,#6366f1 45%,#2563eb 100%) !important;
  border:1px solid rgba(167,139,250,.58) !important;
  box-shadow:0 14px 30px rgba(20,37,86,.34), inset 0 1px 0 rgba(255,255,255,.18) !important;
}
body[data-page="dashboard"] .hero-pill-action:hover{
  transform:translateY(-1px);
  filter:saturate(1.08) brightness(1.05);
  box-shadow:0 18px 34px rgba(20,37,86,.40), inset 0 1px 0 rgba(255,255,255,.22) !important;
}
body[data-page="dashboard"] .hero-actions-stack,
body[data-page="dashboard"] .hero-withdraw-note{
  display:none !important;
}
@media (min-width: 1180px){
  body[data-page="dashboard"] .hero-inline-stats{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
@media (max-width: 1179px) and (min-width: 768px){
  body[data-page="dashboard"] .hero-inline-stats{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width: 767px){
  body[data-page="dashboard"] .hero-pill-action{
    width:100%;
  }
}

/* mobile toolbar and sidebar collision fix */
@media (max-width: 760px){
  body.app-shell .mobile-toolbar{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:12px !important;
    min-height:56px !important;
    padding:10px 14px !important;
    position:sticky !important;
    top:0 !important;
    z-index:95 !important;
    background:linear-gradient(180deg,var(--navy-1) 0%, var(--navy-2) 100%) !important;
    border-bottom:1px solid rgba(255,255,255,.10) !important;
  }
  body.app-shell .mobile-toolbar-title{
    color:#f8fbff !important;
    font-size:15px !important;
    font-weight:800 !important;
    letter-spacing:.01em !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    flex:1 1 auto !important;
    text-align:right !important;
  }
  body.app-shell .mobile-nav-toggle{
    flex:0 0 auto !important;
    width:40px !important;
    height:40px !important;
    padding:0 !important;
    border-radius:12px !important;
    background:rgba(255,255,255,.10) !important;
    color:#ffffff !important;
    border:1px solid rgba(255,255,255,.14) !important;
    box-shadow:none !important;
    font-size:20px !important;
    line-height:1 !important;
  }
  body.app-shell .sidebar-backdrop{
    top:56px !important;
    inset:56px 0 0 0 !important;
    z-index:90 !important;
  }
  body.app-shell .sidebar{
    top:56px !important;
    inset:56px auto 0 0 !important;
    height:calc(100dvh - 56px) !important;
    width:min(320px,88vw) !important;
    z-index:91 !important;
    padding:18px 18px 16px !important;
    border-top:0 !important;
    border-right:1px solid rgba(255,255,255,.10) !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
  }
  body.app-shell .sidebar .brand{
    display:grid !important;
    grid-template-columns:48px minmax(0,1fr) !important;
    align-items:center !important;
    gap:12px !important;
    padding:4px 0 14px !important;
    margin-bottom:12px !important;
    border-bottom:1px solid rgba(255,255,255,.10) !important;
  }
  body.app-shell .sidebar .brand-badge{
    width:48px !important;
    height:48px !important;
    border-radius:14px !important;
    background:linear-gradient(135deg,#4f7cff,#6b4eff) !important;
    color:#fff !important;
    box-shadow:none !important;
  }
  body.app-shell .sidebar .brand-title{
    color:#ffffff !important;
    opacity:1 !important;
    font-size:17px !important;
    font-weight:800 !important;
    line-height:1.15 !important;
    letter-spacing:-.01em !important;
  }
  body.app-shell .sidebar .brand-sub{
    color:rgba(232,241,255,.86) !important;
    font-size:12px !important;
    margin-top:2px !important;
    line-height:1.35 !important;
  }
  body.app-shell .sidebar .nav{
    padding-right:0 !important;
    overflow:visible !important;
  }
  body.app-shell .sidebar .nav-link,
  body.app-shell .sidebar .nav-section-label,
  body.app-shell .sidebar .user-name,
  body.app-shell .sidebar .user-role{
    color:#f7fbff !important;
  }
  body.app-shell .sidebar .nav-section-label{
    color:rgba(221,233,255,.56) !important;
  }
  body.app-shell .sidebar .nav-link{
    background:transparent !important;
  }
  body.app-shell .sidebar .nav-link.active{
    background:linear-gradient(180deg, rgba(93,110,255,.24), rgba(93,110,255,.16)) !important;
    border:1px solid rgba(121,143,255,.30) !important;
    color:#ffffff !important;
  }
  body.app-shell .sidebar .sidebar-foot{
    margin-top:18px !important;
    padding-top:16px !important;
    border-top:1px solid rgba(255,255,255,.10) !important;
    background:none !important;
  }
}


.brand-badge-logo{
  padding: 6px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(0,0,0,.16);
}
.brand-logo{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  border-radius:12px;
  background:#ffffff;
}
.mobile-toolbar-title{
  color:#ffffff;
}


/* typography final polish */
html{
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  text-rendering:optimizeLegibility;
}
body{
  font-size:15px;
  line-height:1.6;
  color:var(--text);
}
p, li, td, input, select, textarea{
  line-height:1.6;
}
h1,h2,h3,h4,h5,h6{
  letter-spacing:-0.02em;
  color:#14233d;
}
.topbar h1{
  font-size:34px;
  font-weight:800;
  letter-spacing:-0.035em;
  line-height:1.08;
}
.card-head h3,
section.card h3{
  font-size:26px;
  font-weight:750;
  line-height:1.2;
}
.brand-title{
  font-weight:800;
  letter-spacing:-0.02em;
}
.brand-sub,
.topbar p,
.card-head .muted,
.muted,
small.muted,
.metric .sub,
.mini .sub,
.auth-card p,
.page-note,
label,
th,
.meta,
.metric .meta,
.mini .meta,
.summary-chip span,
.info-tile span,
.mini-stat span,
.platform-meta-grid span,
.kv-grid span,
.user-role{
  font-weight:500;
  color:#66758f;
}
.eyebrow-label,
.nav-section-label,
th,
.metric .meta,
.mini .meta,
.summary-chip span,
.info-tile span,
.mini-stat span,
.platform-meta-grid span,
.kv-grid span,
.badge,
.pill,
.hero-pill,
.user-role{
  letter-spacing:.08em;
  text-transform:uppercase;
}
.eyebrow-label,
.nav-section-label{
  font-size:11px;
  font-weight:800;
  color:#7a879d;
}
.nav-link{
  font-weight:650;
  font-size:16px;
  line-height:1.45;
}
.user-name,
.topbar-stat strong,
.card strong,
.card b,
.table-wrap td strong,
.list-row strong,
.summary-chip strong,
.info-tile strong,
.mini-stat strong,
.platform-main-value,
.metric-lg,
.metric .value,
.mini .value,
.mini .value.sm,
.metric .value.sm,
.value,
.value.sm{
  color:#10233f;
}
.card strong,
.card b,
.table-wrap td strong,
.list-row strong{
  font-weight:680;
}
.metric .value,
.mini .value,
.value,
.metric-lg,
.platform-main-value,
.summary-chip strong{
  font-weight:800;
  letter-spacing:-0.03em;
  line-height:1.12;
}
.metric .value{font-size:32px;}
.metric .value.sm,
.mini .value.sm,
.value.sm{font-size:24px;font-weight:780;}
.mini-stat strong,
.info-tile strong,
.platform-meta-grid strong,
.kv-grid strong,
.transaction-card strong,
.compact-inline-item strong,
.compact-platform-meta strong,
.hero-pill strong{
  font-weight:720;
  letter-spacing:-0.015em;
}
.compact-platform-meta strong,
.platform-meta-grid strong,
.kv-grid strong{
  font-size:15px;
}
.hero-pill,
.badge,
.pill{
  font-weight:700;
  font-size:12px;
}
.btn{
  font-weight:720;
  letter-spacing:-0.01em;
}
.btn-small{font-weight:680;}
label{
  font-size:13px;
  gap:7px;
}
input::placeholder,
textarea::placeholder{
  color:#95a3b8;
  font-weight:500;
}
.table-wrap th{
  font-size:12px;
  font-weight:760;
  color:#75839a;
}
.table-wrap td{
  font-size:14px;
  color:#23324d;
}
.card-head .muted,
.muted,
small.muted,
.page-note,
.platform-card p,
.transaction-card p,
.topbar p{
  font-size:14px;
}
.card p:last-child,
.card .muted:last-child{
  margin-bottom:0;
}
.topbar-stat span{
  display:block;
  margin-bottom:4px;
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#7a879d;
}
.topbar-stat strong{
  font-size:15px;
  font-weight:760;
}
.user-role,
.brand-sub{
  font-size:12px;
}
.brand-sub{color:rgba(255,255,255,.78);}
.sidebar .brand-title,
.sidebar .brand-sub,
.sidebar .user-name,
.sidebar .user-role,
.mobile-toolbar-title{
  text-shadow:0 1px 0 rgba(0,0,0,.08);
}
.compact-inline-item span,
.compact-platform-meta span,
.hero-pill,
.summary-chip span,
.info-tile span,
.mini-stat span,
.platform-meta-grid span,
.kv-grid span{
  line-height:1.35;
}
.compact-inline-item strong,
.compact-platform-card .metric-lg,
.platform-card .metric-lg,
.platform-card .platform-main-value{
  font-size:clamp(20px,2vw,30px);
}
@media (max-width:920px){
  .topbar h1{font-size:30px;}
  .card-head h3, section.card h3{font-size:22px;}
}
@media (max-width:640px){
  body{font-size:14px;}
  .topbar h1{font-size:28px;}
  .card-head h3, section.card h3{font-size:20px;}
  .metric .value{font-size:28px;}
  .metric .value.sm,
  .mini .value.sm,
  .value.sm{font-size:22px;}
  .table-wrap td{font-size:13.5px;}
}


/* brand badge white logo polish */
.brand{align-items:center;}
.brand-badge,
.brand-badge-logo{
  background:#ffffff !important;
  border:1px solid rgba(210,221,240,.92) !important;
  box-shadow:0 12px 28px rgba(7,18,38,.18), inset 0 1px 0 rgba(255,255,255,.8) !important;
}
.brand-badge-logo{
  padding:7px !important;
  border-radius:16px !important;
}
.brand-logo{
  background:#ffffff !important;
  border-radius:12px !important;
  object-fit:contain !important;
}
.mobile-toolbar-title{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  color:#ffffff !important;
  font-weight:800 !important;
}
.mobile-toolbar-title span{
  color:#ffffff !important;
}
.mobile-brand-icon{
  width:28px;
  height:28px;
  display:block;
  object-fit:contain;
  background:#ffffff;
  border-radius:10px;
  padding:4px;
  box-shadow:0 6px 16px rgba(5,15,34,.22);
  border:1px solid rgba(210,221,240,.92);
}


/* client dashboard readability refresh */
body[data-page="dashboard"] .client-greeting-stat span{
  font-size:14px;
  letter-spacing:-0.01em;
  text-transform:none;
  color:#5f7391;
  margin-bottom:2px;
}
body[data-page="dashboard"] .client-greeting-stat strong{
  font-size:13px;
  font-weight:700;
  color:#8a99b3;
}
body[data-page="dashboard"] .client-balance-hero .meta{
  color:rgba(255,255,255,.9);
  font-size:13px;
  font-weight:800;
}
body[data-page="dashboard"] .client-balance-hero .value{
  font-size:clamp(40px,5vw,56px);
  line-height:1.02;
  letter-spacing:-0.04em;
}
body[data-page="dashboard"] .client-balance-hero .sub{
  max-width:980px;
  font-size:14px;
  line-height:1.55;
  color:rgba(236,243,255,.92);
}
body[data-page="dashboard"] .hero-inline-stats{
  gap:12px;
  margin-top:18px;
}
body[data-page="dashboard"] .hero-pill{
  min-height:46px;
  padding:12px 16px;
  font-size:13px;
  font-weight:700;
  letter-spacing:0;
  text-transform:none;
}
body[data-page="dashboard"] .hero-pill-action{
  font-size:15px !important;
  font-weight:800 !important;
}
body[data-page="dashboard"] .dashboard-main-grid{
  align-items:start;
}
body[data-page="dashboard"] .dashboard-main-grid > .card{
  padding:24px;
}
body[data-page="dashboard"] .dashboard-main-grid .card-head h3{
  font-size:18px;
  line-height:1.28;
  margin-bottom:4px;
}
body[data-page="dashboard"] .dashboard-main-grid .card-head .muted{
  font-size:14px;
  line-height:1.6;
  color:#667791;
}
body[data-page="dashboard"] .client-platform-card-grid{
  gap:16px;
}
body[data-page="dashboard"] .client-platform-card{
  padding:18px;
  border-radius:22px;
  box-shadow:none;
}
body[data-page="dashboard"] .client-platform-card .platform-card-head h4{
  font-size:16px;
  font-weight:800;
  line-height:1.25;
}
body[data-page="dashboard"] .client-platform-card .platform-card-head p{
  font-size:13px;
  line-height:1.45;
  color:#72819a;
}
body[data-page="dashboard"] .client-platform-card .platform-main-value{
  margin-top:14px;
  font-size:clamp(20px,2.2vw,32px);
  font-weight:800;
  line-height:1.1;
}
body[data-page="dashboard"] .client-platform-card .platform-card-subtitle{
  margin-top:8px;
  font-size:13px;
  line-height:1.55;
  color:#6a7a93;
}
body[data-page="dashboard"] .client-dashboard-metric-grid{
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-top:14px;
}
body[data-page="dashboard"] .client-dashboard-metric-grid > div{
  padding:14px 14px 12px;
  border-radius:16px;
  min-height:96px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
body[data-page="dashboard"] .client-dashboard-metric-grid span{
  font-size:11px;
  font-weight:800;
  line-height:1.35;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#7785a0;
}
body[data-page="dashboard"] .client-dashboard-metric-grid strong{
  margin-top:10px;
  display:block;
  font-size:16px;
  line-height:1.2;
  font-weight:800;
  color:#11233e;
  word-break:break-word;
}
body[data-page="dashboard"] .platform-inline-notes{
  margin-top:14px;
  gap:8px;
}
body[data-page="dashboard"] .platform-inline-notes span{
  font-size:12px;
  font-weight:600;
  letter-spacing:0;
  text-transform:none;
  padding:9px 12px;
  border-radius:999px;
}
body[data-page="dashboard"] .compact-total-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
}
body[data-page="dashboard"] .compact-total-grid .info-tile{
  padding:16px 18px;
  border-radius:18px;
  min-height:116px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
body[data-page="dashboard"] .compact-total-grid .info-tile span{
  font-size:12px;
  font-weight:800;
  line-height:1.4;
  letter-spacing:.08em;
  text-transform:uppercase;
}
body[data-page="dashboard"] .compact-total-grid .info-tile strong{
  font-size:clamp(24px,2.4vw,38px);
  line-height:1.08;
  letter-spacing:-0.03em;
}
body[data-page="dashboard"] .compact-platform-grid{
  gap:14px;
}
body[data-page="dashboard"] .compact-platform-card{
  padding:18px;
  border-radius:18px;
}
body[data-page="dashboard"] .compact-platform-card .top strong{
  font-size:15px;
}
body[data-page="dashboard"] .compact-platform-card .metric-lg{
  font-size:22px;
  margin-top:10px;
}
body[data-page="dashboard"] .compact-platform-meta-clean{
  margin-top:12px;
  display:grid;
  gap:8px;
}
body[data-page="dashboard"] .compact-platform-meta-clean span{
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:13px;
  line-height:1.45;
  color:#61738f;
  font-weight:600;
  letter-spacing:0;
  text-transform:none;
}
body[data-page="dashboard"] .compact-platform-meta-clean strong{
  flex:none;
  color:#11233e;
  font-size:13px;
  font-weight:800;
}
@media (max-width:760px){
  body.app-shell .sidebar .brand-badge,
  body.app-shell .sidebar .brand-badge-logo{
    background:#ffffff !important;
    border:1px solid rgba(210,221,240,.92) !important;
    box-shadow:0 10px 22px rgba(7,18,38,.16) !important;
  }
  body.app-shell .sidebar .brand-badge{
    color:#17253d !important;
  }
  body[data-page="dashboard"] .client-balance-hero{
    padding:20px 18px;
  }
  body[data-page="dashboard"] .client-balance-hero .value{
    font-size:44px;
  }
  body[data-page="dashboard"] .client-balance-hero .sub{
    font-size:13.5px;
  }
  body[data-page="dashboard"] .client-platform-card-grid{
    grid-template-columns:1fr;
    gap:14px;
  }
  body[data-page="dashboard"] .client-platform-card .platform-main-value{
    font-size:18px;
  }
  body[data-page="dashboard"] .client-dashboard-metric-grid{
    grid-template-columns:1fr;
    gap:10px;
  }
  body[data-page="dashboard"] .client-dashboard-metric-grid > div{
    min-height:auto;
    padding:13px 14px;
  }
  body[data-page="dashboard"] .client-dashboard-metric-grid strong{
    margin-top:8px;
    font-size:15px;
  }
  body[data-page="dashboard"] .compact-total-grid{
    grid-template-columns:1fr;
    gap:12px;
  }
  body[data-page="dashboard"] .compact-total-grid .info-tile{
    min-height:auto;
    padding:15px 16px;
  }
  body[data-page="dashboard"] .compact-total-grid .info-tile strong{
    font-size:22px;
  }
  body[data-page="dashboard"] .compact-platform-card{
    padding:16px;
  }
}


/* final polish for client-facing pages */
body[data-page="reports"] .dashboard-main-grid,
body[data-page="withdrawals"] .dashboard-main-grid,
body[data-page="transactions"] .dashboard-main-grid{
  align-items:start;
}
body[data-page="reports"] .section-hero,
body[data-page="withdrawals"] .report-hero-card,
body[data-page="transactions"] .section-hero{
  padding:24px 26px;
  border-radius:24px;
}
body[data-page="reports"] .section-hero .card-head h3,
body[data-page="withdrawals"] .section-title-row h3,
body[data-page="transactions"] .section-hero .card-head h3{
  font-size:20px;
  line-height:1.25;
  letter-spacing:-0.02em;
}
body[data-page="reports"] .section-hero .muted,
body[data-page="withdrawals"] .section-title-row .muted,
body[data-page="transactions"] .section-hero .muted{
  font-size:14px;
  line-height:1.6;
  color:#677995;
}
body[data-page="reports"] .premium-metric,
body[data-page="withdrawals"] .compact-summary-card,
body[data-page="transactions"] .compact-inline-item{
  border-radius:18px;
  box-shadow:none;
}
body[data-page="reports"] .premium-metric .meta,
body[data-page="withdrawals"] .compact-summary-card span,
body[data-page="transactions"] .compact-inline-item span{
  font-size:11.5px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#73839d;
}
body[data-page="reports"] .premium-metric .value,
body[data-page="withdrawals"] .compact-summary-card strong,
body[data-page="transactions"] .compact-inline-item strong{
  font-weight:800;
  letter-spacing:-0.03em;
  line-height:1.08;
}
body[data-page="reports"] .premium-metric .sub,
body[data-page="withdrawals"] .compact-summary-card small,
body[data-page="transactions"] .compact-inline-item small{
  font-size:12.5px;
  line-height:1.5;
  color:#6d7e97;
}
body[data-page="reports"] .platform-card,
body[data-page="reports"] .currency-summary-card,
body[data-page="reports"] .manual-finance-card,
body[data-page="withdrawals"] .compact-table-card,
body[data-page="transactions"] .compact-table-card{
  border-radius:22px;
  box-shadow:none;
}
body[data-page="reports"] .platform-card-head h4,
body[data-page="reports"] .currency-summary-top strong,
body[data-page="reports"] .manual-finance-head strong{
  font-size:16px;
  line-height:1.25;
  font-weight:800;
}
body[data-page="reports"] .platform-card-head p,
body[data-page="reports"] .report-trend-day,
body[data-page="reports"] .manual-finance-card .muted,
body[data-page="reports"] .currency-summary-list span,
body[data-page="withdrawals"] .list-row .muted,
body[data-page="transactions"] .list-row .muted{
  font-size:13px;
  line-height:1.5;
  color:#6f8098;
}
body[data-page="reports"] .platform-main-value.small.compact,
body[data-page="reports"] .currency-summary-metric{
  font-size:clamp(24px,2.2vw,34px);
  line-height:1.12;
  letter-spacing:-0.03em;
}
body[data-page="reports"] .platform-meta-grid.compact-platform-meta-grid{
  gap:12px;
  grid-template-columns:repeat(3,minmax(0,1fr));
}
body[data-page="reports"] .platform-meta-grid.compact-platform-meta-grid > div,
body[data-page="reports"] .currency-summary-list > div,
body[data-page="reports"] .manual-finance-items > div{
  padding:14px 14px 12px;
  border-radius:16px;
  min-height:92px;
}
body[data-page="reports"] .platform-meta-grid.compact-platform-meta-grid span,
body[data-page="reports"] .currency-summary-list span,
body[data-page="reports"] .manual-finance-items span{
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#7b8aa3;
}
body[data-page="reports"] .platform-meta-grid.compact-platform-meta-grid .subvalue,
body[data-page="reports"] .currency-summary-list .subvalue,
body[data-page="reports"] .manual-finance-items strong{
  margin-top:10px;
  font-size:16px;
  font-weight:800;
  line-height:1.2;
  color:#13253f;
  word-break:break-word;
}
body[data-page="reports"] .report-trend-row{
  padding:16px 18px;
  border-radius:18px;
}
body[data-page="reports"] .report-trend-gross strong{
  font-size:17px;
  line-height:1.18;
}
body[data-page="reports"] .report-trend-client{
  font-size:17px;
}
body[data-page="reports"] .report-trend-side small{
  font-size:13px;
  color:#6f8098;
}
body[data-page="withdrawals"] .sticky-actions,
body[data-page="transactions"] .toolbar-filters,
body[data-page="withdrawals"] .toolbar-filters{
  gap:10px;
}
body[data-page="withdrawals"] .pill{
  padding:10px 14px;
  border-radius:999px;
  font-size:13px;
  font-weight:700;
}
body[data-page="withdrawals"] .form-grid label span,
body[data-page="transactions"] .form-grid label span{
  font-size:13px;
  font-weight:700;
  color:#50637f;
}
body[data-page="withdrawals"] .form-grid input,
body[data-page="withdrawals"] .form-grid textarea,
body[data-page="transactions"] .toolbar-filters input,
body[data-page="transactions"] .toolbar-filters select,
body[data-page="withdrawals"] .toolbar-filters input,
body[data-page="withdrawals"] .toolbar-filters select{
  font-size:14px;
}
body[data-page="withdrawals"] .stack-list.compact .list-row,
body[data-page="transactions"] .stack-list.compact .list-row{
  padding:14px 16px;
  border-radius:16px;
}
body[data-page="transactions"] .compact-inline-grid.compact-inline-grid-5{
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
}
body[data-page="transactions"] .table-wrap table,
body[data-page="reports"] .table-wrap table,
body[data-page="withdrawals"] .table-wrap table{
  font-size:14px;
}
body[data-page="transactions"] .table-wrap thead th,
body[data-page="reports"] .table-wrap thead th,
body[data-page="withdrawals"] .table-wrap thead th{
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#73839d;
}
body[data-page="transactions"] .table-wrap tbody td,
body[data-page="reports"] .table-wrap tbody td,
body[data-page="withdrawals"] .table-wrap tbody td{
  font-size:13.5px;
  line-height:1.5;
  color:#17263f;
}
body[data-page="transactions"] .badge,
body[data-page="reports"] .badge,
body[data-page="withdrawals"] .badge{
  font-size:11.5px;
  font-weight:800;
}
@media (max-width:980px){
  body[data-page="reports"] .platform-meta-grid.compact-platform-meta-grid,
  body[data-page="reports"] .currency-summary-grid,
  body[data-page="reports"] .manual-finance-grid.compact-manual-finance-grid,
  body[data-page="transactions"] .compact-inline-grid.compact-inline-grid-5{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}
@media (max-width:760px){
  body[data-page="reports"] .section-hero,
  body[data-page="withdrawals"] .report-hero-card,
  body[data-page="transactions"] .section-hero,
  body[data-page="reports"] .dashboard-main-grid > .card,
  body[data-page="withdrawals"] .dashboard-main-grid > .card,
  body[data-page="transactions"] .compact-table-card{
    padding:18px;
  }
  body[data-page="reports"] .section-hero .card-head h3,
  body[data-page="withdrawals"] .section-title-row h3,
  body[data-page="transactions"] .section-hero .card-head h3{
    font-size:18px;
  }
  body[data-page="reports"] .platform-main-value.small.compact,
  body[data-page="reports"] .currency-summary-metric,
  body[data-page="reports"] .premium-metric .value,
  body[data-page="withdrawals"] .compact-summary-card strong,
  body[data-page="transactions"] .compact-inline-item strong{
    font-size:22px;
  }
  body[data-page="reports"] .platform-meta-grid.compact-platform-meta-grid,
  body[data-page="reports"] .currency-summary-grid,
  body[data-page="reports"] .manual-finance-grid.compact-manual-finance-grid,
  body[data-page="transactions"] .compact-inline-grid.compact-inline-grid-5{
    grid-template-columns:1fr;
    gap:10px;
  }
  body[data-page="reports"] .platform-meta-grid.compact-platform-meta-grid > div,
  body[data-page="reports"] .currency-summary-list > div,
  body[data-page="reports"] .manual-finance-items > div{
    min-height:auto;
    padding:13px 14px;
  }
  body[data-page="reports"] .report-trend-row{
    padding:14px;
    gap:10px;
  }
  body[data-page="reports"] .report-trend-gross strong,
  body[data-page="reports"] .report-trend-client{
    font-size:15px;
  }
}


body[data-page="reports"] .client-safe-kpis{grid-template-columns:repeat(3,minmax(0,1fr));}
body[data-page="reports"] .client-safe-platform-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
@media (max-width:760px){body[data-page="reports"] .client-safe-kpis,body[data-page="reports"] .client-safe-platform-grid{grid-template-columns:1fr;}}


/* final report trend and global spacing polish */
:root{
  --soft-card-border:#d9e5f4;
  --soft-card-bg:#fbfdff;
}
body.app-shell .main{
  padding-left:clamp(18px,2vw,30px);
  padding-right:clamp(18px,2vw,30px);
}
body[data-page="reports"] .reports-page{
  display:block;
}
body[data-page="reports"] .reports-split-half{
  gap:18px !important;
  align-items:start !important;
}
body[data-page="reports"] .reports-trend-card,
body[data-page="reports"] .reports-manual-card{
  padding:24px !important;
  border-radius:22px !important;
  background:#ffffff !important;
  border:1px solid var(--soft-card-border) !important;
  box-shadow:0 10px 28px rgba(15,35,70,.05) !important;
}
body[data-page="reports"] .reports-trend-card .card-head,
body[data-page="reports"] .reports-manual-card .card-head{
  margin-bottom:18px !important;
}
body[data-page="reports"] .reports-trend-card .card-head h3,
body[data-page="reports"] .reports-manual-card .card-head h3{
  font-size:18px !important;
  font-weight:800 !important;
  line-height:1.25 !important;
  color:#0f213b !important;
  letter-spacing:-.02em !important;
}
body[data-page="reports"] .reports-trend-card .card-head .muted,
body[data-page="reports"] .reports-manual-card .card-head .muted{
  margin-top:6px !important;
  font-size:13.5px !important;
  line-height:1.55 !important;
  color:#61738f !important;
}
body[data-page="reports"] .reports-trend-card .stack-list.compact{
  gap:14px !important;
}
body[data-page="reports"] .report-trend-row{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:18px !important;
  padding:18px 20px !important;
  margin:0 !important;
  border-radius:18px !important;
  border:1px solid #dbe8f7 !important;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%) !important;
  box-shadow:none !important;
  min-height:72px !important;
}
body[data-page="reports"] .report-trend-main{
  min-width:0 !important;
  display:grid !important;
  gap:4px !important;
}
body[data-page="reports"] .report-trend-day{
  font-size:12.5px !important;
  font-weight:700 !important;
  color:#7b8da6 !important;
  line-height:1.3 !important;
}
body[data-page="reports"] .report-trend-gross strong{
  display:block !important;
  font-size:17px !important;
  font-weight:800 !important;
  color:#0d2a52 !important;
  line-height:1.2 !important;
  letter-spacing:-.02em !important;
  overflow-wrap:anywhere !important;
}
body[data-page="reports"] .report-trend-talents{
  font-size:12.5px !important;
  color:#7c8ba3 !important;
  line-height:1.35 !important;
}
body[data-page="reports"] .report-trend-side{
  min-width:112px !important;
  text-align:right !important;
  display:grid !important;
  gap:3px !important;
  justify-items:end !important;
}
body[data-page="reports"] .report-trend-client{
  display:block !important;
  font-size:17px !important;
  font-weight:800 !important;
  line-height:1.2 !important;
  color:#0d2a52 !important;
  letter-spacing:-.02em !important;
  overflow-wrap:anywhere !important;
}
body[data-page="reports"] .report-trend-side small{
  font-size:12.5px !important;
  font-weight:600 !important;
  color:#6d7e97 !important;
  line-height:1.35 !important;
}
body[data-page="reports"] .manual-finance-grid.compact-manual-finance-grid{
  gap:14px !important;
}
body[data-page="reports"] .manual-finance-card{
  padding:18px !important;
  border-radius:18px !important;
  border:1px solid #dbe8f7 !important;
}
body[data-page="reports"] .manual-finance-items{
  gap:10px !important;
}
body[data-page="reports"] .manual-finance-items > div{
  padding:13px 14px !important;
  border-radius:15px !important;
}
body[data-page="reports"] .manual-finance-items strong{
  font-size:15px !important;
  line-height:1.25 !important;
  overflow-wrap:anywhere !important;
}
body[data-page="reports"] .card,
body[data-page="dashboard"] .card,
body[data-page="transactions"] .card,
body[data-page="withdrawals"] .card{
  overflow:hidden;
}
body[data-page="reports"] .platform-card,
body[data-page="dashboard"] .platform-card,
body[data-page="reports"] .info-tile,
body[data-page="dashboard"] .info-tile,
body[data-page="reports"] .compact-inline-item,
body[data-page="dashboard"] .compact-inline-item{
  overflow-wrap:anywhere;
}
@media (max-width:980px){
  body[data-page="reports"] .reports-split-half{
    grid-template-columns:1fr !important;
  }
}
@media (max-width:640px){
  body.app-shell .main{
    padding-left:14px !important;
    padding-right:14px !important;
  }
  body[data-page="reports"] .reports-trend-card,
  body[data-page="reports"] .reports-manual-card{
    padding:18px !important;
    border-radius:18px !important;
  }
  body[data-page="reports"] .report-trend-row{
    grid-template-columns:1fr !important;
    gap:10px !important;
    padding:15px 16px !important;
    min-height:auto !important;
  }
  body[data-page="reports"] .report-trend-side{
    min-width:0 !important;
    width:100% !important;
    text-align:left !important;
    justify-items:start !important;
    padding-top:8px !important;
    border-top:1px solid #edf3fb !important;
  }
  body[data-page="reports"] .report-trend-gross strong,
  body[data-page="reports"] .report-trend-client{
    font-size:16px !important;
  }
}


/* passkey ui */
.passkey-login-box,.passkey-manage-card{
  border:1px solid #d9e4f3;
  background:#f8fbff;
}
.passkey-login-box{
  margin-top:18px;
  padding:16px;
  border-radius:18px;
}
.passkey-login-head{display:flex;flex-direction:column;gap:4px;margin-bottom:12px}
.passkey-login-head strong{font-size:15px;color:#14233d}
.passkey-login-head span{font-size:13px;color:#6a7a93}
.btn-passkey-login,.btn-passkey-register{min-height:46px}
.passkey-feedback{margin-top:12px;padding:10px 12px;border-radius:14px;font-size:13px;font-weight:600}
.passkey-feedback.success{background:#ecfdf5;color:#166534;border:1px solid #bbf7d0}
.passkey-feedback.error{background:#fef2f2;color:#b91c1c;border:1px solid #fecaca}
.passkey-device-list{display:grid;gap:12px;margin-top:14px}
.passkey-device-item{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 16px;border:1px solid #dbe6f5;border-radius:16px;background:#fff}
.passkey-device-item strong{font-size:14px;color:#14233d}
body[data-page="dashboard"] .passkey-manage-card{padding:22px}
@media (max-width:760px){
  .passkey-device-item{flex-direction:column;align-items:flex-start}
  .btn-passkey-login,.btn-passkey-register{width:100%}
}


/* security settings page */
body[data-page="security"] .topbar-right{align-self:flex-start}
.security-hero-card,.security-settings-card{padding:24px;border-radius:24px}
.security-overview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.security-overview-card{padding:18px 18px 16px;border:1px solid #dbe6f5;border-radius:18px;background:#fbfcfe;display:flex;flex-direction:column;gap:8px}
.security-overview-card span{font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#7b8aa3}
.security-overview-card strong{font-size:22px;line-height:1.15;color:#13253f;font-weight:800;letter-spacing:-.02em}
.security-overview-card small{font-size:13px;line-height:1.55;color:#6a7a93}
.security-page-grid{align-items:start}
.security-device-list{gap:14px}
.security-device-item{padding:16px 18px;border-radius:18px;background:#fbfcfe;border:1px solid #dbe6f5}
.security-device-copy{display:grid;gap:4px}
.security-device-copy strong{font-size:15px}
.security-steps{display:grid;gap:14px;margin-top:8px}
.security-step{display:grid;grid-template-columns:40px minmax(0,1fr);gap:14px;align-items:start;padding:16px 0;border-bottom:1px solid #e8eef6}
.security-step:last-child{border-bottom:0;padding-bottom:0}
.security-step span{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(135deg,#4f7cff,#6b4eff);color:#fff;font-weight:800;box-shadow:0 10px 24px rgba(79,124,255,.22)}
.security-step strong{display:block;font-size:15px;line-height:1.35;color:#13253f;margin-bottom:4px}
.security-step p{margin:0;font-size:13.5px;line-height:1.6;color:#6a7a93}
.security-note{margin-top:18px;padding:14px 16px;border-radius:16px;background:#f7faff;border:1px solid #dbe6f5;font-size:13.5px;line-height:1.6;color:#566a88}
.passkey-dashboard-link-card .passkey-inline-summary{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.passkey-dashboard-link-card .hero-pill{font-size:12px;padding:9px 12px}
/* overall UI tidy pass */
.card,.topbar,.sidebar .nav-link,.btn,input,select,textarea,.badge,.pill{transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease,color .18s ease,transform .18s ease}
.topbar{padding:24px 28px;border-radius:24px;margin-bottom:18px}
.main{padding:24px}
.card{padding:22px;border-radius:22px}
.card-head{gap:14px}
.card-head h3{margin-bottom:4px}
.filter-toolbar,.toolbar-filters{gap:10px}
input,select,textarea{min-height:44px;border-radius:14px}
textarea{min-height:112px}
.btn{min-height:44px;border-radius:14px;padding:0 16px}
.stack-list.compact{gap:12px}
.list-row.compact,.clean-list-item,.compact-summary-card,.compact-inline-item,.info-tile,.summary-chip{border-radius:18px}
.table-wrap{border-radius:18px;overflow:auto}
.table-wrap table{min-width:720px}
@media (max-width:980px){
  .security-overview-grid{grid-template-columns:1fr}
  .security-page-grid{grid-template-columns:1fr}
}
@media (max-width:760px){
  .main{padding:16px}
  .topbar{padding:18px 18px 16px;border-radius:22px}
  .card,.security-hero-card,.security-settings-card{padding:18px}
  .card-head{gap:10px}
  .security-step{grid-template-columns:34px minmax(0,1fr);gap:12px;padding:14px 0}
  .security-step span{width:34px;height:34px;border-radius:10px}
  .security-device-item{padding:14px}
  .passkey-dashboard-link-card .card-head{align-items:flex-start}
  .table-wrap table{min-width:640px}
}


/* client report privacy + spacing polish */
body[data-page="reports"] .client-safe-kpis{grid-template-columns:repeat(3,minmax(0,1fr)) !important;}
body[data-page="reports"] .client-safe-platform-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
body[data-page="reports"] .client-safe-currency-list{grid-template-columns:repeat(2,minmax(0,1fr)) !important;}
body[data-page="reports"] .reports-split-half{gap:18px !important;}
body[data-page="reports"] .reports-trend-card,
body[data-page="reports"] .reports-manual-card{padding:24px !important;border-radius:24px !important;}
body[data-page="reports"] .reports-trend-card .card-head,
body[data-page="reports"] .reports-manual-card .card-head{margin-bottom:16px !important;}
body[data-page="reports"] .reports-trend-card .card-head h3,
body[data-page="reports"] .reports-manual-card .card-head h3{font-size:18px !important;font-weight:800 !important;line-height:1.28 !important;}
body[data-page="reports"] .reports-trend-card .card-head .muted,
body[data-page="reports"] .reports-manual-card .card-head .muted{font-size:13px !important;line-height:1.6 !important;color:#70809a !important;}
body[data-page="reports"] .stack-list.compact{gap:12px !important;}
body[data-page="reports"] .report-trend-row{padding:16px 18px !important;border-radius:18px !important;gap:14px !important;align-items:flex-start !important;}
body[data-page="reports"] .report-trend-main,
body[data-page="reports"] .report-trend-side{min-width:0 !important;}
body[data-page="reports"] .report-trend-day{font-size:13px !important;font-weight:700 !important;color:#5d6f8a !important;margin-bottom:6px !important;}
body[data-page="reports"] .report-trend-gross{margin-bottom:6px !important;}
body[data-page="reports"] .report-trend-gross strong{font-size:16px !important;font-weight:800 !important;line-height:1.22 !important;color:#11233e !important;}
body[data-page="reports"] .report-trend-talents{font-size:12.5px !important;line-height:1.55 !important;color:#73849d !important;word-break:break-word !important;}
body[data-page="reports"] .report-trend-side{padding-left:16px !important;margin-left:auto !important;text-align:right !important;}
body[data-page="reports"] .report-trend-client{font-size:16px !important;font-weight:800 !important;line-height:1.2 !important;color:#13253f !important;}
body[data-page="reports"] .report-trend-side small{display:block !important;margin-top:4px !important;font-size:12px !important;line-height:1.45 !important;color:#7a89a0 !important;}
body[data-page="reports"] .manual-finance-grid.compact-manual-finance-grid{gap:14px !important;}
body[data-page="reports"] .manual-finance-card{padding:18px !important;border-radius:18px !important;}
body[data-page="reports"] .manual-finance-head{margin-bottom:12px !important;gap:10px !important;}
body[data-page="reports"] .manual-finance-items{gap:10px !important;}
body[data-page="reports"] .manual-finance-items > div{padding:13px 14px !important;border-radius:15px !important;min-width:0 !important;}
body[data-page="reports"] .manual-finance-items span{display:block !important;margin-bottom:8px !important;font-size:11px !important;line-height:1.4 !important;}
body[data-page="reports"] .manual-finance-items strong{display:block !important;font-size:15px !important;line-height:1.22 !important;word-break:break-word !important;}
@media (max-width:760px){
  body[data-page="reports"] .client-safe-kpis,
  body[data-page="reports"] .client-safe-platform-grid,
  body[data-page="reports"] .client-safe-currency-list{grid-template-columns:1fr !important;}
  body[data-page="reports"] .reports-trend-card,
  body[data-page="reports"] .reports-manual-card{padding:18px !important;}
  body[data-page="reports"] .report-trend-row{padding:14px !important;gap:10px !important;}
  body[data-page="reports"] .report-trend-side{padding-left:0 !important;text-align:left !important;margin-left:0 !important;}
}


.import-preview-card{padding-bottom:22px}.import-preview-grid{align-items:start;gap:16px}.import-preview-panel{padding:18px;border-radius:20px}.import-preview-panel .card-head h3{font-size:16px}.import-preview-list{gap:10px}.import-preview-row{padding:12px 14px;border-radius:16px}.import-preview-row .right{text-align:right;min-width:160px}.preview-new{border:1px solid #dcefe2;background:#fbfffc}.preview-existing{border:1px solid #dfe6f7;background:#fbfcff}.preview-skipped{border:1px solid #f5ead7;background:#fffdfa}.preview-failed{border:1px solid #f1d8d8;background:#fffafa}@media (max-width:760px){.import-preview-grid{grid-template-columns:1fr}.import-preview-row{gap:8px}.import-preview-row .right{min-width:0}}

.dedupe-preview-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.dedupe-preview-card{background:#fff;border:1px solid #f0d78a;border-radius:16px;padding:14px 16px;box-shadow:0 1px 0 rgba(255,255,255,.6) inset}
.dedupe-preview-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start;margin-bottom:10px}
.dedupe-preview-head strong{font-size:14px;font-weight:800;color:#1a2942}
.dedupe-preview-kv{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:10px}
.dedupe-preview-kv > div{background:#fff8e7;border:1px solid #f6e3aa;border-radius:12px;padding:10px 12px}
.dedupe-preview-kv span{display:block;font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#8a6c1d;margin-bottom:6px}
.dedupe-preview-kv strong{font-size:13px;line-height:1.35;color:#1c2b44;word-break:break-word}
.dedupe-preview-note{font-size:12.5px;line-height:1.6}
@media (max-width:760px){.dedupe-preview-grid,.dedupe-preview-kv{grid-template-columns:1fr}}


.import-preview-title-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:4px}
.import-preview-row .badge.subtle{font-size:11px;font-weight:800;letter-spacing:.04em;text-transform:none;padding:6px 9px;border-radius:999px}
.import-preview-row .badge.warning.subtle{background:#fff6db;border:1px solid #f3d98b;color:#8a5a00}
.import-preview-panel .list-row{align-items:flex-start;gap:14px}
.import-preview-panel .list-row .right{min-width:160px}
@media (max-width:760px){.import-preview-title-row{gap:8px}.import-preview-panel .list-row .right{min-width:0}}

/* Exchange rate UI */
.topbar-fx-rate{display:flex;flex-direction:column;gap:2px;text-decoration:none;border:1px solid rgba(15,23,42,.08);background:#fff;border-radius:14px;padding:10px 12px;min-width:150px;box-shadow:0 8px 22px rgba(15,23,42,.06)}
.topbar-fx-rate span{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:#64748b;font-weight:700}
.topbar-fx-rate strong{font-size:14px;color:#0f172a;line-height:1.15}
.topbar-fx-rate small{font-size:11px;color:#64748b}
.fx-big-rate{display:flex;flex-direction:column;align-items:flex-end;gap:4px;background:rgba(15,23,42,.04);border-radius:18px;padding:14px 16px;min-width:220px}
.fx-big-rate span,.fx-big-rate small{color:#64748b;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.fx-big-rate strong{font-size:24px;color:#0f172a}
.fx-action-stack{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
@media (max-width: 760px){.topbar-fx-rate{width:100%;min-width:0}.fx-big-rate{align-items:flex-start;width:100%;min-width:0}.fx-big-rate strong{font-size:20px}}
