﻿:root {
  --bg: #f5f7fb;
  --card: #fff;
  --ink: #1f2c43;
  --muted: #77849a;
  --line: #e8ecf3;
  --blue: #575ce5;
  --blue-soft: #eef0ff;
  --shadow: 0 10px 32px rgba(36, 49, 82, .045);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid #989df8; outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.layout { display: flex; min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex: 0 0 242px; flex-direction: column; height: 100vh; padding: 30px 16px 22px; background: #17233d; color: #fff; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 12px; font-size: 19px; font-weight: 750; letter-spacing: .2px; line-height: 1.3; white-space: nowrap; }
.brand-mark { display: grid; flex: 0 0 40px; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: #676cf0; color: #fff; font-size: 19px; font-weight: 800; box-shadow: 0 8px 18px rgba(67, 72, 195, .25); }
.brand-copy small { display: block; margin-top: 2px; color: #8d9ab4; font-size: 9px; font-weight: 700; letter-spacing: 2px; }
.nav-caption { margin: 48px 13px 13px; color: #7887a6; font-size: 11px; font-weight: 700; letter-spacing: 2px; }
.nav-caption-secondary { margin-top: 35px; }
.main-nav { display: grid; gap: 6px; }
.main-nav a { display: flex; align-items: center; gap: 13px; min-height: 46px; padding: 10px 14px; border-radius: 10px; color: #a8b5ce; font-weight: 600; transition: background .18s, color .18s; }
.main-nav a svg { flex: none; width: 19px; height: 19px; }
.main-nav a:hover { background: #283755; color: #fff; }
.main-nav a.selected { background: #354482; color: #fff; box-shadow: inset 3px 0 #aaaaff; }
.sidebar-foot { margin-top: auto; padding: 18px 12px 0; border-top: 1px solid #31405b; color: #b5c0d5; font-size: 12px; }
.sidebar-foot small { display: block; margin: 4px 0 0 15px; color: #8391ab; }
.sidebar-foot-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: #64d6ae; box-shadow: 0 0 0 3px #64d6ae20; }
.main-wrap { flex: 1; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 76px; padding: 0 42px; border-bottom: 1px solid var(--line); background: #fff; }
.topbar-context { display: grid; gap: 1px; }
.topbar-kicker { color: #9ca8bc; font-size: 10px; font-weight: 750; letter-spacing: 2px; }
.topbar-context strong { font-size: 14px; font-weight: 700; }
.userbox { display: flex; align-items: center; gap: 11px; color: #53627a; font-weight: 600; }
.userbox form { margin: 0 0 0 8px; }
.avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; background: #e9ebff; color: #535ad1; font-weight: 800; }
.link-button { padding: 6px 0 6px 11px; border: 0; border-left: 1px solid var(--line); background: none; color: #8490a5; font-size: 12px; }
.link-button:hover, .text-link:hover { color: #373dcc; }
.content { width: min(100%, 1510px); margin: 0 auto; padding: 36px 42px 76px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-head h1 { margin: 5px 0 7px; font-size: clamp(25px, 2vw, 31px); font-weight: 780; letter-spacing: -.8px; line-height: 1.25; }
.page-head p, .section-head p { margin: 0; color: var(--muted); }
.eyebrow, .section-kicker { color: #6469dc; font-size: 10px; font-weight: 800; letter-spacing: 1.6px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 41px; padding: 9px 17px; border: 1px solid transparent; border-radius: 9px; font-weight: 700; white-space: nowrap; transition: transform .18s, background .18s, border-color .18s, box-shadow .18s; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: #575ce5; color: #fff; box-shadow: 0 7px 16px #575ce529; }
.button.primary:hover { background: #484dcf; box-shadow: 0 9px 20px #575ce540; }
.button.secondary { border-color: #dce2ef; background: #fff; color: #4b5974; }
.button.secondary:hover { border-color: #aab4d0; color: #3d43c5; }
.text-link { color: #4e54d5; font-size: 13px; font-weight: 700; white-space: nowrap; }

.welcome-banner { position: relative; display: flex; justify-content: space-between; min-height: 170px; margin-bottom: 20px; padding: 30px 34px; overflow: hidden; border-radius: 16px; background: linear-gradient(112deg, #252e59 0%, #42478b 64%, #6765d5 100%); color: #fff; }
.welcome-banner:after { position: absolute; right: 17%; bottom: -95px; width: 280px; height: 280px; border: 1px solid #ffffff25; border-radius: 50%; content: ""; }
.welcome-label { color: #bfc2ff; font-size: 10px; font-weight: 800; letter-spacing: 2.2px; }
.welcome-banner h2 { position: relative; z-index: 1; margin: 15px 0 6px; font-size: clamp(20px, 2vw, 27px); line-height: 1.25; letter-spacing: -.5px; }
.welcome-banner p { position: relative; z-index: 1; margin: 0; color: #d7daf7; font-size: 13px; }
.welcome-art { position: relative; flex: 0 0 230px; align-self: stretch; }
.welcome-art span { position: absolute; display: block; border: 1px solid #ffffff67; border-radius: 10px; background: #ffffff21; box-shadow: 0 16px 28px #15204a38; transform: rotate(-13deg); }
.welcome-art span:nth-child(1) { top: 8px; right: 67px; width: 140px; height: 88px; }
.welcome-art span:nth-child(2) { top: 38px; right: 31px; width: 145px; height: 88px; background: #ffffff3a; transform: rotate(7deg); }
.welcome-art span:nth-child(3) { top: 63px; right: 7px; width: 145px; height: 88px; background: #ffffff55; transform: rotate(-7deg); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.finance-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.dashboard-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.metric { min-width: 0; padding: 21px 22px 19px; border: 1px solid var(--line); border-radius: 13px; background: var(--card); box-shadow: var(--shadow); }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.metric-label { color: #65728a; font-size: 13px; font-weight: 650; }
.metric-icon { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border-radius: 10px; font-size: 18px; font-weight: 750; line-height: 1; }
.metric-icon.blue { background: #e9edff; color: #5a61e4; }
.metric-icon.green { background: #e5f8ef; color: #169966; }
.metric-icon.amber { background: #fff2dc; color: #c98b21; }
.metric-icon.violet { background: #f0eafe; color: #8660c8; }
.metric-value { margin-top: 15px; overflow-wrap: anywhere; font-size: clamp(19px, 1.75vw, 28px); font-variant-numeric: tabular-nums; font-weight: 780; letter-spacing: -.8px; line-height: 1.25; }
.metric-foot { margin-top: 11px; color: #96a1b2; font-size: 12px; }
.metric-foot strong { color: #565cdb; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin: 32px 0 15px; }
.section-head h2, .panel h2 { margin: 3px 0 2px; font-size: 18px; letter-spacing: -.2px; }
.section-head p { font-size: 12px; }
.section-head.compact { margin-top: 26px; }
.section-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; }
.panel { border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow); }
.table-scroll { overflow-x: auto; }
table { width: 100%; min-width: 750px; border-collapse: collapse; text-align: left; }
th { padding: 14px 18px; background: #fafbfe; color: #7d8aa0; font-size: 12px; font-weight: 700; white-space: nowrap; }
td { padding: 17px 18px; border-top: 1px solid #eef0f5; color: #546178; white-space: nowrap; }
tbody tr:hover { background: #fbfbff; }
.row-link { color: #3945aa; font-weight: 700; }
.row-link:hover { text-decoration: underline; }
.project-name-content { display: inline-flex; align-items: center; gap: 8px; }
.urgent-tag { display: inline-flex; align-items: center; flex: none; padding: 2px 7px; border: 1px solid #f4c8b7; border-radius: 5px; background: #fff0e8; color: #b75030; font-size: 11px; font-weight: 800; white-space: nowrap; }
.row-actions { display: flex; align-items: center; gap: 6px; }
.row-actions form, .actions form { margin: 0; }
.balance-cell { display: inline-flex; align-items: center; gap: 8px; }
.balance-settle-link { padding: 3px 8px; border: 1px solid #cdd3ff; border-radius: 6px; background: #eef0ff; color: #4f55c9; font-size: 12px; font-weight: 700; }
.balance-settle-link:hover { border-color: #aeb6f8; background: #e4e7ff; }
.balance-cell.unsettled, .balance-cell.unsettled .balance-settle-link { color: #d94b55; }
.balance-cell.settled, .balance-cell.settled .balance-settle-link { color: #18895d; }
.status-form { margin: 0; }
.status-select { min-width: 105px; padding: 5px 8px; border: 1px solid #dce2ef; border-radius: 8px; font-size: 12px; font-weight: 700; cursor: pointer; }
.status-select:hover { border-color: #aab4d0; }
.status-select.status-lead { background: #f0f2f6; color: #6f7e96; }
.status-select.status-active { background: #e9edff; color: #5158d2; }
.status-select.status-review { background: #fff3dd; color: #a6761c; }
.status-select.status-done { background: #e5f7ed; color: #19845c; }
.status-select.status-cancelled { background: #faebeb; color: #b95d5d; }
.button.small { min-height: 31px; padding: 5px 10px; font-size: 12px; }
.button.urgent-action { border-color: #f4c8b7; background: #fff0e8; color: #b75030; }
.button.urgent-action:hover { border-color: #eaa789; background: #ffe5d8; color: #a54121; }
.empty { padding: 38px 16px; color: #8d99ad; text-align: center; white-space: normal; }
.empty strong, .empty span { display: block; }
.empty strong { margin: 5px 0 2px; color: #52607a; font-size: 15px; }
.empty-symbol { color: #8c92e7; font-size: 31px; line-height: 1; }
.empty .button { margin-top: 18px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 50px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge:before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.status-lead { background: #f0f2f6; color: #6f7e96; }
.status-active { background: #e9edff; color: #5158d2; }
.status-review { background: #fff3dd; color: #a6761c; }
.status-done { background: #e5f7ed; color: #19845c; }
.status-cancelled { background: #faebeb; color: #b95d5d; }
.filters { display: flex; align-items: center; gap: 10px; padding: 16px; }
.filters .search-field { position: relative; flex: 1 1 300px; max-width: 420px; }
.search-field svg { position: absolute; top: 11px; left: 13px; width: 19px; height: 19px; color: #9aa6b8; pointer-events: none; }
.search-field .input { padding-left: 41px; }
.filters select { flex: 0 0 160px; width: 160px; }
.clear-filter { padding: 8px; color: #777f9b; font-size: 12px; }
.clear-filter:hover { color: #4b51d1; }
.input { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid #dce2ed; border-radius: 8px; outline: 0; background: #fff; color: #29364d; }
.form-field select.input { appearance: auto; }
.input::placeholder { color: #a0aabc; }
.input:focus { border-color: #7b80e9; box-shadow: 0 0 0 3px #7b80e91c; }
.input:disabled { background: #f3f5f8; color: #8792a5; }
textarea.input { resize: vertical; }
.breadcrumb { display: flex; align-items: center; gap: 10px; min-width: 0; margin-bottom: 18px; color: #8d98ac; font-size: 12px; flex-wrap: wrap; }
.breadcrumb a { color: #525bd1; }
.detail-head { margin-bottom: 24px; }
.actions { display: flex; align-items: center; gap: 12px; }
.detail-metrics .metric { padding: 20px; }
.detail-metrics .metric-value { font-size: clamp(18px, 1.6vw, 24px); }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; margin-top: 20px; }
.detail-panel { min-width: 0; padding: 24px; }
.panel-head { margin-bottom: 17px; }
.prose { min-height: 42px; overflow-wrap: anywhere; color: #586780; line-height: 1.9; }
.prose p { margin: 0 0 8px; }
.divider { height: 1px; margin: 20px 0; background: var(--line); }
.key-values { display: grid; gap: 15px; }
.key-values > div { display: flex; justify-content: space-between; gap: 12px; }
.key-values span { color: #8996aa; }
.key-values strong { text-align: right; font-weight: 700; overflow-wrap: anywhere; }
.detail-panel h3 { font-size: 13px; }
.help { margin: 22px 0 0; color: #97a2b3; font-size: 12px; }
.positive { color: #128b5a; font-weight: 700; }
.negative { color: #c75b5b; font-weight: 700; }
.timeline { padding: 8px 23px; }
.timeline > div { position: relative; display: flex; justify-content: space-between; gap: 15px; margin-left: 6px; padding: 12px 0 12px 22px; border-left: 1px solid #e4e7f4; }
.timeline-dot { position: absolute; top: 18px; left: -5px; width: 9px; height: 9px; border-radius: 50%; background: #7178e7; }
.timeline strong { font-weight: 650; }
.timeline small { color: #93a0b2; white-space: nowrap; }
.form-panel { max-width: 880px; padding: 28px; }
.settlement-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); align-items: start; gap: 18px; }
.settlement-layout .form-panel { width: 100%; }
.settlement-note { margin-bottom: 22px; padding: 11px 14px; border: 1px solid #dfe4ff; border-radius: 8px; background: #f5f6ff; color: #535bb1; font-size: 13px; }
.settlement-summary { padding: 25px; }
.settlement-summary h2 { margin: 0 0 23px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { display: block; margin-bottom: 7px; color: #536178; font-weight: 700; }
.form-field small { display: block; margin-top: 6px; color: #929eb0; }
.calculated-value, .readonly-value { display: flex; align-items: center; min-height: 42px; padding: 9px 12px; border: 1px solid #e1e5f2; border-radius: 8px; background: #f7f8ff; color: #4c52c9; font-weight: 750; font-variant-numeric: tabular-nums; }
.readonly-value { background: #f8f9fc; color: #65738a; font-weight: 600; }
.description-cell { max-width: 260px; color: #6a7890; }
.required, .field-error { color: #c24f5d; }
.field-error { margin-top: 5px; font-size: 12px; }
.form-actions { display: flex; gap: 10px; margin-top: 27px; padding-top: 22px; border-top: 1px solid var(--line); }
.notice { margin-bottom: 20px; padding: 12px 16px; border: 1px solid #bfe8d4; border-radius: 9px; background: #e7f8ef; color: #1e8458; }
.error-box { margin: 16px 0; padding: 11px 15px; border: 1px solid #f0c7cc; border-radius: 8px; background: #fff0f1; color: #a64b59; }
.month-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.month-strip > div { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 17px 20px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.month-strip > div > span:last-child { display: grid; color: #7a879d; font-size: 12px; }
.month-strip strong { overflow-wrap: anywhere; color: #25334d; font-size: 19px; font-variant-numeric: tabular-nums; }
.month-strip-icon { display: grid; flex: 0 0 37px; width: 37px; height: 37px; place-items: center; border-radius: 10px; font-size: 19px; }
.month-strip-icon.income { background: #e9edff; color: #5961df; }
.month-strip-icon.cost { background: #ecf2f9; color: #7c92b3; }
.chart { padding: 26px 30px 18px; }
.chart-bars { display: flex; justify-content: space-around; align-items: end; gap: 16px; height: 225px; padding: 0 10px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), #f1f3f8 calc(25% - 1px), #f1f3f8 25%); }
.chart-group { display: flex; flex-direction: column; align-items: center; justify-content: end; width: 14%; max-width: 100px; height: 100%; }
.chart-pair { display: flex; align-items: end; justify-content: center; gap: 7px; width: 100%; height: 187px; }
.chart-bar { width: 30%; min-width: 7px; min-height: 2px; border-radius: 6px 6px 0 0; }
.chart-bar.income, .legend-income { background: #6369e9; }
.chart-bar.cost, .legend-cost { background: #cbd4e8; }
.chart-group > span { height: 37px; padding-top: 11px; color: #8996aa; font-size: 11px; white-space: nowrap; }
.chart-legend { display: flex; justify-content: center; gap: 22px; padding-top: 15px; color: #8190a5; font-size: 12px; }
.chart-legend span { display: flex; align-items: center; gap: 7px; }
.chart-legend i { display: block; width: 9px; height: 9px; border-radius: 3px; }

.login-page { min-height: 100vh; padding: 24px; background: #edf0f8; }
.login-shell { display: grid; grid-template-columns: 1fr 1fr; width: min(100%, 1120px); min-height: min(670px, calc(100vh - 48px)); margin: auto; overflow: hidden; border: 1px solid #e1e5f0; border-radius: 20px; background: #fff; box-shadow: 0 28px 80px #18274220; }
.login-intro { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 38px; background: linear-gradient(145deg, #202b55, #4e51aa); color: #fff; }
.login-intro:before, .login-intro:after { position: absolute; width: 310px; height: 310px; border: 1px solid #ffffff36; border-radius: 50%; content: ""; }
.login-intro:before { right: -65px; top: 55px; }
.login-intro:after { right: -125px; top: 115px; }
.login-intro .brand { position: relative; z-index: 1; padding: 0; }
.login-intro .brand-copy small { color: #b2b9e6; }
.login-intro-copy { position: relative; z-index: 1; }
.login-intro-copy h1 { margin: 17px 0; font-size: clamp(27px, 3vw, 40px); line-height: 1.35; letter-spacing: -1px; }
.login-intro-copy p { color: #d3d8f4; }
.login-intro-foot { color: #a7afe0; font-size: 10px; font-weight: 800; letter-spacing: 2px; }
.login-form-wrap { display: grid; place-items: center; padding: 40px; }
.login-card { width: min(100%, 365px); }
.login-card h2 { margin: 12px 0 5px; font-size: 30px; }
.muted { margin: 0; color: var(--muted); }
.login-card form { display: grid; margin-top: 31px; }
.login-card label { margin: 17px 0 7px; color: #536178; font-weight: 700; }
.login-card .input { min-height: 46px; }
.wide { width: 100%; margin-top: 28px; }
.login-support { margin-top: 27px; color: #a0aabc; font-size: 12px; text-align: center; }

@media (max-width: 1150px) {
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
  .settlement-layout { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .layout { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 14px 16px 10px; }
  .sidebar .brand { padding: 0 4px; font-size: 16px; }
  .sidebar .brand-mark { flex-basis: 33px; width: 33px; height: 33px; font-size: 16px; }
  .sidebar .brand-copy small { display: none; }
  .nav-caption, .nav-caption-secondary, .sidebar-foot { display: none; }
  .main-nav { display: flex; gap: 4px; margin-top: 13px; overflow-x: auto; }
  .main-nav a { min-height: 36px; padding: 7px 10px; font-size: 12px; white-space: nowrap; }
  .main-nav a svg { width: 16px; height: 16px; }
  .topbar { height: 56px; padding: 0 17px; }
  .topbar-kicker { display: none; }
  .topbar-context strong { font-size: 12px; }
  .userbox { gap: 7px; font-size: 12px; }
  .userbox form { margin-left: 3px; }
  .avatar { width: 28px; height: 28px; border-radius: 8px; }
  .link-button { padding-left: 8px; }
  .content { padding: 25px 16px 58px; }
  .page-head { align-items: start; }
  .page-head h1 { font-size: 24px; }
  .page-head p { max-width: 30em; font-size: 12px; }
  .welcome-banner { min-height: 145px; padding: 23px; }
  .welcome-art { display: none; }
  .metric { padding: 17px; }
  .metric-value { font-size: 20px; }
  .metric-foot { font-size: 11px; }
  .filters { flex-wrap: wrap; }
  .filters .search-field { flex-basis: 100%; max-width: none; }
  .filters select { flex: 1 1 140px; width: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .form-panel { padding: 20px; }
  .timeline > div { display: block; }
  .timeline small { display: block; margin-top: 3px; white-space: normal; }
  .login-shell { grid-template-columns: 1fr; min-height: calc(100vh - 48px); }
  .login-intro { min-height: 160px; padding: 25px; }
  .login-intro-copy h1 { margin: 10px 0 0; font-size: 23px; }
  .login-intro-copy p, .login-intro-foot, .login-intro-copy .welcome-label { display: none; }
  .login-form-wrap { padding: 34px 26px; }
}
@media (max-width: 600px) {
  .page-head { flex-wrap: wrap; gap: 15px; }
  .page-head .button { width: 100%; }
  .metrics { gap: 10px; }
  .metric { padding: 15px; }
  .metric-value, .detail-metrics .metric-value { font-size: 17px; }
  .metric-foot { line-height: 1.4; }
  .metric-icon { width: 29px; height: 29px; flex-basis: 29px; font-size: 15px; }
  .month-strip { gap: 10px; }
  .month-strip > div { padding: 12px; }
  .month-strip strong { font-size: 15px; }
  .month-strip-icon { display: none; }
  .section-head h2 { font-size: 17px; }
  .section-head { flex-wrap: wrap; }
  .section-actions { width: 100%; justify-content: flex-start; }
  .responsive-table { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  .responsive-table table, .responsive-table tbody, .responsive-table tr, .responsive-table td { display: block; width: 100%; min-width: 0; }
  .responsive-table thead { display: none; }
  .responsive-table tr { margin-bottom: 11px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
  .responsive-table td { display: flex; justify-content: space-between; gap: 15px; padding: 10px 15px; border-top: 1px solid #f2f3f7; text-align: right; white-space: normal; overflow-wrap: anywhere; }
  .responsive-table td:first-child { border-top: 0; }
  .responsive-table td.description-cell { max-width: none; }
  .responsive-table .row-actions { flex-wrap: wrap; justify-content: flex-end; }
  .responsive-table td:before { flex: 0 0 auto; color: #8d98aa; font-size: 12px; content: attr(data-label); }
  .responsive-table td.empty { display: block; padding: 35px 16px; text-align: center; }
  .responsive-table td.empty:before { display: none; }
  .chart { padding: 19px 14px 15px; }
  .chart-bars { gap: 7px; height: 190px; padding: 0; }
  .chart-pair { height: 155px; gap: 3px; }
  .chart-group > span { height: 35px; font-size: 10px; }
  .actions { flex-wrap: wrap; }
  .detail-panel { padding: 18px; }
  .login-page { padding: 0; }
  .login-shell { min-height: 100vh; border: 0; border-radius: 0; }
}
@media (max-width: 380px) {
  .user-name { display: none; }
  .metric-label { font-size: 12px; }
  .metric-value { font-size: 15px; }
  .month-strip { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}


.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 24px; background: #17233d88; }
.modal-backdrop[hidden] { display: none; }
.export-modal { width: min(100%, 760px); max-height: min(90vh, 900px); overflow: auto; padding: 24px; }
.modal-head, .modal-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head { margin-bottom: 18px; }
.modal-head h2 { margin: 0; }
.export-paper { padding: 34px 36px 38px; border: 1px solid #dfe4ee; border-top: 5px solid #6268e8; background: #fff; color: #26344d; box-shadow: 0 8px 24px #18274212; }
.export-paper h1 { margin: 0 0 27px; padding-bottom: 17px; border-bottom: 1px solid #e5e8f0; text-align: center; font-size: 27px; letter-spacing: 2px; }
.export-paper h3 { margin: 27px 0 9px; padding-left: 11px; border-left: 3px solid #6268e8; font-size: 15px; }
.export-paper p { margin: 0; white-space: pre-wrap; line-height: 1.8; }
.export-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid #dfe4ee; border-left: 1px solid #dfe4ee; }
.export-grid > div { display: flex; gap: 12px; padding: 11px 13px; border-right: 1px solid #dfe4ee; border-bottom: 1px solid #dfe4ee; }
.export-grid > div:nth-child(odd) { background: #fafbfe; }
.export-grid b { flex: 0 0 92px; color: #68758b; font-size: 12px; }
.export-grid span { overflow-wrap: anywhere; }
.modal-actions { justify-content: flex-end; margin-top: 18px; }

/* UI refinement: clearer hierarchy and quieter surfaces */
.content { background: radial-gradient(circle at 100% 0, #ffffffaa 0, transparent 32%); }
.panel { transition: border-color .2s, box-shadow .2s; }
.panel:hover { border-color: #d9def0; box-shadow: 0 14px 34px rgba(36, 49, 82, .07); }
.metric { position: relative; overflow: hidden; }
.metric:after { position: absolute; right: -24px; bottom: -30px; width: 90px; height: 90px; border: 1px solid #e8ebff; border-radius: 50%; content: ""; pointer-events: none; }
.finance-metrics .metric:first-child { border-top: 3px solid #5a61e4; }
.finance-metrics .metric:last-child { border-top: 3px solid #27a675; }
th { letter-spacing: .2px; }
tbody tr { transition: background .18s, box-shadow .18s; }
tbody tr:hover { box-shadow: inset 3px 0 #7a80e8; }
.form-panel { border-top: 3px solid #686ee7; }
.filters.panel { background: linear-gradient(180deg, #fff, #fbfcff); }
.button.primary { background: linear-gradient(135deg, #6268ee, #5157d7); }
.button.secondary { box-shadow: 0 2px 7px rgba(47, 61, 96, .04); }

