:root {
  --navy: #102536;
  --navy-2: #17384a;
  --ink: #172733;
  --muted: #687984;
  --muted-2: #8e9ba3;
  --paper: #f4f7f7;
  --surface: #ffffff;
  --line: #dfe7e8;
  --line-dark: #cbd8da;
  --teal: #168b82;
  --teal-dark: #0f6e68;
  --teal-soft: #e7f5f2;
  --amber: #b97927;
  --amber-soft: #fff4df;
  --coral: #c75e5c;
  --coral-soft: #fcedeb;
  --blue: #4673ad;
  --blue-soft: #edf3fb;
  --shadow: 0 18px 50px rgba(16, 37, 54, .07);
  --shadow-small: 0 8px 25px rgba(16, 37, 54, .06);
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--paper); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(22, 139, 130, .24); outline-offset: 2px; }
[hidden] { display: none !important; }

.login-shell { position: relative; display: grid; min-height: 100vh; place-items: center; overflow: hidden; padding: 32px 16px; background: var(--navy); }
.login-shell::before { position: absolute; inset: 0; content: ""; background: linear-gradient(115deg, rgba(22,139,130,.17), transparent 45%), radial-gradient(circle at 12% 80%, rgba(199,94,92,.12), transparent 30%); }
.login-orbit { position: absolute; border: 1px solid rgba(230,250,246,.16); border-radius: 50%; transform: rotate(-20deg); }
.orbit-one { width: 55vw; height: 55vw; right: -14vw; top: -16vw; }
.orbit-two { width: 28vw; height: 28vw; left: -11vw; bottom: -8vw; border-color: rgba(234,198,140,.18); }
.login-card { position: relative; width: min(100%, 424px); padding: 42px 40px 34px; border: 1px solid rgba(255,255,255,.13); border-radius: 20px; background: rgba(255,255,255,.96); box-shadow: 0 30px 90px rgba(0,0,0,.24); }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; flex: 0 0 auto; color: #fff; border-radius: 11px; background: var(--teal); box-shadow: 0 7px 14px rgba(22, 139, 130, .24); }
.brand-mark span { font-size: 12px; font-weight: 800; letter-spacing: -.04em; }
.brand-mark-large { width: 46px; height: 46px; margin-bottom: 27px; border-radius: 14px; background: var(--navy); box-shadow: none; }
.brand-mark-large span { font-size: 14px; }
.eyebrow { margin: 0; color: var(--teal); font-size: 10px; font-weight: 800; letter-spacing: .13em; line-height: 1.3; }
.login-card h1 { margin: 7px 0 10px; color: var(--navy); font-size: 32px; letter-spacing: -.045em; line-height: 1.08; }
.login-copy { margin: 0 0 30px; color: var(--muted); }
.stack-form { display: grid; gap: 16px; }
.stack-form label, .form-grid label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }
.stack-form input, .form-grid input, .form-grid select, .form-grid textarea, .search-wrap input, .filter-bar select { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); padding: 0 12px; transition: border-color .16s, box-shadow .16s; }
.stack-form input:focus, .form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus, .search-wrap input:focus, .filter-bar select:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(22,139,130,.1); outline: none; }
.form-error { min-height: 18px; margin: 0; color: var(--coral); font-size: 12px; }
.login-footnote { margin: 30px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 11px; }

