@font-face {
  font-family: Workspace;
  src: local("Inter"), local("Segoe UI");
  font-display: swap;
}
:root {
  font-family: Workspace, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-synthesis: none;
  color: #24352f;
  background: #f5f6f4;
  --green: #245c4b;
  --forest: #1e493d;
  --lime: #e0edb9;
  --muted: #5f7356;
  --border: #e3e8e2;
  --canvas: #f5f6f4;
  --red: #ad514b;
  --radius: 20px;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { color: inherit; cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
a { color: var(--green); }
svg { display: inline-block; vertical-align: middle; flex-shrink: 0; }
button:focus-visible, a:focus-visible, tr:focus-visible, summary:focus-visible { outline: 3px solid #90b6a3; outline-offset: 3px; }
input:focus, select:focus, textarea:focus { outline: 2px solid #87ae9b; outline-offset: 2px; border-color: #6e9a84; }
input, select, textarea { min-width: 0; max-width: 100%; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 30px; font-weight: 650; line-height: 1.25; }
h2 { font-size: 18px; font-weight: 650; line-height: 1.35; }
h3 { font-size: 15px; font-weight: 600; line-height: 1.4; }
small { font-size: 12px; }
.muted { color: var(--muted); }
.mono, .money { font-variant-numeric: tabular-nums; }
.money { white-space: nowrap; }
.positive { color: var(--green); }
.negative { color: var(--red); }
.hidden { display: none !important; }
.boot { min-height: 100dvh; display: flex; align-items: center; justify-content: center; gap: 14px; color: var(--muted); }
.spinner { display: inline-block; width: 22px; height: 22px; border: 2px solid #d6e2d9; border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Controls */
.btn { border: 1px solid #dbe3dc; background: #fff; min-height: 42px; border-radius: 10px; padding: 11px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-size: 13px; font-weight: 600; text-decoration: none; line-height: 1.3; white-space: nowrap; transition: background .16s, border-color .16s; }
.btn:hover { background: #f5f8f3; border-color: #c7d3c9; }
.btn.primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn.primary:hover { background: #1c4b3d; border-color: #1c4b3d; }
.btn.danger { color: var(--red); border-color: #ecd4cf; }
.btn.danger:hover { background: #fff3ef; border-color: #deb9b1; }
.btn.quiet { background: transparent; border-color: transparent; color: var(--green); }
.btn.quiet:hover { background: #edf4ed; }
.btn.small { min-height: 36px; padding: 8px 12px; font-size: 12px; }
.icon-btn { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid transparent; border-radius: 10px; color: #748178; flex-shrink: 0; }
.icon-btn:hover { background: #edf3ec; color: var(--green); }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 7px; background: #edf4ed; padding: 5px 8px; font-size: 12px; line-height: 1.35; font-weight: 500; color: #456c54; white-space: nowrap; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; background: currentColor; }
.pill.warning { background: #fbf2e1; color: #896329; }
.pill.red { background: #f9ebe7; color: #a55047; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 21px; min-width: 0; }
.field label { font-size: 13px; font-weight: 600; color: #405347; }
.field input, .field select, .field textarea { border: 1px solid #d8e1d9; border-radius: 10px; padding: 12px 13px; background: #fff; width: 100%; font-size: 14px; color: #283f33; min-height: 45px; line-height: 1.4; }
.field textarea { resize: vertical; min-height: 90px; }
.field .hint { font-size: 12px; color: var(--muted); line-height: 1.6; }
.field input[readonly] { background: #f4f6f1; color: var(--muted); }
.field-required { color: #a86b4f; }
.error { color: #a3443c; background: #fff2ee; border: 1px solid #f0d6ce; border-radius: 10px; padding: 12px 14px; font-size: 13px; line-height: 1.7; margin-bottom: 18px; }
.success-note { padding: 15px; background: #edf5e9; border: 1px solid #d8e7d1; border-radius: 10px; font-size: 13px; line-height: 1.7; color: #45643d; }

/* Sign-in */
.login { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.login-story { padding: 50px 62px 34px; background: var(--forest); color: #fff; display: flex; flex-direction: column; overflow: hidden; }
.brand { display: flex; gap: 11px; align-items: center; font-size: 22px; font-weight: 650; line-height: 1.3; }
.brand-mark { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: var(--lime); border-radius: 12px; color: var(--forest); flex-shrink: 0; }
.login-story .brand-mark { width: 42px; height: 42px; }
.login-copy { margin: auto 0; max-width: 450px; padding: 70px 0 36px; }
.eyebrow { font-size: 12px; font-weight: 600; color: #b2cbbd; line-height: 1.4; }
.login-copy h1 { font-size: 46px; line-height: 1.16; font-weight: 550; margin: 22px 0; }
.login-copy p { font-size: 16px; line-height: 1.75; color: #c0d3c7; max-width: 370px; }
.login-visual { margin: 36px 0 24px; border: 1px solid #4b6c5a; border-radius: 18px; background: #2a5345; padding: 25px; }
.visual-header { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #e0ebdf; }
.visual-bars { height: 118px; display: flex; align-items: flex-end; gap: 16px; margin-top: 27px; border-bottom: 1px solid #577461; }
.visual-bars span { flex: 1; background: #80a38a; border-radius: 5px 5px 0 0; }
.visual-bars span:nth-last-child(2) { background: var(--lime); }
.visual-caption { display: flex; justify-content: space-between; color: #b6ceba; font-size: 12px; gap: 12px; margin-top: 14px; }
.login-story footer { font-size: 12px; color: #b2c8b9; line-height: 1.6; }
.login-form-wrap { padding: 48px; display: flex; align-items: center; justify-content: center; background: #f8f9f6; }
.login-form { max-width: 420px; width: 100%; background: #fff; padding: 36px; border: 1px solid var(--border); border-radius: 24px; box-shadow: 0 15px 50px #263e2a05; }
.login-form .eyebrow { color: var(--muted); }
.login-form h2 { font-size: 29px; margin: 14px 0 11px; }
.login-form > p { font-size: 14px; line-height: 1.7; color: var(--muted); margin-bottom: 30px; }
.login-form .field { margin-bottom: 20px; }
.login-form .field input { min-height: 48px; }
.login-form .btn { width: 100%; margin-top: 7px; min-height: 46px; }
.login-note { font-size: 12px; line-height: 1.75; color: var(--muted); display: flex; gap: 9px; margin-top: 26px; }
.login-note > svg { margin-top: 3px; }

/* Navigation and workspace */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { background: #fff; color: #64766a; border-right: 1px solid var(--border); position: fixed; inset: 0 auto 0 0; width: 248px; z-index: 40; padding: 29px 17px 18px; display: flex; flex-direction: column; overflow-y: auto; }
.sidebar .brand { font-size: 20px; color: #243c2d; padding: 0 11px; gap: 10px; }
.sidebar .brand-mark { width: 34px; height: 36px; border-radius: 10px; background: #e4edcf; }
.workspace-label { margin: 40px 14px 16px; font-size: 12px; font-weight: 500; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 6px; }
.nav button { border: 1px solid transparent; min-height: 45px; display: flex; align-items: center; gap: 12px; padding: 12px 13px; background: transparent; color: #69786e; text-align: left; border-radius: 11px; font-size: 14px; font-weight: 500; line-height: 1.35; }
.nav button svg { width: 18px; height: 18px; color: #82917f; }
.nav button:hover { background: #f5f7f1; color: var(--green); }
.nav button.active { background: #eaf2e9; border-color: #e2ebdf; color: #2c5943; font-weight: 600; }
.nav button.active svg { color: #3d7053; }
.nav button.active:after { content: ""; margin-left: auto; width: 5px; height: 5px; border-radius: 50%; background: #5d8c5a; flex-shrink: 0; }
.nav-gap { height: 21px; }
.sidebar-bottom { margin-top: auto; padding-top: 36px; }
.sync-mini { border: 1px solid #e5ebde; border-radius: 12px; background: #f8faf2; padding: 13px 12px; margin: 0 3px 18px; display: flex; align-items: flex-start; gap: 9px; }
.sync-mini strong { font-size: 12px; display: block; color: #557044; font-weight: 600; line-height: 1.5; }
.sync-mini small { font-size: 11px; color: var(--muted); display: block; margin-top: 3px; line-height: 1.6; }
.sync-mini .dot { color: #80a75f; margin-top: 6px; }
.profile { display: flex; align-items: center; gap: 10px; padding: 17px 5px 0; border-top: 1px solid #e8ece5; }
.avatar { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; background: #ecf0e4; color: #5c7253; font-size: 12px; font-weight: 650; border: 0; border-radius: 50%; flex-shrink: 0; }
.profile-name { flex: 1; min-width: 0; }
.profile-name strong { display: block; color: #455944; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-name small { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.profile .icon-btn { width: 31px; height: 36px; color: #829075; }
.main { grid-column: 2; min-width: 0; }
.topbar { min-height: 78px; background: #fff; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 32px; }
.breadcrumbs { font-size: 13px; display: flex; align-items: center; gap: 12px; color: var(--muted); min-width: 0; }
.breadcrumbs span:last-child { color: #4d604b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-right { display: flex; align-items: center; gap: 18px; font-size: 12px; color: var(--muted); flex-shrink: 0; }
.topbar-right .icon-btn { border: 1px solid var(--border); width: 35px; height: 35px; color: #7e8f75; }
.topbar-right .pill { font-size: 11px; padding: 6px 9px; background: #f5f7f0; color: var(--muted); }
.topbar-search.btn { display: inline-flex; align-items: center; gap: 9px; color: var(--muted); background: #f7f9f4; border: 1px solid #e5eadf; padding: 9px 12px; min-height: 37px; font-size: 12px; font-weight: 400; }
.topbar-search kbd { font-family: inherit; font-size: 10px; border: 1px solid #dce5d3; border-radius: 4px; padding: 2px 4px; color: var(--muted); }
.content { padding: 32px 32px 44px; max-width: 1720px; margin: auto; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.page-head > div:first-child { min-width: 0; }
.page-head p { font-size: 13px; margin-top: 9px; color: var(--muted); line-height: 1.7; }
.page-actions { display: flex; gap: 9px; flex-shrink: 0; }
.section-label, .metric-caption { font-size: 12px; color: var(--muted); line-height: 1.7; }
.metric-caption { margin-bottom: 9px; }
.periodbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 23px; gap: 16px; }
.segmented { display: inline-flex; background: #e9ede5; padding: 4px; border: 1px solid #e4e8df; border-radius: 12px; gap: 3px; }
.segmented button { background: transparent; border: 1px solid transparent; min-height: 33px; padding: 7px 16px; border-radius: 9px; font-size: 12px; font-weight: 500; color: #536b49; white-space: nowrap; }
.segmented button.active { background: #fff; border-color: #e0e6db; color: #3f5a34; box-shadow: 0 2px 4px #21321f06; }
.segmented button:not(.active):hover { color: #3f5a34; background: #f0f4ea; }
.period-label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 8px; white-space: nowrap; }

/* Financial overview */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 25px; }
.kpi { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 21px 21px 19px; min-height: 163px; min-width: 0; }
.kpi.primary { background: var(--green); border-color: var(--green); color: #fff; }
.kpi-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: #63765a; font-size: 13px; font-weight: 500; min-height: 34px; line-height: 1.4; }
.kpi-title > svg { color: #78936d; width: 20px; height: 20px; }
.kpi-symbol { width: 35px; height: 35px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: #f0f4e7; color: #6d8b53; flex-shrink: 0; }
.kpi-symbol.expense, .kpi:nth-child(2) .kpi-symbol { color: #a9795c; background: #f7eee6; }
.kpi-symbol.net, .kpi:nth-child(3) .kpi-symbol { color: #65809d; background: #edf2f8; }
.kpi-symbol.average { color: #7b8c63; background: #eff3e4; }
.kpi.primary .kpi-symbol { background: #e0edb9; color: #3c6545; }
.kpi.primary .kpi-title { color: #d3e3d2; }
.kpi.primary .kpi-title > svg { color: var(--lime); }
.kpi-value { font-size: 30px; line-height: 1.2; font-weight: 650; margin-top: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; color: #2a4030; }
.kpi-value.compact { font-size: 26px; }
.kpi.primary .kpi-value { color: #fff; }
.kpi-value.negative { color: var(--red); }
.kpi-value .currency { font-size: .67em; color: var(--muted); font-weight: 400; margin-left: 4px; }
.kpi.primary .kpi-value .currency { color: #c7dbb9; }
.kpi-foot { margin-top: 11px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.kpi.primary .kpi-foot { color: #c4d6bf; }
.kpi-foot .tag { font-size: 11px; padding: 3px 6px; border-radius: 5px; background: #edf5e5; color: var(--muted); margin-right: 5px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr); gap: 22px; margin-bottom: 25px; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.panel-head { padding: 24px; display: flex; align-items: center; justify-content: space-between; gap: 15px; min-width: 0; }
.panel-head > div { min-width: 0; }
.panel-head h2 { font-size: 17px; }
.panel-head p { font-size: 12px; color: var(--muted); margin-top: 7px; line-height: 1.5; }
.panel-head > svg { color: #8c9e7b; }
.panel-kicker { color: var(--muted); font-size: 12px; display: block; margin-bottom: 6px; line-height: 1.5; }
.record-count { display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 500; color: var(--muted); background: #f0f5e7; padding: 4px 8px; border-radius: 6px; vertical-align: middle; margin-left: 8px; }
.dashboard-section { margin-top: 24px; }
.legend { display: flex; gap: 14px; align-items: center; font-size: 12px; color: var(--muted); flex-shrink: 0; }
.legend span { white-space: nowrap; }
.legend .dot { margin-right: 6px; width: 7px; height: 7px; }
.chart { height: 263px; padding: 0 22px 17px; min-width: 0; }
.chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.chart svg text { font-family: inherit; fill: var(--muted); font-size: 12px; }
.chart .empty { padding: 48px 15px !important; }
.chart-note { font-size: 12px; color: var(--muted); margin: 10px 5px 0; line-height: 1.5; }
.chart:has(.chart-note) svg { height: calc(100% - 28px); }
.breakdown { padding: 0 24px 20px; }
.breakdown-item { margin: 0; padding: 16px 0; border-bottom: 1px solid #edf1e8; }
.breakdown-item:first-child { padding-top: 6px; }
.breakdown-item:last-child { border-bottom: 0; padding-bottom: 0; }
.breakdown-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; font-size: 13px; gap: 9px; }
.breakdown-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.breakdown-title h3 { font-size: 13px; font-weight: 500; color: #536d44; }
.breakdown-title span:not(.breakdown-symbol) { font-size: 12px; color: var(--muted); display: block; margin-top: 3px; }
.breakdown-symbol { width: 33px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: #eff4e7; color: #708a58; flex-shrink: 0; }
.breakdown-symbol.parking { background: #edf2f8; color: #6e87a7; }
.breakdown-symbol.hotel { background: #f8eee4; color: #b58b66; }
.breakdown-value { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.breakdown-value strong { font-size: 14px; font-weight: 600; display: block; }
.breakdown-value span { font-size: 12px; color: var(--muted); display: block; margin-top: 4px; }
.track { height: 5px; border-radius: 5px; background: #f0f3e9; overflow: hidden; }
.track > div { height: 100%; border-radius: 5px; background: #6a8755; }
.breakdown-bottom { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 8px; }
.breakdown:empty::after { content: "Доступ к направлениям поступлений не назначен"; color: var(--muted); font-size: 13px; line-height: 1.7; display: block; padding: 15px 0 30px; }

/* Registers and filters */
.table-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; white-space: nowrap; }
th { background: #f8faf4; padding: 13px 21px; font-size: 12px; line-height: 1.4; color: var(--muted); font-weight: 500; border-top: 1px solid #e9eee2; border-bottom: 1px solid #e9eee2; }
td { padding: 17px 21px; border-bottom: 1px solid #edf0e7; vertical-align: middle; font-size: 14px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fbf4; }
td .cell-main { font-size: 14px; font-weight: 550; color: #465f38; max-width: 300px; overflow: hidden; text-overflow: ellipsis; }
td .cell-sub { font-size: 12px; color: var(--muted); max-width: 240px; overflow: hidden; text-overflow: ellipsis; margin-top: 6px; }
th.align-right, td.align-right { text-align: right; }
td.money { font-size: 14px; }
.type-label { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.type-icon { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: #edf3e5; color: #759454; }
.type-icon.parking { background: #edf2f8; color: #6e89aa; }
.type-icon.hotel { background: #f8eee4; color: #b08a66; }
.type-icon.expense { background: #f9ece7; color: #ad7965; }
.owner-cell { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.owner-cell .avatar { width: 26px; height: 26px; font-size: 10px; background: #eef3e5; color: var(--muted); }
.record-row { cursor: pointer; }
.record-row > td:last-child { color: #91a27b; }
.record-client { display: flex; align-items: center; gap: 10px; }
.record-client-copy { min-width: 0; }
.record-mobile-icon, .cell-mobile-meta { display: none; }
.table-footer { padding: 16px 21px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.table-footer .pagination { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.pagination .icon-btn { width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 8px; }
.filter-panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 20px; overflow: hidden; }
.filter-tabs { display: flex; gap: 24px; padding: 0 23px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.filter-tabs button { font-size: 13px; min-height: 53px; white-space: nowrap; padding: 16px 0; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); }
.filter-tabs button.active { color: var(--green); border-bottom-color: var(--green); font-weight: 600; }
.filter-tabs button:hover { color: var(--green); }
.filters { padding: 18px 22px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.searchbox { position: relative; flex: 1 1 250px; min-width: 180px; }
.searchbox svg { position: absolute; left: 13px; top: 14px; color: #92a27e; pointer-events: none; }
.searchbox input { width: 100%; padding: 11px 13px 11px 38px; border: 1px solid #dfe6d8; border-radius: 10px; font-size: 14px; min-height: 42px; background: #fff; color: #4e6740; }
.filters select, .filters input[type=date] { border: 1px solid #dfe6d8; background: #fff; border-radius: 10px; padding: 10px 11px; font-size: 14px; min-height: 42px; color: #637a50; }
.filters select { max-width: 230px; }
.date-filter { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); min-width: 0; }
.date-filter input { width: 145px; }
.results-strip { margin-bottom: 15px; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.results-strip strong { color: #526f3c; font-weight: 600; }
.empty { padding: 56px 24px; text-align: center; }
.empty > svg { color: #9db18a; width: 34px; height: 34px; }
.empty h3 { margin: 16px 0 8px; font-size: 17px; color: #4f6d3c; }
.empty p { font-size: 13px; line-height: 1.8; color: var(--muted); }
.empty .btn { margin-top: 21px; }
.notice { background: #fff7e7; border: 1px solid #eedfbd; color: #8c6e38; font-size: 13px; line-height: 1.7; padding: 13px 17px; border-radius: 12px; margin-bottom: 21px; }
.notice.info { background: #f0f5e9; border-color: #e0e9d5; color: #536f40; }
.scope-notice { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; color: var(--muted); margin: -6px 0 23px; line-height: 1.7; }
.scope-notice svg { margin-top: 3px; }
.scope-notice strong { font-weight: 600; color: #5c793f; }
.scope-tags { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; max-width: 310px; white-space: normal; }

/* Reports, Excel, rooms and help */
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.report-totals { margin-top: 24px; }
.report-select { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.report-select button { border-radius: 10px; border: 1px solid var(--border); background: #fff; padding: 11px 16px; color: var(--muted); font-size: 13px; min-height: 42px; }
.report-select button.active { background: var(--green); border-color: var(--green); color: #fff; }
.report-select button:hover:not(.active) { background: #eef4e7; color: var(--green); }
.report-table th, .report-table td { padding: 17px 23px; }
.sheet-list { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 11px; padding: 0 24px 24px; }
.sheet-item { display: flex; align-items: center; gap: 11px; padding: 15px; background: #f7faf1; border: 1px solid #e8efdd; border-radius: 11px; font-size: 13px; color: #617b49; }
.sheet-item > svg { color: #84a161; }
.export-hero { padding: 28px; display: flex; align-items: center; gap: 18px; }
.excel-icon { width: 61px; height: 67px; display: flex; align-items: center; justify-content: center; border-radius: 15px; background: #eaf4de; color: #759e51; flex-shrink: 0; }
.export-hero h2 { font-size: 20px; margin-bottom: 8px; overflow-wrap: anywhere; }
.export-hero p { font-size: 13px; line-height: 1.7; color: var(--muted); }
.export-details { padding: 0 28px 27px; }
.export-details .btn { margin-top: 19px; white-space: normal; }
.export-details p { color: var(--muted); font-size: 13px; line-height: 1.85; }
.info-list { padding: 0 24px 24px; list-style: none; margin: 0; }
.info-list li { display: flex; gap: 13px; padding: 17px 0; border-bottom: 1px solid var(--border); font-size: 13px; line-height: 1.75; color: var(--muted); }
.info-list li:first-child { padding-top: 3px; }
.info-list li:last-child { border: 0; padding-bottom: 0; }
.info-list strong { color: #5c7b40; display: block; font-weight: 600; margin-bottom: 3px; }
.info-list svg { color: #8dac6e; margin-top: 4px; }
.role-card { padding: 19px 24px; border-bottom: 1px solid var(--border); }
.role-card:last-child { border: 0; }
.role-card h3 { font-size: 14px; display: flex; justify-content: space-between; color: #58763c; }
.role-card p { font-size: 13px; line-height: 1.8; color: var(--muted); margin-top: 7px; }
.room-toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 21px; }
.room-toolbar input { padding: 11px 13px; min-height: 43px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: #607c45; }
.rooms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.room { padding: 23px; border: 1px solid var(--border); border-radius: 18px; background: #fff; }
.room h3 { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 17px; color: #55723d; }
.room p { font-size: 13px; margin-top: 16px; color: var(--muted); line-height: 1.8; }
.room .guest { font-size: 14px; font-weight: 500; color: #56783a; margin-top: 19px; line-height: 1.65; overflow-wrap: anywhere; }
.room .btn { margin-top: 17px; }
.help-copy { font-size: 14px; line-height: 1.9; color: var(--muted); padding: 0 24px 25px; }
.help-copy h3 { font-size: 15px; color: #5d7c3f; margin: 20px 0 7px; }
.help-copy ol { padding-left: 19px; margin-top: 5px; }
.help-copy li { padding-left: 3px; margin-bottom: 6px; }
.password-link { font-size: 12px; color: inherit; text-decoration: none; }
.inline-summary { display: flex; gap: 22px; font-size: 12px; color: var(--muted); }
.inline-summary b { color: var(--muted); font-weight: 600; }

/* Dialogs and access controls */
.overlay { position: fixed; inset: 0; background: #172f2457; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 26px; backdrop-filter: blur(4px); }
.dialog { background: #fff; border: 1px solid #e6ecdd; border-radius: 22px; box-shadow: 0 24px 80px #172e242b; width: 540px; max-width: 100%; max-height: calc(100dvh - 52px); display: flex; flex-direction: column; overflow: hidden; }
.dialog.wide { width: 760px; }
.dialog-head { padding: 25px 27px 21px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; flex-shrink: 0; }
.dialog-head h2 { font-size: 23px; }
.dialog-head p { font-size: 13px; line-height: 1.65; color: var(--muted); margin-top: 8px; }
.dialog-head .icon-btn { margin: -4px -6px 0 0; }
.dialog-body { padding: 24px 27px; overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.dialog form { display: contents; }
.dialog-footer { border-top: 1px solid var(--border); padding: 18px 27px; display: flex; justify-content: flex-end; gap: 10px; background: #fafcf6; flex-shrink: 0; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 20px; }
.form-grid .full { grid-column: 1 / -1; }
.form-section { grid-column: 1 / -1; margin: 3px 0 19px; display: flex; align-items: center; gap: 12px; font-size: 12px; font-weight: 600; color: var(--muted); }
.form-section:after { content: ""; height: 1px; background: #e7edde; flex: 1; }
.kind-choices { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-bottom: 26px; }
.kind-choice { background: #fff; border: 1px solid #dfe7d4; border-radius: 12px; padding: 15px 7px; color: var(--muted); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 9px; font-size: 12px; min-height: 79px; }
.kind-choice:hover { background: #f7faf1; border-color: #c7d8b1; }
.kind-choice.active { border-color: #8fac70; background: #f0f6e6; color: #5d7b3d; box-shadow: inset 0 0 0 1px #8fac70; }
.kind-choice:disabled { opacity: 1; }
.kind-choice:disabled:not(.active) { color: #a7b596; background: #fafcf7; }
.form-total { grid-column: 1 / -1; background: #f0f6e6; padding: 19px 20px; border-radius: 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 1px 0 19px; font-size: 13px; color: var(--muted); }
.form-total strong { font-size: 25px; color: var(--green); font-weight: 600; white-space: nowrap; }
.details-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 23px; }
.detail-label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 7px; line-height: 1.5; }
.detail-value { font-size: 14px; line-height: 1.75; overflow-wrap: anywhere; color: #546f3d; }
.detail-amount { font-size: 36px; font-weight: 650; color: var(--green); margin-bottom: 26px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.detail-amount.negative { color: var(--red); }
.detail-note { font-size: 13px; line-height: 1.85; background: #f6f9ef; border-radius: 12px; padding: 17px; margin-top: 25px; color: var(--muted); overflow-wrap: anywhere; }
.secret-box { font-family: Consolas, monospace; user-select: all; background: #f2f7e8; padding: 16px; border: 1px solid #e2ebd6; border-radius: 10px; margin: 12px 0; font-size: 18px; word-break: break-all; color: #5c7c3a; }
.scope-field { padding: 0; border: 0; margin: 3px 0 24px; min-width: 0; }
.scope-field legend { padding: 0; font-size: 13px; font-weight: 600; color: #486237; }
.scope-hint { font-size: 12px; line-height: 1.65; color: var(--muted); margin: 8px 0 12px; }
.scope-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.scope-option { display: flex; align-items: center; gap: 10px; padding: 14px 12px; border: 1px solid #dfe8d3; border-radius: 11px; cursor: pointer; font-size: 13px; min-height: 60px; color: #617c46; }
.scope-option:has(input:checked) { border-color: #9ab57b; background: #f2f8e9; }
.scope-option:has(input:disabled) { cursor: default; }
.scope-option:focus-within { outline: 2px solid #93b47d; outline-offset: 2px; }
.scope-option input { width: 17px; height: 17px; accent-color: var(--green); margin: 0; flex-shrink: 0; }
.scope-option .type-icon { width: 27px; height: 27px; flex-shrink: 0; }
.scope-controls { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; }
.scope-controls .scope-hint { margin: 0; }
.audit-time { color: var(--muted); font-size: 12px; }
.audit-action { font-size: 13px; color: var(--muted); line-height: 1.7; }
.notification { position: fixed; bottom: 25px; right: 26px; padding: 16px 20px; background: #345c35; color: #f4f8e8; border-radius: 13px; box-shadow: 0 7px 25px #243e2426; font-size: 13px; z-index: 200; max-width: 440px; line-height: 1.65; }
.notification.bad { background: #985846; }
.loading-area { padding: 90px; display: flex; justify-content: center; }
.mobile-menu, .sidebar-backdrop { display: none; }
.page-load-error { padding: 30px; background: #fff; border: 1px solid #eed7cd; border-radius: 18px; font-size: 14px; line-height: 1.8; }
.page-load-error h2 { margin-bottom: 8px; }
.page-load-error .btn { margin-top: 17px; }

/* Compact desktop and tablet */
@media (min-width: 1700px) {
  .content { padding-top: 38px; }
  .kpi { min-height: 174px; padding: 24px; }
  .kpi-value { font-size: 34px; }
  .kpi-value.compact { font-size: 29px; }
  .chart { height: 285px; }
}
@media (max-width: 1280px) {
  .shell { grid-template-columns: 224px minmax(0, 1fr); }
  .sidebar { width: 224px; padding-left: 12px; padding-right: 12px; }
  .sidebar .brand { font-size: 18px; }
  .nav button { padding-left: 11px; gap: 10px; }
  .content { padding: 28px 25px 38px; }
  .topbar { padding: 0 25px; }
  .topbar-right { gap: 12px; }
  .topbar-search.btn { display: none; }
  .kpi { padding: 19px 18px; }
  .kpis { gap: 12px; }
  .kpi-title { font-size: 12px; }
  .kpi-value { font-size: 26px; }
  .kpi-value.compact { font-size: 22px; }
  .dashboard-grid { gap: 18px; grid-template-columns: minmax(0, 1.6fr) minmax(275px, 1fr); }
  .panel-head { padding: 21px; }
  .breakdown { padding-left: 21px; padding-right: 21px; }
  .legend { gap: 10px; }
  th, td { padding-left: 18px; padding-right: 18px; }
  .rooms { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { min-height: 157px; }
  .kpi-value { font-size: 30px; }
  .kpi-value.compact { font-size: 26px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .chart { height: 260px; }
  .breakdown { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding-top: 2px; padding-bottom: 24px; }
  .breakdown-item, .breakdown-item:first-child, .breakdown-item:last-child { margin: 0; padding: 0; border: 0; }
  .breakdown-top { flex-wrap: wrap; row-gap: 10px; }
  .breakdown-title { flex-basis: 100%; }
  .breakdown-value { text-align: left; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .topbar-right > span:first-child { display: none; }
  .page-head { align-items: flex-start; }
  .page-actions { flex-wrap: wrap; justify-content: flex-end; max-width: 215px; }
  .page-head h1 { font-size: 28px; }
  .login-story { padding: 40px; }
  .login-copy h1 { font-size: 39px; }
  .login-form-wrap { padding: 28px; }
  .login-form { padding: 30px; }
}

/* Touch layouts */
@media (max-width: 780px) {
  .shell { display: block; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; width: 265px; padding: 26px 16px 20px; }
  .shell.menu-open .sidebar { transform: translateX(0); }
  .shell.menu-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: #19322557; border: 0; z-index: 39; cursor: pointer; }
  .sidebar .brand { font-size: 20px; }
  .nav button { font-size: 14px; min-height: 47px; padding: 13px; }
  .profile .avatar { width: 42px; height: 42px; }
  .profile .icon-btn { width: 36px; height: 44px; }
  .sidebar-bottom { padding-top: 30px; }
  .mobile-menu { display: inline-flex; width: 40px; height: 44px; margin-left: -7px; }
  .topbar { min-height: 66px; padding: 0 20px; gap: 10px; }
  .breadcrumbs { gap: 8px; font-size: 12px; }
  .breadcrumbs > span:first-of-type, .breadcrumbs > span:nth-of-type(2) { display: none; }
  .topbar-right { gap: 10px; }
  .topbar-right .icon-btn { width: 40px; height: 40px; }
  .topbar-right .pill { font-size: 10px; gap: 5px; }
  .content { padding: 25px 20px 35px; }
  .page-head { margin-bottom: 23px; flex-wrap: wrap; gap: 20px; }
  .page-head h1 { font-size: 27px; }
  .page-head p { font-size: 13px; margin-top: 9px; line-height: 1.7; }
  .page-actions { width: 100%; max-width: none; justify-content: flex-start; gap: 9px; }
  .page-actions .btn { flex: 1; font-size: 13px; min-height: 44px; padding: 11px 13px; }
  .periodbar { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 20px; }
  .segmented { width: 100%; gap: 3px; padding: 4px; }
  .segmented button { flex: 1; min-height: 36px; padding: 9px 10px; font-size: 12px; }
  .period-label { font-size: 12px; }
  .kpis { gap: 11px; margin-bottom: 20px; }
  .kpi { padding: 17px 16px; min-height: 155px; border-radius: 16px; }
  .kpi.primary { grid-column: 1 / -1; min-height: 156px; }
  .kpi.primary .kpi-value { font-size: 34px; }
  .kpi.primary .kpi-value.compact { font-size: 30px; }
  .kpi:last-child { grid-column: 1 / -1; min-height: 135px; }
  .kpi:last-child .kpi-value { font-size: 28px; margin-top: 11px; }
  .kpi-title { font-size: 12px; align-items: flex-start; min-height: 30px; gap: 7px; }
  .kpi-symbol { width: 31px; height: 31px; border-radius: 9px; }
  .kpi-symbol svg { width: 16px; height: 16px; }
  .kpi-value { font-size: 26px; margin-top: 14px; line-height: 1.25; }
  .kpi-value.compact { font-size: 22px; }
  .kpi:not(.primary):not(:last-child) .kpi-value.compact .currency { display: block; margin: 2px 0 0; font-size: 14px; }
  .kpi-foot { font-size: 12px; margin-top: 9px; line-height: 1.5; }
  .dashboard-grid { margin-bottom: 20px; gap: 20px; }
  .panel { border-radius: 17px; }
  .panel-head { padding: 21px 19px; gap: 12px; }
  .panel-head h2 { font-size: 17px; }
  .panel-head p { font-size: 12px; }
  .panel-head .btn { padding: 8px; font-size: 12px; }
  .record-count { margin-left: 5px; }
  .chart { height: 250px; padding: 0 14px 15px; }
  .legend { font-size: 11px; gap: 9px; }
  .legend .dot { width: 6px; height: 6px; margin-right: 4px; }
  .breakdown { display: block; padding: 0 20px 23px; }
  .breakdown-item, .breakdown-item:first-child { border-bottom: 1px solid #edf1e8; padding: 17px 0; }
  .breakdown-item:first-child { padding-top: 2px; }
  .breakdown-item:last-child { padding-top: 17px; }
  .breakdown-top { flex-wrap: nowrap; }
  .breakdown-title { flex-basis: auto; }
  .breakdown-value { text-align: right; }
  .breakdown-value strong { font-size: 15px; }
  .filter-tabs { padding: 0 18px; gap: 23px; }
  .filter-tabs button { font-size: 13px; min-height: 51px; }
  .filters { padding: 16px; gap: 10px; }
  .filters .searchbox { flex-basis: 100%; min-width: 0; }
  .searchbox input, .filters select, .filters input[type=date] { font-size: 16px; min-height: 44px; }
  .searchbox svg { top: 15px; }
  .filters select { flex: 1 1 calc(50% - 5px); max-width: 100%; width: 100%; }
  .date-filter { width: 100%; gap: 6px; }
  .date-filter input { flex: 1; width: calc(50% - 10px); padding: 10px 8px; }
  .filters .btn { min-height: 44px; flex: 1; }
  .filters .icon-btn { width: 44px; height: 44px; }
  .results-strip { gap: 8px; font-size: 12px; flex-wrap: wrap; }
  th, td { padding-left: 17px; padding-right: 17px; }
  td { padding-top: 17px; padding-bottom: 17px; }
  .receipts-table { table-layout: fixed; white-space: normal; }
  .receipts-table .col-date, .receipts-table .col-kind, .receipts-table .col-payment, .receipts-table .col-owner { display: none; }
  .receipts-table .col-identity { width: auto; padding-right: 6px; }
  .receipts-table .col-amount { width: 116px; padding-left: 6px; padding-right: 0; white-space: nowrap; font-size: 13px; }
  .receipts-table .col-action { width: 28px; padding-left: 5px; padding-right: 11px; }
  .receipts-table .cell-main, .receipts-table .cell-sub { max-width: 100%; }
  .receipts-table .cell-main { font-size: 13px; line-height: 1.5; white-space: nowrap; }
  .receipts-table .cell-sub { font-size: 12px; line-height: 1.5; white-space: nowrap; margin-top: 3px; }
  .record-client { gap: 9px; }
  .record-client-copy { flex: 1; }
  .record-mobile-icon { display: inline-flex; width: 28px; height: 31px; flex-shrink: 0; }
  .cell-mobile-meta { display: block; font-size: 11px; color: var(--muted); margin-top: 5px; line-height: 1.5; white-space: nowrap; }
  .table-footer { padding: 14px 17px; gap: 10px; font-size: 12px; flex-wrap: wrap; }
  .table-footer .pagination { gap: 9px; }
  .pagination .icon-btn { width: 38px; height: 40px; }
  .table-footer > span:last-child:not(:first-child) { font-size: 11px; }
  .report-select { gap: 8px; }
  .report-select button { flex: 1 1 calc(50% - 4px); font-size: 12px; min-height: 44px; padding: 10px; }
  .scope-notice { font-size: 12px; margin-top: -4px; }
  .scope-tags { max-width: 240px; }
  .overlay { padding: 12px; align-items: center; }
  .dialog { max-height: calc(100dvh - 24px); border-radius: 18px; }
  .dialog-head { padding: 21px 20px 18px; gap: 10px; }
  .dialog-head h2 { font-size: 22px; }
  .dialog-head p { font-size: 12px; }
  .dialog-head .icon-btn { width: 40px; height: 40px; margin-top: -7px; }
  .dialog-body { padding: 21px 20px; }
  .dialog-footer { padding: 16px 20px; flex-wrap: wrap; gap: 9px; }
  .dialog-footer .btn { min-height: 44px; }
  .form-grid { column-gap: 13px; }
  .field { margin-bottom: 20px; }
  .field label { font-size: 12px; }
  .field input, .field select, .field textarea { font-size: 16px; min-height: 46px; padding: 11px; }
  .field .hint { font-size: 12px; }
  .kind-choices { gap: 6px; margin-bottom: 24px; }
  .kind-choice { font-size: 11px; padding: 13px 4px; min-height: 75px; border-radius: 10px; }
  .kind-choice svg { width: 19px; height: 19px; }
  .form-section { font-size: 12px; }
  .details-grid { column-gap: 16px; row-gap: 20px; }
  .detail-value { font-size: 14px; }
  .detail-amount { font-size: 31px; }
  .scope-option { padding: 13px 10px; gap: 8px; min-height: 60px; font-size: 13px; }
  .scope-option .type-icon { width: 25px; height: 25px; }
  .scope-hint { font-size: 12px; }
  .scope-controls .btn { min-height: 42px; }
  .login { display: block; background: #f8f9f6; }
  .login-story { padding: 26px 25px; min-height: auto; }
  .login-story .brand { font-size: 22px; }
  .login-story .brand-mark { width: 38px; height: 38px; }
  .login-copy, .login-story footer { display: none; }
  .login-form-wrap { padding: 35px 22px 45px; }
  .login-form { max-width: 420px; padding: 29px 25px; border-radius: 21px; }
  .login-form h2 { font-size: 28px; }
  .login-form > p { font-size: 14px; }
  .login-form .field input { font-size: 16px; min-height: 48px; }
  .login-note { font-size: 12px; }
  .export-hero { padding: 23px; gap: 15px; }
  .export-hero h2 { font-size: 19px; }
  .excel-icon { width: 49px; height: 59px; border-radius: 12px; }
  .export-details { padding: 0 23px 24px; }
  .sheet-list { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 0 21px 23px; gap: 9px; }
  .sheet-item { padding: 13px 11px; font-size: 12px; gap: 8px; }
  .rooms { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .room { padding: 18px 15px; border-radius: 15px; }
  .room h3 { flex-wrap: wrap; font-size: 16px; gap: 9px; }
  .room p { font-size: 12px; }
  .room .guest { font-size: 13px; }
  .room .btn { width: 100%; font-size: 11px; padding: 10px 8px; min-height: 44px; gap: 5px; }
  .room-toolbar input { font-size: 16px; min-height: 44px; }
  .info-list { padding-left: 21px; padding-right: 21px; }
  .help-copy { font-size: 13px; padding: 0 21px 24px; }
  .role-card { padding: 18px 21px; }
  .notification { bottom: 16px; right: 16px; left: 16px; max-width: none; font-size: 13px; }
  .inline-summary { gap: 12px; font-size: 12px; flex-wrap: wrap; }
}
@media (max-width: 390px) {
  .content { padding-left: 16px; padding-right: 16px; }
  .topbar { padding-left: 16px; padding-right: 16px; }
  .topbar-right .pill { display: none; }
  .kpi { padding-left: 14px; padding-right: 14px; }
  .kpi-title { gap: 5px; }
  .kpi-symbol { width: 28px; height: 28px; border-radius: 8px; }
  .kpi-value { font-size: 24px; }
  .kpi-value.compact { font-size: 20px; }
  .panel-head { gap: 8px; }
  .panel-head .legend { gap: 6px; font-size: 10px; }
  .page-actions .btn { font-size: 12px; gap: 7px; }
  .dialog-body { padding-left: 17px; padding-right: 17px; }
  .dialog-footer { padding-left: 17px; padding-right: 17px; }
  .dialog-footer .btn { font-size: 12px; padding-left: 11px; padding-right: 11px; }
  .scope-option .type-icon { display: none; }
  .scope-controls { flex-wrap: wrap; }
  .sheet-list { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation-duration: .01ms !important; transition: none !important; scroll-behavior: auto !important; }
}


