@font-face {
    font-family: "Golos Text";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/GolosText-Regular.woff2") format("woff2");
}

@font-face {
    font-family: "Golos Text";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/GolosText-Medium.woff2") format("woff2");
}

@font-face {
    font-family: "Golos Text";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/GolosText-SemiBold.woff2") format("woff2");
}

@font-face {
    font-family: "Golos Text";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/GolosText-Bold.woff2") format("woff2");
}

:root {
    color-scheme: light;
    --fp-paper: #f7f6f3;
    --fp-surface: #fbfaf8;
    --fp-white: #ffffff;
    --fp-ink: #1b2028;
    --fp-muted: #6f7784;
    --fp-line: #dfe2e7;
    --fp-line-dark: #313945;
    --fp-brass: #3e5f9a;
    --fp-brass-light: #7590bf;
    --fp-dark: #151b24;
    --fp-font: "Golos Text", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--fp-ink); font-family: var(--fp-font); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }

.fp-brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; font-size: 16px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; }
.fp-brand > span:last-child { display: flex; flex-direction: column; }
.fp-brand small { margin-top: 2px; color: var(--fp-muted); font-size: 8px; font-weight: 500; letter-spacing: .18em; line-height: 1; text-transform: uppercase; }
.fp-brand-mark { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; overflow: hidden; border: 0; color: var(--fp-brass); }
.fp-brand-mark i { font-size: 18px; line-height: 1; }
.fp-brand-mark img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Login */
.fp-login-page { min-height: 100vh; background: var(--fp-paper); }
.fp-login-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(430px, .82fr) minmax(0, 1.18fr); }
.fp-login-panel { display: flex; min-height: 100vh; align-items: center; justify-content: center; order: 1; border-right: 1px solid var(--fp-line); padding: 56px clamp(42px, 6vw, 100px); background: var(--fp-surface); }
.fp-login-card { width: min(390px, 100%); }
.fp-brand-mobile { display: inline-flex; margin-bottom: clamp(72px, 12vh, 128px); color: var(--fp-ink); }
.fp-login-card header { border-top: 1px solid var(--fp-brass); padding-top: 25px; }
.fp-kicker { display: block; margin-bottom: 15px; color: var(--fp-brass); font-size: 10px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; }
.fp-login-card header h2 { margin: 0; color: var(--fp-ink); font-family: var(--fp-font); font-size: clamp(34px, 3vw, 45px); font-weight: 600; letter-spacing: -.045em; line-height: 1.05; }
.fp-login-card header p { margin: 17px 0 0; color: var(--fp-muted); font-size: 13px; line-height: 1.6; }

