@charset "UTF-8";

:root {
  color-scheme: light;
  --bg: #f1f0e9;
  --surface: #fbfaf6;
  --surface-soft: #f5f3ec;
  --ink: #22231f;
  --muted: #65675e;
  --plum: #34382f;
  --plum-dark: #252920;
  --plum-light: #606857;
  --rose: #b4b5a6;
  --rose-soft: #e9e8df;
  --sage-soft: #e4e8de;
  --green: #415845;
  --border: #dbd8cd;
  --danger: #913f3a;
  --shadow: 0 18px 50px rgba(38, 40, 32, .1);
  --radius: 26px;
  --font: "Avenir Next", Avenir, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:not(:disabled), summary, select { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(52, 56, 47, .35); outline-offset: 3px; }
::selection { background: #d9ded1; color: var(--ink); }

.app-shell { min-height: 100vh; min-height: 100dvh; }
.side-rail { display: none; }
.app-content { min-width: 0; }
.mobile-header { height: 80px; padding: 16px 20px 10px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--serif); font-size: 25px; font-weight: 400; letter-spacing: -.8px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--plum); color: #fff; }
.brand-mark svg { width: 19px; height: 19px; }
.brand small { display: block; margin-top: 1px; color: var(--muted); font-family: var(--font); font-size: 9px; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; }
.local-badge { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #718c72; box-shadow: 0 0 0 3px rgba(113, 140, 114, .13); }
.main-content { width: 100%; max-width: 1140px; margin: 0 auto; padding: 12px 18px 132px; }
.view { animation: view-in .25s ease; }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 12px 2px 27px; }
.page-heading h1 { margin: 4px 0 8px; font-family: var(--serif); font-size: clamp(32px, 8vw, 46px); line-height: 1.08; letter-spacing: -1.5px; font-weight: 400; }
.overview-heading h1 { font-style: italic; }
.page-heading p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 13px; }
.eyebrow { margin: 0; color: var(--plum-light); font-size: 10px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; }
.page-heading .heading-action { display: none; }

