:root {
    --navy: #18233f;
    --navy-2: #202e50;
    --ink: #17213a;
    --muted: #718096;
    --faint: #9aa7b9;
    --canvas: #f4f6fa;
    --surface: #fff;
    --line: #e7ebf1;
    --violet: #6c5ce7;
    --violet-soft: #eeeafd;
    --teal: #15a3a7;
    --teal-soft: #e5f6f5;
    --coral: #fb6b52;
    --coral-soft: #fff0ed;
    --amber: #e5a832;
    --amber-soft: #fff7df;
    --green: #25a26f;
    --green-soft: #e9f7f1;
    --danger: #d84c5a;
    --danger-soft: #fff0f1;
    --radius: 16px;
    --shadow: 0 8px 28px rgba(23, 33, 58, .06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }

.eyebrow, .section-kicker {
    margin: 0 0 5px;
    color: #8b97aa;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;
}
.eyebrow--light { color: rgba(255,255,255,.58); }
.brand-mark {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    padding: 10px;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, #7e6cf0, #5844d9);
    box-shadow: 0 10px 28px rgba(108, 92, 231, .28);
}
.brand-mark span { width: 5px; border-radius: 5px; background: currentColor; }
.brand-mark span:nth-child(1) { height: 10px; opacity: .65; }
.brand-mark span:nth-child(2) { height: 18px; }
.brand-mark span:nth-child(3) { height: 14px; opacity: .82; }
.brand-mark--small { width: 37px; height: 37px; padding: 8px; border-radius: 11px; box-shadow: none; }

/* Login */
.login-page {
    min-height: 100vh;
    background: #f7f8fb;
}
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 48%) 1fr; }
.login-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: min(460px, calc(100% - 64px));
    margin: auto;
    padding: 50px 0;
}
.login-card .brand-mark { margin-bottom: 38px; }
.login-card h1 {
    margin: 5px 0 16px;
    font-family: Manrope, sans-serif;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.11;
    letter-spacing: -.045em;
}
.login-copy { max-width: 420px; margin: 0 0 32px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.login-form { display: grid; gap: 20px; }
.login-form label, .modal-form label {
    display: grid;
    gap: 8px;
    color: #3c475b;
    font-size: 12px;
    font-weight: 700;
}
.login-form input, .modal-form input, .modal-form select {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #dfe4ec;
    border-radius: 10px;
    outline: none;
    color: var(--ink);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.login-form input:focus, .modal-form input:focus, .modal-form select:focus {
    border-color: var(--violet);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, .11);
}
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 64px; }
.password-toggle {
    position: absolute;
    top: 0; right: 5px; bottom: 0;
    border: 0; background: transparent;
    color: var(--violet);
    font-size: 11px; font-weight: 700;
    cursor: pointer;
}
.login-foot { margin: 28px 0 0; color: var(--faint); font-size: 11px; }
.login-visual {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(circle at 70% 20%, rgba(123, 105, 235, .28), transparent 28%),
        radial-gradient(circle at 22% 76%, rgba(28, 169, 169, .18), transparent 26%),
        linear-gradient(150deg, #18233f 0%, #233257 55%, #19233e 100%);
}
.login-visual::before {
    content: ""; position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 42px 42px;
}
.login-orbit { position: absolute; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; }
.login-orbit--one { width: 520px; height: 520px; left: 10%; top: 14%; }
.login-orbit--two { width: 760px; height: 760px; left: -4%; top: 0; }
.login-mini-card {
    position: absolute;
    width: 230px;
    padding: 22px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 16px;
    color: #fff;
    background: rgba(255,255,255,.075);
    box-shadow: 0 24px 50px rgba(0,0,0,.2);
    backdrop-filter: blur(13px);
}
.login-mini-card span { display: block; color: rgba(255,255,255,.55); font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.login-mini-card strong { display: block; margin: 8px 0 2px; font-family: Manrope,sans-serif; font-size: 28px; }
.login-mini-card small { color: #6ee2bd; font-size: 11px; }
.login-mini-card--revenue { top: 23%; left: 16%; transform: rotate(-2deg); }
.login-mini-card--cost { top: 44%; right: 13%; transform: rotate(2deg); }
.login-mini-card--net { top: 65%; left: 19%; transform: rotate(-1deg); }
.form-error { margin: 0 0 20px; padding: 12px 14px; border-radius: 9px; color: var(--danger); background: var(--danger-soft); font-size: 12px; font-weight: 600; }

/* Shell */
.app-shell { min-height: 100vh; display: flex; }
.sidebar {
    position: fixed;
    z-index: 50;
    inset: 0 auto 0 0;
    width: 228px;
    display: flex;
    flex-direction: column;
    color: #c7cede;
    background: var(--navy);
}
.sidebar-brand {
    height: 80px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 24px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.sidebar-brand div:last-child { display: grid; line-height: 1.05; }
.sidebar-brand strong { color: #fff; font-family: Manrope,sans-serif; font-size: 16px; }
.sidebar-brand div:last-child span { color: #8490a7; font-size: 10px; }
.sidebar-nav { flex: 1; padding: 22px 12px; }
.sidebar-nav p { margin: 15px 12px 9px; color: #66738d; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.sidebar-nav a, .sidebar-nav button {
    position: relative;
    width: 100%;
    height: 43px;
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 2px 0;
    padding: 0 13px;
    border: 0;
    border-radius: 9px;
    color: #aab4c8;
    background: transparent;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: .18s ease;
}
.sidebar-nav a:hover, .sidebar-nav button:hover { color: #fff; background: rgba(255,255,255,.055); }
.sidebar-nav a.is-active { color: #fff; background: rgba(108,92,231,.3); }
.sidebar-nav a.is-active::before { content: ""; position: absolute; left: 0; width: 3px; height: 20px; border-radius: 0 4px 4px 0; background: #8d7df5; }
.sidebar-nav svg { width: 18px; height: 18px; }
.nav-count { margin-left: auto; padding: 2px 6px; border-radius: 8px; color: #9aa6bc; background: rgba(255,255,255,.06); font-size: 9px; }
.sidebar-profile {
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 17px;
    border-top: 1px solid rgba(255,255,255,.07);
}
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: #6c5ce7; font-size: 12px; font-weight: 700; }
.sidebar-profile div { min-width: 0; flex: 1; display: grid; }
.sidebar-profile strong { overflow: hidden; color: #fff; font-size: 11px; text-overflow: ellipsis; }
.sidebar-profile small { color: #7c899f; font-size: 9px; }
.sidebar-profile a { display: grid; place-items: center; color: #69758d; }
.sidebar-profile a:hover { color: #fff; }
.sidebar-profile svg { width: 18px; height: 18px; }
.main-content { width: calc(100% - 228px); min-width: 0; margin-left: 228px; }
.topbar {
    min-height: 80px;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 34px;
    border-bottom: 1px solid var(--line);
    background: rgba(255,255,255,.92);
}
.topbar h1 { margin: 0; font-family: Manrope,sans-serif; font-size: 19px; letter-spacing: -.025em; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.data-freshness { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.data-freshness > span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.primary-button, .secondary-button, .danger-button, .text-button {
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 15px;
    border-radius: 9px;
    border: 0;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}
.primary-button { color: #fff; background: var(--violet); box-shadow: 0 6px 16px rgba(108,92,231,.2); }
.primary-button:hover { background: #5c4bd4; }
.primary-button:disabled { opacity: .55; cursor: wait; }
.primary-button--wide { width: 100%; height: 49px; margin-top: 4px; justify-content: space-between; padding: 0 18px; }
.secondary-button { border: 1px solid #dfe4ec; color: #4b586c; background: #fff; }
.secondary-button:hover { border-color: #cbd3df; background: #f9fafc; }
.secondary-button--dark { border-color: rgba(255,255,255,.15); color: #fff; background: rgba(255,255,255,.08); }
.danger-button { margin-right: auto; color: var(--danger); background: var(--danger-soft); }
.text-button { color: var(--muted); background: transparent; }
.mobile-menu { display: none; width: 38px; height: 38px; border: 0; border-radius: 9px; background: #f2f4f8; }
.mobile-menu svg { width: 19px; }
.content-wrap { max-width: 1500px; margin: 0 auto; padding: 28px 34px 12px; }

/* Dashboard */
.hero {
    position: relative;
    min-height: 185px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    overflow: hidden;
    padding: 34px 42px;
    border-radius: 18px;
    color: #fff;
    background:
        radial-gradient(circle at 82% 30%, rgba(130,111,241,.38), transparent 28%),
        linear-gradient(120deg, #192642 0%, #25365d 64%, #273963 100%);
    box-shadow: 0 18px 40px rgba(23,33,58,.14);
}
.hero::after {
    content: ""; position: absolute; width: 390px; height: 390px; right: 12%; border: 1px solid rgba(255,255,255,.06); border-radius: 50%;
    box-shadow: 0 0 0 70px rgba(255,255,255,.018), 0 0 0 140px rgba(255,255,255,.012);
}
.hero > * { position: relative; z-index: 1; }
.hero h2 { max-width: 690px; margin: 7px 0 9px; font-family: Manrope,sans-serif; font-size: clamp(25px, 3vw, 38px); line-height: 1.18; letter-spacing: -.045em; }
.hero h2 em { color: #8d7df5; font-style: normal; }
.hero p:last-child { margin: 0; color: rgba(255,255,255,.6); font-size: 12px; }
.hero-meter { min-width: 176px; padding: 18px 20px; border: 1px solid rgba(255,255,255,.12); border-radius: 13px; background: rgba(255,255,255,.07); backdrop-filter: blur(12px); }
.hero-meter__value { font-family: Manrope,sans-serif; font-size: 30px; font-weight: 700; }
.hero-meter__value small { font-size: 14px; }
.hero-meter > span { color: rgba(255,255,255,.54); font-size: 10px; }
.hero-meter__track { height: 5px; margin-top: 13px; overflow: hidden; border-radius: 10px; background: rgba(255,255,255,.12); }
.hero-meter__track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7562ed, #3dd2b4); }
.attention-strip {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 17px;
    padding: 13px 17px;
    border: 1px solid #f5d8c9;
    border-radius: 12px;
    background: #fff9f5;
}
.attention-icon { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; color: #e05b43; background: #ffe8df; font-size: 13px; font-weight: 800; }
.attention-strip div:nth-child(2) { display: grid; }
.attention-strip strong { font-size: 11px; }
.attention-strip span { color: #8c776e; font-size: 10px; }
.attention-strip a { margin-left: auto; color: #d85842; font-size: 10px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.kpi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 15px; margin: 17px 0; }
.kpi-card {
    position: relative;
    min-height: 142px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px 22px 18px 72px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}
.kpi-icon { position: absolute; top: 22px; left: 20px; width: 39px; height: 39px; display: grid; place-items: center; border-radius: 11px; }
.kpi-icon svg { width: 19px; height: 19px; }
.kpi-card--revenue .kpi-icon { color: var(--violet); background: var(--violet-soft); }
.kpi-card--cost .kpi-icon { color: var(--coral); background: var(--coral-soft); }
.kpi-card--tax .kpi-icon { color: var(--amber); background: var(--amber-soft); }
.kpi-card--net .kpi-icon { color: var(--teal); background: var(--teal-soft); }
.kpi-card > span { color: var(--muted); font-size: 10px; font-weight: 600; }
.kpi-card > strong { margin: 2px 0 7px; font-family: Manrope,sans-serif; font-size: 25px; letter-spacing: -.04em; }
.kpi-card > small { color: var(--faint); font-size: 9px; }
.kpi-card > small b { color: var(--green); }
.panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}
.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.75fr) minmax(330px,.8fr); gap: 15px; scroll-margin-top: 15px; }
.panel-head { min-height: 73px; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 19px 21px 13px; }
.panel-head h2 { margin: 0; font-family: Manrope,sans-serif; font-size: 16px; letter-spacing: -.025em; }
.panel-head p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.panel-head a { color: var(--violet); font-size: 10px; font-weight: 700; text-decoration: none; }
.chart-legend { display: flex; gap: 15px; padding-top: 8px; color: var(--muted); font-size: 9px; }
.chart-legend span { display: flex; align-items: center; gap: 5px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 3px; }
.legend-revenue { background: var(--violet); }
.legend-cost { background: #f1a298; }
.cash-chart { position: relative; height: 230px; display: grid; grid-template-columns: repeat(12,1fr); gap: 10px; margin: 5px 20px 0 48px; border-bottom: 1px solid #e8ebf1; background: repeating-linear-gradient(to bottom, #f0f2f6 0, #f0f2f6 1px, transparent 1px, transparent 33.333%); }
.chart-grid { position: absolute; inset: -7px auto 0 -43px; height: 100%; display: flex; flex-direction: column; justify-content: space-between; color: #a1aabb; font-size: 8px; }
.chart-month { min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; text-align: center; }
.chart-bars { height: 195px; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.bar { position: relative; width: min(13px, 42%); min-height: 2px; border-radius: 4px 4px 1px 1px; transition: opacity .2s; }
.bar:hover { opacity: .76; }
.bar span { display: none; position: absolute; z-index: 3; left: 50%; bottom: calc(100% + 5px); transform: translateX(-50%); padding: 4px 6px; border-radius: 5px; color: #fff; background: var(--ink); font-size: 8px; font-style: normal; white-space: nowrap; }
.bar:hover span { display: block; }
.bar--revenue { background: linear-gradient(#8879ed,#6c5ce7); }
.bar--cost { background: #f1a298; }
.chart-month > small { height: 27px; padding-top: 8px; color: #8994a6; font-size: 8px; }
.chart-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin-top: 14px; border-top: 1px solid var(--line); background: var(--line); }
.chart-summary div { display: flex; justify-content: space-between; padding: 13px 19px; background: #fff; font-size: 9px; }
.chart-summary span { color: var(--muted); }
.chart-summary strong { font-size: 10px; }
.icon-button { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; color: var(--violet); background: #fff; cursor: pointer; }
.donut-layout { display: flex; align-items: center; gap: 25px; padding: 8px 23px 19px; }
.donut { position: relative; width: 138px; height: 138px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--donut); }
.donut::before { content: ""; position: absolute; inset: 21px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.02); }
.donut > div { position: relative; display: grid; text-align: center; }
.donut strong { font-family: Manrope,sans-serif; font-size: 17px; }
.donut span { color: var(--muted); font-size: 8px; }
.donut-legend { min-width: 0; flex: 1; display: grid; gap: 10px; }
.donut-legend div { display: grid; grid-template-columns: 8px minmax(60px,1fr) auto auto; align-items: center; gap: 7px; }
.donut-legend i { width: 7px; height: 7px; border-radius: 50%; }
.donut-legend span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.donut-legend strong { font-size: 9px; }
.donut-legend small { width: 23px; color: var(--faint); font-size: 8px; text-align: right; }
.panel-insight { display: flex; gap: 10px; margin: 0 18px 18px; padding: 11px 13px; border-radius: 9px; background: #f5f4fd; }
.panel-insight > span { color: var(--violet); }
.panel-insight p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.panel-insight strong { color: #50476d; }
.two-column { display: grid; grid-template-columns: 1.15fr .85fr; gap: 15px; margin-top: 15px; }
.timeline { padding: 0 20px 15px; }
.timeline-row { min-height: 55px; display: grid; grid-template-columns: 34px 16px minmax(0,1fr) auto; align-items: center; gap: 9px; }
.timeline-date { display: grid; text-align: center; line-height: 1.05; }
.timeline-date strong { font-family: Manrope,sans-serif; font-size: 14px; }
.timeline-date span { color: var(--muted); font-size: 7px; font-weight: 700; }
.timeline-line { position: relative; align-self: stretch; display: flex; justify-content: center; }
.timeline-line::after { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; background: #e5e9ef; }
.timeline-line i { position: relative; z-index: 1; align-self: center; width: 7px; height: 7px; border: 2px solid #fff; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 1px #cfc7f8; }
.timeline-copy { min-width: 0; display: grid; }
.timeline-copy strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.timeline-copy span { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.timeline-amount { display: grid; text-align: right; }
.timeline-amount strong { font-size: 10px; }
.timeline-amount span { color: var(--faint); font-size: 8px; }
.timeline-row.is-overdue .timeline-line i { background: var(--danger); box-shadow: 0 0 0 1px #f2b5bb; }
.timeline-row.is-overdue .timeline-date, .timeline-row.is-overdue .timeline-amount span { color: var(--danger); }
.client-bars { display: grid; gap: 13px; padding: 3px 20px 18px; }
.client-row { display: grid; grid-template-columns: 30px minmax(0,1fr) 65px; align-items: center; gap: 10px; }
.client-avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--violet); background: var(--violet-soft); font-size: 9px; font-weight: 800; }
.client-row > div { min-width: 0; display: grid; gap: 6px; }
.client-row > div strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.client-row > div span { height: 4px; overflow: hidden; border-radius: 6px; background: #eef0f4; }
.client-row > div i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6c5ce7,#9a8ef2); }
.client-row p { margin: 0; display: grid; text-align: right; }
.client-row p strong { font-size: 9px; }
.client-row p small { color: var(--faint); font-size: 8px; }
.concentration-note { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.concentration-note strong { color: var(--violet); font-family: Manrope,sans-serif; font-size: 16px; }
.concentration-note small { color: var(--faint); }

/* Tables */
.records-panel { margin-top: 15px; scroll-margin-top: 15px; }
.panel-head--records { align-items: center; padding: 20px 22px; }
.record-actions { display: flex; align-items: center; gap: 10px; }
.search-field { position: relative; }
.search-field svg { position: absolute; left: 11px; top: 10px; width: 15px; height: 15px; color: #9aa5b6; }
.search-field input { width: 180px; height: 35px; padding: 0 10px 0 33px; border: 1px solid var(--line); border-radius: 8px; outline: none; font-size: 10px; }
.filter-pills { display: flex; padding: 3px; border-radius: 9px; background: #f2f4f8; }
.filter-pills button { height: 29px; padding: 0 9px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: 9px; cursor: pointer; }
.filter-pills button.is-active { color: var(--ink); background: #fff; box-shadow: 0 2px 7px rgba(23,33,58,.08); font-weight: 700; }
.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { padding: 13px 16px; color: #7f8b9e; background: #fafbfc; font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { height: 62px; padding: 11px 16px; border-top: 1px solid #eff1f5; color: #4f5c70; font-size: 11.5px; white-space: nowrap; }
tbody tr:first-child td { border-top: 0; }
tbody tr:hover { background: #fcfcfe; }
td:first-child { min-width: 240px; }
td strong { display: block; color: #263249; font-size: 12px; line-height: 1.35; }
td small { display: block; max-width: 340px; overflow: hidden; margin-top: 2px; color: #8490a3; font-size: 10px; line-height: 1.35; text-overflow: ellipsis; }
.money-alert { color: var(--danger); font-weight: 700; }
.status, .category { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 12px; font-size: 9.5px; font-weight: 700; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status--active { color: var(--green); background: var(--green-soft); }
.status--overdue { color: var(--danger); background: var(--danger-soft); }
.status--paused { color: #7b8798; background: #f0f2f5; }
.category--servers { color: var(--coral); background: var(--coral-soft); }
.category--relay { color: var(--violet); background: var(--violet-soft); }
.category--licenses { color: var(--teal); background: var(--teal-soft); }
.category--domains { color: #b47d15; background: var(--amber-soft); }
.category--other { color: #6b7789; background: #f0f2f5; }
.row-menu { width: 30px; height: 28px; border: 0; border-radius: 7px; color: #8e99a9; background: transparent; font-weight: 800; letter-spacing: .08em; cursor: pointer; }
.row-menu:hover { color: var(--violet); background: var(--violet-soft); }
tr.is-filtered-out { display: none; }

/* Taxes */
.tax-section {
    margin-top: 15px;
    overflow: hidden;
    border-radius: var(--radius);
    color: #eef2fa;
    background: linear-gradient(135deg,#192540,#213154);
    scroll-margin-top: 15px;
}
.tax-head { display: flex; justify-content: space-between; align-items: center; gap: 25px; padding: 27px 30px 21px; border-bottom: 1px solid rgba(255,255,255,.08); }
.tax-head h2 { margin: 0; font-family: Manrope,sans-serif; font-size: 20px; }
.tax-head p { margin: 4px 0 0; color: #8997ae; font-size: 10px; }
.tax-grid { display: grid; grid-template-columns: 1.15fr .75fr .85fr; }
.tax-grid > article { min-height: 320px; padding: 25px 28px; border-right: 1px solid rgba(255,255,255,.08); }
.tax-grid > article:last-child { border-right: 0; }
.tax-formula { display: grid; align-content: center; }
.tax-formula > div { display: grid; grid-template-columns: 27px minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 42px; border-bottom: 1px solid rgba(255,255,255,.07); }
.tax-formula > div > span { color: #65738c; font-size: 8px; }
.tax-formula p { margin: 0; display: grid; font-size: 9px; }
.tax-formula p small { color: #71809a; font-size: 8px; }
.tax-formula strong { font-size: 10px; }
.tax-formula .is-subtotal { margin-bottom: 5px; border-color: rgba(141,125,245,.45); }
.tax-formula .is-subtotal strong { color: #a99ef5; font-size: 12px; }
.tax-result { display: flex; flex-direction: column; align-items: center; text-align: center; }
.tax-result > span { color: #8290a8; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.tax-result > strong { margin: 4px 0 14px; font-family: Manrope,sans-serif; font-size: 25px; }
.tax-result > strong small { color: #74829a; font-size: 9px; font-weight: 500; }
.tax-ring {
    position: relative;
    width: 94px; height: 94px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: conic-gradient(#7e6cf0 var(--tax-angle), rgba(255,255,255,.08) 0);
}
.tax-ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #203051; }
.tax-ring div { position: relative; display: grid; }
.tax-ring b { font-family: Manrope,sans-serif; font-size: 16px; }
.tax-ring small { color: #71809a; font-size: 7px; }
.tax-result dl { width: 100%; margin: 17px 0 0; }
.tax-result dl div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid rgba(255,255,255,.06); font-size: 8px; }
.tax-result dt { color: #8290a8; }
.tax-result dd { margin: 0; font-weight: 700; }
.tax-notes { display: flex; flex-direction: column; }
.tax-note-icon { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; color: #a99ef5; background: rgba(108,92,231,.17); font-family: serif; font-weight: 700; }
.tax-notes h3 { margin: 12px 0 8px; font-family: Manrope,sans-serif; font-size: 13px; }
.tax-notes ul { margin: 0; padding-left: 17px; color: #9aa7bb; font-size: 8px; line-height: 1.65; }
.official-links { display: grid; gap: 4px; margin: 15px 0 10px; }
.official-links a { color: #a99ef5; font-size: 8px; font-weight: 700; text-decoration: none; }
.tax-notes > small { margin-top: auto; color: #66758d; font-size: 7px; }
.app-footer { display: flex; justify-content: space-between; padding: 22px 3px 8px; color: #98a3b3; font-size: 8px; }

/* Modals */
.modal-backdrop {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15,24,43,.62);
    backdrop-filter: blur(4px);
}
.modal {
    position: relative;
    width: min(650px, 100%);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 28px;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(0,0,0,.25);
}
.modal--small { width: min(480px, 100%); }
.modal-close { position: absolute; top: 17px; right: 17px; width: 31px; height: 31px; border: 0; border-radius: 8px; color: #8995a7; background: #f3f5f8; font-size: 20px; cursor: pointer; }
.modal h2 { margin: 2px 0 4px; font-family: Manrope,sans-serif; font-size: 22px; }
.modal > p { margin: 0 0 22px; color: var(--muted); font-size: 11px; }
.modal-form { display: grid; gap: 15px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-span-2 { grid-column: span 2; }
.modal-form label small { color: var(--faint); font-size: 9px; font-weight: 400; }
.modal-actions { display: flex; align-items: center; gap: 5px; margin-top: 7px; padding-top: 16px; border-top: 1px solid var(--line); }
.modal-actions .text-button { margin-left: auto; }
.modal-actions .danger-button + .form-status { margin-left: 0; }
.form-status { color: var(--danger); font-size: 9px; }
body.modal-open { overflow: hidden; }
.toast { position: fixed; z-index: 120; right: 22px; bottom: 22px; max-width: 340px; padding: 12px 16px; border-radius: 10px; color: #fff; background: #17213a; box-shadow: 0 12px 32px rgba(0,0,0,.2); font-size: 10px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .25s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast.is-error { background: var(--danger); }

/* Readability pass — keep operational information comfortable at normal zoom. */
.eyebrow, .section-kicker { font-size: 11.5px; }
.topbar h1 { font-size: 22px; }
.data-freshness { font-size: 12px; }
.primary-button, .secondary-button, .danger-button, .text-button { font-size: 12.5px; }
.hero p:last-child { font-size: 13px; line-height: 1.55; }
.hero-meter > span { font-size: 12px; }
.attention-strip strong { font-size: 13px; }
.attention-strip span, .attention-strip a { font-size: 11.5px; line-height: 1.45; }
.kpi-card > span { font-size: 12.5px; }
.kpi-card > strong { font-size: 28px; }
.kpi-card > small { font-size: 11px; line-height: 1.4; }
.panel-head { min-height: 82px; padding: 21px 23px 15px; }
.panel-head h2 { font-size: 20px; }
.panel-head p { font-size: 12px; line-height: 1.45; }
.panel-head a { font-size: 12px; }
.chart-legend { font-size: 11px; }
.chart-grid { font-size: 10px; }
.chart-month > small { font-size: 10px; }
.chart-summary div { font-size: 11px; }
.chart-summary strong { font-size: 12px; }
.donut strong { font-size: 19px; }
.donut span { font-size: 10.5px; }
.donut-legend span, .donut-legend strong { font-size: 11.5px; }
.donut-legend small { width: 30px; font-size: 10px; }
.panel-insight p { font-size: 11.5px; line-height: 1.55; }
.timeline { padding-bottom: 20px; }
.timeline-row { min-height: 70px; grid-template-columns: 40px 18px minmax(0,1fr) auto; gap: 11px; }
.timeline-date strong { font-size: 18px; }
.timeline-date span { font-size: 10px; }
.timeline-copy strong { font-size: 13px; line-height: 1.4; }
.timeline-copy span { font-size: 11px; line-height: 1.4; }
.timeline-amount strong { font-size: 13px; }
.timeline-amount span { font-size: 10.5px; }
.client-bars { gap: 16px; }
.client-row { grid-template-columns: 36px minmax(0,1fr) 82px; }
.client-avatar { width: 36px; height: 36px; font-size: 11px; }
.client-row > div strong { font-size: 12.5px; }
.client-row p strong { font-size: 11.5px; }
.client-row p small { font-size: 10px; }
.concentration-note { font-size: 11px; }
.concentration-note strong { font-size: 19px; }
.search-field input { height: 39px; font-size: 12px; }
.filter-pills button { height: 33px; font-size: 11px; }
table { font-size: 13px; }
th { padding-top: 14px; padding-bottom: 14px; font-size: 11px; }
td { height: 68px; font-size: 13px; }
td strong { font-size: 13.5px; }
td small { margin-top: 3px; font-size: 11.5px; }
.status, .category { font-size: 10.5px; }
.tax-head h2 { font-size: 23px; }
.tax-head p { font-size: 12px; line-height: 1.5; }
.tax-formula > div { min-height: 50px; }
.tax-formula > div > span { font-size: 10px; }
.tax-formula p { font-size: 11.5px; }
.tax-formula p small { font-size: 10px; }
.tax-formula strong { font-size: 12px; }
.tax-result > span { font-size: 11px; }
.tax-result > strong { font-size: 28px; }
.tax-result > strong small { font-size: 11px; }
.tax-ring b { font-size: 18px; }
.tax-ring small { font-size: 9px; }
.tax-result dl div { font-size: 10.5px; }
.tax-notes h3 { font-size: 16px; }
.tax-notes ul { font-size: 11px; line-height: 1.65; }
.official-links a { font-size: 10.5px; }
.tax-notes > small, .app-footer { font-size: 10px; }

@media (max-width: 1160px) {
    .kpi-grid { grid-template-columns: repeat(2,1fr); }
    .dashboard-grid, .two-column { grid-template-columns: 1fr; }
    .tax-grid { grid-template-columns: 1fr 1fr; }
    .tax-notes { grid-column: span 2; min-height: 220px !important; }
    .tax-grid > article:nth-child(2) { border-right: 0; }
    .record-actions { align-items: flex-end; flex-direction: column; }
}
@media (max-width: 820px) {
    .sidebar { transform: translateX(-100%); transition: transform .24s ease; box-shadow: 12px 0 32px rgba(0,0,0,.18); }
    .sidebar.is-open { transform: translateX(0); }
    .main-content { width: 100%; margin-left: 0; }
    .mobile-menu { display: grid; place-items: center; }
    .topbar { padding: 13px 18px; }
    .data-freshness { display: none; }
    .content-wrap { padding: 20px 18px 10px; }
    .hero { padding: 28px; }
    .hero-meter { display: none; }
    .login-shell { grid-template-columns: 1fr; }
    .login-visual { display: none; }
}
@media (max-width: 620px) {
    .topbar .primary-button { width: 38px; padding: 0; font-size: 0; }
    .topbar .primary-button span { font-size: 15px; }
    .hero { min-height: 210px; }
    .hero h2 { font-size: 28px; }
    .attention-strip { align-items: flex-start; }
    .attention-strip a { display: none; }
    .kpi-grid { grid-template-columns: 1fr; }
    .kpi-card { min-height: 120px; }
    .cash-chart { gap: 4px; margin-right: 10px; margin-left: 42px; }
    .chart-month > small { font-size: 7px; }
    .chart-summary div { display: grid; gap: 3px; padding: 11px; }
    .donut-layout { flex-direction: column; }
    .donut-legend { width: 100%; }
    .panel-head--records { align-items: flex-start; flex-direction: column; }
    .record-actions { width: 100%; align-items: stretch; }
    .search-field input { width: 100%; }
    .filter-pills { max-width: 100%; overflow-x: auto; }
    .filter-pills button { flex: 0 0 auto; }
    .tax-head { align-items: flex-start; flex-direction: column; }
    .tax-grid { grid-template-columns: 1fr; }
    .tax-notes { grid-column: auto; }
    .tax-grid > article { min-height: auto; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.08); }
    .app-footer { gap: 8px; flex-direction: column; }
    .form-grid { grid-template-columns: 1fr; }
    .form-span-2 { grid-column: auto; }
    .login-card { width: min(100% - 40px, 460px); }
}