.fp-login-intro { display: flex; min-height: 100vh; flex-direction: column; justify-content: space-between; overflow: hidden; position: relative; order: 2; padding: clamp(44px, 5.5vw, 86px); background-color: var(--fp-dark); color: #f5f7fb; }
.fp-login-intro::before { content: "01"; position: absolute; right: clamp(40px, 6vw, 90px); top: clamp(38px, 5vw, 76px); color: rgba(255,255,255,.12); font-family: var(--fp-font); font-size: 12px; font-weight: 600; letter-spacing: .16em; }
.fp-brand-light { position: relative; z-index: 1; color: #f5f7fb; }
.fp-brand-light small { color: rgba(255,255,255,.42); }
.fp-brand-light .fp-brand-mark { color: var(--fp-brass-light); }
.fp-login-copy { width: min(680px, 92%); position: relative; z-index: 1; }
.fp-login-intro .fp-kicker { color: var(--fp-brass-light); }
.fp-login-copy h1 { margin: 0; color: #f5f7fb; font-family: var(--fp-font); font-size: clamp(52px, 6.6vw, 96px); font-weight: 600; letter-spacing: -.065em; line-height: .9; }
.fp-login-copy p { max-width: 470px; margin: 34px 0 0; border-left: 1px solid var(--fp-brass-light); padding-left: 20px; color: rgba(235,240,249,.62); font-size: 14px; line-height: 1.7; }
.fp-login-trust { display: flex; align-items: center; gap: 11px; position: relative; z-index: 1; color: rgba(235,240,249,.52); font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
.fp-login-trust i { color: var(--fp-brass-light); font-size: 13px; }

.fp-alert { margin-top: 23px; border-left: 2px solid; padding: 10px 13px; font-size: 12px; line-height: 1.5; }
.fp-alert-error { border-color: #8d3d32; background: #f6ece9; color: #7d3127; }
.fp-alert-info { border-color: var(--fp-brass); background: #edf1f8; color: #314b7a; }
.fp-login-form { display: grid; gap: 21px; margin-top: 34px; }
.fp-login-form label > span { display: block; margin-bottom: 9px; color: #4d5561; font-size: 10px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; }
.fp-login-form input[type="text"], .fp-login-form input[type="password"] { width: 100%; height: 50px; border: 1px solid var(--fp-line); border-radius: 0; outline: 0; padding: 0 14px; background: transparent; color: var(--fp-ink); transition: border-color .15s, background .15s; }
.fp-login-form input:focus { border-color: var(--fp-ink); background: var(--fp-white); }
.fp-login-form .fp-check { display: flex; align-items: flex-start; gap: 10px; color: var(--fp-muted); cursor: pointer; font-size: 11px; }
.fp-login-form .fp-check input { width: 14px; height: 14px; margin: 0; accent-color: var(--fp-brass); }
.fp-login-form .fp-check span { margin: 0; color: inherit; font-weight: 400; letter-spacing: 0; text-transform: none; }
.fp-login-form button { display: flex; height: 52px; align-items: center; justify-content: space-between; border: 1px solid var(--fp-brass); border-radius: 0; padding: 0 19px; background: var(--fp-brass); color: #fff; cursor: pointer; font-size: 11px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; transition: background .15s, border-color .15s; }
.fp-login-form button:hover { border-color: var(--fp-dark); background: var(--fp-dark); }
.fp-login-form button i { font-size: 15px; }

/* Portal shell */
.fp-portal-page { min-height: 100vh; background: var(--fp-paper); --fm-bg: var(--fp-paper); --fm-surface: var(--fp-surface); --fm-text: var(--fp-ink); --fm-muted: var(--fp-muted); --fm-blue: var(--fp-brass); --fm-blue-hover: #304f89; --fm-border: var(--fp-line); --fm-positive: #2f874b; --fm-negative: #c33c3c; }
.fp-topbar { display: flex; height: 76px; align-items: center; justify-content: space-between; position: sticky; z-index: 30; top: 0; border-bottom: 1px solid var(--fp-line); padding: 0 clamp(22px, 3vw, 46px); background: rgba(247,246,243,.96); backdrop-filter: blur(14px); }
.fp-topbar .fp-brand-mark { color: var(--fp-brass); }
.fp-user { display: flex; align-items: center; gap: 12px; }
.fp-user-avatar { display: inline-flex; width: 31px; height: 31px; align-items: center; justify-content: center; border: 1px solid var(--fp-line); border-radius: 50%; background: transparent; color: var(--fp-ink); font-family: var(--fp-font); font-size: 12px; font-weight: 600; }
.fp-user-name { max-width: 180px; overflow: hidden; color: #4d5561; font-size: 11px; font-weight: 600; letter-spacing: .02em; text-overflow: ellipsis; white-space: nowrap; }
.fp-user form { margin: 0; }
.fp-user button { border: 0; border-left: 1px solid var(--fp-line); padding: 4px 0 4px 13px; background: transparent; color: var(--fp-muted); cursor: pointer; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.fp-user button:hover { color: var(--fp-ink); }
.fp-shell { display: grid; min-height: calc(100vh - 76px); grid-template-columns: clamp(220px, 17.5vw, 252px) minmax(0, 1fr); }

.fp-sidebar { display: flex; min-height: calc(100vh - 76px); flex-direction: column; justify-content: space-between; position: sticky; top: 76px; padding: 30px 22px 25px; background: var(--fp-dark); color: #f5f1e8; }
.fp-sidebar nav { display: grid; gap: 1px; }
.fp-sidebar nav a { display: flex; min-height: 42px; align-items: center; gap: 12px; position: relative; border-bottom: 1px solid rgba(255,255,255,.09); padding: 10px 4px; color: rgba(237,241,248,.58); font-size: 11px; font-weight: 500; letter-spacing: .015em; text-decoration: none; }
.fp-sidebar nav a:hover { color: rgba(255,255,255,.86); }
.fp-sidebar nav a.is-active { color: #fff; }
.fp-sidebar nav a.is-active::after { content: ""; width: 20px; height: 1px; position: absolute; right: 2px; background: var(--fp-brass-light); }
.fp-nav-dot { width: 5px; height: 5px; border: 1px solid currentColor; border-radius: 50%; }
.fp-sidebar nav a.is-active .fp-nav-dot { border-color: var(--fp-brass-light); background: var(--fp-brass-light); }
.fp-sidebar-note { border-top: 1px solid var(--fp-line-dark); padding-top: 17px; }
.fp-sidebar-note span { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.62); font-size: 9px; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.fp-sidebar-note span i { width: 5px; height: 5px; border-radius: 50%; background: #759175; box-shadow: 0 0 0 3px rgba(117,145,117,.13); }
.fp-sidebar-note p { margin: 8px 0 0; color: rgba(255,255,255,.28); font-size: 10px; line-height: 1.5; }

.fp-content.fm-app { min-width: 0; min-height: calc(100vh - 76px); padding: 48px clamp(32px, 3.05vw, 48px) 76px; background: var(--fp-paper); font-family: var(--fp-font); }
.fp-content .fm-page-header { margin-bottom: 38px; }
.fp-content .fm-page-header h1 { font-family: var(--fp-font); font-size: clamp(38px, 4.5vw, 58px); font-weight: 700; letter-spacing: -.055em; line-height: 1; }
.fp-content .fm-page-header p { max-width: 620px; margin-top: 12px; font-size: 13px; }
.fp-content .fm-eyebrow { margin-bottom: 13px; color: var(--fp-brass); font-size: 9px; letter-spacing: .18em; }
.fp-content .fm-primary-button, .fp-content .fm-secondary-button { min-height: 52px; border-color: var(--fp-brass); border-radius: 0; padding: 10px 28px; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.fp-content .fm-primary-button { min-width: 220px; }
.fp-content .fm-primary-button { background: var(--fp-brass); color: #fff; }
.fp-content .fm-primary-button:hover { border-color: var(--fp-ink); background: var(--fp-ink); }
.fp-content .fm-secondary-button { border-color: var(--fp-line); background: transparent; color: var(--fp-ink); }

.fp-content .fm-filter-row { align-items: center; border-top: 1px solid var(--fp-line); border-bottom: 1px solid var(--fp-line); margin-bottom: 28px; padding: 14px 0; }
.fp-content .fm-segmented { border: 0; border-radius: 0; padding: 0; background: transparent; }
.fp-content .fm-segmented button, .fp-content .fm-segmented a { display: inline-flex; min-height: 32px; flex: 0 0 auto; align-items: center; border: 0; border-radius: 0; padding: 6px 11px; background: transparent; color: var(--fp-muted); font-size: 10px; font-weight: 600; letter-spacing: .035em; text-decoration: none; }
.fp-content .fm-segmented button.is-selected, .fp-content .fm-segmented a.is-selected { border-bottom: 2px solid var(--fp-brass); background: transparent; color: var(--fp-ink); }
.fp-content .fm-period-label { color: var(--fp-ink); font-family: var(--fp-font); font-size: 13px; font-weight: 500; letter-spacing: -.01em; }
.fp-content .fm-period-navigation { display: inline-flex; align-items: center; gap: 8px; }
.fp-content .fm-period-navigation > a, .fp-content .fm-period-navigation > .is-disabled { display: inline-flex; width: 34px; height: 34px; flex: 0 0 34px; align-items: center; justify-content: center; border: 1px solid var(--fp-line); color: var(--fp-ink); font-size: 13px; text-decoration: none; transition: border-color .18s ease, background .18s ease, color .18s ease; }
.fp-content .fm-period-navigation > a:hover { border-color: var(--fp-brass); background: #f3f6fb; color: var(--fp-brass); }
.fp-content .fm-period-navigation > .is-disabled { color: #bcc1c9; cursor: default; }
.fp-content .fm-period-navigation .fm-period-label { min-width: 150px; text-align: center; white-space: nowrap; }

.fp-content .fm-card { border: 1px solid var(--fp-line); border-radius: 2px; background: var(--fp-surface); box-shadow: none; }
.fp-content .fm-kpi-grid { gap: 1px; border: 1px solid var(--fp-line); margin-bottom: 28px; background: var(--fp-line); }
.fp-content .fm-kpi-card { border: 0; border-radius: 0; padding: 20px; }
.fp-content .fm-kpi-topline { color: var(--fp-muted); font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.fp-content .fm-dot { display: none; }
.fp-content .fm-kpi-card strong { margin: 25px 0 8px; font-family: var(--fp-font); font-size: 34px; font-weight: 600; letter-spacing: -.04em; }
.fp-content .fm-kpi-card small { color: #848b96; font-size: 10px; line-height: 1.45; }
.fp-content .fm-dashboard-grid, .fp-content .fm-workspace-grid { gap: 18px; }
.fp-content .fm-chart-card, .fp-content .fm-side-card, .fp-content .fm-list-card, .fp-content .fm-guidance-card { padding: 24px; }
.fp-content .fm-card-heading h2, .fp-content .fm-guidance-card h2 { font-family: var(--fp-font); font-size: 19px; font-weight: 600; letter-spacing: -.025em; }
.fp-content .fm-card-heading p, .fp-content .fm-guidance-card p { margin-top: 7px; font-size: 10px; letter-spacing: .03em; }
.fp-content .fm-empty-chart, .fp-content .fm-empty-state { min-height: 250px; padding: 34px 18px; }
.fp-content .fm-empty-chart strong, .fp-content .fm-empty-state h3 { font-family: var(--fp-font); font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.fp-content .fm-empty-chart p, .fp-content .fm-empty-state p { max-width: 430px; color: var(--fp-muted); font-size: 11px; line-height: 1.6; text-align: center; }
.fp-empty-icon { margin-bottom: 17px; color: var(--fp-brass); font-size: 34px; line-height: 1; }

.fp-content .fm-quick-actions { margin-top: 12px; }
.fp-content .fm-quick-actions a { justify-content: space-between; border-bottom: 1px solid var(--fp-line); border-radius: 0; padding: 15px 0; }
.fp-content .fm-quick-actions a:last-child { border-bottom: 0; }
.fp-content .fm-quick-actions a > i { width: auto; color: var(--fp-muted); font-size: 13px; }
.fp-content .fm-filter-placeholder { border-top: 1px solid var(--fp-line); border-bottom: 1px solid var(--fp-line); margin-top: 23px; padding: 18px 0; }
.fp-content .fm-filter-placeholder input { border-radius: 0; background: #f1f3f7; }
.fp-content .fm-stage-label { border-radius: 0; padding: 6px 9px; background: #e8edf5; color: #3e5f9a; font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.fp-content .fm-guidance-card li { border-bottom-color: var(--fp-line); font-size: 11px; }
.fp-mobile-nav { display: none; }

/* Stage 2 operations */
.fp-page-alert { margin: -14px 0 24px; }
.fp-operations-layout { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(250px, .8fr); gap: 18px; margin-bottom: 18px; }
.fp-operation-form-card, .fp-accounts-card, .fp-operation-list-card { padding: 24px; }
.fp-operation-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 26px; }
.fp-field { display: block; min-width: 0; }
.fp-field[hidden] { display: none; }
.fp-field-wide { grid-column: 1 / -1; }
.fp-field > span, .fp-operation-filters label > span { display: block; margin-bottom: 8px; color: var(--fp-muted); font-size: 9px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.fp-field input, .fp-field select, .fp-field textarea, .fp-operation-filters input, .fp-operation-filters select { width: 100%; min-height: 44px; border: 1px solid var(--fp-line); border-radius: 0; outline: 0; padding: 10px 12px; background: #fff; color: var(--fp-ink); font-family: var(--fp-font); font-size: 12px; transition: border-color .15s, box-shadow .15s; }
.fp-field textarea { min-height: 82px; resize: vertical; }
.fp-field input:focus, .fp-field select:focus, .fp-field textarea:focus, .fp-operation-filters input:focus, .fp-operation-filters select:focus { border-color: var(--fp-brass); box-shadow: 0 0 0 2px rgba(62,95,154,.1); }
.fp-form-actions { display: flex; align-items: center; gap: 10px; grid-column: 1 / -1; }
.fp-form-actions .fm-secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; text-decoration: none; }
.fp-form-submit { width: max-content; grid-column: 1 / -1; }
.fp-account-list { display: grid; margin-top: 18px; }
.fp-account-list > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--fp-line); padding: 16px 0; }
.fp-account-list > div:last-child { border-bottom: 0; }
.fp-account-list span, .fp-account-list b { display: block; font-size: 11px; }
.fp-account-list small { display: block; margin-top: 4px; color: var(--fp-muted); font-size: 9px; text-transform: uppercase; }
.fp-account-list b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.fp-operation-list-card { margin-top: 18px; }
.fp-operation-filters { display: grid; grid-template-columns: .9fr .9fr 1fr 1fr minmax(160px, 1.25fr) auto; align-items: end; gap: 10px; margin: 24px 0 8px; border-top: 1px solid var(--fp-line); border-bottom: 1px solid var(--fp-line); padding: 18px 0; }
.fp-operation-filters .fm-secondary-button { min-height: 44px; padding-right: 18px; padding-left: 18px; }
.fp-operation-list { display: grid; }
.fp-operation-row { position: relative; display: grid; grid-template-columns: 110px minmax(0, 1fr) 130px minmax(120px, auto) 120px; align-items: center; gap: 16px; border-bottom: 1px solid var(--fp-line); padding: 17px 0; }
.fp-operation-row:last-child { border-bottom: 0; }
.fp-operation-row.is-archived { opacity: .72; }
.fp-operation-kind { display: flex; align-items: center; gap: 8px; color: var(--fp-muted); font-size: 10px; font-weight: 600; text-transform: uppercase; }
.fp-operation-kind > span { border: 1px solid var(--fp-line); padding: 2px 5px; color: var(--fp-muted); font-size: 8px; letter-spacing: .06em; }
.fp-operation-kind i { width: 6px; height: 6px; border-radius: 50%; background: var(--fp-muted); }
.fp-operation-kind.income i { background: var(--fm-positive); }
.fp-operation-kind.expense i { background: var(--fm-negative); }
.fp-operation-kind.transfer i { background: var(--fp-brass); }
.fp-operation-main { min-width: 0; }
.fp-operation-main b, .fp-operation-main span, .fp-operation-main em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-operation-main b { font-size: 12px; font-weight: 600; }
.fp-operation-main span, .fp-operation-row time { margin-top: 4px; color: var(--fp-muted); font-size: 10px; }
.fp-operation-main em { margin-top: 5px; color: #765e45; font-size: 9px; font-style: normal; }
.fp-operation-row time { margin: 0; white-space: nowrap; }
.fp-operation-row > strong { justify-self: end; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fp-operation-row > strong.income { color: var(--fm-positive); }
.fp-operation-row > strong.expense { color: var(--fm-negative); }
.fp-operation-row > strong.transfer { color: var(--fp-ink); }
.fp-operation-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; font-size: 9px; }
.fp-operation-actions > a, .fp-operation-actions summary { color: var(--fp-brass); font-weight: 600; text-decoration: none; text-transform: uppercase; cursor: pointer; }
.fp-operation-actions summary { list-style: none; }
.fp-operation-actions summary::-webkit-details-marker { display: none; }
.fp-operation-actions details { position: relative; }
.fp-operation-actions details > form { position: absolute; z-index: 10; top: calc(100% + 10px); right: 0; width: 280px; border: 1px solid var(--fp-line); padding: 14px; background: #fff; box-shadow: 0 12px 28px rgba(24,35,52,.14); }
.fp-operation-actions form span { display: block; margin-bottom: 7px; color: var(--fp-muted); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.fp-operation-actions form textarea { width: 100%; min-height: 64px; border: 1px solid var(--fp-line); padding: 9px; color: var(--fp-ink); font: 11px/1.45 var(--fp-font); resize: vertical; }
.fp-operation-actions form button { width: 100%; min-height: 34px; border: 0; margin-top: 8px; background: var(--fp-brass); color: #fff; font: 600 9px var(--fp-font); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.fp-linked-label { color: var(--fp-muted); font-size: 8px; letter-spacing: .07em; text-transform: uppercase; }
.fp-pagination { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--fp-line); margin-top: 4px; padding-top: 18px; color: var(--fp-muted); font-size: 10px; }
.fp-pagination a { color: var(--fp-brass); text-decoration: none; }
.fp-compact-empty { min-height: 190px !important; }
.fp-chart-wrap { height: 280px; margin-top: 18px; }
.fp-balance-summary { margin-top: 26px; border-top: 1px solid var(--fp-line); padding-top: 18px; }
.fp-section-label { display: block; margin-bottom: 8px; color: var(--fp-muted); font-size: 9px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.fp-balance-summary > div { display: flex; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--fp-line); padding: 11px 0; font-size: 10px; }
.fp-balance-summary > div:last-child { border-bottom: 0; }
.fp-balance-summary b { white-space: nowrap; }

/* Stage 2.3 sales */
.fp-sales-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--fp-line); margin-bottom: 18px; background: var(--fp-line); gap: 1px; }
.fp-sales-kpis article { min-width: 0; padding: 18px 20px; background: var(--fp-surface); }
.fp-sales-kpis article.is-accent { background: #eef2f8; }
.fp-sales-kpis span { display: block; margin-bottom: 18px; color: var(--fp-muted); font-size: 9px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.fp-sales-kpis strong { display: block; overflow: hidden; font-size: 24px; font-weight: 600; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.fp-sale-form-card, .fp-sales-list-card { padding: 24px; }
.fp-sale-form-card { margin-bottom: 18px; scroll-margin-top: 100px; }
.fp-quick-product { margin-top: 20px; border: 1px solid #ccd6e6; padding: 14px 16px; background: #f3f6fa; }
.fp-quick-product > summary { color: var(--fp-brass); cursor: pointer; font-size: 9px; font-weight: 600; letter-spacing: .08em; list-style: none; text-transform: uppercase; }
.fp-quick-product > summary::-webkit-details-marker { display: none; }
.fp-quick-product > summary::before { content: "+"; margin-right: 7px; }
.fp-quick-product[open] > summary::before { content: "−"; }
.fp-quick-product form { display: grid; grid-template-columns: 1.4fr .8fr .8fr auto; align-items: end; gap: 10px; margin-top: 14px; }
.fp-quick-product .fm-secondary-button { min-height: 44px; padding: 8px 14px; }
.fp-sale-form { margin-top: 25px; }
.fp-sale-basics { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(280px, 1.2fr); gap: 14px; }
.fp-quick-client { border-bottom: 1px solid var(--fp-line); padding: 15px 0 17px; }
.fp-quick-client summary { width: max-content; color: var(--fp-brass); cursor: pointer; font-size: 10px; font-weight: 600; letter-spacing: .06em; list-style: none; text-transform: uppercase; }
.fp-quick-client summary::-webkit-details-marker { display: none; }
.fp-quick-client summary::before { content: "+"; margin-right: 7px; }
.fp-quick-client[open] summary::before { content: "−"; }
.fp-quick-client > div { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.fp-quick-client > p { margin: 9px 0 0; color: var(--fp-muted); font-size: 10px; }
.fp-sale-lines-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 25px 0 12px; }
.fp-sale-lines-heading span, .fp-sale-lines-heading small { display: block; }
.fp-sale-lines-heading span { color: var(--fp-ink); font-size: 12px; font-weight: 600; }
.fp-sale-lines-heading small { margin-top: 5px; color: var(--fp-muted); font-size: 9px; }
.fp-sale-lines-heading .fm-secondary-button { min-height: 38px; padding: 8px 14px; }
.fp-sale-lines { border-top: 1px solid var(--fp-line); }
.fp-sale-line { display: grid; grid-template-columns: minmax(240px, 1.5fr) minmax(105px, .55fr) minmax(120px, .65fr) minmax(120px, .65fr) 34px; align-items: end; gap: 10px; border-bottom: 1px solid var(--fp-line); padding: 15px 0; }
.fp-line-total { min-width: 0; padding: 0 4px 10px; }
.fp-line-total span { display: block; margin-bottom: 11px; color: var(--fp-muted); font-size: 9px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.fp-line-total strong { display: block; overflow: hidden; font-size: 12px; font-variant-numeric: tabular-nums; text-overflow: ellipsis; white-space: nowrap; }
.fp-remove-line { width: 34px; height: 44px; border: 0; background: transparent; color: #9a5a55; cursor: pointer; }
.fp-sale-form-footer { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto; align-items: end; gap: 20px; margin-top: 20px; }
.fp-sale-form-footer .fp-field textarea { min-height: 66px; }
.fp-sale-total { min-width: 145px; padding-bottom: 10px; text-align: right; }
.fp-sale-total span, .fp-sale-total strong { display: block; }
.fp-sale-total span { margin-bottom: 8px; color: var(--fp-muted); font-size: 9px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.fp-sale-total strong { font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
.fp-sale-prerequisite { display: flex; min-height: 126px; align-items: center; gap: 18px; margin-top: 22px; border-top: 1px solid var(--fp-line); padding-top: 20px; }
.fp-sale-prerequisite > i { color: var(--fp-brass); font-size: 30px; }
.fp-sale-prerequisite > div { flex: 1; }
.fp-sale-prerequisite b { font-size: 13px; }
.fp-sale-prerequisite p { max-width: 560px; margin: 6px 0 0; color: var(--fp-muted); font-size: 10px; line-height: 1.55; }
.fp-sale-filters { display: grid; grid-template-columns: 1fr 1fr 1fr minmax(180px, 1.4fr) auto; align-items: end; gap: 10px; margin: 24px 0 8px; border-top: 1px solid var(--fp-line); border-bottom: 1px solid var(--fp-line); padding: 18px 0; }
.fp-sale-filters label > span { display: block; margin-bottom: 8px; color: var(--fp-muted); font-size: 9px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.fp-sale-filters input, .fp-sale-filters select { width: 100%; min-height: 44px; border: 1px solid var(--fp-line); border-radius: 0; padding: 10px 12px; background: #fff; color: var(--fp-ink); font: 12px var(--fp-font); }
.fp-sale-filters .fm-secondary-button { min-height: 44px; padding-right: 18px; padding-left: 18px; }
.fp-sales-list { display: grid; }
.fp-sale-card { border-bottom: 1px solid var(--fp-line); scroll-margin-top: 100px; }
.fp-sale-card:last-child { border-bottom: 0; }
.fp-sale-card > header { display: grid; grid-template-columns: 130px minmax(170px, 1fr) 105px 130px 130px; align-items: center; gap: 18px; padding: 19px 0; }
.fp-sale-number span, .fp-sale-number time, .fp-sale-client b, .fp-sale-client span, .fp-sale-amount span, .fp-sale-amount strong, .fp-sale-debt span, .fp-sale-debt strong { display: block; }
.fp-sale-number span { font-size: 11px; font-weight: 600; }
.fp-sale-number time, .fp-sale-client span { margin-top: 5px; color: var(--fp-muted); font-size: 9px; }
.fp-sale-client b { overflow: hidden; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.fp-payment-status { width: max-content; border: 1px solid var(--fp-line); padding: 5px 7px; color: var(--fp-muted); font-size: 8px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.fp-payment-status.is-partial { border-color: #c8b47e; color: #806b2d; }
.fp-payment-status.is-paid { border-color: #9ab7a2; color: #427052; }
.fp-sale-amount, .fp-sale-debt { text-align: right; }
.fp-sale-amount span, .fp-sale-debt span { margin-bottom: 5px; color: var(--fp-muted); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.fp-sale-amount strong, .fp-sale-debt strong { font-size: 12px; font-variant-numeric: tabular-nums; }
.fp-sale-debt strong { color: #765e45; }
.fp-sale-details { border-top: 1px dashed #d8d9dc; padding: 0 0 18px; }
.fp-sale-details > summary { display: flex; width: max-content; align-items: center; gap: 8px; padding: 12px 0 4px; color: var(--fp-brass); cursor: pointer; font-size: 9px; font-weight: 600; letter-spacing: .06em; list-style: none; text-transform: uppercase; }
.fp-sale-details > summary::-webkit-details-marker { display: none; }
.fp-sale-details[open] > summary i { transform: rotate(180deg); }
.fp-sale-details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; margin-top: 14px; }
.fp-sale-details h3 { margin: 0 0 9px; color: var(--fp-muted); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.fp-sale-items > div, .fp-sale-payments > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--fp-line); padding: 10px 0; }
.fp-sale-items span, .fp-sale-payments span { min-width: 0; }
.fp-sale-items b, .fp-sale-payments b, .fp-sale-items small, .fp-sale-payments small { display: block; }
.fp-sale-items b, .fp-sale-payments b, .fp-sale-items strong, .fp-sale-payments strong { font-size: 10px; }
.fp-sale-items small, .fp-sale-payments small, .fp-sale-payments > p { margin-top: 4px; color: var(--fp-muted); font-size: 9px; }
.fp-sale-items strong, .fp-sale-payments strong { white-space: nowrap; }
.fp-sale-comment { margin: 12px 0 0; border-left: 2px solid var(--fp-line); padding-left: 10px; color: var(--fp-muted); font-size: 10px; }
.fp-payment-form { display: grid; grid-template-columns: 1fr 1.2fr 1fr 1fr; align-items: end; gap: 10px; margin-top: 22px; border: 1px solid #ccd6e6; padding: 17px; background: #f3f6fa; }
.fp-payment-heading { grid-column: 1 / -1; margin-bottom: 3px; }
.fp-payment-heading b, .fp-payment-heading span { display: block; }
.fp-payment-heading b { font-size: 12px; }
.fp-payment-heading span { margin-top: 4px; color: var(--fp-muted); font-size: 9px; }
.fp-payment-comment { grid-column: 1 / span 3; }
.fp-payment-form .fm-primary-button { width: 100%; min-width: 0; min-height: 44px; padding: 10px 16px; }

/* Lost opportunities */
.fp-lost-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--fp-line); margin-bottom: 18px; background: var(--fp-line); gap: 1px; }
.fp-lost-kpis article { min-width: 0; padding: 18px 20px; background: var(--fp-surface); }
.fp-lost-kpis article.is-accent { background: #eef2f8; }
.fp-lost-kpis span, .fp-lost-kpis strong, .fp-lost-kpis small { display: block; }
.fp-lost-kpis span { color: var(--fp-muted); font-size: 9px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.fp-lost-kpis strong { margin-top: 18px; overflow: hidden; font-size: 23px; font-weight: 600; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.fp-lost-kpis small { margin-top: 6px; color: var(--fp-muted); font-size: 9px; }
.fp-lost-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); gap: 18px; margin-bottom: 18px; }
.fp-lost-form-card, .fp-lost-ranking-card, .fp-lost-list-card { padding: 24px; }
.fp-lost-form-card { scroll-margin-top: 100px; }
.fp-lost-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.fp-lost-wide { grid-column: 1 / -1; }
.fp-lost-hint { display: flex; align-items: flex-start; gap: 10px; grid-column: 1 / -1; border-left: 2px solid var(--fp-brass); padding: 11px 13px; background: #f5f7fa; color: var(--fp-muted); }
.fp-lost-hint i { flex: 0 0 auto; color: var(--fp-brass); font-size: 15px; }
.fp-lost-hint p { margin: 0; font-size: 10px; line-height: 1.55; }
.fp-lost-hint b { color: var(--fp-ink); }
.fp-lost-submit { grid-column: 1 / -1; justify-self: end; }
.fp-lost-ranking { display: grid; margin-top: 18px; }
.fp-lost-ranking > div:not(.fm-empty-state) { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-top: 1px solid var(--fp-line); padding: 13px 0; }
.fp-lost-ranking > div:first-child { border-top: 0; }
.fp-lost-ranking .fp-lost-rank { color: #a0a7b2; font-size: 10px; font-weight: 600; }
.fp-lost-ranking b, .fp-lost-ranking small { display: block; }
.fp-lost-ranking b { font-size: 11px; }
.fp-lost-ranking small { margin-top: 4px; color: var(--fp-muted); font-size: 9px; }
.fp-lost-ranking strong { font-size: 12px; font-weight: 600; white-space: nowrap; }
.fp-lost-list { display: grid; gap: 10px; margin-top: 20px; }
.fp-lost-record { border: 1px solid var(--fp-line); background: #fff; }
.fp-lost-record > header { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 15px 17px; }
.fp-lost-record-icon { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; background: #eef2f8; color: var(--fp-brass); font-size: 17px; }
.fp-lost-record header b, .fp-lost-record header small { display: block; }
.fp-lost-record header b { font-size: 12px; }
.fp-lost-record header small { margin-top: 4px; color: var(--fp-muted); font-size: 9px; }
.fp-lost-record-value { text-align: right; }
.fp-lost-record-value span, .fp-lost-record-value strong { display: block; }
.fp-lost-record-value span { color: var(--fp-muted); font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.fp-lost-record-value strong { margin-top: 5px; font-size: 17px; font-weight: 600; }
.fp-lost-record-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--fp-line); background: #fafbfc; }
.fp-lost-record-details p { margin: 0; border-left: 1px solid var(--fp-line); padding: 12px 17px; }
.fp-lost-record-details p:first-child { border-left: 0; }
.fp-lost-record-details p.is-comment { grid-column: 1 / -1; border-top: 1px solid var(--fp-line); border-left: 0; }
.fp-lost-record-details span, .fp-lost-record-details b { display: block; }
.fp-lost-record-details span { color: var(--fp-muted); font-size: 8px; letter-spacing: .05em; text-transform: uppercase; }
.fp-lost-record-details b { margin-top: 5px; font-size: 10px; font-weight: 500; line-height: 1.45; }
.fp-lost-archive { border-top: 1px solid var(--fp-line); padding: 10px 17px; }
.fp-lost-archive summary { width: max-content; color: var(--fp-muted); font-size: 9px; font-weight: 600; letter-spacing: .05em; list-style: none; text-transform: uppercase; cursor: pointer; }
.fp-lost-archive summary::-webkit-details-marker { display: none; }
.fp-lost-archive form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; margin-top: 10px; }
.fp-lost-archive label span { display: block; margin-bottom: 5px; color: var(--fp-muted); font-size: 8px; text-transform: uppercase; }
.fp-lost-archive textarea { width: 100%; min-height: 55px; border: 1px solid var(--fp-line); padding: 8px; font: 10px/1.4 var(--fp-font); resize: vertical; }
.fp-lost-archive button { min-height: 36px; border: 0; padding: 0 14px; background: var(--fp-dark); color: #fff; font: 600 9px var(--fp-font); text-transform: uppercase; cursor: pointer; }

/* Stage 2.4 inventory and production */
.fp-production-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--fp-line); margin-bottom: 16px; background: var(--fp-line); gap: 1px; }
.fp-production-kpis article { min-width: 0; padding: 18px 20px; background: var(--fp-surface); }
.fp-production-kpis article.is-accent { background: #eef2f8; }
.fp-production-kpis span, .fp-production-kpis strong, .fp-production-kpis small { display: block; }
.fp-production-kpis span { color: var(--fp-muted); font-size: 9px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.fp-production-kpis strong { margin-top: 18px; overflow: hidden; font-size: 23px; font-weight: 600; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.fp-production-kpis small { margin-top: 6px; color: var(--fp-muted); font-size: 9px; }
.fp-production-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border: 1px solid var(--fp-line); margin-bottom: 18px; background: var(--fp-line); }
.fp-production-actions a { display: flex; min-width: 0; align-items: center; gap: 14px; padding: 17px 19px; background: var(--fp-surface); color: var(--fp-ink); text-decoration: none; }
.fp-production-actions a:hover { background: #f1f4f9; }
.fp-production-actions i { color: var(--fp-brass); font-size: 20px; }
.fp-production-actions span, .fp-production-actions b, .fp-production-actions small { display: block; }
.fp-production-actions b { font-size: 11px; }
.fp-production-actions small { margin-top: 4px; color: var(--fp-muted); font-size: 9px; }
.fp-production-forms { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 18px; }
.fp-purchase-card, .fp-batch-card, .fp-stock-overview, .fp-production-list-card { padding: 24px; }
.fp-purchase-card, .fp-batch-card, .fp-stock-overview { scroll-margin-top: 96px; }
.fp-quick-material { margin: 20px 0; border: 1px solid #ccd6e6; padding: 14px 16px; background: #f3f6fa; }
.fp-quick-material summary, .fp-additional-costs summary { color: var(--fp-brass); cursor: pointer; font-size: 9px; font-weight: 600; letter-spacing: .08em; list-style: none; text-transform: uppercase; }
.fp-quick-material summary::-webkit-details-marker, .fp-additional-costs summary::-webkit-details-marker { display: none; }
.fp-quick-material summary::before, .fp-additional-costs summary::before { content: "+"; margin-right: 7px; }
.fp-quick-material[open] summary::before, .fp-additional-costs[open] summary::before { content: "−"; }
.fp-quick-material form { display: grid; grid-template-columns: 1.25fr 1fr .8fr .8fr auto; align-items: end; gap: 9px; margin-top: 14px; }
.fp-quick-material .fm-secondary-button { min-height: 44px; padding: 8px 13px; }
.fp-purchase-form, .fp-batch-form { display: grid; gap: 17px; margin-top: 20px; }
.fp-production-basics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fp-production-wide { grid-column: 1 / -1; }
.fp-production-lines-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--fp-line); padding-top: 16px; }
.fp-production-lines-heading > span { font-size: 11px; font-weight: 600; }
.fp-production-lines-heading .fm-secondary-button { min-height: 34px; padding: 7px 11px; }
.fp-purchase-items, .fp-batch-materials, #batch-costs { display: grid; }
.fp-purchase-item { display: grid; grid-template-columns: minmax(170px, 1.35fr) 90px 105px 92px 30px; align-items: end; gap: 8px; border-bottom: 1px solid var(--fp-line); padding: 11px 0; }
.fp-purchase-item > strong { align-self: center; padding-top: 13px; font-size: 10px; text-align: right; white-space: nowrap; }
.fp-purchase-item > button, .fp-batch-material > button, .fp-batch-cost > button { width: 30px; height: 44px; border: 0; background: transparent; color: #9a5a55; cursor: pointer; }
.fp-production-submit { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.fp-production-submit > span { color: var(--fp-muted); font-size: 9px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.fp-production-submit b { display: block; margin-top: 5px; color: var(--fp-ink); font-size: 20px; letter-spacing: -.03em; }
.fp-production-submit .fm-primary-button { min-width: 190px; }
.fp-batch-material { display: grid; grid-template-columns: minmax(190px, 1fr) 110px 30px; align-items: end; gap: 8px; border-bottom: 1px solid var(--fp-line); padding: 11px 0; }
.fp-additional-costs { border-top: 1px solid var(--fp-line); border-bottom: 1px solid var(--fp-line); padding: 15px 0; }
.fp-batch-cost { display: grid; grid-template-columns: minmax(160px, 1fr) 105px minmax(130px, .8fr) 30px; align-items: end; gap: 8px; padding-top: 11px; }
.fp-additional-costs > .fm-secondary-button { min-height: 34px; margin-top: 11px; padding: 7px 11px; }
.fp-complete-batch { width: 100% !important; }
.fp-production-prerequisite { display: flex; min-height: 150px; align-items: center; justify-content: center; gap: 15px; margin-top: 22px; border-top: 1px solid var(--fp-line); color: var(--fp-muted); text-align: left; }
.fp-production-prerequisite > i { color: var(--fp-brass); font-size: 27px; }
.fp-production-prerequisite b, .fp-production-prerequisite p { display: block; }
.fp-production-prerequisite b { color: var(--fp-ink); font-size: 12px; }
.fp-production-prerequisite p { max-width: 440px; margin: 5px 0 0; font-size: 10px; line-height: 1.55; }
.fp-stock-overview { margin-top: 18px; }
.fp-stock-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; margin-top: 23px; }
.fp-stock-columns h3 { margin: 0 0 8px; color: var(--fp-muted); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.fp-stock-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--fp-line); padding: 12px 0; }
.fp-stock-row span, .fp-stock-row b, .fp-stock-row small { display: block; min-width: 0; }
.fp-stock-row b { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.fp-stock-row small { margin-top: 5px; color: var(--fp-muted); font-size: 9px; }
.fp-stock-row strong { font-size: 11px; white-space: nowrap; }
.fp-stock-empty { margin: 20px 0; color: var(--fp-muted); font-size: 10px; }
.fp-production-history { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.fp-production-record { border-bottom: 1px solid var(--fp-line); }
.fp-production-record > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 15px 0; cursor: pointer; list-style: none; }
.fp-production-record > summary::-webkit-details-marker { display: none; }
.fp-production-record > summary span, .fp-production-record > summary b, .fp-production-record > summary small { display: block; min-width: 0; }
.fp-production-record > summary b { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.fp-production-record > summary small, .fp-production-record > summary > span:nth-child(2) { margin-top: 5px; color: var(--fp-muted); font-size: 8px; }
.fp-production-record > summary > strong { font-size: 10px; white-space: nowrap; }
.fp-production-record > div { border-top: 1px dashed var(--fp-line); padding: 8px 0 12px; }
.fp-production-record > div p { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 6px 0; font-size: 9px; }
.fp-production-record > div p.is-sub { padding-left: 12px; color: var(--fp-muted); }
.fp-history-empty { min-height: 110px; padding-top: 35px; color: var(--fp-muted); font-size: 10px; text-align: center; }

/* Stage 2.5 clients */
.fp-client-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--fp-line); margin-bottom: 18px; background: var(--fp-line); gap: 1px; }
.fp-client-kpis article { min-width: 0; padding: 18px 20px; background: var(--fp-surface); }
.fp-client-kpis article.is-accent { background: #eef2f8; }
.fp-client-kpis span, .fp-client-kpis strong, .fp-client-kpis small { display: block; }
.fp-client-kpis span { color: var(--fp-muted); font-size: 9px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.fp-client-kpis strong { margin-top: 18px; overflow: hidden; font-size: 23px; font-weight: 600; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.fp-client-kpis small { margin-top: 6px; color: var(--fp-muted); font-size: 9px; }
.fp-client-form-card, .fp-client-list-card { padding: 24px; }
.fp-client-form-card { margin-bottom: 18px; scroll-margin-top: 96px; }
.fp-client-form { display: grid; grid-template-columns: 1.2fr 1fr .8fr; align-items: end; gap: 14px; margin-top: 23px; }
.fp-client-note, .fp-client-reason { grid-column: 1 / -1; }
.fp-client-note textarea { min-height: 70px; }
.fp-client-reason input { min-height: 42px; }
.fp-client-form-actions { display: flex; align-items: center; gap: 10px; grid-column: 1 / -1; }
.fp-client-form-actions .fm-secondary-button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; text-decoration: none; }
.fp-client-filters { display: grid; grid-template-columns: 200px minmax(240px, 1fr) auto; align-items: end; gap: 10px; margin: 23px 0 4px; border-top: 1px solid var(--fp-line); border-bottom: 1px solid var(--fp-line); padding: 17px 0; }
.fp-client-filters label > span { display: block; margin-bottom: 8px; color: var(--fp-muted); font-size: 9px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.fp-client-filters input, .fp-client-filters select { width: 100%; min-height: 44px; border: 1px solid var(--fp-line); border-radius: 0; padding: 10px 12px; background: #fff; color: var(--fp-ink); font: 12px var(--fp-font); }
.fp-client-filters .fm-secondary-button { min-height: 44px; padding-right: 20px; padding-left: 20px; }
.fp-client-list { display: grid; }
.fp-client-card { border-bottom: 1px solid var(--fp-line); scroll-margin-top: 96px; }
.fp-client-card:last-child { border-bottom: 0; }
.fp-client-card.is-archived { opacity: .72; }
.fp-client-card > header { display: grid; grid-template-columns: 42px minmax(180px, 1.45fr) repeat(4, minmax(90px, .75fr)); align-items: center; gap: 15px; padding: 20px 0 16px; }
.fp-client-avatar { display: flex; width: 42px; height: 42px; align-items: center; justify-content: center; border: 1px solid #b9c6d9; background: #eef2f8; color: var(--fp-brass); font-size: 14px; font-weight: 700; }
.fp-client-identity, .fp-client-identity b, .fp-client-identity span, .fp-client-identity small { display: block; min-width: 0; }
.fp-client-identity b { overflow: hidden; font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.fp-client-identity span, .fp-client-identity small { overflow: hidden; margin-top: 5px; color: var(--fp-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.fp-client-identity small { color: #8d7353; }
.fp-client-metric { min-width: 0; text-align: right; }
.fp-client-metric span, .fp-client-metric strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-client-metric span { margin-bottom: 6px; color: var(--fp-muted); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.fp-client-metric strong { font-size: 11px; font-variant-numeric: tabular-nums; }
.fp-client-metric.is-debt strong { color: #765e45; }
.fp-client-card-footer { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 0 0 17px 57px; }
.fp-client-history { flex: 1; min-width: 0; }
.fp-client-history > summary { display: flex; width: max-content; align-items: center; gap: 7px; color: var(--fp-brass); cursor: pointer; font-size: 9px; font-weight: 600; letter-spacing: .06em; list-style: none; text-transform: uppercase; }
.fp-client-history > summary::-webkit-details-marker { display: none; }
.fp-client-history[open] > summary i { transform: rotate(180deg); }
.fp-client-history-body { margin-top: 13px; border-top: 1px dashed var(--fp-line); padding-top: 10px; }
.fp-client-comment { margin: 0 0 10px; border-left: 2px solid #b9c6d9; padding: 8px 11px; background: #f6f8fb; color: var(--fp-muted); font-size: 10px; line-height: 1.55; }
.fp-client-comment span { display: block; margin-bottom: 4px; color: var(--fp-ink); font-size: 8px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.fp-client-comment.is-archive { border-left-color: #c7a78b; }
.fp-client-sales-history { display: grid; }
.fp-client-sales-history > a { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--fp-line); padding: 11px 0; color: var(--fp-ink); text-decoration: none; }
.fp-client-sales-history > a:hover b { color: var(--fp-brass); }
.fp-client-sales-history span, .fp-client-sales-history b, .fp-client-sales-history small { display: block; min-width: 0; }
.fp-client-sales-history b { font-size: 10px; }
.fp-client-sales-history small { overflow: hidden; margin-top: 4px; color: var(--fp-muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.fp-client-sale-payment { flex: 0 0 155px; text-align: right; }
.fp-client-empty-history { margin: 10px 0 0; color: var(--fp-muted); font-size: 9px; }
.fp-client-actions { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; gap: 12px; font-size: 9px; }
.fp-client-actions > a, .fp-client-actions summary { color: var(--fp-brass); font-weight: 600; letter-spacing: .04em; text-decoration: none; text-transform: uppercase; cursor: pointer; }
.fp-client-actions summary { list-style: none; }
.fp-client-actions summary::-webkit-details-marker { display: none; }
.fp-client-actions details { position: relative; }
.fp-client-actions details > form { position: absolute; z-index: 10; top: calc(100% + 9px); right: 0; width: 260px; border: 1px solid var(--fp-line); padding: 13px; background: #fff; box-shadow: 0 12px 28px rgba(24,35,52,.14); }
.fp-client-actions form span { display: block; margin-bottom: 7px; color: var(--fp-muted); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.fp-client-actions form textarea { width: 100%; min-height: 60px; border: 1px solid var(--fp-line); padding: 8px; color: var(--fp-ink); font: 10px/1.45 var(--fp-font); resize: vertical; }
.fp-client-actions form button { width: 100%; min-height: 33px; border: 0; margin-top: 7px; background: var(--fp-brass); color: #fff; font: 600 9px var(--fp-font); letter-spacing: .05em; text-transform: uppercase; cursor: pointer; }
.fp-client-archive-label { color: var(--fp-muted); font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.fp-client-empty { min-height: 220px !important; }

/* Stage 2.6 analytics */
.fp-analytics-period { scroll-margin-top: 96px; }
.fp-analytics-period .fm-period-label { display: flex; align-items: flex-end; flex-direction: column; gap: 4px; }
.fp-analytics-period .fm-period-label small { color: var(--fp-muted); font-size: 8px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.fp-analytics-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--fp-line); margin-bottom: 18px; background: var(--fp-line); gap: 1px; }
.fp-analytics-kpis article { min-width: 0; padding: 17px 19px; background: var(--fp-surface); }
.fp-analytics-kpi-top { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; }
.fp-analytics-kpi-top span { overflow: hidden; color: var(--fp-muted); font-size: 8px; font-weight: 600; letter-spacing: .08em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.fp-analytics-kpi-top em { flex: 0 0 auto; border: 1px solid var(--fp-line); padding: 3px 5px; color: var(--fp-muted); font-size: 8px; font-style: normal; }
.fp-analytics-kpi-top em.is-positive { border-color: #a9c1af; color: #3f7150; }
.fp-analytics-kpi-top em.is-negative { border-color: #d2aaa7; color: #96524e; }
.fp-analytics-kpis article > strong { display: block; margin-top: 17px; overflow: hidden; font-size: 22px; font-weight: 600; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.fp-analytics-kpis article > small { display: block; margin-top: 6px; overflow: hidden; color: var(--fp-muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.fp-analytics-chart-card { margin-bottom: 18px; padding: 24px; }
.fp-analytics-formula { align-self: flex-start; border: 1px solid #cbd5e4; padding: 6px 8px; background: #f2f5f9; color: var(--fp-brass); font-size: 8px; letter-spacing: .04em; text-transform: uppercase; }
.fp-analytics-chart { height: 310px; margin-top: 22px; }
.fp-analytics-empty { min-height: 230px !important; }
.fp-analytics-breakdowns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.fp-analytics-list-card { min-width: 0; padding: 22px; }
.fp-analytics-ranking { display: grid; margin-top: 15px; }
.fp-analytics-rank-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; border-bottom: 1px solid var(--fp-line); padding: 12px 0; }
.fp-analytics-rank-row:last-child, .fp-analytics-expense-row:last-child { border-bottom: 0; }
.fp-analytics-rank-number { color: #9ba2ac; font-size: 9px; font-variant-numeric: tabular-nums; }
.fp-analytics-rank-main, .fp-analytics-rank-main b, .fp-analytics-rank-main a, .fp-analytics-rank-main small { display: block; min-width: 0; }
.fp-analytics-rank-main b, .fp-analytics-rank-main a { overflow: hidden; color: var(--fp-ink); font-size: 10px; font-weight: 600; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.fp-analytics-rank-main a:hover { color: var(--fp-brass); }
.fp-analytics-rank-main small { overflow: hidden; margin-top: 4px; color: var(--fp-muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.fp-analytics-rank-main i { display: block; width: var(--performance, 0); height: 2px; max-width: 100%; margin-top: 7px; background: var(--fp-brass); }
.fp-analytics-rank-value { min-width: 0; text-align: right; }
.fp-analytics-rank-value b, .fp-analytics-rank-value small { display: block; white-space: nowrap; }
.fp-analytics-rank-value b { font-size: 9px; }
.fp-analytics-rank-value small { margin-top: 4px; color: var(--fp-muted); font-size: 7px; }
.fp-analytics-expense-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--fp-line); padding: 12px 0; }
.fp-analytics-expense-row span, .fp-analytics-expense-row b, .fp-analytics-expense-row small { display: block; min-width: 0; }
.fp-analytics-expense-row span { flex: 1; }
.fp-analytics-expense-row b { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.fp-analytics-expense-row small { margin-top: 4px; color: var(--fp-muted); font-size: 8px; }
.fp-analytics-expense-row i { display: block; width: var(--share, 0); height: 2px; max-width: 100%; margin-top: 7px; background: #9eabc0; }
.fp-analytics-expense-row strong { font-size: 9px; white-space: nowrap; }
.fp-analytics-list-empty { margin: 28px 0; color: var(--fp-muted); font-size: 9px; line-height: 1.5; text-align: center; }

/* Calendar and private reminders */
.fp-reminder-stack { display: grid; gap: 8px; margin: -10px 0 22px; }
.fp-reminder-stack article { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 1px solid var(--fp-line); border-left: 3px solid var(--event-color); padding: 12px 14px; background: #fff; }
.fp-reminder-stack article > i { color: var(--event-color); font-size: 17px; text-align: center; }
.fp-reminder-stack article span, .fp-reminder-stack article b, .fp-reminder-stack article small { display: block; }
.fp-reminder-stack article span { color: var(--fp-muted); font-size: 7px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.fp-reminder-stack article b { margin-top: 3px; font-size: 10px; }
.fp-reminder-stack article small { margin-top: 3px; color: var(--fp-muted); font-size: 8px; }
.fp-reminder-actions { display: flex; gap: 6px; }
.fp-reminder-actions form { margin: 0; }
.fp-reminder-actions button { border: 1px solid var(--fp-line); padding: 7px 9px; background: transparent; color: var(--fp-muted); font-size: 8px; }
.fp-reminder-actions button.is-done { border-color: var(--fp-brass); color: var(--fp-brass); }
.fp-calendar-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .65fr); gap: 18px; margin-bottom: 18px; }
.fp-calendar-card, .fp-calendar-day-card, .fp-calendar-form-card, .fp-calendar-upcoming { padding: 22px; }
.fp-calendar-header { display: grid; grid-template-columns: 36px minmax(0, 1fr) 36px; align-items: center; gap: 14px; margin-bottom: 20px; }
.fp-calendar-header > a { display: flex; width: 36px; height: 36px; align-items: center; justify-content: center; border: 1px solid var(--fp-line); color: var(--fp-ink); text-decoration: none; }
.fp-calendar-header > div { text-align: center; }
.fp-calendar-header span, .fp-calendar-header small { display: block; color: var(--fp-muted); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.fp-calendar-header h2 { margin: 4px 0; font-size: 20px; font-weight: 600; letter-spacing: -.03em; text-transform: capitalize; }
.fp-calendar-header small { letter-spacing: 0; text-transform: none; }
.fp-calendar-weekdays, .fp-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.fp-calendar-weekdays { border: 1px solid var(--fp-line); border-bottom: 0; background: #f0f3f8; }
.fp-calendar-weekdays span { padding: 8px; color: var(--fp-muted); font-size: 8px; font-weight: 600; text-align: center; text-transform: uppercase; }
.fp-calendar-grid { border-top: 1px solid var(--fp-line); border-left: 1px solid var(--fp-line); }
.fp-calendar-grid > a { min-width: 0; min-height: 74px; position: relative; border-right: 1px solid var(--fp-line); border-bottom: 1px solid var(--fp-line); padding: 9px; background: #fff; color: var(--fp-ink); text-decoration: none; }
.fp-calendar-grid > a:hover { background: #f4f6fa; }
.fp-calendar-grid > a.is-outside { background: #fafafa; color: #b1b5bc; }
.fp-calendar-grid > a.is-selected { box-shadow: inset 0 0 0 1px var(--fp-brass); background: #f1f4f9; }
.fp-calendar-grid > a.is-today > b { display: flex; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 50%; background: var(--fp-brass); color: #fff; }
.fp-calendar-grid > a > b { font-size: 9px; font-weight: 600; }
.fp-calendar-grid > a > span { display: flex; gap: 4px; margin-top: 22px; }
.fp-calendar-grid > a > span i { width: 6px; height: 6px; border-radius: 50%; background: var(--event-color); }
.fp-calendar-grid > a > small { position: absolute; right: 7px; bottom: 8px; color: var(--fp-muted); font-size: 7px; }
.fp-calendar-day-card .fm-card-heading > span { display: flex; width: 28px; height: 28px; align-items: center; justify-content: center; border: 1px solid var(--fp-line); color: var(--fp-muted); font-size: 9px; }
.fp-calendar-day-events { display: grid; margin-top: 12px; }
.fp-calendar-day-events article { display: grid; grid-template-columns: 58px minmax(0, 1fr) 24px; gap: 10px; border-top: 1px solid var(--fp-line); padding: 14px 0; position: relative; }
.fp-calendar-day-events article::before { width: 2px; position: absolute; top: 14px; bottom: 14px; left: 0; background: var(--event-color); content: ""; }
.fp-calendar-day-events time { padding-left: 10px; color: var(--fp-muted); font-size: 8px; text-transform: uppercase; }
.fp-calendar-day-events b, .fp-calendar-day-events small { display: block; }
.fp-calendar-day-events b { font-size: 10px; }
.fp-calendar-day-events small { margin-top: 4px; color: var(--fp-muted); font-size: 8px; }
.fp-calendar-day-events p { margin: 7px 0 0; color: var(--fp-muted); font-size: 8px; line-height: 1.5; }
.fp-calendar-day-events article > a { color: var(--fp-muted); font-size: 10px; text-align: right; }
.fp-calendar-day-empty { padding: 58px 10px; color: var(--fp-muted); text-align: center; }
.fp-calendar-day-empty i { display: block; margin-bottom: 12px; color: #a7b4c7; font-size: 26px; }
.fp-calendar-day-empty b { display: block; color: var(--fp-ink); font-size: 10px; }
.fp-calendar-day-empty p { max-width: 230px; margin: 8px auto 0; font-size: 8px; line-height: 1.55; }
.fp-calendar-lower { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr); gap: 18px; }
.fp-calendar-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-top: 18px; }
.fp-calendar-title { grid-column: span 2; }
.fp-calendar-description { grid-column: 1 / -1; }
.fp-calendar-all-day { display: flex; align-items: center; gap: 8px; align-self: end; min-height: 45px; color: var(--fp-muted); font-size: 9px; }
.fp-calendar-all-day input { accent-color: var(--fp-brass); }
.fp-calendar-form-actions { display: flex; align-items: center; gap: 8px; grid-column: 1 / -1; }
.fp-calendar-form-actions .fm-secondary-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.fp-calendar-form-actions details { margin-left: auto; color: #8b504d; font-size: 8px; }
.fp-calendar-archive-form { display: flex; align-items: end; gap: 10px; border-top: 1px solid var(--fp-line); margin-top: 16px; padding-top: 16px; }
.fp-calendar-archive-form label { flex: 1; }
.fp-calendar-archive-form button { border: 1px solid #cba8a5; padding: 10px 12px; background: transparent; color: #8b504d; font-size: 8px; }
.fp-calendar-readonly { margin-top: 18px; border: 1px solid var(--fp-line); padding: 18px; color: var(--fp-muted); font-size: 9px; }
.fp-calendar-upcoming > a { display: grid; grid-template-columns: 42px minmax(0, 1fr) 12px; align-items: center; gap: 11px; border-top: 1px solid var(--fp-line); padding: 13px 0; color: var(--fp-ink); text-decoration: none; }
.fp-calendar-upcoming > a time { display: block; border-left: 2px solid var(--event-color); padding-left: 10px; }
.fp-calendar-upcoming > a time b, .fp-calendar-upcoming > a time small, .fp-calendar-upcoming > a span b, .fp-calendar-upcoming > a span small { display: block; }
.fp-calendar-upcoming > a time b { font-size: 14px; }
.fp-calendar-upcoming > a time small { color: var(--fp-muted); font-size: 7px; text-transform: uppercase; }
.fp-calendar-upcoming > a span b { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.fp-calendar-upcoming > a span small { margin-top: 4px; color: var(--fp-muted); font-size: 7px; }
.fp-calendar-upcoming > a > i { color: #9ca4af; font-size: 8px; }
.fp-calendar-upcoming-empty { padding: 50px 15px; color: var(--fp-muted); font-size: 9px; text-align: center; }
.fp-calendar-upcoming-empty i { display: block; margin-bottom: 10px; font-size: 24px; }
.fp-calendar-upcoming footer { border-top: 1px solid var(--fp-line); margin-top: 10px; padding-top: 14px; color: var(--fp-muted); font-size: 7px; line-height: 1.5; }

/* Reports */
.fp-report-catalog { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--fp-line); margin-bottom: 18px; background: var(--fp-line); }
.fp-report-catalog > a { display: grid; min-width: 0; grid-template-columns: 28px minmax(0, 1fr) 12px; align-items: center; gap: 11px; min-height: 88px; padding: 15px 16px; background: var(--fp-surface); color: var(--fp-ink); text-decoration: none; transition: background .15s, color .15s; }
.fp-report-catalog > a:hover { background: #f1f4f9; }
.fp-report-catalog > a.is-active { background: var(--fp-dark); color: #fff; }
.fp-report-catalog > a > i:first-child { color: var(--fp-brass); font-size: 18px; }
.fp-report-catalog > a.is-active > i:first-child { color: var(--fp-brass-light); }
.fp-report-catalog > a > i:last-child { color: var(--fp-muted); font-size: 9px; }
.fp-report-catalog b, .fp-report-catalog small { display: block; min-width: 0; }
.fp-report-catalog b { overflow: hidden; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.fp-report-catalog small { margin-top: 5px; overflow: hidden; color: var(--fp-muted); font-size: 8px; line-height: 1.35; text-overflow: ellipsis; }
.fp-report-catalog > a.is-active small { color: rgba(255,255,255,.48); }
.fp-report-builder { margin-bottom: 18px; padding: 22px; scroll-margin-top: 96px; }
.fp-report-verified { border: 1px solid #b7c9ba; padding: 6px 8px; color: #477152; font-size: 8px; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.fp-report-verified i { margin-right: 4px; }
.fp-report-form { display: grid; grid-template-columns: minmax(220px, 1.5fr) repeat(2, minmax(150px, .75fr)) auto; align-items: end; gap: 12px; margin-top: 20px; }
.fp-report-form .fm-secondary-button { height: 45px; white-space: nowrap; }
.fp-report-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--fp-line); margin-bottom: 18px; background: var(--fp-line); }
.fp-report-summary article { min-width: 0; padding: 17px 19px; background: var(--fp-surface); }
.fp-report-summary span, .fp-report-summary small { display: block; overflow: hidden; color: var(--fp-muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.fp-report-summary span { font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.fp-report-summary strong { display: block; margin-top: 15px; overflow: hidden; font-size: 21px; font-weight: 600; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.fp-report-summary small { margin-top: 6px; }
.fp-report-preview { padding: 0; overflow: hidden; }
.fp-report-preview-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 24px; }
.fp-report-preview-head h2 { margin: 6px 0 0; font-size: 21px; font-weight: 600; letter-spacing: -.03em; }
.fp-report-preview-head p { margin: 6px 0 0; color: var(--fp-muted); font-size: 9px; }
.fp-report-downloads { display: flex; gap: 8px; }
.fp-report-downloads a { display: flex; min-width: 128px; align-items: center; gap: 9px; border: 1px solid var(--fp-line); padding: 10px 12px; color: var(--fp-ink); text-decoration: none; }
.fp-report-downloads a:hover { border-color: var(--fp-brass); }
.fp-report-downloads a.is-primary { border-color: var(--fp-brass); background: var(--fp-brass); color: #fff; }
.fp-report-downloads a > i { font-size: 16px; }
.fp-report-downloads b, .fp-report-downloads small { display: block; }
.fp-report-downloads b { font-size: 9px; letter-spacing: .06em; }
.fp-report-downloads small { margin-top: 3px; color: var(--fp-muted); font-size: 7px; }
.fp-report-downloads a.is-primary small { color: rgba(255,255,255,.62); }
.fp-report-table-wrap { overflow-x: auto; border-top: 1px solid var(--fp-line); border-bottom: 1px solid var(--fp-line); }
.fp-report-table { width: 100%; min-width: 720px; border-collapse: collapse; background: #fff; }
.fp-report-table th { padding: 12px 14px; background: #f0f3f8; color: #5d6673; font-size: 8px; font-weight: 600; letter-spacing: .06em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.fp-report-table td { max-width: 260px; border-top: 1px solid #eceef1; padding: 12px 14px; overflow: hidden; color: #353c46; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.fp-report-table td.is-money, .fp-report-table td.is-number, .fp-report-table td.is-integer, .fp-report-table td.is-percent { font-variant-numeric: tabular-nums; font-weight: 600; }
.fp-report-more { margin: 0; padding: 13px 24px; background: #f7f8fa; color: var(--fp-muted); font-size: 8px; text-align: right; }
.fp-report-empty { min-height: 220px; border-top: 1px solid var(--fp-line); }
.fp-report-audit-note { display: flex; align-items: flex-start; gap: 11px; padding: 17px 24px; background: var(--fp-dark); color: #fff; }
.fp-report-audit-note > i { margin-top: 1px; color: var(--fp-brass-light); font-size: 16px; }
.fp-report-audit-note b, .fp-report-audit-note small { display: block; }
.fp-report-audit-note b { font-size: 9px; font-weight: 600; }
.fp-report-audit-note small { margin-top: 4px; color: rgba(255,255,255,.46); font-size: 8px; line-height: 1.45; }

/* Desktop readability */
@media (min-width: 941px) {
    .fp-topbar .fp-brand { font-size: 18px; }
    .fp-topbar .fp-brand small { font-size: 9px; }
    .fp-user-avatar { width: 34px; height: 34px; font-size: 13px; }
    .fp-user-name { font-size: 13px; }
    .fp-user button { font-size: 11px; }

    .fp-sidebar nav a { min-height: 46px; font-size: 13px; }
    .fp-sidebar-note span { font-size: 11px; }
    .fp-sidebar-note p { font-size: 12px; }

    .fp-content .fm-page-header p { font-size: 15px !important; }
    .fp-content .fm-eyebrow { font-size: 11px; }
    .fp-content .fm-card-heading h2,
    .fp-content .fm-guidance-card h2 { font-size: 22px !important; }
    .fp-content .fm-primary-button,
    .fp-content .fm-secondary-button,
    .fp-content .fm-segmented button,
    .fp-content .fm-segmented a { font-size: 12px !important; }
    .fp-content .fm-period-label { font-size: 14px; }

    .fp-content span { font-size: 12px !important; }
    .fp-content small,
    .fp-content time { font-size: 12px !important; }
    .fp-content p { font-size: 13px !important; }
    .fp-content b,
    .fp-content a { font-size: 13px !important; }
    .fp-content em { font-size: 11px !important; }
    .fp-content h3 { font-size: 15px !important; }
    .fp-content input,
    .fp-content select,
    .fp-content textarea { font-size: 14px !important; }
    .fp-content button,
    .fp-content summary { font-size: 12px !important; }
    .fp-content th { font-size: 11px !important; }
    .fp-content td { font-size: 12px !important; }
    .fp-content strong { font-size: 14px !important; }

    .fp-content .fm-kpi-card strong { font-size: 38px !important; }
    .fp-content .fp-sales-kpis strong { font-size: 27px !important; }
    .fp-content .fp-lost-kpis strong { font-size: 26px !important; }
    .fp-content .fp-production-kpis strong,
    .fp-content .fp-client-kpis strong { font-size: 26px !important; }
    .fp-content .fp-analytics-kpis article > strong,
    .fp-content .fp-report-summary strong { font-size: 25px !important; }
    .fp-content .fp-sale-total strong { font-size: 25px !important; }
    .fp-content .fp-production-submit b { font-size: 22px !important; }
    .fp-content .fp-calendar-header h2,
    .fp-content .fp-report-preview-head h2 { font-size: 24px !important; }
    .fp-content .fp-calendar-upcoming > a time b { font-size: 16px !important; }
}

@media (min-width: 720px) {
    .fp-content .fm-page-header { flex-direction: row; align-items: flex-end; justify-content: space-between; }
    .fp-content .fm-primary-button { width: auto; }
    .fp-content .fm-filter-row { flex-direction: row; justify-content: space-between; }
    .fp-content .fm-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 940px) {
    .fp-login-shell { grid-template-columns: 1fr; }
    .fp-login-intro { display: none; }
    .fp-login-panel { min-height: 100vh; border-right: 0; padding: 36px 24px; }
    .fp-brand-mobile { margin-bottom: 78px; }
    .fp-shell { display: block; }
    .fp-sidebar { display: none; }
    .fp-content.fm-app { padding-bottom: 122px; }
    .fp-mobile-nav { display: flex; height: calc(84px + env(safe-area-inset-bottom)); align-items: stretch; position: fixed; z-index: 40; right: 0; bottom: 0; left: 0; visibility: hidden; overflow-x: auto; overflow-y: hidden; border-top: 1px solid var(--fp-line-dark); padding: 0 7px env(safe-area-inset-bottom); background: rgba(21,27,36,.98); scrollbar-width: none; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
    .fp-mobile-nav.is-ready { visibility: visible; }
    .fp-mobile-nav::-webkit-scrollbar { display: none; }
    .fp-mobile-nav a { display: flex; min-width: 86px; flex: 0 0 86px; align-items: center; justify-content: center; flex-direction: column; gap: 8px; position: relative; color: rgba(255,255,255,.55); text-decoration: none; scroll-snap-align: center; }
    .fp-mobile-nav a > i { color: rgba(255,255,255,.62); font-size: 21px; line-height: 1; }
    .fp-mobile-nav a small { font-size: 10px; font-weight: 500; letter-spacing: .01em; line-height: 1; white-space: nowrap; }
    .fp-mobile-nav a.is-active { color: #fff; }
    .fp-mobile-nav a.is-active > i { color: #9fb6df; }
    .fp-mobile-nav a.is-active::after { content: ""; width: 30px; height: 2px; position: absolute; top: 0; background: var(--fp-brass-light); }
    .fp-content .fm-filter-row { align-items: stretch; flex-direction: column; gap: 12px; }
    .fp-content .fm-segmented { display: flex; overflow-x: auto; scrollbar-width: none; }
    .fp-content .fm-segmented::-webkit-scrollbar { display: none; }
    .fp-content .fm-period-navigation { justify-content: space-between; }
    .fp-content .fm-period-navigation .fm-period-label { min-width: 0; flex: 1 1 auto; }
    .fp-operations-layout { grid-template-columns: 1fr; }
    .fp-operation-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fp-operation-filters .fm-secondary-button { width: 100%; }
    .fp-sales-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fp-lost-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fp-lost-layout { grid-template-columns: 1fr; }
    .fp-lost-form-card, .fp-lost-ranking-card, .fp-lost-list-card { padding: 18px; }
    .fp-lost-record-details { grid-template-columns: 1fr; }
    .fp-lost-record-details p, .fp-lost-record-details p:first-child { border-top: 1px solid var(--fp-line); border-left: 0; }
    .fp-lost-record-details p:first-child { border-top: 0; }
    .fp-sale-line { grid-template-columns: minmax(220px, 1.4fr) 100px 120px 110px 34px; }
    .fp-quick-product form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fp-quick-product .fm-secondary-button { width: 100%; }
    .fp-sale-form-footer { grid-template-columns: 1fr auto; }
    .fp-sale-form-footer > .fp-field { grid-column: 1 / -1; }
    .fp-sale-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fp-sale-card > header { grid-template-columns: 120px minmax(150px, 1fr) 100px 115px; }
    .fp-sale-debt { grid-column: 4; }
    .fp-sale-amount { display: none; }
    .fp-payment-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fp-payment-comment { grid-column: 1; }
    .fp-production-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fp-production-forms, .fp-production-history { grid-template-columns: 1fr; }
    .fp-quick-material form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fp-quick-material .fm-secondary-button { width: 100%; }
    .fp-client-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fp-client-card > header { grid-template-columns: 42px minmax(170px, 1.25fr) repeat(2, minmax(105px, .75fr)); }
    .fp-client-avatar, .fp-client-identity { grid-row: 1 / span 2; }
    .fp-analytics-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fp-analytics-breakdowns { grid-template-columns: 1fr 1fr; }
    .fp-analytics-breakdowns > article:last-child { grid-column: 1 / -1; }
    .fp-report-catalog { grid-template-columns: 1fr 1fr; }
    .fp-report-form { grid-template-columns: 1fr 1fr; }
    .fp-report-type { grid-column: 1 / -1; }
    .fp-report-summary { grid-template-columns: 1fr 1fr; }
    .fp-calendar-layout, .fp-calendar-lower { grid-template-columns: 1fr; }
    .fp-calendar-form { grid-template-columns: 1fr 1fr; }
    .fp-calendar-title { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
    .fp-topbar { height: 64px; padding: 0 16px; }
    .fp-topbar .fp-brand small { display: none; }
    .fp-user-name { display: none; }
    .fp-user-avatar { width: 29px; height: 29px; }
    .fp-shell { min-height: calc(100vh - 64px); }
    .fp-content.fm-app { min-height: calc(100vh - 64px); padding: 30px 16px 96px; }
    .fp-content .fm-page-header { margin-bottom: 30px; }
    .fp-content .fm-page-header h1 { font-size: 40px; }
    .fp-login-panel { align-items: flex-start; padding-top: 27px; }
    .fp-brand-mobile { margin-bottom: 84px; }
    .fp-login-card header h2 { font-size: 37px; }
    .fp-operation-form-card, .fp-accounts-card, .fp-operation-list-card { padding: 18px; }
    .fp-operation-form { grid-template-columns: 1fr; }
    .fp-field-wide { grid-column: auto; }
    .fp-form-submit { width: 100%; grid-column: auto; }
    .fp-operation-filters { grid-template-columns: 1fr; }
    .fp-operation-row { grid-template-columns: 1fr auto; gap: 7px 12px; }
    .fp-operation-kind { grid-column: 1; }
    .fp-operation-main { grid-column: 1; }
    .fp-operation-row time { grid-column: 1; }
    .fp-operation-row > strong { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
    .fp-operation-actions { grid-column: 1 / -1; justify-content: flex-start; border-top: 1px solid var(--fp-line); margin-top: 5px; padding-top: 10px; }
    .fp-operation-actions details > form { position: static; width: min(280px, calc(100vw - 72px)); margin-top: 10px; box-shadow: none; }
    .fp-form-actions { align-items: stretch; flex-direction: column; }
    .fp-sales-kpis { grid-template-columns: 1fr 1fr; }
    .fp-sales-kpis article { padding: 15px; }
    .fp-sales-kpis span { margin-bottom: 11px; }
    .fp-sales-kpis strong { font-size: 18px; }
    .fp-sale-form-card, .fp-sales-list-card { padding: 18px; }
    .fp-lost-kpis { grid-template-columns: 1fr 1fr; }
    .fp-lost-kpis article { padding: 14px; }
    .fp-lost-kpis strong { margin-top: 11px; font-size: 18px; }
    .fp-lost-form { grid-template-columns: 1fr; }
    .fp-lost-wide, .fp-lost-hint, .fp-lost-submit { grid-column: 1; }
    .fp-lost-submit { width: 100%; justify-self: stretch; }
    .fp-lost-record > header { grid-template-columns: 38px minmax(0, 1fr); }
    .fp-lost-record-value { grid-column: 1 / -1; border-top: 1px solid var(--fp-line); padding-top: 11px; text-align: left; }
    .fp-lost-archive form { grid-template-columns: 1fr; }
    .fp-sale-basics, .fp-quick-client > div { grid-template-columns: 1fr; }
    .fp-quick-product form { grid-template-columns: 1fr; }
    .fp-sale-lines-heading { align-items: stretch; flex-direction: column; }
    .fp-sale-lines-heading .fm-secondary-button { width: 100%; }
    .fp-sale-line { grid-template-columns: 1fr 1fr 34px; }
    .fp-sale-product { grid-column: 1 / -1; }
    .fp-line-total { grid-column: 1 / span 2; padding-left: 0; }
    .fp-remove-line { grid-column: 3; grid-row: 2; }
    .fp-sale-form-footer { grid-template-columns: 1fr; }
    .fp-sale-total { text-align: left; }
    .fp-sale-form-footer .fm-primary-button { width: 100%; }
    .fp-sale-prerequisite { align-items: flex-start; flex-wrap: wrap; }
    .fp-sale-prerequisite .fm-secondary-button { width: 100%; }
    .fp-sale-filters { grid-template-columns: 1fr; }
    .fp-sale-card > header { grid-template-columns: 1fr auto; gap: 10px; }
    .fp-sale-number { grid-column: 1; }
    .fp-sale-client { grid-column: 1; }
    .fp-payment-status { grid-column: 2; grid-row: 1; }
    .fp-sale-debt { grid-column: 2; grid-row: 2; }
    .fp-sale-details-grid { grid-template-columns: 1fr; gap: 22px; }
    .fp-payment-form { grid-template-columns: 1fr; }
    .fp-payment-comment { grid-column: 1; }
    .fp-production-kpis { grid-template-columns: 1fr 1fr; }
    .fp-production-kpis article { padding: 14px; }
    .fp-production-kpis strong { margin-top: 11px; font-size: 18px; }
    .fp-production-actions { grid-template-columns: 1fr; }
    .fp-purchase-card, .fp-batch-card, .fp-stock-overview, .fp-production-list-card { padding: 18px; }
    .fp-quick-material form, .fp-production-basics { grid-template-columns: 1fr; }
    .fp-production-wide { grid-column: 1; }
    .fp-purchase-item { grid-template-columns: 1fr 1fr 30px; }
    .fp-purchase-item .fp-production-item-main { grid-column: 1 / -1; }
    .fp-purchase-item > strong { grid-column: 1 / span 2; padding-top: 0; text-align: left; }
    .fp-purchase-item > button { grid-column: 3; grid-row: 2; }
    .fp-production-submit { align-items: stretch; flex-direction: column; }
    .fp-production-submit .fm-primary-button { width: 100%; }
    .fp-batch-material { grid-template-columns: 1fr 30px; }
    .fp-batch-material .fp-production-item-main { grid-column: 1 / -1; }
    .fp-batch-cost { grid-template-columns: 1fr 1fr 30px; }
    .fp-batch-cost > label:first-child { grid-column: 1 / -1; }
    .fp-batch-cost > button { grid-column: 3; grid-row: 2; }
    .fp-stock-columns { grid-template-columns: 1fr; gap: 28px; }
    .fp-production-record > summary { grid-template-columns: 1fr auto; }
    .fp-production-record > summary > span:nth-child(2) { display: none; }
    .fp-client-kpis { grid-template-columns: 1fr 1fr; }
    .fp-client-kpis article { padding: 14px; }
    .fp-client-kpis strong { margin-top: 11px; font-size: 18px; }
    .fp-client-form-card, .fp-client-list-card { padding: 18px; }
    .fp-client-form, .fp-client-filters { grid-template-columns: 1fr; }
    .fp-client-note, .fp-client-reason, .fp-client-form-actions { grid-column: 1; }
    .fp-client-form-actions { align-items: stretch; flex-direction: column; }
    .fp-client-form-actions .fm-primary-button, .fp-client-form-actions .fm-secondary-button, .fp-client-filters .fm-secondary-button { width: 100%; }
    .fp-client-card > header { grid-template-columns: 42px minmax(0, 1fr); gap: 10px 12px; }
    .fp-client-avatar { grid-column: 1; grid-row: 1; }
    .fp-client-identity { grid-column: 2; grid-row: 1; }
    .fp-client-metric { display: flex; align-items: center; justify-content: space-between; grid-column: 1 / -1; border-top: 1px solid var(--fp-line); padding-top: 8px; text-align: left; }
    .fp-client-metric span { margin: 0; }
    .fp-client-card-footer { align-items: stretch; flex-direction: column; padding-left: 0; }
    .fp-client-actions { justify-content: flex-start; }
    .fp-client-actions details > form { position: static; width: min(260px, calc(100vw - 72px)); margin-top: 8px; box-shadow: none; }
    .fp-client-sales-history > a { align-items: flex-start; }
    .fp-client-sale-payment { flex-basis: 110px; }
    .fp-analytics-period .fm-period-label { align-items: flex-start; }
    .fp-analytics-kpis { grid-template-columns: 1fr 1fr; }
    .fp-analytics-kpis article { padding: 14px; }
    .fp-analytics-kpis article > strong { margin-top: 12px; font-size: 18px; }
    .fp-analytics-kpi-top { align-items: flex-start; flex-direction: column; }
    .fp-analytics-chart-card, .fp-analytics-list-card { padding: 18px; }
    .fp-analytics-formula { display: none; }
    .fp-analytics-chart { height: 260px; }
    .fp-analytics-breakdowns { grid-template-columns: 1fr; }
    .fp-analytics-breakdowns > article:last-child { grid-column: auto; }
    .fp-analytics-rank-row { grid-template-columns: 18px minmax(0, 1fr); }
    .fp-analytics-rank-value { grid-column: 2; text-align: left; }
    .fp-report-catalog { grid-template-columns: 1fr; }
    .fp-report-catalog > a { min-height: 74px; }
    .fp-report-builder { padding: 18px; }
    .fp-report-builder .fm-card-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
    .fp-report-form { grid-template-columns: 1fr; }
    .fp-report-type { grid-column: auto; }
    .fp-report-form .fm-secondary-button { width: 100%; }
    .fp-report-summary article { padding: 14px; }
    .fp-report-summary strong { margin-top: 11px; font-size: 17px; }
    .fp-report-preview-head { align-items: stretch; flex-direction: column; padding: 18px; }
    .fp-report-downloads { display: grid; grid-template-columns: 1fr 1fr; }
    .fp-report-downloads a { min-width: 0; }
    .fp-report-audit-note { padding: 16px 18px; }
    .fp-reminder-stack article { grid-template-columns: 28px minmax(0, 1fr); }
    .fp-reminder-actions { grid-column: 1 / -1; padding-left: 40px; }
    .fp-calendar-card, .fp-calendar-day-card, .fp-calendar-form-card, .fp-calendar-upcoming { padding: 18px; }
    .fp-calendar-grid > a { min-height: 58px; padding: 6px; }
    .fp-calendar-grid > a > span { gap: 2px; margin-top: 15px; }
    .fp-calendar-grid > a > span i { width: 4px; height: 4px; }
    .fp-calendar-form { grid-template-columns: 1fr; }
    .fp-calendar-title, .fp-calendar-description { grid-column: auto; }
    .fp-calendar-form-actions { align-items: stretch; flex-direction: column; grid-column: auto; }
    .fp-calendar-form-actions .fm-primary-button, .fp-calendar-form-actions .fm-secondary-button { width: 100%; }
    .fp-calendar-archive-form { align-items: stretch; flex-direction: column; }
    .fp-mobile-nav a small { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