.app-shell { display: grid; min-height: 100vh; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar { display: flex; position: sticky; top: 0; height: 100vh; flex-direction: column; padding: 24px 15px 16px; color: #dbe7e8; background: var(--navy); }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 0 11px; }
.sidebar-brand strong, .sidebar-brand small { display: block; }
.sidebar-brand strong { color: #f8fbfb; font-size: 14px; letter-spacing: -.02em; }
.sidebar-brand small { margin-top: 2px; color: #8aa2aa; font-size: 10px; }
.sidebar-rule { height: 1px; margin: 28px 11px 18px; background: rgba(255,255,255,.11); }
.nav-list { display: grid; gap: 5px; }
.nav-item { display: grid; grid-template-columns: 27px 1fr auto; align-items: center; gap: 7px; min-height: 45px; padding: 0 10px; border: 0; border-radius: 10px; color: #92a8ad; background: transparent; text-align: left; transition: color .16s, background .16s; }
.nav-item:hover { color: #eaf6f3; background: rgba(255,255,255,.07); }
.nav-item.active { color: #fff; background: rgba(22,139,130,.95); box-shadow: 0 8px 18px rgba(0,0,0,.13); }
.nav-icon { display: grid; width: 23px; height: 23px; place-items: center; font-size: 16px; font-weight: 400; }
.nav-item kbd { color: currentColor; opacity: .65; font-size: 9px; letter-spacing: .08em; }
.sidebar-bottom { display: grid; gap: 16px; margin-top: auto; }
.integration-note { display: flex; gap: 9px; padding: 12px 11px; border: 1px solid rgba(255,255,255,.1); border-radius: 11px; background: rgba(255,255,255,.05); }
.integration-note strong, .integration-note small { display: block; }
.integration-note strong { color: #eaf6f3; font-size: 11px; }
.integration-note small { margin-top: 3px; color: #8fa6ac; font-size: 10px; line-height: 1.45; }
.status-dot, .live-dot { display: inline-block; width: 7px; height: 7px; margin-top: 5px; flex: 0 0 auto; border-radius: 50%; background: #d5963d; box-shadow: 0 0 0 4px rgba(213,150,61,.1); }
.user-strip { display: flex; align-items: center; gap: 9px; padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.1); }
.user-strip strong, .user-strip small { display: block; }
.user-strip strong { color: #eff8f8; font-size: 11px; }
.user-strip small { color: #849ba1; font-size: 10px; }
.avatar { display: grid; width: 29px; height: 29px; place-items: center; color: var(--navy); border-radius: 50%; background: #e6c48b; font-size: 12px; font-weight: 800; }
.user-strip .icon-button { margin-left: auto; color: #8ca4aa; }
.main-content { min-width: 0; }
.topbar { display: flex; min-height: 70px; align-items: center; justify-content: space-between; gap: 18px; padding: 0 40px; border-bottom: 1px solid var(--line); background: rgba(244,247,247,.92); }
.mobile-brand { display: none; align-items: center; gap: 9px; color: var(--navy); }
.topbar-meta { display: flex; align-items: center; gap: 8px; color: var(--muted-2); font-size: 11px; }
.live-dot { margin-top: 0; width: 6px; height: 6px; background: var(--teal); box-shadow: 0 0 0 4px rgba(22,139,130,.1); }
.topbar-meta time { margin-left: 8px; color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.view { max-width: 1360px; margin: 0 auto; padding: 42px 40px 70px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.heading-dashboard { align-items: center; }
.page-heading h1 { margin: 7px 0 8px; color: var(--navy); font-size: clamp(27px, 3.2vw, 38px); letter-spacing: -.055em; line-height: 1.1; }
.page-subtitle { max-width: 650px; margin: 0; color: var(--muted); font-size: 13px; }
.heading-actions { display: flex; gap: 9px; flex: 0 0 auto; }
.button { display: inline-flex; min-height: 39px; align-items: center; justify-content: center; gap: 6px; padding: 0 14px; border: 1px solid transparent; border-radius: 9px; font-size: 12px; font-weight: 750; white-space: nowrap; transition: transform .16s, box-shadow .16s, background .16s, border-color .16s; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button-primary { color: #fff; background: var(--teal); box-shadow: 0 7px 13px rgba(22,139,130,.17); }
.button-primary:hover { background: var(--teal-dark); box-shadow: 0 10px 18px rgba(22,139,130,.22); }
.button-outline { color: var(--navy); border-color: var(--line-dark); background: rgba(255,255,255,.66); }
.button-outline:hover, .button-quiet:hover { border-color: var(--teal); color: var(--teal-dark); }
.button-quiet { min-height: 34px; padding: 0 9px; color: var(--muted); background: transparent; }
.button-soft { color: var(--teal-dark); background: var(--teal-soft); }
.button-block { width: 100%; min-height: 46px; margin-top: 1px; }
.icon-button { display: inline-grid; width: 31px; height: 31px; place-items: center; padding: 0; border: 0; border-radius: 8px; color: var(--muted); background: transparent; }
.icon-button:hover { color: var(--teal-dark); background: var(--teal-soft); }
.mobile-menu { display: none; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.metric-card { position: relative; min-height: 139px; padding: 20px 19px 17px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-small); }
.metric-card::after { position: absolute; width: 90px; height: 90px; right: -35px; bottom: -45px; border: 1px solid currentColor; border-radius: 50%; opacity: .11; content: ""; }
.metric-card .metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.metric-label { color: var(--muted); font-size: 11px; font-weight: 700; }
.metric-icon { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 8px; font-size: 13px; font-weight: 800; }
.metric-value { margin-top: 15px; color: var(--navy); font-size: clamp(23px, 2.4vw, 31px); font-weight: 760; letter-spacing: -.055em; line-height: 1; }
.metric-value small { margin-left: 3px; font-size: 12px; font-weight: 700; letter-spacing: 0; }
.metric-foot { display: flex; align-items: center; gap: 4px; margin-top: 11px; color: var(--muted-2); font-size: 10px; }
.metric-card.teal { color: var(--teal); }.metric-card.teal .metric-icon { color: var(--teal-dark); background: var(--teal-soft); }
.metric-card.amber { color: var(--amber); }.metric-card.amber .metric-icon { color: var(--amber); background: var(--amber-soft); }
.metric-card.coral { color: var(--coral); }.metric-card.coral .metric-icon { color: var(--coral); background: var(--coral-soft); }
.metric-card.blue { color: var(--blue); }.metric-card.blue .metric-icon { color: var(--blue); background: var(--blue-soft); }

.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-small); }
.money-rail { margin-bottom: 18px; padding: 22px 23px 25px; }
.section-caption { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.section-caption h2 { margin: 5px 0 0; color: var(--navy); font-size: 16px; letter-spacing: -.035em; }
.caption-note { padding-top: 3px; color: var(--muted-2); font-size: 10px; white-space: nowrap; }
.rail-track { display: grid; grid-template-columns: repeat(5, 1fr); position: relative; margin-top: 31px; }
.rail-track::before { position: absolute; top: 15px; right: 8%; left: 8%; height: 1px; background: var(--line-dark); content: ""; }
.rail-node { position: relative; display: grid; justify-items: center; gap: 9px; text-align: center; }
.rail-node::before { z-index: 1; width: 30px; height: 30px; border: 6px solid #fff; border-radius: 50%; background: var(--line-dark); box-shadow: 0 0 0 1px var(--line-dark); content: ""; }
.rail-node.done::before { background: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.rail-node.current::before { background: var(--amber); box-shadow: 0 0 0 1px var(--amber), 0 0 0 6px rgba(185,121,39,.12); }
.rail-node strong { color: var(--navy); font-size: 11px; }
.rail-node small { min-height: 17px; color: var(--muted-2); font-size: 10px; }
.rail-node.done small { color: var(--teal-dark); }.rail-node.current small { color: var(--amber); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; }
.lower-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); }
.chart-card { min-height: 292px; padding: 22px 23px; }
.legend { display: flex; gap: 11px; padding-top: 3px; color: var(--muted-2); font-size: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }.legend i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; }.legend-in { background: var(--teal); }.legend-out { background: #d6a06a; }
.status-chart { display: grid; gap: 14px; margin-top: 28px; }
.bar-line { display: grid; grid-template-columns: 68px 1fr 30px; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; }
.bar-track { height: 8px; overflow: hidden; border-radius: 8px; background: #eef2f2; }.bar-fill { height: 100%; border-radius: inherit; background: var(--teal); }.bar-line:nth-child(2) .bar-fill { background: #6d9ec1; }.bar-line:nth-child(3) .bar-fill { background: #b99a70; }.bar-line:nth-child(4) .bar-fill { background: #d48a6c; }.bar-line:nth-child(5) .bar-fill { background: #7ba88e; }.bar-line:nth-child(6) .bar-fill { background: #9eafb2; }
.bar-count { color: var(--navy); font-weight: 750; text-align: right; }
.cashflow-chart { display: grid; grid-template-columns: repeat(6, 1fr); align-items: end; gap: 11px; min-height: 190px; margin-top: 25px; padding: 0 4px 22px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0, transparent 45px, rgba(223,231,232,.66) 46px); }
.cash-col { display: grid; height: 100%; grid-template-rows: 1fr auto; align-items: end; justify-items: center; gap: 8px; }
.cash-bars { display: flex; align-items: end; gap: 4px; height: 145px; }.cash-bar { width: 10px; min-height: 2px; border-radius: 4px 4px 0 0; }.cash-bar.in { background: var(--teal); }.cash-bar.out { background: #d6a06a; }.cash-month { color: var(--muted-2); font-size: 10px; }
.action-list, .mini-list { display: grid; gap: 2px; margin-top: 16px; }
.action-row, .mini-row { display: flex; align-items: center; gap: 11px; min-height: 53px; padding: 8px 6px; border-bottom: 1px solid #eef2f2; }.action-row:last-child, .mini-row:last-child { border-bottom: 0; }.action-mark { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; color: var(--amber); border-radius: 8px; background: var(--amber-soft); font-size: 12px; }.action-main, .mini-main { min-width: 0; flex: 1; }.action-main strong, .action-main small, .mini-main strong, .mini-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.action-main strong, .mini-main strong { color: var(--navy); font-size: 11px; }.action-main small, .mini-main small { margin-top: 2px; color: var(--muted-2); font-size: 10px; }.action-amount { color: var(--amber); font-size: 11px; font-weight: 750; }.mini-status { align-self: start; }.text-button { padding: 2px 0; border: 0; color: var(--teal-dark); background: transparent; font-size: 11px; font-weight: 750; }.text-button:hover { color: var(--teal); }
.empty-mini { padding: 26px 6px; color: var(--muted-2); font-size: 11px; }

.filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 10px; }.search-wrap { display: flex; min-width: 230px; flex: 1; align-items: center; gap: 6px; padding-left: 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }.search-wrap:focus-within { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(22,139,130,.1); }.search-wrap span { color: var(--muted-2); font-size: 18px; }.search-wrap input { min-height: 37px; padding-left: 0; border: 0; box-shadow: none; outline: 0; }.search-wrap input:focus { box-shadow: none; }.filter-bar select { width: 144px; min-height: 37px; color: var(--muted); font-size: 11px; }.filter-count { margin-left: auto; padding-right: 7px; color: var(--muted-2); font-size: 11px; white-space: nowrap; }
.table-card { overflow: hidden; }.table-scroll { overflow-x: auto; } table { width: 100%; border-collapse: collapse; min-width: 850px; } th { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--muted-2); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-align: left; white-space: nowrap; } td { padding: 15px 16px; border-bottom: 1px solid #eef2f2; color: var(--muted); font-size: 12px; vertical-align: middle; } tr:last-child td { border-bottom: 0; } tbody tr:hover { background: #fbfdfd; }.cell-main strong, .cell-main small { display: block; }.cell-main strong { color: var(--navy); font-size: 12px; }.cell-main small { max-width: 210px; margin-top: 3px; overflow: hidden; color: var(--muted-2); text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }.money { color: var(--navy); font-weight: 760; }.money.income { color: var(--teal-dark); }.money.expense { color: var(--coral); }.sub-money { margin-top: 3px; color: var(--muted-2); font-size: 10px; }.status-chip { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border-radius: 999px; color: var(--muted); background: #eef2f2; font-size: 10px; font-weight: 750; white-space: nowrap; }.status-chip.teal { color: var(--teal-dark); background: var(--teal-soft); }.status-chip.amber { color: #96621e; background: var(--amber-soft); }.status-chip.coral { color: #a84947; background: var(--coral-soft); }.status-chip.blue { color: #446c9d; background: var(--blue-soft); }.status-chip.done { color: #326b52; background: #edf7ef; }.row-actions { display: flex; align-items: center; gap: 5px; }.table-action { min-height: 29px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--teal-dark); background: #fff; font-size: 10px; font-weight: 750; white-space: nowrap; }.table-action:hover { border-color: var(--teal); background: var(--teal-soft); }.table-action.primary { color: #fff; border-color: var(--teal); background: var(--teal); }.table-action.danger { color: var(--coral); }.empty-state { display: grid; justify-items: center; gap: 6px; padding: 74px 20px 84px; text-align: center; }.empty-state > span { color: var(--teal); font-size: 28px; }.empty-state strong { color: var(--navy); font-size: 14px; }.empty-state small { color: var(--muted-2); font-size: 11px; }

.modal-root { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(16,37,54,.48); }.modal { width: min(100%, 580px); max-height: calc(100vh - 36px); overflow: auto; border: 1px solid rgba(255,255,255,.7); border-radius: 16px; background: var(--surface); box-shadow: 0 28px 90px rgba(0,0,0,.25); }.modal-head { display: flex; align-items: start; justify-content: space-between; gap: 15px; padding: 23px 24px 16px; border-bottom: 1px solid var(--line); }.modal-head h2 { margin: 3px 0 0; color: var(--navy); font-size: 20px; letter-spacing: -.045em; }.modal-head p { margin: 6px 0 0; color: var(--muted); font-size: 11px; }.modal-body { padding: 21px 24px 24px; }.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 13px; }.form-grid .full { grid-column: 1 / -1; }.form-grid textarea { min-height: 86px; padding-top: 10px; resize: vertical; }.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--line); }.form-hint { grid-column: 1 / -1; margin: -4px 0 0; padding: 9px 10px; border-radius: 8px; color: var(--muted); background: var(--paper); font-size: 11px; }.detail-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-bottom: 18px; }.detail-kpi { padding: 10px; border-radius: 8px; background: var(--paper); }.detail-kpi small, .detail-kpi strong { display: block; }.detail-kpi small { color: var(--muted-2); font-size: 10px; }.detail-kpi strong { margin-top: 3px; color: var(--navy); font-size: 15px; }.detail-section { margin-top: 19px; }.detail-section h3 { margin: 0 0 8px; color: var(--navy); font-size: 12px; }.detail-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid #eef2f2; color: var(--muted); font-size: 11px; }.detail-line:last-child { border-bottom: 0; }.detail-line strong { color: var(--navy); }.stepper { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 3px 0 20px; }.step { position: relative; display: grid; justify-items: center; gap: 5px; color: var(--muted-2); font-size: 9px; text-align: center; }.step::before { z-index: 1; width: 19px; height: 19px; border: 4px solid #fff; border-radius: 50%; background: var(--line-dark); box-shadow: 0 0 0 1px var(--line-dark); content: ""; }.step:not(:last-child)::after { position: absolute; top: 9px; left: 50%; width: 100%; height: 1px; background: var(--line-dark); content: ""; }.step.done { color: var(--teal-dark); }.step.done::before { background: var(--teal); box-shadow: 0 0 0 1px var(--teal); }.step.done:not(:last-child)::after { background: var(--teal); }.step.current { color: var(--amber); }.step.current::before { background: var(--amber); box-shadow: 0 0 0 1px var(--amber), 0 0 0 5px rgba(185,121,39,.11); }.modal-footer-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 20px; }
.toast { position: fixed; z-index: 30; right: 22px; bottom: 22px; max-width: min(360px, calc(100vw - 44px)); padding: 12px 15px; border: 1px solid var(--line); border-radius: 10px; color: var(--navy); background: #fff; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .2s, transform .2s; font-size: 12px; }.toast.show { opacity: 1; transform: translateY(0); }.toast.error { color: #a84947; border-color: #f0c5c2; background: #fff7f6; }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 214px minmax(0, 1fr); }.topbar, .view { padding-left: 25px; padding-right: 25px; }.metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .app-shell { display: block; }.sidebar { position: fixed; z-index: 15; top: 0; left: 0; width: 238px; transform: translateX(-102%); transition: transform .22s ease; box-shadow: 20px 0 50px rgba(0,0,0,.2); }.app-shell.sidebar-open .sidebar { transform: translateX(0); }.mobile-menu { display: inline-grid; }.mobile-brand { display: flex; }.topbar { min-height: 62px; padding: 0 16px; }.topbar-meta { display: none; }.topbar-actions .button { display: none; }.view { padding: 28px 16px 48px; }.page-heading, .heading-dashboard { align-items: start; flex-direction: column; margin-bottom: 23px; }.heading-actions { width: 100%; }.heading-actions .button { flex: 1; }.dashboard-grid, .lower-grid { grid-template-columns: 1fr; }.rail-track { min-width: 600px; }.money-rail { overflow-x: auto; }.caption-note { display: none; }.filter-bar { flex-wrap: wrap; }.search-wrap { min-width: 100%; }.filter-bar select { flex: 1; width: auto; }.filter-count { margin-left: 0; }.table-card { border-radius: 11px; }.modal-root { align-items: end; padding: 0; }.modal { width: 100%; max-height: 92vh; border-radius: 17px 17px 0 0; }.modal-head { padding: 20px 18px 14px; }.modal-body { padding: 18px; }
}
@media (max-width: 470px) {
  .login-card { padding: 32px 23px 25px; }.metric-grid { grid-template-columns: 1fr; }.metric-card { min-height: 122px; }.topbar .mobile-brand strong { font-size: 13px; }.page-heading h1 { font-size: 29px; }.heading-actions { flex-direction: column; }.form-grid { grid-template-columns: 1fr; }.form-grid .full { grid-column: auto; }.detail-summary { grid-template-columns: repeat(2, 1fr); }.cashflow-chart { gap: 5px; }.cash-bar { width: 7px; }.section-caption h2 { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* UI refresh: soft operations cockpit / 2026-09-19 */
:root {
  --paper: #edf4f3;
  --surface: rgba(255, 255, 255, .86);
  --line: rgba(190, 208, 208, .72);
  --line-dark: #b9cccc;
  --shadow: 0 22px 58px rgba(16, 37, 54, .10), 0 2px 8px rgba(16, 37, 54, .04);
  --shadow-small: 0 14px 34px rgba(16, 37, 54, .075), 0 2px 7px rgba(16, 37, 54, .035);
  --radius: 20px;
  --ease-standard: cubic-bezier(.22, 1, .36, 1);
}

html { background: var(--paper); }
body {
  background:
    radial-gradient(circle at 88% 0%, rgba(22, 139, 130, .10), transparent 28rem),
    radial-gradient(circle at 8% 92%, rgba(185, 121, 39, .06), transparent 24rem),
    var(--paper);
}

.app-shell {
  gap: 16px;
  padding: 16px;
  min-height: 100dvh;
  background: transparent;
}
.sidebar {
  top: 16px;
  height: calc(100dvh - 32px);
  padding: 22px 14px 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  background: linear-gradient(160deg, #173645 0%, #0d2532 100%);
  box-shadow: 0 24px 60px rgba(11, 31, 42, .20), inset 0 1px 0 rgba(255,255,255,.08);
}
.sidebar-rule { margin-top: 25px; }
.nav-list { gap: 7px; }
.nav-item {
  min-height: 47px;
  border-radius: 14px;
  transition: color .2s var(--ease-standard), background .2s var(--ease-standard), transform .2s var(--ease-standard), box-shadow .2s var(--ease-standard);
}
.nav-item:hover { transform: translateX(2px); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(40, 171, 158, .98), rgba(16, 121, 114, .94));
  box-shadow: 0 12px 24px rgba(0, 0, 0, .17), inset 0 1px 0 rgba(255,255,255,.14);
}
.integration-note { border-radius: 14px; background: rgba(255,255,255,.065); }

.main-content {
  min-height: calc(100dvh - 32px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .74);
  border-radius: 20px;
  background: rgba(250, 252, 252, .70);
  box-shadow: 0 16px 48px rgba(16, 37, 54, .07), inset 0 1px 0 rgba(255,255,255,.72);
  backdrop-filter: blur(16px);
}
.topbar {
  min-height: 72px;
  padding: 0 32px;
  border-bottom-color: rgba(190, 208, 208, .62);
  background: rgba(248, 251, 251, .72);
  backdrop-filter: blur(16px);
}
.view { padding: 36px 32px 60px; }
.page-heading { margin-bottom: 26px; }
.page-heading h1 { letter-spacing: -.06em; }
.metric-grid, .dashboard-grid { gap: 16px; }
.metric-grid { margin-bottom: 16px; }
.metric-card, .card {
  border-radius: 20px;
  box-shadow: var(--shadow-small);
  background: var(--surface);
  backdrop-filter: blur(14px);
}
.metric-card {
  min-height: 145px;
  padding: 21px 20px 18px;
  transition: transform .22s var(--ease-standard), box-shadow .22s var(--ease-standard), border-color .22s ease;
}
.metric-card:hover {
  transform: translateY(-3px);
  border-color: rgba(22, 139, 130, .35);
  box-shadow: 0 20px 42px rgba(16, 37, 54, .11), 0 2px 8px rgba(16, 37, 54, .04);
}
.metric-value { font-variant-numeric: tabular-nums; }
.metric-value.counter-animating { color: var(--teal-dark); }
.metric-value.counter-settled { animation: counter-settled .38s var(--ease-standard); }
.money-rail { margin-bottom: 16px; }
.chart-card { min-height: 292px; }
.filter-bar { margin-bottom: 16px; border-radius: 20px; }
.table-card { border-radius: 20px; }

.button, .table-action, .nav-item {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.button {
  border-radius: 12px;
  transition: transform .2s var(--ease-standard), box-shadow .2s var(--ease-standard), background .2s var(--ease-standard), border-color .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(1px) scale(.985); }
.button-primary { box-shadow: 0 10px 20px rgba(22,139,130,.18); }
.button-primary:hover { box-shadow: 0 14px 26px rgba(22,139,130,.25); }
.button-ripple {
  position: absolute;
  z-index: -1;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255,255,255,.48);
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  animation: button-ripple .52s ease-out forwards;
}
.table-action { transition: transform .18s var(--ease-standard), border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.table-action:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(16,37,54,.08); }
.icon-button { transition: transform .18s var(--ease-standard), color .18s ease, background .18s ease; }
.icon-button:active { transform: scale(.92); }

.rail-node::before { transition: transform .26s var(--ease-standard), box-shadow .26s ease, background .26s ease; }
.rail-node:hover::before { transform: scale(1.10); }
.bar-fill, .cash-bar { transition: width .65s var(--ease-standard), height .65s var(--ease-standard); }
.toast { border-radius: 14px; box-shadow: var(--shadow); }
.view:not([hidden]) { animation: view-in .38s var(--ease-standard); }

@keyframes button-ripple {
  0% { opacity: .7; transform: translate(-50%, -50%) scale(0); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(14); }
}
@keyframes counter-settled {
  0% { transform: translateY(2px); text-shadow: 0 0 0 rgba(22,139,130,0); }
  55% { transform: translateY(0); text-shadow: 0 0 16px rgba(22,139,130,.20); }
  100% { text-shadow: 0 0 0 rgba(22,139,130,0); }
}
@keyframes view-in {
  from { opacity: .72; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 214px minmax(0, 1fr); }
  .topbar, .view { padding-left: 25px; padding-right: 25px; }
}
@media (max-width: 780px) {
  .app-shell { display: block; padding: 0; }
  .main-content { min-height: 100dvh; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
  .sidebar {
    top: 16px;
    left: 16px;
    width: min(292px, calc(100vw - 32px));
    height: calc(100dvh - 32px);
    border-radius: 20px;
  }
  .topbar { min-height: 64px; padding: 0 16px; }
  .view { padding: 28px 16px 48px; }
  .metric-card, .card { border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .button:hover, .metric-card:hover, .nav-item:hover, .table-action:hover { transform: none; }
  .button-ripple { display: none; }
  .view:not([hidden]) { animation: none; }
}

.button-danger {
  color: #a84947;
  border-color: rgba(196, 104, 99, .34);
  background: rgba(255, 247, 246, .92);
}
.button-danger:hover { border-color: #c46863; background: #fff0ee; box-shadow: 0 10px 20px rgba(196,104,99,.14); }
.table-action.danger:hover { border-color: #c46863; color: #a84947; background: #fff0ee; }
.table-action.locked {
  display: inline-flex;
  align-items: center;
  color: var(--muted-2);
  background: #f5f7f7;
  cursor: help;
}
input[readonly], textarea[readonly] { color: var(--muted); background: #f5f7f7; cursor: not-allowed; }