.button { min-height: 48px; border: 1px solid transparent; border-radius: 999px; padding: 11px 21px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 650; font-size: 13px; transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease; }
.button:active { transform: scale(.98); }
.button svg { width: 18px; height: 18px; stroke-width: 1.8; }
.button-primary { background: var(--plum); color: #fff; box-shadow: 0 5px 14px rgba(37, 41, 32, .1); }
.button-primary:hover { background: var(--plum-dark); }
.button-secondary { background: var(--surface); border-color: var(--border); color: var(--plum); }
.button-secondary:hover { background: var(--rose-soft); border-color: #c9c7bb; }
.button-danger { background: var(--danger); color: #fff; }
.button-danger-ghost { color: var(--danger); background: #f5eae6; padding: 10px 15px; }
.full-width { width: 100%; }
.icon-button { width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; display: inline-grid; place-items: center; flex-shrink: 0; border: 1px solid transparent; border-radius: 50%; background: var(--surface-soft); color: var(--muted); transition: background .15s ease, color .15s ease, border-color .15s ease; }
.icon-button:hover { background: var(--rose-soft); border-color: var(--border); color: var(--plum); }
.text-button { min-height: 44px; padding: 8px 0; border: 0; background: transparent; color: var(--plum); display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.text-button:hover { color: var(--plum-light); }
.text-button svg { width: 15px; height: 15px; }

.earnings-card { position: relative; overflow: hidden; padding: 26px 24px 22px; border: 1px solid rgba(255, 255, 255, .06); border-radius: 28px; background: var(--plum); color: #fff; box-shadow: 0 16px 34px rgba(37, 41, 32, .13); }
.earnings-card::before { content: ""; position: absolute; width: 200px; height: 200px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 50%; right: -105px; top: -105px; box-shadow: 0 0 0 34px rgba(255, 255, 255, .018); }
.earnings-top { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.earnings-label { display: block; color: rgba(255, 255, 255, .76); font-size: 11px; font-weight: 500; }
.earnings-value { display: block; margin-top: 7px; font-family: var(--font); font-size: clamp(36px, 10vw, 48px); line-height: 1.1; letter-spacing: -1.7px; font-weight: 550; font-variant-numeric: tabular-nums; }
.commission-pill { padding: 6px 11px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .9); font-size: 10px; white-space: nowrap; }
.earnings-bottom { position: relative; display: flex; gap: 34px; margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .16); }
.earnings-bottom div { display: flex; flex-direction: column; }
.earnings-bottom span { color: rgba(255, 255, 255, .7); font-size: 10px; }
.earnings-bottom strong { margin-top: 3px; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.earnings-decoration { position: absolute; right: 3px; bottom: 1px; opacity: .35; }
.earnings-decoration svg { width: 30px; height: 30px; }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 14px 0; }
.stat-card { min-width: 0; padding: 17px 14px; display: flex; align-items: flex-start; gap: 11px; border: 1px solid var(--border); border-radius: 21px; background: var(--surface); }
.stat-icon { width: 36px; height: 36px; border-radius: 12px; background: var(--sage-soft); color: var(--green); display: grid; place-items: center; flex-shrink: 0; }
.stat-icon.rose { background: var(--rose-soft); color: var(--plum); }
.stat-icon svg { width: 17px; height: 17px; }
.stat-card div { min-width: 0; display: flex; flex-direction: column; }
.stat-card div > span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.stat-card strong { margin: 3px 0 1px; font-size: 19px; line-height: 1.3; letter-spacing: -.4px; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.stat-card small { color: var(--muted); font-size: 9px; }
.quick-add-card { width: 100%; min-height: 78px; margin: 0 0 30px; padding: 14px 16px; display: flex; align-items: center; gap: 13px; text-align: left; border: 1px dashed #c9c6b9; border-radius: 22px; background: var(--surface-soft); color: var(--ink); }
.quick-add-card:hover { border-color: var(--plum-light); background: var(--rose-soft); }
.quick-add-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface); color: var(--plum); border: 1px solid var(--border); }
.quick-add-card > span:nth-child(2) { display: flex; flex-direction: column; }
.quick-add-card strong { font-size: 13px; }
.quick-add-card small { color: var(--muted); font-size: 11px; }
.quick-chevron { margin-left: auto; width: 18px; color: var(--plum-light); }
.content-section { margin-top: 4px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 2px 14px; }
.section-heading h2, .settings-heading h2 { margin: 0; font-family: var(--serif); font-size: 22px; line-height: 1.2; letter-spacing: -.45px; font-weight: 400; }
.section-heading p, .settings-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.visit-list { display: flex; flex-direction: column; gap: 11px; }
.visit-card { padding: 17px; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); transition: border-color .15s ease, transform .15s ease; }
.visit-card:hover { border-color: #c5c3b7; transform: translateY(-1px); }
.visit-card-main { display: flex; align-items: center; gap: 12px; }
.client-avatar { width: 45px; height: 45px; border-radius: 15px; display: grid; place-items: center; flex-shrink: 0; background: var(--rose-soft); color: var(--plum); font-family: var(--serif); font-size: 16px; font-weight: 400; letter-spacing: .3px; }
.visit-card-info { flex: 1; min-width: 0; }
.visit-card-info strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visit-card-info span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visit-card-amount { text-align: right; flex-shrink: 0; }
.visit-card-amount strong { display: block; font-size: 15px; font-variant-numeric: tabular-nums; }
.visit-card-amount span { display: block; color: var(--green); font-size: 10px; }
.visit-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 11px; padding-top: 8px; border-top: 1px solid var(--border); }
.visit-date { color: var(--muted); font-size: 10px; }
.visit-actions { display: flex; align-items: center; gap: 3px; }
.mini-button { min-height: 44px; padding: 8px; display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 11px; }
.mini-button:hover { background: var(--rose-soft); color: var(--plum); }
.mini-button svg { width: 15px; height: 15px; }
.visit-notes { margin: 11px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-soft); color: var(--muted); font-size: 11px; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty-state { padding: 38px 20px; text-align: center; border: 1px dashed #cbc8bc; border-radius: var(--radius); background: rgba(251, 250, 246, .55); }
.empty-state .empty-icon { width: 50px; height: 50px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 50%; background: var(--rose-soft); color: var(--plum); }
.empty-state h3 { margin: 0 0 5px; font-family: var(--serif); font-size: 21px; font-weight: 400; }
.empty-state p { max-width: 300px; margin: 0 auto 17px; color: var(--muted); font-size: 12px; }

.filter-bar { display: flex; gap: 9px; margin-bottom: 12px; }
.search-field { min-width: 0; min-height: 48px; padding: 0 15px; display: flex; align-items: center; gap: 9px; flex: 1; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); }
.search-field:focus-within { border-color: var(--plum-light); box-shadow: 0 0 0 3px rgba(52, 56, 47, .08); }
.search-field svg { width: 18px; height: 18px; }
.search-field input { width: 100%; min-width: 0; min-height: 44px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 16px; }
.search-field input::placeholder, input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
.month-field { min-width: 128px; }
.month-field input { height: 48px; width: 100%; padding: 0 10px; border: 1px solid var(--border); border-radius: 15px; outline: 0; background: var(--surface); color: var(--ink); font-size: 16px; }
.month-field input:focus { border-color: var(--plum-light); box-shadow: 0 0 0 3px rgba(52, 56, 47, .08); }
.results-line { min-height: 30px; padding: 0 3px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; }
.client-search { margin-bottom: 12px; }
.client-list { display: grid; gap: 11px; }
.client-card { padding: 16px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); }
.client-card .client-avatar { border-radius: 50%; }
.client-card-info { min-width: 0; flex: 1; }
.client-card-info strong { display: block; font-size: 14px; }
.client-card-info span { color: var(--muted); font-size: 10px; }
.client-card-stats { display: flex; gap: 16px; text-align: right; }
.client-card-stats div { display: flex; flex-direction: column; }
.client-card-stats strong { font-size: 13px; font-variant-numeric: tabular-nums; }
.client-card-stats span { color: var(--muted); font-size: 9px; }
.client-card > svg { width: 17px; color: #929487; }

.settings-card { margin-bottom: 15px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.settings-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 21px; }
.settings-icon { width: 39px; height: 39px; display: grid; place-items: center; flex-shrink: 0; border-radius: 13px; background: var(--sage-soft); color: var(--green); }
.settings-icon.rose { background: var(--rose-soft); color: var(--plum); }
.settings-icon svg { width: 18px; height: 18px; }
.field { min-width: 0; margin-bottom: 16px; }
.field label, .choice-section legend { display: block; margin: 0 0 7px 2px; color: #4d5047; font-size: 12px; font-weight: 650; }
.optional { color: var(--muted); font-size: 10px; font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; outline: none; background: var(--surface-soft); color: var(--ink); font-family: var(--font); font-size: 16px; transition: border-color .15s, box-shadow .15s, background .15s; }
.field textarea { min-height: 76px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--plum-light); box-shadow: 0 0 0 3px rgba(52, 56, 47, .08); background: var(--surface); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 36px; }
.input-suffix span { position: absolute; right: 14px; top: 13px; color: var(--muted); }
.commission-preview { margin: -2px 0 16px; padding: 11px 13px; border: 1px solid #d5ddce; border-radius: 13px; background: var(--sage-soft); color: var(--green); font-size: 11px; }
.catalog-list { display: flex; flex-direction: column; gap: 8px; }
.catalog-item { min-height: 50px; display: flex; align-items: center; gap: 10px; padding: 7px 7px 7px 13px; border: 1px solid transparent; border-radius: 15px; background: var(--surface-soft); }
.catalog-item-info { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.catalog-item-info strong { font-size: 12px; font-weight: 600; overflow-wrap: anywhere; }
.catalog-item-info span { color: var(--plum); font-size: 12px; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.catalog-item .icon-button { width: 44px; height: 44px; background: transparent; }
.catalog-item .icon-button svg { width: 16px; height: 16px; }
.catalog-item-actions { display: flex; }
.catalog-edit-fields { width: 100%; display: flex; align-items: center; gap: 7px; }
.catalog-edit-fields input { min-width: 0; width: 100%; height: 44px; padding: 8px 9px; border: 1px solid var(--border); border-radius: 10px; outline: 0; background: var(--surface); font-size: 16px; }
.catalog-edit-fields input:focus { border-color: var(--plum-light); box-shadow: 0 0 0 3px rgba(52, 56, 47, .08); }
.catalog-edit-fields input[type="number"] { max-width: 84px; }
.catalog-edit-fields .icon-button { width: 44px; height: 44px; color: var(--green); }
.catalog-add { display: flex; align-items: flex-end; gap: 8px; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border); }
.catalog-add .field { flex: 1; margin: 0; }
.catalog-add .price-field { flex: 0 0 88px; }
.catalog-add .field label { font-size: 11px; }
.catalog-add .field input { min-height: 46px; padding: 10px; }
.add-catalog-button { height: 46px; width: 46px; background: var(--plum); color: #fff; }
.add-catalog-button:hover { background: var(--plum-dark); color: #fff; }
.settings-footnote { margin: 12px 3px 0; color: var(--muted); font-size: 10px; }
.data-actions { display: grid; gap: 9px; }
.file-button { position: relative; overflow: hidden; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.privacy-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 15px; padding: 12px; border-radius: 13px; background: var(--surface-soft); color: var(--muted); }
.privacy-note svg { width: 16px; height: 16px; margin-top: 1px; }
.privacy-note p { margin: 0; font-size: 10px; }

.bottom-nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; height: calc(78px + env(safe-area-inset-bottom)); padding: 8px 9px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; border-top: 1px solid rgba(219, 216, 205, .95); background: rgba(251, 250, 246, .96); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.bottom-nav .nav-item { height: 60px; padding: 6px 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; border-radius: 16px; background: transparent; color: var(--muted); font-size: 9px; font-weight: 600; }
.bottom-nav .nav-item svg { width: 21px; height: 21px; }
.bottom-nav .nav-item.active { color: var(--plum); }
.add-nav { height: 66px; margin-top: -18px; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: transparent; color: var(--plum); }
.add-nav > span { width: 51px; height: 51px; display: grid; place-items: center; border: 5px solid var(--bg); border-radius: 50%; background: var(--plum); color: #fff; box-shadow: 0 6px 15px rgba(37, 41, 32, .16); }
.add-nav svg { width: 22px; height: 22px; stroke-width: 1.9; }
.add-nav small { font-size: 9px; font-weight: 650; }

dialog { color: var(--ink); font-family: var(--font); }
dialog::backdrop { background: rgba(31, 33, 28, .48); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sheet-dialog { width: 100%; max-width: 600px; max-height: 94vh; max-height: 94dvh; margin: auto auto 0; padding: 0; border: 1px solid var(--border); border-radius: 30px 30px 0 0; background: var(--surface); box-shadow: 0 -15px 50px rgba(34, 35, 31, .16); overflow: hidden; }
.sheet-dialog[open] { animation: sheet-up .25s ease; }
@keyframes sheet-up { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.sheet-dialog form { max-height: 94vh; max-height: 94dvh; display: flex; flex-direction: column; }
.dialog-header { padding: 20px 20px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.dialog-header h2 { margin: 3px 0 0; font-family: var(--serif); font-size: 28px; line-height: 1.15; letter-spacing: -.65px; font-weight: 400; }
.dialog-header .icon-button { background: var(--surface-soft); }
.dialog-body { padding: 19px 20px 6px; overflow-y: auto; overscroll-behavior: contain; }
.client-date-row { grid-template-columns: 1.35fr 1fr; }
.choice-section { min-width: 0; margin: 2px 0 18px; padding: 0; border: 0; }
.choice-section legend { width: 100%; }
.choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.choice-option { position: relative; min-width: 0; }
.choice-option input { position: absolute; opacity: 0; pointer-events: none; }
.choice-option label { min-height: 64px; padding: 11px 12px; display: flex; flex-direction: column; justify-content: center; border: 1px solid var(--border); border-radius: 16px; background: var(--surface-soft); transition: border-color .15s, background .15s, box-shadow .15s; cursor: pointer; }
.choice-option label strong { font-size: 12px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.choice-option label span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.choice-option input:checked + label { border-color: var(--plum); background: var(--rose-soft); box-shadow: inset 0 0 0 1px var(--plum); color: var(--plum); }
.choice-option input:checked + label span { color: var(--plum); }
.choice-option input:focus-visible + label { outline: 3px solid rgba(52, 56, 47, .3); outline-offset: 2px; }
.choice-option .choice-check { position: absolute; right: 8px; top: 8px; width: 17px; height: 17px; display: none; place-items: center; border-radius: 50%; background: var(--plum); color: #fff; }
.choice-option .choice-check svg { width: 10px; height: 10px; stroke-width: 2.5; }
.choice-option input:checked ~ .choice-check { display: grid; }
.choice-option input:checked + label { padding-right: 28px; }
.custom-extra { margin: -3px 0 18px; border: 1px solid transparent; border-radius: 14px; background: var(--surface-soft); }
.custom-extra summary { min-height: 46px; padding: 11px 13px; display: flex; align-items: center; gap: 6px; color: var(--plum); font-size: 12px; font-weight: 600; list-style: none; }
.custom-extra summary::-webkit-details-marker { display: none; }
.custom-extra summary svg { width: 15px; height: 15px; }
.custom-extra-fields { padding: 0 11px 2px; display: flex; align-items: flex-end; gap: 7px; }
.custom-extra-fields .field { flex: 1; }
.custom-extra-fields .price-field { flex: 0 0 82px; }
.custom-extra-fields .field input { min-height: 46px; padding: 10px; }
.custom-extra-fields .icon-button { height: 46px; margin-bottom: 16px; background: var(--rose-soft); color: var(--plum); }
.visit-total { margin: 4px 0 12px; padding: 16px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface-soft); }
.visit-total > div { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 11px; }
.visit-total > div strong { color: var(--ink); font-size: 13px; font-variant-numeric: tabular-nums; }
.visit-total .earned-line { margin: 13px 0 0; padding-top: 13px; border-top: 1px solid var(--border); color: var(--plum); font-weight: 650; }
.visit-total .earned-line small { margin-left: 4px; color: var(--muted); font-weight: 400; }
.visit-total .earned-line strong { color: var(--plum); font-size: 21px; }
.dialog-footer { padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 9px; border-top: 1px solid var(--border); background: var(--surface); }
.dialog-footer .button { flex: 1; }
.dialog-footer .button-danger-ghost { flex: 0; }
.save-visit { flex: 1.5 !important; }
.confirm-dialog, .install-dialog { width: calc(100% - 36px); max-width: 400px; padding: 29px; border: 1px solid var(--border); border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.confirm-icon { width: 50px; height: 50px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%; background: #f5eae6; color: var(--danger); }
.confirm-dialog h2, .install-dialog h2 { margin: 0 0 8px; font-family: var(--serif); font-size: 27px; line-height: 1.2; letter-spacing: -.5px; font-weight: 400; }
.confirm-dialog p, .install-dialog p { margin: 0 0 22px; color: var(--muted); font-size: 12px; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.install-dialog { position: fixed; }
.dialog-close { position: absolute; top: 12px; right: 12px; }
.install-illustration { width: 62px; height: 62px; margin: 3px auto 17px; display: grid; place-items: center; border-radius: 50%; background: var(--rose-soft); color: var(--plum); }
.install-illustration svg { width: 29px; height: 29px; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: calc(94px + env(safe-area-inset-bottom)); width: max-content; max-width: calc(100% - 32px); padding: 12px 17px; display: flex; align-items: center; gap: 8px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 999px; background: var(--plum); color: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .16); font-size: 12px; opacity: 0; pointer-events: none; transform: translate(-50%, 15px); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 16px; height: 16px; color: #c3d6bd; }

@media (max-width: 380px) {
  .client-card-stats { gap: 10px; }
  .catalog-edit-fields { flex-wrap: wrap; }
  .catalog-edit-fields input[type="number"] { max-width: none; }
}

@media (min-width: 600px) {
  .main-content { padding: 24px 28px 132px; }
  .page-heading .heading-action { display: inline-flex; }
  .quick-add-card { display: none; }
  .stats-grid { gap: 14px; margin: 17px 0 30px; }
  .stat-card { padding: 19px; gap: 13px; }
  .stat-card div > span { font-size: 11px; }
  .stat-card strong { font-size: 23px; }
  .stat-card small { font-size: 10px; }
  .visit-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .client-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .data-actions { grid-template-columns: 1fr 1fr; }
  .data-actions .file-button { grid-column: 1 / -1; }
  .sheet-dialog { margin: auto; border-radius: 30px; max-height: 90dvh; }
  .sheet-dialog form { max-height: 90dvh; }
  .dialog-footer { padding-bottom: 14px; }
}

@media (min-width: 900px) {
  .app-shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); }
  .side-rail { position: sticky; top: 0; height: 100vh; height: 100dvh; padding: 29px 18px 23px; display: flex; flex-direction: column; border-right: 1px solid var(--border); background: var(--surface); }
  .side-rail .brand { padding: 0 9px; }
  .side-nav { display: flex; flex-direction: column; gap: 6px; margin-top: 46px; }
  .side-nav .nav-item { min-height: 48px; padding: 11px 15px; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; text-align: left; }
  .side-nav .nav-item:hover { background: var(--surface-soft); color: var(--plum); }
  .side-nav .nav-item svg { width: 19px; height: 19px; }
  .side-nav .nav-item.active { background: var(--plum); color: #fff; }
  .side-add { margin: 26px 5px 0; }
  .rail-note { margin: auto 6px 0; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 9px; }
  .mobile-header, .bottom-nav { display: none; }
  .main-content { padding: 46px 42px 64px; }
  .page-heading { margin-bottom: 32px; }
  .page-heading h1 { font-size: 44px; }
  .overview-heading h1 { font-size: 46px; }
  .earnings-card { padding: 30px 31px 24px; }
  .earnings-value { font-size: 49px; }
  .earnings-bottom { gap: 55px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 260px)); }
  .settings-card { padding: 25px; }
  .data-actions { grid-template-columns: repeat(3, 1fr); }
  .data-actions .file-button { grid-column: auto; }
  .toast { bottom: 30px; }
}

@media (min-width: 1250px) {
  .app-shell { grid-template-columns: 250px minmax(0, 1fr); }
  .main-content { padding-left: 52px; padding-right: 52px; }
  #view-overview { display: grid; grid-template-columns: 1.3fr 1fr; gap: 0 24px; }
  #view-overview .overview-heading { grid-column: 1 / -1; }
  #view-overview .earnings-card { grid-column: 1; }
  #view-overview .stats-grid { grid-column: 1; margin-bottom: 0; }
  #view-overview .content-section { grid-column: 2; grid-row: 2 / 4; margin-top: 0; }
  #view-overview .visit-list { display: flex; }
  #view-overview .visit-card { padding: 15px; }
  #view-overview .visit-card-footer { display: none; }
  #view-overview .section-heading p { display: none; }
}

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