:root {
  color-scheme: light;
  --bg: #eef3f5;
  --panel: #ffffff;
  --ink: #1f2937;
  --muted: #6f7b8b;
  --line: #dfe7ec;
  --nav: #071a2d;
  --blue: #2f7df0;
  --green: #17a673;
  --danger: #e5484d;
  --shadow: 0 18px 50px rgba(20, 35, 55, 0.10);
  font-family: "Inter", "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: 0;
}

/* AI Assistant module */
.ai-topbar { align-items: center; }
.ai-local-badge { padding: 8px 12px; border: 1px solid #b9d9d0; border-radius: 999px; background: #edf8f4; color: #1d6b5a; font-size: 12px; font-weight: 800; white-space: nowrap; }
.ai-tabs { display: flex; gap: 6px; margin-bottom: 18px; padding: 5px; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.ai-tabs a { flex: 0 0 auto; padding: 9px 13px; border-radius: 10px; color: var(--muted); font-size: 13px; font-weight: 700; text-decoration: none; }
.ai-tabs a.active { background: #1d6b5a; color: #fff; }
.ai-addon-required { max-width: 720px; margin: 36px auto; padding: 38px; text-align: center; }
.ai-addon-required p { max-width: 560px; margin: 10px auto 22px; color: var(--muted); line-height: 1.6; }
.ai-lock-mark { display: inline-grid; width: 54px; height: 54px; place-items: center; border-radius: 16px; background: #e7f4f0; color: #1d6b5a; font-weight: 900; }
.ai-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.ai-metrics article { display: grid; gap: 8px; min-height: 125px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.ai-metrics span, .ai-metrics small { color: var(--muted); font-size: 12px; }
.ai-metrics strong { font-size: 20px; line-height: 1.25; }
.ai-overview-grid, .ai-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ai-check-list { display: grid; gap: 10px; padding-left: 20px; }
.ai-warning-panel { border-color: #f0d5aa; background: #fffaf2; }
.ai-dialog-layout { display: grid; grid-template-columns: minmax(260px, .7fr) minmax(0, 1.5fr); gap: 18px; }
.ai-dialog-main, .ai-card-list { display: grid; align-content: start; gap: 14px; }
.ai-panel-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.ai-panel-head h2, .ai-panel-head p { margin: 0; }
.ai-panel-head p { margin-top: 4px; color: var(--muted); font-size: 12px; }
.ai-dialog-list { display: grid; align-content: start; gap: 7px; }
.ai-dialog-item { display: grid; gap: 4px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); text-decoration: none; }
.ai-dialog-item span, .ai-dialog-item small { color: var(--muted); font-size: 12px; }
.ai-dialog-item.active { border-color: #75b9a8; background: #edf8f4; }
.ai-message-list { display: grid; gap: 10px; margin-bottom: 16px; }
.ai-message { max-width: 84%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #f8fafb; }
.ai-message-draft { margin-left: auto; border-color: #b9d9d0; background: #edf8f4; }
.ai-message-internal { border-style: dashed; background: #fffaf2; }
.ai-message header { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.ai-message p { margin: 8px 0; line-height: 1.5; }
.ai-message small, .ai-message time { color: var(--muted); font-size: 11px; }
.ai-message-form, .ai-editor-form { display: grid; gap: 12px; }
.ai-message-form label, .ai-editor-form label, .ai-form-grid label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.ai-context-form { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.ai-context-form small { color: var(--muted); }
.ai-create-panel { margin-top: 14px; }
.ai-create-panel summary { display: flex; justify-content: space-between; gap: 12px; cursor: pointer; }
.ai-create-panel summary span { color: var(--muted); font-size: 12px; }
.ai-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.ai-form-grid .wide { grid-column: 1 / -1; }
.ai-two-column { display: grid; grid-template-columns: minmax(280px, .7fr) minmax(0, 1.3fr); gap: 18px; align-items: start; }
.ai-content-card header { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.ai-content-card h2 { margin: 4px 0 0; font-size: 17px; }
.ai-content-card header span, .ai-content-card small { color: var(--muted); font-size: 11px; }
.ai-content-card p { line-height: 1.55; }
.ai-readonly-settings dl { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.ai-readonly-settings dt { color: var(--muted); }
.ai-readonly-settings dd { margin: 0; font-weight: 800; }
.ai-table-wrap { overflow-x: auto; }

@media (max-width: 1050px) {
  .ai-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-dialog-layout, .ai-two-column { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .ai-metrics, .ai-overview-grid, .ai-settings-grid, .ai-form-grid { grid-template-columns: 1fr; }
  .ai-form-grid .wide { grid-column: auto; }
  .ai-local-badge { display: none; }
  .ai-message { max-width: 100%; }
}

/* Finance module */
.finance-topbar { align-items: center; }
.finance-tabs { display: flex; gap: 6px; margin: 0 0 18px; padding: 5px; overflow-x: auto; border: 1px solid #e4e9ee; border-radius: 14px; background: #fff; scrollbar-width: thin; }
.finance-tabs a { flex: 0 0 auto; padding: 9px 13px; border-radius: 10px; color: #62707c; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.finance-tabs a:hover { background: #f3f6f8; color: #24323d; }
.finance-tabs a.active { background: #1d6b5a; color: #fff; }
.finance-filter-bar { display: flex; align-items: end; gap: 10px; margin-bottom: 18px; padding: 14px; border: 1px solid #e4e9ee; border-radius: 14px; background: #fff; }
.finance-filter-bar label { display: grid; gap: 5px; color: #6b7781; font-size: 12px; font-weight: 700; }
.finance-filter-bar input, .finance-filter-bar select { min-height: 40px; }
.finance-operation-filters input:first-of-type { flex: 1 1 280px; }
.finance-metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.finance-metric { position: relative; min-height: 132px; padding: 20px; overflow: hidden; border: 1px solid #e3e9ed; border-radius: 18px; background: #fff; box-shadow: 0 8px 25px rgba(23, 44, 57, .04); }
.finance-metric::after { content: ''; position: absolute; right: -20px; bottom: -35px; width: 100px; height: 100px; border-radius: 50%; background: #eef7f4; }
.finance-metric > * { position: relative; z-index: 1; display: block; }
.finance-metric span { margin-bottom: 12px; color: #66747f; font-size: 13px; font-weight: 700; }
.finance-metric strong { color: #172b35; font-size: clamp(22px, 2vw, 30px); line-height: 1.15; }
.finance-metric small, .finance-metric a { margin-top: 10px; color: #87929a; font-size: 12px; }
.finance-metric.income::after, .finance-metric.profit::after { background: #dff4eb; }
.finance-metric.expense::after, .finance-metric.warning::after { background: #fff0e7; }
.finance-overview-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .85fr); gap: 18px; margin-bottom: 18px; }
.finance-chart-panel { min-height: 310px; }
.finance-panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.finance-panel-heading h2, .finance-account-list h2, .finance-category-list h2, .finance-entity-form h2, .finance-readiness h2 { margin: 0; font-size: 18px; }
.finance-panel-heading p { margin: 4px 0 0; color: #8a949c; font-size: 13px; }
.finance-bar-chart { display: flex; align-items: end; gap: 16px; min-height: 190px; padding: 20px 8px 0; border-bottom: 1px solid #e8edef; }
.finance-bar-group { display: grid; flex: 1; min-width: 40px; justify-items: center; gap: 8px; }
.finance-bar-pair { display: flex; align-items: end; gap: 4px; height: 150px; }
.finance-bar-pair i { display: block; width: 14px; border-radius: 5px 5px 2px 2px; }
.finance-bar-pair .income { background: #47a78e; }
.finance-bar-pair .expense { background: #e59a68; }
.finance-bar-group small { color: #7d8991; font-size: 11px; }
.finance-chart-legend { display: flex; gap: 18px; margin-top: 15px; font-size: 12px; color: #69767f; }
.finance-chart-legend span::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; }
.finance-chart-legend .income::before { background: #47a78e; }
.finance-chart-legend .expense::before { background: #e59a68; }
.finance-ranking { display: grid; gap: 15px; }
.finance-ranking div { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding-bottom: 9px; overflow: hidden; }
.finance-ranking span, .finance-ranking strong { position: relative; z-index: 1; font-size: 13px; }
.finance-ranking i { position: absolute; left: 0; bottom: 0; height: 4px; border-radius: 4px; background: #d98958; }
.finance-readiness { display: grid; grid-template-columns: 1fr repeat(3, minmax(100px, auto)); align-items: center; gap: 20px; }
.finance-readiness div { display: grid; gap: 4px; }
.finance-readiness span { color: #7a868e; font-size: 12px; }
.finance-readiness strong { font-size: 18px; }
.finance-create-panel { margin-bottom: 18px; }
.finance-editor { margin-bottom: 18px; border-color: #b9d9d0; box-shadow: 0 12px 30px rgba(29, 107, 90, .08); }
.finance-editor .finance-panel-heading > a { color: #64737c; font-size: 13px; }
.finance-bulk-bar { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; padding: 10px 14px; border: 1px solid #e3e9ec; border-radius: 12px; background: #f8fafb; }
.finance-bulk-bar strong { color: #52616b; font-size: 12px; }
.finance-bulk-bar select { width: auto; min-height: 36px; padding-top: 6px; padding-bottom: 6px; font-size: 12px; }
.finance-bulk-bar a { margin-left: auto; color: #3d7568; font-size: 12px; font-weight: 700; }
.finance-select-cell { width: 34px; text-align: center !important; }
.finance-select-cell input { width: 16px; height: 16px; }
.finance-row-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.finance-row-actions > a { display: inline-grid; width: 29px; height: 29px; place-items: center; border: 1px solid #dfe7e9; border-radius: 8px; color: #45665e; text-decoration: none; }
.finance-row-actions form { margin: 0; }
.finance-split-list { display: grid; gap: 10px; margin-bottom: 14px; }
.finance-split-row { display: grid; grid-template-columns: 28px minmax(110px, .5fr) minmax(180px, 1fr) minmax(180px, 1fr) minmax(160px, 1fr); align-items: end; gap: 10px; padding: 12px; border: 1px solid #e5ebed; border-radius: 12px; background: #fafcfc; }
.finance-split-row > b { align-self: center; color: #2e7c68; text-align: center; }
.finance-split-row label { display: grid; gap: 5px; color: #69767f; font-size: 11px; font-weight: 700; }
.finance-unsplit-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid #e7ecee; }
.finance-history-list { display: grid; gap: 8px; }
.finance-history-list details { border: 1px solid #e4e9ec; border-radius: 11px; background: #fafcfc; }
.finance-history-list summary { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 14px; cursor: pointer; }
.finance-history-list summary span { font-size: 13px; font-weight: 800; }
.finance-history-list summary small { display: block; margin-top: 3px; color: #89949b; font-size: 11px; font-weight: 500; }
.finance-history-list time { color: #718089; font-size: 12px; }
.finance-history-data { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 12px 12px; }
.finance-history-data b { display: block; margin-bottom: 5px; color: #67747c; font-size: 11px; }
.finance-history-data pre { max-height: 260px; margin: 0; padding: 10px; overflow: auto; border-radius: 8px; background: #17242b; color: #dce9e5; font: 11px/1.45 monospace; white-space: pre-wrap; }
.finance-create-panel summary { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.finance-create-panel summary span { color: #849099; font-size: 13px; }
.finance-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.finance-form-grid label, .finance-entity-form label { display: grid; gap: 6px; color: #64727c; font-size: 12px; font-weight: 700; }
.finance-form-grid .wide { grid-column: span 2; }
.finance-table-panel { padding: 0; overflow: hidden; }
.finance-table-panel .finance-panel-heading { padding: 20px 20px 0; }
.finance-table-scroll { overflow-x: auto; }
.finance-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.finance-table th { padding: 11px 14px; border-top: 1px solid #edf0f2; border-bottom: 1px solid #e5eaed; background: #f7f9fa; color: #68757e; font-size: 11px; text-align: left; text-transform: uppercase; white-space: nowrap; }
.finance-table td { padding: 13px 14px; border-bottom: 1px solid #edf0f2; color: #35434c; vertical-align: middle; }
.finance-table td strong, .finance-table td small { display: block; }
.finance-table td small { margin-top: 3px; color: #95a0a7; font-size: 10px; }
.finance-table .amount { font-variant-numeric: tabular-nums; font-weight: 800; text-align: right; white-space: nowrap; }
.finance-table .amount.positive { color: #228369; }
.finance-table .amount.negative { color: #c46d44; }
.finance-status { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: #e7f5f0; color: #27755f; font-size: 10px; font-weight: 800; white-space: nowrap; }
.finance-status.unallocated { background: #fff0df; color: #a6632d; }
.finance-icon-button { min-height: 28px; padding: 2px 9px; border: 1px solid #e6d8d4; border-radius: 8px; background: #fff; color: #b4624d; font-size: 18px; }
.finance-settings-grid { display: grid; grid-template-columns: minmax(280px, .65fr) minmax(0, 1.35fr); gap: 18px; }
.finance-entity-form { display: grid; align-content: start; gap: 14px; }
.finance-account-list article, .finance-category-list article { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 0; border-bottom: 1px solid #edf0f2; }
.finance-bank-section { margin-top: 18px; }
.finance-sync-list h2, .finance-rule-list h2 { margin: 0; font-size: 18px; }
.finance-sync-list article, .finance-rule-list article { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid #edf0f2; }
.finance-sync-list article > div { display: grid; gap: 4px; }
.finance-sync-list article > div:last-child { justify-items: end; }
.finance-sync-list span, .finance-sync-list small, .finance-rule-list p, .finance-rule-list small { margin: 0; color: #849098; font-size: 11px; }
.finance-sync-list small { color: #b85d4b; }
.finance-sync-status { color: #2a8068; font-size: 11px; }
.finance-sync-status.failed { color: #bd5c49; }
.finance-rule-list article { justify-content: flex-start; }
.finance-rule-list article > div { display: grid; flex: 1; gap: 4px; }
.finance-rule-list article > form { margin: 0; }
.finance-rule-priority { display: inline-grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border-radius: 10px; background: #e7f4f0; color: #26715e; font-size: 11px; font-weight: 800; }
.finance-report-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.finance-report-metrics .finance-metric { min-height: 112px; }
.finance-table tfoot th { padding: 14px; border-top: 2px solid #dce5e7; background: #f4f7f7; }
.finance-pnl { display: grid; gap: 0; max-width: 900px; margin: 0 auto 18px; }
.finance-pnl h2, .finance-calendar-list h2, .finance-forecast-list h2 { margin: 0 0 14px; font-size: 18px; }
.finance-pnl > div { display: flex; justify-content: space-between; padding: 12px 4px; border-bottom: 1px solid #edf0f2; }
.finance-pnl > div.subtotal { margin-top: 3px; border-top: 1px solid #ccd9dc; font-weight: 800; }
.finance-pnl > div.total { margin-top: 4px; padding: 15px 10px; border: 0; border-radius: 10px; background: #edf6f3; font-size: 16px; font-weight: 800; }
.finance-pnl .negative, .finance-calendar-list .negative, .finance-forecast-list .negative { color: #c1644c; }
.finance-calendar-list > div { display: grid; grid-template-columns: 44px minmax(140px, 1fr) auto auto auto; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid #edf0f2; }
.finance-calendar-list time { color: #66757e; font-size: 12px; font-weight: 800; }
.finance-calendar-list span { display: grid; gap: 3px; }
.finance-calendar-list small { color: #8a959d; font-size: 11px; }
.finance-calendar-list b { white-space: nowrap; }
.finance-calendar-list b.positive { color: #278267; }
.finance-calendar-list form { margin: 0; }
.finance-calendar-list em { color: #39816e; font-size: 11px; font-style: normal; font-weight: 700; }
.finance-forecast-list > div { display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; padding: 9px 0; border-bottom: 1px solid #edf0f2; font-size: 12px; }
.finance-forecast-list span { color: #7c8991; }

@media (max-width: 1200px) {
  .finance-report-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.finance-account-list article:last-child, .finance-category-list article:last-child { border-bottom: 0; }
.finance-account-list article div, .finance-category-list article div { display: grid; gap: 4px; }
.finance-account-list article span, .finance-category-list small { color: #859099; font-size: 12px; }
.finance-account-list article b { color: #1f6e5c; font-size: 17px; }
.finance-category-list article { justify-content: flex-start; }
.finance-category-list article em { margin-left: auto; color: #87939a; font-size: 11px; font-style: normal; }
.finance-category-dot { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; background: #df8c5c; }
.finance-category-dot.income { background: #3eaa87; }
.finance-checkbox { display: flex !important; grid-template-columns: auto 1fr; align-items: center; }
.finance-checkbox input { width: auto; }
.finance-empty { display: grid; min-height: 90px; place-items: center; color: #8a959d; font-size: 13px; text-align: center; }
.finance-placeholder { min-height: 260px; display: grid; align-content: center; justify-items: center; text-align: center; }
.finance-placeholder span { color: #2f8b72; font-size: 12px; font-weight: 800; text-transform: uppercase; }
.finance-placeholder h2 { margin: 8px 0; }
.finance-placeholder p { max-width: 620px; margin: 0; color: #74818a; }

@media (max-width: 1050px) {
  .finance-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-overview-grid, .finance-settings-grid { grid-template-columns: 1fr; }
  .finance-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finance-split-row { grid-template-columns: 28px repeat(2, minmax(0, 1fr)); }
  .finance-split-row > label:last-child { grid-column: 2 / -1; }
}

@media (max-width: 700px) {
  .finance-topbar { align-items: flex-start; gap: 12px; }
  .finance-filter-bar { flex-wrap: wrap; }
  .finance-filter-bar > * { flex: 1 1 130px; }
  .finance-metric-grid, .finance-form-grid { grid-template-columns: 1fr; }
  .finance-form-grid .wide { grid-column: auto; }
  .finance-readiness { grid-template-columns: 1fr 1fr; }
  .finance-readiness h2 { grid-column: 1 / -1; }
  .finance-chart-panel { padding: 16px; }
  .finance-bar-chart { gap: 8px; }
  .finance-bulk-bar { align-items: stretch; flex-direction: column; }
  .finance-bulk-bar select { width: 100%; }
  .finance-bulk-bar a { margin-left: 0; }
  .finance-split-row { grid-template-columns: 24px 1fr; }
  .finance-split-row > label, .finance-split-row > label:last-child { grid-column: 2; }
  .finance-history-data { grid-template-columns: 1fr; }
  .finance-report-metrics, .finance-calendar-metrics { grid-template-columns: 1fr; }
  .finance-calendar-list > div { grid-template-columns: 38px 1fr auto; }
  .finance-calendar-list > div form, .finance-calendar-list > div em { grid-column: 2 / -1; }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.74)),
    repeating-linear-gradient(135deg, transparent 0 34px, rgba(22, 46, 70, 0.035) 35px 36px),
    var(--bg);
}

body.modal-open {
  overflow: hidden;
  touch-action: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
.link-button {
  border: 0;
  border-radius: 8px;
  padding: 11px 16px;
  color: var(--ink);
  background: #e8eef2;
  cursor: pointer;
  text-decoration: none;
  min-height: 42px;
}

button:hover,
.link-button:hover {
  filter: brightness(0.98);
}

.primary {
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}

.ghost {
  background: #fff;
  border: 1px solid var(--line);
}

.secondary {
  background: #eef3f7;
  color: var(--ink);
  font-weight: 700;
}

.inline-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.inline-actions button {
  width: auto;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}

.field-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.field-var {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 2px 8px;
  border: 1px solid #d8e7ff;
  border-radius: 999px;
  background: #eef5ff;
  color: #236bd4;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
}

label input,
label select,
label textarea {
  color: var(--ink);
}

.home-page {
  min-height: 100vh;
  background: #f5f8fb;
}

.home-header {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
  display: flex;
  align-items: center;
  gap: 28px;
}

.home-logo {
  display: flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  flex: 0 0 auto;
}

.home-logo-image {
  display: block;
  width: 220px;
  height: 56px;
  object-fit: contain;
  object-position: left center;
}

.home-header nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.home-header nav a,
.home-login {
  color: #536173;
  text-decoration: none;
  font-weight: 700;
}

.home-login {
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

.home-hero {
  width: min(1180px, calc(100% - 32px));
  margin: 10px auto 0;
  min-height: 560px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(420px, 0.98fr);
  gap: 34px;
  align-items: center;
  padding: 54px;
  border-radius: 28px;
  background:
    linear-gradient(125deg, rgba(245, 164, 0, 0.18), transparent 34%),
    linear-gradient(310deg, rgba(10, 184, 223, 0.22), transparent 38%),
    #eaf4fb;
  overflow: hidden;
}

.hero-copy {
  display: grid;
  gap: 22px;
}

.eyebrow {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(47, 125, 240, 0.10);
  color: #1f67bd;
  font-weight: 800;
}

.hero-copy h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(42px, 6vw, 74px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 620px;
  margin: 0;
  color: #536173;
  font-size: 20px;
  line-height: 1.5;
}

.domain-search {
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr) auto;
  align-items: center;
  gap: 0;
  max-width: 660px;
  padding: 8px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(30, 54, 83, 0.12);
}

.domain-search span {
  padding: 0 6px 0 12px;
  color: #718094;
  font-weight: 800;
  white-space: nowrap;
}

.domain-search input {
  border: 0;
  min-height: 52px;
  padding-left: 2px;
  font-size: 18px;
}

.domain-search input:focus {
  outline: none;
}

.domain-search button {
  min-height: 52px;
}

.hero-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-tabs span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #455468;
  font-weight: 750;
}

.hero-product {
  min-height: 430px;
  padding: 16px;
  border-radius: 22px;
  background: #071a2d;
  box-shadow: 0 34px 80px rgba(7, 26, 45, 0.26);
  transform: rotate(1deg);
}

.product-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 16px;
  color: #d7e3f0;
}

.product-top span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f97316;
}

.product-top span:nth-child(2) {
  background: #facc15;
}

.product-top span:nth-child(3) {
  background: #22c55e;
}

.product-top b {
  margin-left: auto;
}

.product-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.product-board article {
  min-height: 310px;
  padding: 14px;
  border-radius: 16px;
  background: #f6f8fb;
}

.product-board header {
  padding: 12px;
  border-radius: 13px 20px 20px 13px;
  background: var(--accent);
  color: #fff;
}

.product-board header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.product-board b {
  display: block;
  margin: 24px 0;
  font-size: 28px;
  font-weight: 500;
}

.product-board p {
  margin: 0 0 8px;
  font-weight: 800;
}

.product-board small {
  color: #6b7584;
  line-height: 1.45;
}

.catalog-section {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto 0;
}

.catalog-section-head {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.catalog-section-head span {
  color: #7b8797;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.catalog-section-head h2 {
  margin: 0;
  font-size: 36px;
}

.catalog-section-head p {
  margin: 0;
  color: #6d7786;
  font-size: 18px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.catalog-card {
  display: grid;
  gap: 12px;
}

.catalog-card a {
  color: inherit;
  text-decoration: none;
}

.catalog-card img {
  width: 100%;
  aspect-ratio: 1 / 0.82;
  object-fit: cover;
  border-radius: 18px;
  background: #dde5ee;
}

.catalog-card div {
  display: grid;
  gap: 5px;
}

.catalog-card strong {
  font-size: 17px;
}

.catalog-card span {
  color: #6f7b8a;
  line-height: 1.35;
}

.catalog-card b {
  font-size: 16px;
}

.catalog-book-button {
  justify-self: start;
  padding: 9px 13px;
  border-radius: 10px;
  background: #eef2f6;
  color: #1f2937;
  font-weight: 800;
}

.catalog-page {
  min-height: 100vh;
  background: #fff;
}

.catalog-public-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}

.apartment-hero,
.apartment-content {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.apartment-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 32px;
  align-items: end;
  padding: 26px 0 38px;
}

.apartment-photo img {
  width: 100%;
  aspect-ratio: 1.65 / 1;
  object-fit: cover;
  border-radius: 24px;
}

.apartment-summary {
  display: grid;
  gap: 12px;
}

.catalog-back {
  color: #6b7280;
  font-weight: 800;
  text-decoration: none;
}

.apartment-summary h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
}

.apartment-summary p {
  margin: 0;
  color: #6f7b8a;
  font-size: 19px;
}

.apartment-summary strong {
  font-size: 24px;
}

.apartment-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 42px;
  padding-bottom: 52px;
}

.apartment-content article {
  display: grid;
  gap: 18px;
}

.apartment-content h2 {
  margin: 22px 0 0;
  font-size: 26px;
}

.apartment-content p {
  margin: 0;
  color: #4b5563;
  font-size: 18px;
  line-height: 1.65;
}

.amenities-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.amenities-list span {
  padding: 11px 13px;
  border: 1px solid #dfe5ec;
  border-radius: 999px;
  background: #f8fafc;
  font-weight: 750;
}

.availability-calendar {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
}

.availability-calendar span {
  display: grid;
  place-items: center;
  min-height: 58px;
  border: 1px solid #dfe5ec;
  border-radius: 14px;
  background: #fff;
}

.availability-calendar span.is-booked {
  color: #98a2af;
  background: #f1f4f7;
  text-decoration: line-through;
}

.availability-calendar small {
  color: #7b8797;
}

.booking-widget {
  position: sticky;
  top: 96px;
  align-self: start;
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid #dfe5ec;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.12);
}

.booking-widget h2 {
  margin: 0;
}

.service-grid,
.workflow-band,
.launch-band {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 0;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.service-grid article {
  padding: 22px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(25, 43, 66, 0.07);
}

.service-grid strong {
  display: block;
  margin-bottom: 10px;
  font-size: 18px;
}

.service-grid p,
.workflow-band p,
.launch-band p {
  margin: 0;
  color: #657386;
  line-height: 1.55;
}

.workflow-band,
.launch-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: 30px;
  align-items: center;
  padding: 34px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(25, 43, 66, 0.07);
}

.workflow-band h2,
.launch-band h2 {
  margin: 0 0 10px;
  font-size: 34px;
}

.workflow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.workflow-steps span {
  padding: 13px 15px;
  border-radius: 10px;
  background: #eef5ff;
  color: #1f67bd;
  font-weight: 800;
}

.launch-band {
  grid-template-columns: 1fr auto;
  margin-bottom: 34px;
  background: #071a2d;
  color: #fff;
}

.launch-band p {
  color: #b8c7d8;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(440px, 100%);
  padding: 34px;
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.brand-mark,
.logo span {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f5a400, #0ab8df);
  color: #fff;
  font-weight: 900;
  font-size: 24px;
}

.auth-brand-logo {
  display: block;
  width: min(260px, 100%);
  height: 74px;
  object-fit: contain;
  object-position: left center;
}

.auth-brand-logo.compact {
  width: 210px;
  height: 58px;
}

.login-panel h1 {
  margin: 18px 0 8px;
  font-size: 36px;
}

.login-panel p {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.55;
}

.bot-trap {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.auth-links {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
}

.auth-links a {
  color: #1f67bd;
  font-weight: 800;
  text-decoration: none;
}

.auth-links a:hover {
  text-decoration: underline;
}

.stack {
  display: grid;
  gap: 16px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  background: #f5f7f9;
  transition: grid-template-columns 0.22s ease;
}

.app-shell.sidebar-open {
  grid-template-columns: 292px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  z-index: 90;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 18px 0;
  border-right: 1px solid #e5e9ef;
  background: #fff;
  color: #4b5563;
  overflow: visible;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(130, 142, 156, 0.4) transparent;
  transition: padding 0.22s ease;
}

.sidebar-logo {
  display: inline-flex;
  width: 190px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  overflow: hidden;
}

.sidebar-logo img {
  display: block;
  width: 190px;
  height: 44px;
  max-width: none;
  object-fit: contain;
  object-position: left center;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(130, 142, 156, 0.34);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 14px;
  color: #141a23;
}

.mobile-sidebar-head {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mobile-menu-button {
  display: inline-flex;
  width: 42px;
  min-height: 42px;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  border: 1px solid #d8e0e7;
  border-radius: 10px;
  background: #fff;
}

.mobile-menu-button span {
  display: block;
  width: 19px;
  height: 2px;
  border-radius: 999px;
  background: #65717e;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.app-shell.sidebar-open:not(.mobile-shell) .mobile-menu-button span:nth-child(1),
.sidebar.menu-open .mobile-menu-button span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.app-shell.sidebar-open:not(.mobile-shell) .mobile-menu-button span:nth-child(2),
.sidebar.menu-open .mobile-menu-button span:nth-child(2) {
  opacity: 0;
}

.app-shell.sidebar-open:not(.mobile-shell) .mobile-menu-button span:nth-child(3),
.sidebar.menu-open .mobile-menu-button span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.logo strong,
.logo small {
  display: block;
}

.logo small {
  color: #7e8997;
}

.sidebar nav {
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding-right: 12px;
  padding-bottom: 12px;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-group-list {
  display: grid;
  gap: 2px;
}

.nav-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 22px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: #9aa3b2;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.nav-group-title i {
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.16s ease;
}

.nav-group.is-collapsed .nav-group-title i {
  transform: rotate(-45deg) translateY(2px);
}

.nav-group.is-collapsed .nav-group-list {
  display: none;
}

.sidebar-collapse-button {
  position: absolute;
  z-index: 90;
  top: 50px;
  right: -17px;
  display: inline-flex;
  width: 34px;
  height: 34px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #d7dee7;
  border-radius: 50%;
  background: #fff;
  color: #65717e;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(28, 39, 53, 0.08);
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.sidebar-collapse-button:hover {
  background: #f1f3f5;
  color: #2e3a49;
}

.sidebar-collapse-button svg {
  width: 18px;
  height: 18px;
  transform: rotate(180deg);
  transition: transform 0.18s ease;
}

.sidebar-collapse-button[aria-expanded="false"] svg {
  transform: rotate(0);
}

.collapse-icon {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: currentColor;
}

.collapse-icon::before,
.collapse-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 9px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.collapse-icon::before {
  transform: rotate(45deg);
}

.collapse-icon::after {
  transform: rotate(-45deg);
}

.collapse-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.sidebar a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  color: #4b5563;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 7px 10px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.nav-thumb {
  position: relative;
  width: 24px;
  height: 24px;
  display: inline-flex;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  font-style: normal;
  color: #9aa3af;
  filter: none;
}

.nav-thumb img {
  display: block;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  object-fit: contain;
}

.nav-thumb svg {
  width: 21px;
  height: 21px;
  display: block;
}

.nav-label,
.logo div {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav-label {
  min-width: 0;
}

.nav-badge {
  position: absolute;
  top: -5px;
  right: -10px;
  z-index: 2;
  flex: 0 0 auto;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 2px solid #fff;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ef3b67;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 5px 12px rgba(239, 59, 103, 0.3);
}

.app-shell.sidebar-open .nav-label,
.app-shell.sidebar-open .logo div {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.app-shell:not(.sidebar-open) .sidebar {
  gap: 16px;
  padding: 18px 12px;
}

.app-shell:not(.sidebar-open) .sidebar-logo {
  width: 46px;
  flex-basis: 46px;
  background: url("/assets/apartnic-logo-new.png") -15px center / 173px 44px no-repeat;
}

.app-shell:not(.sidebar-open) .sidebar-logo img {
  display: none;
}

.app-shell:not(.sidebar-open) .logo {
  display: none;
}

.app-shell:not(.sidebar-open) .mobile-sidebar-head {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

.app-shell:not(.sidebar-open) .sidebar nav {
  justify-items: center;
  margin-top: 10px;
}

.app-shell:not(.sidebar-open) .nav-group {
  width: 48px;
  gap: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #edf0f4;
}

.app-shell:not(.sidebar-open) .nav-group:last-child {
  border-bottom: 0;
}

.app-shell:not(.sidebar-open) .nav-group-title {
  display: none;
}

.app-shell:not(.sidebar-open) .sidebar-collapse-button {
  width: 34px;
  height: 34px;
  min-height: 34px;
  justify-content: center;
  padding: 0;
}

.app-shell:not(.sidebar-open) .collapse-label {
  display: none;
}

.app-shell:not(.sidebar-open) .sidebar a {
  width: 48px;
  height: 48px;
  justify-content: center;
  padding: 0;
}

.app-shell:not(.sidebar-open) .nav-badge {
  top: -5px;
  right: -10px;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  font-size: 10px;
}

.app-shell:not(.sidebar-open) .nav-label {
  display: none;
}

.app-shell:not(.sidebar-open) .nav-theme-toggle {
  width: 48px;
  height: 48px;
  min-height: 48px;
  justify-content: center;
  padding: 0;
}

.app-shell:not(.sidebar-open) .nav-theme-toggle .theme-switch,
.app-shell:not(.sidebar-open) .nav-theme-toggle small {
  display: none;
}

.app-shell:not(.sidebar-open) .sidebar-account {
  grid-template-columns: 42px;
  justify-content: center;
  margin: 0 -12px 0;
  padding: 14px 0;
}

.app-shell:not(.sidebar-open) .sidebar-account > a,
.app-shell:not(.sidebar-open) .sidebar-notifications {
  display: none !important;
}

.nav-tooltip {
  position: fixed;
  z-index: 130;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0 12px;
  border-radius: 10px;
  background: #0866e8;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  pointer-events: none;
  opacity: 0;
  transform: translate(-6px, -50%) scale(0.96);
  box-shadow: 0 8px 18px rgba(8, 102, 232, 0.22);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.nav-tooltip.is-visible {
  opacity: 1;
  transform: translate(0, -50%) scale(1);
}

.sidebar a.active,
.sidebar a:hover {
  background: #f1f3f5;
  border-color: transparent;
  color: #4b5563;
  font-weight: 650;
}

.sidebar a.active .nav-badge,
.sidebar a:hover .nav-badge {
  border-color: #fff;
}

.sidebar a.active .nav-thumb,
.sidebar a:hover .nav-thumb {
  color: #9aa3af;
  filter: none;
}

.nav-theme-toggle {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 2px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #4b5563;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
}

.nav-theme-toggle:hover {
  background: #f1f3f5;
}

.theme-switch {
  width: 34px;
  height: 20px;
  flex: 0 0 34px;
  margin-left: auto;
  padding: 2px;
  border-radius: 999px;
  background: #c8d0da;
  transition: background 0.18s ease;
}

.theme-switch i {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.2);
  transition: transform 0.18s ease;
}

.nav-theme-toggle[aria-pressed="true"] .theme-switch {
  background: #0866e8;
}

.nav-theme-toggle[aria-pressed="true"] .theme-switch i {
  transform: translateX(14px);
}

.nav-theme-toggle small {
  width: 30px;
  color: #9aa3b2;
  font-size: 11px;
  font-weight: 600;
  text-align: right;
}

.sidebar-account {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 38px 38px;
  align-items: center;
  flex: 0 0 auto;
  gap: 12px;
  margin: 0 -18px 0;
  padding: 14px 18px;
  border-top: 1px solid #edf0f4;
  background: #fff;
}

.sidebar-avatar {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #0ba35b;
  color: #fff;
  font-size: 22px;
  font-weight: 850;
}

.sidebar-account a {
  min-height: 0;
  display: grid;
  gap: 2px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #111827;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.sidebar-account a:hover {
  border-color: transparent;
}

.sidebar-account b,
.sidebar-account small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-account small {
  color: #9aa3b2;
  font-weight: 500;
}

.sidebar-logout {
  width: 38px;
  height: 38px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: #9aa3b2 !important;
}

.sidebar-notifications,
.notification-drawer-header button {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #9aa3b2;
  cursor: pointer;
}

.sidebar-notifications:hover,
.sidebar-notifications[aria-expanded="true"],
.notification-drawer-header button:hover {
  background: #f1f3f5;
  color: #4b5563;
}

.sidebar-notifications svg,
.notification-drawer-header button svg {
  width: 24px;
  height: 24px;
}

.notification-drawer {
  position: fixed;
  z-index: 120;
  top: 0;
  right: 0;
  width: min(380px, 100vw);
  height: 100dvh;
  padding: 22px;
  border-left: 1px solid #e5e9ef;
  background: #fff;
  box-shadow: -18px 0 48px rgba(25, 36, 51, 0.15);
}

.notification-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid #edf0f4;
}

.notification-drawer-header h2 {
  margin: 0;
  color: #111827;
  font-size: 20px;
}

.notification-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 72px 20px;
  color: #4b5563;
  text-align: center;
}

.notification-empty i {
  display: inline-flex;
  width: 50px;
  height: 50px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f1f3f5;
  color: #9aa3b2;
}

.notification-empty i svg {
  width: 26px;
  height: 26px;
}

.notification-empty strong,
.notification-empty p {
  margin: 0;
}

.notification-empty p {
  color: #9aa3b2;
  font-size: 14px;
  line-height: 1.45;
}

.sidebar-logout svg {
  width: 24px;
  height: 24px;
}

.content {
  position: relative;
  min-width: 0;
  padding: 28px 34px 34px;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 70;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 62px;
  padding: 10px 34px;
  border-bottom: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
}

@media (min-width: 901px) {
  .app-shell {
    grid-template-rows: minmax(0, 1fr);
  }

  .app-topbar {
    display: none;
  }
}

.app-topbar-left {
  display: flex;
  align-items: center;
  gap: 24px;
  min-width: 0;
}

.app-topbar-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  color: #141a23;
  text-decoration: none;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0;
}

.app-topbar-logo-img {
  display: block;
  width: 190px;
  height: 44px;
  object-fit: contain;
  object-position: left center;
}

.app-shell:not(.sidebar-open) .app-topbar-logo {
  width: 44px;
  overflow: hidden;
}

.app-shell:not(.sidebar-open) .app-topbar-logo-img {
  max-width: none;
}

.app-topbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  color: #202733;
}

.app-topbar-brand strong {
  overflow: hidden;
  max-width: 520px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-topbar-brand span {
  color: var(--muted);
  white-space: nowrap;
}

.app-topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.shell-menu-button {
  display: none;
}

.knowledge-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: #5d6773;
  text-decoration: none;
  font-weight: 750;
}

.knowledge-link::before {
  content: "?";
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #8e98a4;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.profile-chip {
  position: relative;
  z-index: 80;
  top: auto;
  right: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: auto;
  height: 42px;
  padding: 0 2px 0 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #5d6773;
  text-decoration: none;
  box-shadow: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.profile-chip:hover,
.profile-chip.active,
.profile-chip[aria-expanded="true"] {
  transform: translateY(-1px);
  box-shadow: none;
}

.profile-chip span {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  border-radius: 999px;
  background: #8e98a4;
  color: #fff;
}

.profile-chip b {
  font-size: 15px;
}

.profile-chip svg {
  width: 22px;
  height: 22px;
  display: block;
  fill: currentColor;
}

.shell-menu-button {
  width: 38px;
  min-height: 38px;
  flex: 0 0 38px;
  gap: 4px;
  border: 0;
  border-radius: 999px;
  background: #8e98a4;
  color: #fff;
}

.shell-menu-button span {
  width: 17px;
  height: 2px;
  background: currentColor;
}

.profile-menu {
  position: absolute;
  z-index: 90;
  top: 54px;
  right: 34px;
  width: 238px;
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(124, 145, 170, 0.18);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 22px 58px rgba(31, 45, 61, 0.18);
}

.profile-menu[hidden] {
  display: none;
}

.profile-menu strong,
.profile-menu small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-menu small {
  color: var(--muted);
}

.profile-menu a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 750;
}

.profile-menu a:hover {
  background: #eef3f7;
}

.profile-menu a:last-child {
  color: #c03f64;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
  padding-right: 0;
}

.topbar h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.topbar p {
  margin: 6px 0 0;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.page-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: #8a95a3;
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-home-head h1 {
  font-size: 34px;
  max-width: 100%;
}

.dashboard-alert {
  display: grid;
  gap: 6px;
  margin-bottom: 26px;
  padding: 22px 24px;
  border-radius: 16px;
  border-left: 5px solid #f1c46b;
  background: #fff1d8;
  color: #2b2b2b;
}

.dashboard-alert strong {
  font-size: 18px;
}

.dashboard-period-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  padding: 10px;
  border: 1px solid #e5e9ee;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(27, 42, 61, .04);
}

.dashboard-period-form,
.dashboard-presets,
.dashboard-date-range {
  display: flex;
  align-items: center;
  gap: 7px;
}

.dashboard-period-form { min-width: 0; flex-wrap: wrap; }

.dashboard-date-range {
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid #e2e7ed;
  border-radius: 11px;
  color: #647082;
  font-size: 13px;
  font-weight: 700;
}

.dashboard-date-range label { display: flex; align-items: center; gap: 5px; }
.dashboard-date-range input { width: 126px; min-height: 30px; padding: 0; border: 0; background: transparent; color: #273242; font: inherit; outline: 0; }
.dashboard-calendar-icon { display: grid; width: 18px; height: 18px; place-items: center; color: #647082; }
.dashboard-calendar-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.dashboard-date-apply { min-height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: #eef2f6; color: #2f3b4a; font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; }
.dashboard-date-apply:hover { background: #e3e9ef; }
.dashboard-presets { flex-wrap: wrap; }
.dashboard-presets a, .dashboard-presets button { padding: 10px 12px; border: 0; border-radius: 10px; background: transparent; color: #7a8492; font: inherit; font-size: 13px; font-weight: 750; text-decoration: none; white-space: nowrap; cursor: pointer; }
.dashboard-presets a:hover, .dashboard-presets button:hover { background: #f4f6f9; color: #273242; }
.dashboard-presets a.is-active, .dashboard-presets button.is-active { background: #eef0f5; color: #202a38; }
.dashboard-settings-button { display: inline-flex; min-height: 42px; align-items: center; gap: 7px; padding: 0 13px; border: 1px solid #e2e7ed; border-radius: 11px; background: #fff; color: #303b4a; font: inherit; font-size: 13px; font-weight: 750; cursor: pointer; }
.dashboard-settings-button:hover, .dashboard-settings-button[aria-expanded="true"] { background: #f3f6f9; }
.dashboard-settings-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; color: #586779; }
.dashboard-settings-backdrop { position: fixed; z-index: 125; inset: 0; background: rgba(14, 20, 29, .72); }
.dashboard-settings-drawer { position: fixed; z-index: 130; top: 0; right: 0; display: flex; width: min(430px, 100vw); height: 100dvh; flex-direction: column; padding: 34px 36px 28px; overflow-y: auto; background: #fff; box-shadow: -18px 0 48px rgba(0, 0, 0, .2); }
.dashboard-settings-form { display: flex; min-height: 100%; flex-direction: column; }
.dashboard-settings-backdrop[hidden],
.dashboard-settings-drawer[hidden] { display: none !important; }
.dashboard-settings-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.dashboard-settings-header h2 { margin: 4px 0 0; color: #111827; font-size: 25px; letter-spacing: -.025em; }
.dashboard-settings-header button { display: inline-grid; width: 40px; height: 40px; flex: 0 0 40px; padding: 0; place-items: center; border: 1px solid #dfe5eb; border-radius: 50%; background: #fff; color: #5f6c7c; box-shadow: 0 4px 12px rgba(25, 36, 51, .06); cursor: pointer; }
.dashboard-settings-header button:hover { border-color: #cbd4de; background: #f4f6f8; color: #253142; }
.dashboard-settings-header button svg { display: block; width: 18px; height: 18px; }
.dashboard-settings-intro { max-width: 330px; margin: 18px 0 0; color: #7b8490; font-size: 15px; font-weight: 550; line-height: 1.45; }
.dashboard-settings-count { margin: 28px 0 0; color: #8a929d; font-size: 14px; }
.dashboard-settings-section { padding: 28px 0; }
.dashboard-settings-group-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dashboard-settings-section h3 { margin: 0; color: #1f2937; font-size: 18px; }
.dashboard-settings-group-title span { color: #303b4a; font-size: 22px; line-height: 1; }
.dashboard-settings-sources { display: grid; gap: 3px; }
.dashboard-settings-sources label { display: grid; grid-template-columns: 16px 9px minmax(0, 1fr) 18px; align-items: center; gap: 10px; min-height: 40px; padding: 0; color: #303946; font-size: 14px; font-weight: 650; cursor: pointer; }
.dashboard-source-handle { display: grid; width: 16px; height: 24px; place-items: center; color: #c4cbd3; cursor: grab; touch-action: none; user-select: none; }
.dashboard-source-handle svg { width: 10px; height: 16px; fill: currentColor; }
.dashboard-source-handle:active { cursor: grabbing; }
.dashboard-settings-sources label.is-dragging { opacity: .42; }
.dashboard-settings-sources label.is-drag-over { border-radius: 8px; background: #f2f7f5; }
.dashboard-source-dot { width: 9px; height: 9px; border-radius: 50%; background: #405fe8; }.dashboard-source-dot.dot-1 { background: #20a973; }.dashboard-source-dot.dot-2 { background: #ef4c91; }.dashboard-source-dot.dot-3 { background: #8b5cf6; }.dashboard-source-dot.dot-4 { background: #ef4444; }.dashboard-source-dot.dot-5 { background: #f97316; }
.dashboard-settings-sources label:hover span { color: #111827; }
.dashboard-settings-sources input[type="checkbox"] { appearance: none; box-sizing: border-box; width: 18px !important; min-width: 18px !important; max-width: 18px !important; height: 18px !important; min-height: 18px !important; max-height: 18px !important; margin: 0; padding: 0 !important; border: 1.5px solid #4fae83; border-radius: 5px; background: #fff; cursor: pointer; }
.dashboard-settings-sources input[type="checkbox"]:checked { border-color: #08a665; background: #08a665 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='white' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round' d='m3.2 8.1 3 3 6.7-6.4'/%3E%3C/svg%3E") center/13px 13px no-repeat; }
.dashboard-settings-sources input[type="hidden"] { display: none !important; }
.dashboard-settings-charts-section { padding-top: 2px; }
.dashboard-chart-spacer { display: block; width: 16px; height: 24px; }
.dashboard-settings-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; padding-top: 20px; border-top: 1px solid #edf0f4; }
.dashboard-settings-footer button,
.dashboard-settings-reset { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; border-radius: 11px; font-size: 14px; font-weight: 750; text-decoration: none; }
.dashboard-settings-reset { border: 1px solid #dfe5eb; background: #fff; color: #536173; cursor: pointer; }
.dashboard-settings-reset:hover { background: #f4f6f8; color: #263241; }

.dashboard-summary-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.5fr) repeat(2, minmax(220px, 0.6fr));
  gap: 22px;
  margin-bottom: 24px;
}

.dashboard-summary-card,
.dashboard-info-card,
.dashboard-panel {
  border: 0;
  border-radius: 22px;
  background: #f0f2f5;
  box-shadow: none;
}

.dashboard-summary-card {
  min-height: 190px;
  padding: 28px;
  overflow: hidden;
}

.dashboard-summary-card h2,
.dashboard-info-card h2,
.dashboard-panel h2 {
  margin: 0;
  font-size: 20px;
}

.dashboard-summary-card small,
.dashboard-info-card p {
  color: var(--muted);
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px;
  margin-top: 34px;
}

.dashboard-metrics b,
.dashboard-info-card b {
  display: block;
  color: #030712;
  font-size: 38px;
  line-height: 1;
}

.dashboard-metrics span {
  display: block;
  margin-top: 8px;
  color: #4b5563;
}

.dashboard-info-card {
  display: grid;
  align-content: start;
  gap: 16px;
  min-height: 190px;
  padding: 28px;
}

.dashboard-info-card p {
  margin: 0;
  line-height: 1.45;
}

.dashboard-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.dashboard-chart-card {
  min-width: 0;
  padding: 22px 22px 15px;
  overflow: hidden;
  border: 1px solid #e5e9ee;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(27, 42, 61, .045);
}

.dashboard-chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dashboard-chart-head div { display: grid; gap: 7px; }
.dashboard-chart-head span, .dashboard-chart-head small { color: #7b8593; font-size: 13px; font-weight: 700; }
.dashboard-chart-head strong { color: #171f2d; font-size: 27px; line-height: 1.1; letter-spacing: -.03em; }
.dashboard-chart-head small { padding-top: 2px; color: #a0a8b3; font-weight: 600; text-align: right; }
.dashboard-line-chart { position: relative; height: 120px; margin-top: 16px; cursor: crosshair; }
.dashboard-line-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.dashboard-chart-tooltip { position: absolute; z-index: 3; min-width: 98px; padding: 8px 10px; border: 1px solid #e1e7ed; border-radius: 9px; background: rgba(255, 255, 255, .97); box-shadow: 0 8px 20px rgba(27, 42, 61, .14); color: #253142; font-size: 11px; font-weight: 750; line-height: 1.35; pointer-events: none; transform: translate(-50%, calc(-100% - 10px)); }
.dashboard-chart-tooltip strong { display: block; color: #161f2d; font-size: 13px; }
.dashboard-chart-tooltip span { color: #7c8795; }
.dashboard-chart-axis { display: flex; justify-content: space-between; margin-top: 2px; color: #9aa3ae; font-size: 11px; font-weight: 700; }

.dashboard-panels {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(320px, 0.7fr);
  gap: 22px;
}

.dashboard-panel {
  padding: 24px;
}

.dashboard-panel-heading h2 { margin: 0; }
.dashboard-panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.dashboard-sources-content { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 18px; margin-top: 18px; }
.dashboard-sources-chart { width: 150px; height: 150px; }
.dashboard-sources-chart svg { width: 100%; height: 100%; }
.dashboard-sources-legend { display: grid; gap: 9px; min-width: 0; }
.dashboard-sources-legend > div { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.dashboard-sources-legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--source-color); }
.dashboard-sources-legend span { display: grid; min-width: 0; color: #2e3948; font-size: 13px; font-weight: 750; }
.dashboard-sources-legend small { margin-top: 2px; color: #8a95a3; font-size: 11px; font-weight: 600; }
.dashboard-sources-legend b { color: #1f2937; font-size: 13px; white-space: nowrap; }

.stage-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.stage-overview a,
.recent-bookings a {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 14px;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}

.stage-overview a {
  border-left: 4px solid var(--accent);
}

.stage-overview span,
.recent-bookings span,
.stage-overview small,
.recent-bookings small {
  color: var(--muted);
}

.recent-bookings {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.knowledge-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e5e9ef;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(21, 31, 45, .05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.knowledge-card:hover {
  transform: translateY(-4px);
  border-color: #d6dde6;
  box-shadow: 0 18px 42px rgba(21, 31, 45, .1);
}

.knowledge-layout {
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  gap: 42px;
  width: min(1500px, 100%);
  margin: 0 auto;
}

.knowledge-navigation {
  position: sticky;
  top: 26px;
  align-self: start;
  max-height: calc(100dvh - 52px);
  padding: 8px 0 24px;
  overflow-y: auto;
}

.knowledge-nav-group {
  display: grid;
  gap: 4px;
}

.knowledge-nav-secondary {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid #edf0f4;
}

.knowledge-nav-label {
  display: block;
  margin: 0 12px 10px;
  color: #9aa3b2;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.knowledge-nav-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  width: 100%;
  align-items: center;
  padding: 11px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #697386;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.knowledge-nav-item:hover { background: #f5f7f9; color: #303846; }
.knowledge-nav-item.active { background: #e9f8ef; color: #0e9f58; }
.knowledge-nav-item i { display: inline-flex; }
.knowledge-nav-item svg { width: 20px; height: 20px; }
.knowledge-nav-item small { font-size: 12px; font-weight: 800; opacity: .65; }

.knowledge-contact-card {
  display: grid;
  gap: 5px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid #edf0f4;
}

.knowledge-contact-card a {
  display: flex;
  gap: 11px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  color: #3c4656;
  text-decoration: none;
}

.knowledge-contact-card a:hover { background: #f5f7f9; color: #0e9f58; }
.knowledge-contact-card a > i { display: inline-flex; color: #0e9f58; }
.knowledge-contact-card svg { width: 21px; height: 21px; }
.knowledge-contact-card span { display: grid; min-width: 0; }
.knowledge-contact-card b { overflow: hidden; font-size: 13px; text-overflow: ellipsis; }
.knowledge-contact-card small { margin-top: 2px; color: #9aa3b2; font-size: 11px; }

.knowledge-content { min-width: 0; padding-bottom: 48px; }
.knowledge-hero { max-width: 720px; margin: 4px 0 30px; }
.knowledge-hero h1 { margin: 7px 0 7px; font-size: clamp(32px, 4vw, 48px); letter-spacing: -.035em; }
.knowledge-hero > p { margin: 0; color: var(--muted); font-size: 17px; }

.knowledge-search {
  display: flex;
  gap: 11px;
  width: 100%;
  align-items: center;
  margin-top: 24px;
  padding: 0 15px;
  border: 1px solid #dfe4ea;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(21, 31, 45, .04);
}

.knowledge-search:focus-within { border-color: #0eae62; box-shadow: 0 0 0 3px rgba(14, 174, 98, .1); }
.knowledge-search i { display: inline-flex; color: #9aa3b2; }
.knowledge-search svg { width: 21px; height: 21px; }
.knowledge-search input { width: 100%; height: 50px; padding: 0; border: 0; outline: 0; background: transparent; font: inherit; }

.knowledge-card-cover,
.knowledge-article-visual {
  position: relative;
  display: flex;
  height: 172px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(145deg, #087b4c, #11b86b);
  color: #fff;
}

.knowledge-card-cover::before,
.knowledge-article-visual::before {
  position: absolute;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  content: '';
}

.knowledge-card-cover::after,
.knowledge-article-visual::after {
  position: absolute;
  width: 105px;
  height: 105px;
  border-radius: 30px;
  background: rgba(255, 255, 255, .1);
  box-shadow: 70px 58px 0 rgba(255, 255, 255, .07), -76px 48px 0 rgba(255, 255, 255, .08);
  content: '';
  transform: rotate(24deg);
}

.knowledge-card-cover > span,
.knowledge-article-visual > span {
  z-index: 1;
  display: inline-flex;
  width: 74px;
  height: 74px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .32);
  border-radius: 24px;
  background: rgba(255, 255, 255, .17);
  backdrop-filter: blur(8px);
}

.knowledge-card-cover svg,
.knowledge-article-visual svg { width: 38px; height: 38px; }
.knowledge-card-cover small { position: absolute; z-index: 1; right: 14px; bottom: 12px; color: rgba(255, 255, 255, .78); font-size: 11px; font-weight: 700; }
.knowledge-cover-finance { background: linear-gradient(145deg, #0d827f, #23b5a1); }
.knowledge-cover-reports { background: linear-gradient(145deg, #3954a5, #637ee2); }
.knowledge-cover-contracts { background: linear-gradient(145deg, #aa603a, #df8b55); }
.knowledge-cover-locks { background: linear-gradient(145deg, #5c3faa, #8a6de2); }
.knowledge-cover-objects { background: linear-gradient(145deg, #217aa4, #42a9ca); }
.knowledge-cover-instructions { background: linear-gradient(145deg, #b07b21, #e3ad49); }
.knowledge-cover-companies { background: linear-gradient(145deg, #3d657a, #6a93a5); }

.knowledge-card-body { display: flex; min-height: 230px; flex-direction: column; padding: 20px 21px 21px; }
.knowledge-card-tag,
.knowledge-article-tag { align-self: flex-start; padding: 5px 9px; border-radius: 999px; background: #e9f8ef; color: #0e9f58; font-size: 12px; font-weight: 800; }
.knowledge-card h2 { margin: 13px 0 8px; font-size: 19px; line-height: 1.25; letter-spacing: -.015em; }
.knowledge-card p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--muted); font-size: 14px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.knowledge-card-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: auto; padding-top: 16px; }
.knowledge-card-body button { align-self: flex-start; margin: 0; padding: 0; border: 0; background: transparent; color: #0e9f58; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.knowledge-card-body button:hover { color: #087c47; }
.knowledge-card-body button span { margin-left: 4px; }
.knowledge-card-body .knowledge-edit-button { color: #7b8595; font-size: 12px; }
.knowledge-card-body .knowledge-edit-button:hover { color: #303846; }

.knowledge-admin-badge { display: inline-flex; margin-top: 14px; padding: 6px 10px; border-radius: 999px; background: #fff4dc; color: #9a6510; font-size: 12px; font-weight: 800; }

.knowledge-update-card {
  grid-column: 1 / -1;
  padding: 26px;
  border: 1px solid #e5e9ef;
  border-radius: 20px;
  background: #fff;
}

.knowledge-update-card time { color: #8892a3; font-size: 13px; }
.knowledge-update-card > span { margin-left: 10px; padding: 4px 8px; border-radius: 999px; background: #e9f8ef; color: #0e9f58; font-size: 12px; font-weight: 800; }
.knowledge-update-card h2 { margin: 13px 0 7px; font-size: 21px; }
.knowledge-update-card p { margin: 0; color: var(--muted); line-height: 1.55; }

.knowledge-empty { justify-items: center; padding: 80px 20px; text-align: center; }
.knowledge-empty:not([hidden]) { display: grid; }
.knowledge-empty i { display: inline-flex; width: 58px; height: 58px; align-items: center; justify-content: center; border-radius: 50%; background: #f0f2f5; color: #9aa3b2; }
.knowledge-empty svg { width: 27px; height: 27px; }
.knowledge-empty h2 { margin: 17px 0 5px; }
.knowledge-empty p { margin: 0; color: var(--muted); }

.knowledge-drawer-backdrop { position: fixed; z-index: 139; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(17, 24, 39, .22); cursor: default; }
.knowledge-article-drawer,
.knowledge-editor-drawer { position: fixed; z-index: 140; top: 0; right: 0; width: min(620px, 100vw); height: 100dvh; overflow-y: auto; contain: layout paint; background: #fff; box-shadow: -22px 0 60px rgba(17, 24, 39, .22); }
.knowledge-drawer-backdrop[hidden], .knowledge-article-drawer[hidden], .knowledge-editor-drawer[hidden] { display: none !important; }
.knowledge-article-drawer > header { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 18px 30px; border-bottom: 1px solid #edf0f4; background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px); }
.knowledge-article-drawer > header > span { color: #7b8595; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.knowledge-article-drawer > header button { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: #f1f3f5; color: #697386; cursor: pointer; }
.knowledge-article-drawer > header button:hover { background: #e7eaee; color: #111827; }
.knowledge-article-drawer > header svg { width: 20px; height: 20px; }
.knowledge-article-content { padding: 40px 44px 64px; }
.knowledge-article-content h2 { margin: 17px 0 12px; font-size: clamp(29px, 4vw, 40px); line-height: 1.1; letter-spacing: -.035em; }
.knowledge-article-lead { margin: 0 0 28px; color: var(--muted); font-size: 17px; line-height: 1.6; }
.knowledge-article-visual { height: 245px; margin: 0 0 30px; border-radius: 22px; }
.knowledge-article-content h3 { margin: 30px 0 10px; font-size: 21px; }
.knowledge-article-content > p:not(.knowledge-article-lead) { margin: 0; color: #4d5767; font-size: 16px; line-height: 1.75; }
.knowledge-article-note { margin-top: 28px; padding: 18px 20px; border-left: 4px solid #0eae62; border-radius: 4px 14px 14px 4px; background: #eefaf3; }
.knowledge-article-note b { color: #0b8f4f; }
.knowledge-article-note p { margin: 5px 0 0; color: #4f6c5d; line-height: 1.55; }

.knowledge-editor-drawer { width: min(680px, 100vw); }
.knowledge-editor-drawer > header { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 18px 30px; border-bottom: 1px solid #edf0f4; background: #fff; }
.knowledge-editor-drawer > header > span { color: #7b8595; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.knowledge-editor-drawer > header button { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: #f1f3f5; color: #697386; cursor: pointer; }
.knowledge-editor-drawer > header svg { width: 20px; height: 20px; }
.knowledge-editor-form { display: grid; gap: 18px; padding: 30px 36px 50px; }
.knowledge-editor-form label { display: grid; gap: 8px; color: #4d5767; font-size: 13px; font-weight: 800; }
.knowledge-editor-form input,
.knowledge-editor-form select,
.knowledge-editor-form textarea { width: 100%; padding: 12px 14px; border: 1px solid #dfe4ea; border-radius: 12px; outline: 0; background: #fff; color: #222c3a; font: inherit; font-weight: 500; line-height: 1.5; resize: vertical; }
.knowledge-editor-form input:focus,
.knowledge-editor-form select:focus,
.knowledge-editor-form textarea:focus { border-color: #0eae62; box-shadow: 0 0 0 3px rgba(14, 174, 98, .1); }
.knowledge-editor-form .primary { justify-self: start; min-width: 200px; }
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 1280px) {
  .dashboard-summary-grid,
  .dashboard-panels {
    grid-template-columns: 1fr;
  }

  .dashboard-chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .dashboard-sources-content { grid-template-columns: 130px minmax(0, 1fr); }
  .dashboard-sources-chart { width: 130px; height: 130px; }

  .stage-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .knowledge-layout { grid-template-columns: 225px minmax(0, 1fr); gap: 28px; }
  .knowledge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 240px;
  gap: 12px;
  margin-bottom: 20px;
}

.dashboard-filters {
  grid-template-columns: minmax(260px, 1fr) 240px auto;
  align-items: stretch;
}

.booking-filters {
  grid-template-columns: auto minmax(260px, 1fr) 240px auto;
  align-items: stretch;
}

.kanban-picker {
  position: relative;
}

.kanban-picker-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 10px;
  padding: 5px 11px;
  border: 0;
  border-radius: 12px;
  background: #eef1f3;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.kanban-picker-button:hover,
.kanban-picker-button[aria-expanded="true"] {
  background: #e2e7ea;
}

.kanban-picker-icon {
  display: grid;
  gap: 3px;
  width: 25px;
}

.kanban-picker-icon i {
  display: block;
  height: 4px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.kanban-picker-icon i:nth-child(1) { width: 25px; }
.kanban-picker-icon i:nth-child(2) { width: 18px; }
.kanban-picker-icon i:nth-child(3) { width: 9px; }

.kanban-count-badge {
  display: inline-grid;
  min-width: 23px;
  height: 23px;
  place-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: #ff4a2e;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}

.kanban-picker-chevron {
  width: 10px;
  height: 10px;
  margin-left: 2px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-3px);
  transition: transform .15s ease;
}

.kanban-picker-button[aria-expanded="true"] .kanban-picker-chevron {
  transform: rotate(225deg) translate(-2px, -1px);
}

.kanban-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  width: min(330px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  padding: 8px 0 10px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 32px rgb(38 50 56 / 20%);
}

.kanban-menu-option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 0;
  background: transparent;
  color: #34383b;
  font-size: 16px;
  font-weight: 600;
  text-align: left;
}

.kanban-menu-option:hover,
.kanban-menu-option.active {
  background: #f5f6f7;
}

.kanban-menu-option .kanban-count-badge {
  min-width: 22px;
  height: 22px;
  font-size: 12px;
}

.kanban-menu-divider {
  height: 1px;
  margin: 10px 18px 8px;
  background: var(--line);
}

.kanban-menu-caption {
  display: block;
  width: 100%;
  padding: 8px 18px 0;
  border: 0;
  background: transparent;
  color: #34383b;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
}

.kanban-menu-caption:hover {
  background: transparent;
  color: var(--blue);
}

.kanban-settings-dialog {
  width: min(920px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  border: 0;
  border-radius: 22px;
  padding: 0;
}

.kanban-settings-card {
  display: grid;
  gap: 22px;
  max-height: calc(100vh - 28px);
  overflow: auto;
  padding: 62px 28px 24px;
  background: #fff;
}

.kanban-settings-card header h2,
.kanban-settings-card header p {
  margin: 0;
}

.kanban-settings-card header p {
  margin-top: 7px;
  color: var(--muted);
}

.kanban-settings-group {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.kanban-settings-group > label,
.kanban-stage-setting label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.kanban-stage-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.kanban-stage-setting {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 9px;
  align-items: end;
  padding: 10px;
  border: 1px solid #e4e9ef;
  border-radius: 10px;
  background: #fff;
}

.kanban-stage-setting input[type="color"] {
  width: 100%;
  height: 42px;
  padding: 3px;
  cursor: pointer;
}

.entity-filters {
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: stretch;
}

.add-booking-button {
  min-width: 128px;
  padding-inline: 22px;
  white-space: nowrap;
}

.mobile-stage-tabs {
  display: none;
}

.board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(286px, 318px);
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 18px;
}

.column {
  min-width: 0;
}

.column header {
  position: sticky;
  top: 0;
  z-index: 2;
  margin-bottom: 12px;
  padding: 17px 18px;
  color: #fff;
  background: var(--accent);
  border-radius: 16px 24px 24px 16px;
}

.column header div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.column header strong {
  min-width: 0;
  font-size: 19px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.column header span {
  opacity: 0.82;
  font-size: 18px;
}

.column header b {
  display: block;
  margin-top: 14px;
  font-size: 28px;
  font-weight: 400;
}

.cards {
  display: grid;
  gap: 14px;
}

.booking-card {
  border-left: 4px solid rgba(47, 125, 240, 0.72);
  border-radius: 12px;
  padding: 18px;
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(25, 43, 66, 0.08);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.booking-card[hidden] {
  display: none;
}

.booking-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(25, 43, 66, 0.12);
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.card-head strong {
  font-size: 18px;
}

.card-head span {
  flex: 0 0 auto;
  color: var(--muted);
}

.money-line {
  margin-bottom: 8px;
  color: #4c5868;
  font-size: 21px;
}

.money-line span {
  color: var(--muted);
  font-size: 15px;
}

.guest {
  display: inline-block;
  margin-bottom: 12px;
  color: #1f67bd;
  font-size: 19px;
  text-decoration: none;
}

.booking-state {
  width: fit-content;
  margin: 0 0 12px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #fff4f8;
  color: #b84f7d;
  font-size: 13px;
  font-weight: 800;
}

.booking-state.is-confirmed {
  background: #e8f7ef;
  color: #16734f;
}

.booking-state.is-contract {
  background: #eef5ff;
  color: #1f67bd;
}

.booking-state.is-ready {
  background: #fff7df;
  color: #9a6400;
}

dl {
  margin: 0 0 14px;
}

dt {
  color: var(--muted);
  margin-top: 9px;
}

dd {
  margin: 2px 0 0;
  color: #4c5868;
  font-weight: 650;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips label {
  width: calc(50% - 4px);
  gap: 4px;
}

.chips label span {
  font-size: 12px;
}

.chips input[type="number"] {
  min-height: 34px;
  padding: 7px 9px;
}

.chips .check {
  width: auto;
  display: flex;
  align-items: center;
  grid-auto-flow: column;
  gap: 6px;
  border: 1px solid #f3c8da;
  border-radius: 7px;
  padding: 7px 10px;
  color: #b84f7d;
  background: #fff4f8;
}

.chips .check input {
  width: auto;
  min-height: auto;
}

.chips button {
  min-height: 34px;
  padding: 7px 12px;
  background: #eef5ff;
  color: #1f67bd;
  font-weight: 700;
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(320px, 1fr);
  gap: 18px;
  align-items: start;
}

.instructions-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.instruction-panel {
  align-content: start;
}

.instruction-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.instruction-panel-head h2 {
  margin-bottom: 6px;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.process-filters {
  grid-template-columns: minmax(0, 1fr);
}

.process-card {
  align-content: start;
  min-width: 0;
}

.process-card .detail-list {
  grid-template-columns: 145px minmax(0, 1fr);
  gap: 8px 14px;
}

.process-card .detail-list dt,
.process-card .detail-list dd {
  align-self: center;
}

.process-card .status-badge {
  min-height: 28px;
  max-width: 100%;
  padding: 5px 9px;
  font-size: 13px;
  line-height: 1.1;
  white-space: normal;
  text-align: center;
}

.process-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: flex-start;
}

.process-card-head > div {
  min-width: 0;
}

.process-card-head h2 {
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}

.process-card-head .hint {
  overflow-wrap: anywhere;
}

.process-status {
  min-height: 32px;
  max-width: 142px;
  padding: 6px 10px;
  font-size: 13px;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
}

.process-waiting {
  padding: 12px 14px;
  border-radius: 12px;
  background: #f6f9fc;
  font-weight: 750;
}

.contract-sign-page {
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 34px 16px;
  background:
    linear-gradient(135deg, rgba(230, 244, 255, 0.4) 25%, transparent 25%) 0 0 / 34px 34px,
    #f7fafc;
  color: var(--text);
}

.contract-sign-card {
  width: min(100%, 860px);
  padding: 28px;
  border: 6px solid #12d995;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.15);
}

.contract-sign-card.success {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.contract-sign-header {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: center;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.contract-sign-header h1,
.contract-sign-card.success h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 48px);
  font-weight: 650;
  letter-spacing: 0;
}

.contract-sign-header p,
.contract-sign-subtitle {
  margin: 8px 0 0;
  color: #444;
  font-size: 20px;
}

.contract-sign-form {
  display: grid;
  gap: 22px;
  margin-top: 22px;
}

.contract-code-request {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid #b9e9d9;
  border-radius: 10px;
  background: #f0fcf8;
}

.contract-code-copy {
  display: grid;
  gap: 4px;
}

.contract-code-copy strong {
  font-size: 18px;
}

.contract-code-copy span {
  color: var(--muted);
}

.contract-code-request button {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: #1473e6;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.contract-code-request button:hover {
  background: #0d63ca;
}

.contract-code-input input {
  max-width: 220px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 4px;
  text-align: center;
}

.contract-sign-form b {
  color: #ef4444;
}

.file-field {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.file-field input {
  padding: 14px;
  background: #fff;
}

.contract-check {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  color: #777;
  font-size: 16px;
  line-height: 1.25;
}

.contract-check input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.contract-submit {
  min-height: 58px;
  border: 0;
  border-radius: 8px;
  background: #10d99a;
  color: #062115;
  font-size: 24px;
  font-weight: 650;
  cursor: pointer;
}

.contract-submit:hover {
  filter: brightness(0.96);
}

.contract-link-button {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #1f67bd;
  font: inherit;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.contract-modal-open {
  overflow: hidden;
}

.contract-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  padding: 18px;
  background: rgba(15, 23, 42, 0.52);
}

.contract-modal.is-open {
  display: grid;
}

.contract-modal-panel {
  position: relative;
  width: min(100%, 980px);
  max-height: calc(100vh - 36px);
  margin: auto;
  overflow: auto;
  padding: 34px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.contract-modal-panel h2 {
  margin: 0 54px 18px 0;
  font-size: clamp(28px, 4vw, 42px);
}

.contract-modal-panel pre {
  margin: 0;
  white-space: pre-wrap;
  color: #333;
  font: inherit;
  line-height: 1.45;
}

.contract-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #eef3f7;
  color: #111827;
  font-size: 34px;
  line-height: 1;
  cursor: pointer;
}

.contract-modal-close:hover {
  background: #dde7ef;
}

.variable-help {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(0, 1fr);
  gap: 10px 16px;
  margin: 0;
}

.variable-help dt,
.variable-help dd {
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf2f6;
}

.variable-help dt {
  color: #1f67bd;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.variable-help dd {
  color: #536173;
  font-weight: 650;
}

.panel {
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel h2 {
  margin: 0;
  font-size: 21px;
}

.referral-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.referral-stats article,
.referral-card,
.referral-how {
  border: 1px solid #dfe7f3;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(8, 102, 232, .06);
}

.referral-stats article { display: grid; gap: 7px; padding: 20px 22px; }
.referral-stats span { color: var(--muted); font-size: 14px; font-weight: 700; }
.referral-stats strong { color: var(--ink); font-size: 32px; line-height: 1; }
.referral-stats small { color: var(--muted); }
.referral-card { display: grid; gap: 18px; padding: 26px; }
.referral-card h2, .referral-how h2 { margin: 0; font-size: 21px; }
.referral-card p { margin: 6px 0 0; color: var(--muted); }
.referral-link-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.referral-link-row code { min-width: 0; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.referral-code { color: var(--muted); font-size: 14px; }
.referral-code strong { color: var(--ink); letter-spacing: .06em; }
.referral-how { margin-top: 18px; padding: 26px; }
.referral-how ol { display: grid; gap: 10px; margin: 16px 0 0; padding-left: 22px; color: var(--muted); }

.billing-panel {
  overflow: hidden;
  border: 1px solid #dfe7f3;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(8, 102, 232, 0.08);
}

.billing-panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 30px 22px;
}

.billing-panel-head .page-kicker { color: #0866e8; }
.billing-panel-head h2 { margin: 4px 0 0; font-size: 22px; }
.billing-panel-head p { margin: 0; color: var(--muted); font-size: 14px; }
.billing-table-wrap { position: relative; overflow-x: auto; }
.billing-table-wrap::after { position: absolute; z-index: 5; top: 0; bottom: 0; box-sizing: border-box; width: 23%; border: 3px solid #0866e8; pointer-events: none; content: ''; }
.billing-current-plan-start::after { left: 31%; }
.billing-current-plan-pro::after { left: 54%; }
.billing-current-plan-business::after { right: 0; left: auto; border-radius: 0 0 18px 0; }
.billing-table { width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
.billing-table th, .billing-table td { border-top: 1px solid #e9eef5; text-align: center; }
.billing-table thead th { position: relative; padding: 22px 16px 18px; vertical-align: top; border-top: 1px solid #e0e8f4; background: #f9fbfe; }
.billing-table thead th:first-child { width: 31%; padding-left: 30px; color: #69778a; font-size: 13px; text-align: left; vertical-align: middle; }
.billing-table thead strong, .billing-table thead small, .billing-price { display: block; }
.billing-table thead strong { color: #17233a; font-size: 16px; letter-spacing: .02em; }
.billing-price { margin-top: 10px; color: #0866e8; font-size: 17px; font-weight: 800; }
.billing-table thead small { margin-top: 5px; color: #8390a0; font-size: 11px; font-weight: 600; }
.billing-current-label { position: absolute; z-index: 6; top: 0; right: 0; left: 0; padding: 6px 8px; border-radius: 0 0 10px 10px; background: #0866e8; color: #fff; font-size: 11px; font-weight: 800; }
.billing-table thead .is-current { padding-top: 38px; background: #f2f7ff; box-shadow: none; }
.billing-table tbody th, .billing-table tfoot th { padding: 17px 30px; color: #4c5b70; font-size: 14px; font-weight: 650; text-align: left; white-space: nowrap; }
.billing-table tbody th small { margin-left: 7px; color: #8b97a8; font-size: 11px; font-weight: 600; }
.billing-table td { padding: 12px 16px; color: #b0bac7; }
.billing-table td.is-current { background: #f6f9ff; box-shadow: none; }
.billing-included { display: inline-grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: #b0bac7; font-size: 19px; font-weight: 800; }
.billing-included.is-included { background: #e7f0ff; color: #0866e8; }
.billing-addon-form { display: inline-flex; margin: 0; }
.billing-addon-toggle { display: inline-grid; width: 18px; min-height: 18px; padding: 0; place-items: center; border: 2px solid #a8b8ca; border-radius: 50%; background: #fff; color: #fff; font-size: 11px; font-weight: 850; }
.billing-addon-toggle:hover { border-color: #0866e8; }
.billing-addon-toggle.is-selected { border-color: #0866e8; background: #0866e8; }
.billing-addon-toggle.is-passive { opacity: .7; }
.billing-addon-price { color: #8090a3; font-size: 12px; font-weight: 750; }
.billing-unavailable { color: #b0bac7; font-size: 19px; font-weight: 700; }
.billing-table tfoot th, .billing-table tfoot td { border-bottom: 1px solid #e0e8f4; background: #fbfcff; }
.billing-table tfoot td { padding: 16px; }
.billing-table tfoot td.is-current { background: #f2f7ff; box-shadow: none; }
.billing-select { width: 100%; min-height: 40px; border-radius: 10px; background: #0866e8; color: #fff; font-size: 13px; font-weight: 800; }
.billing-select.is-selected { border: 1px solid #b8d3fb; background: #fff; color: #0866e8; cursor: default; }

.billing-bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 22px; }
.billing-addon-card, .billing-payment-card { min-height: 300px; padding: 30px; border: 1px solid #dfe7f3; border-radius: 22px; background: #fff; box-shadow: 0 12px 32px rgba(25, 48, 82, .05); }
.billing-addon-card h2, .billing-payment-card h2 { margin: 0; color: #17233a; font-size: 20px; }
.billing-addon-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 36px; }
.billing-addon-row strong { display: block; color: #202b3c; font-size: 18px; }
.billing-addon-row strong span { margin-left: 10px; color: #778398; font-weight: 500; }
.billing-addon-row small { display: block; margin-top: 24px; color: #7d899a; font-size: 14px; }
.billing-counter { display: flex; align-items: center; gap: 18px; }
.billing-counter b { min-width: 18px; color: #17233a; font-size: 17px; text-align: center; }
.billing-counter button { display: grid; width: 48px; min-height: 48px; place-items: center; padding: 0; border: 1px solid #e1e8f1; border-radius: 16px; background: #fff; color: #8793a4; font-size: 27px; line-height: 1; opacity: 1; }
.billing-counter button:disabled { cursor: default; }
.billing-usage { height: 9px; margin-top: 16px; overflow: hidden; border-radius: 99px; background: #e7eef8; }
.billing-usage i { display: block; width: 100%; height: 100%; border-radius: inherit; background: #0866e8; }
.billing-payment-card { border-color: #a9cef9; background: #f7fbff; }
.billing-payment-card .page-kicker { color: #0866e8; }
.billing-payment-card h2 { margin-top: 10px; font-size: 28px; }
.billing-periods { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 20px; overflow: hidden; border: 1px solid #dce6f3; border-radius: 16px; background: #fff; }
.billing-periods button { min-height: 76px; padding: 9px; border: 0; border-right: 1px solid #dce6f3; border-radius: 0; background: transparent; color: #667386; font-size: 15px; font-weight: 750; opacity: 1; cursor: default; }
.billing-periods button:last-child { border-right: 0; }
.billing-periods button small { display: block; margin-top: 4px; color: #0866e8; font-size: 12px; font-weight: 800; }
.billing-periods button.is-active { background: #0866e8; color: #fff; }
.billing-payment-price { margin: 22px 0 0; color: #142039; font-size: 36px; font-weight: 850; letter-spacing: .02em; }
.billing-payment-price span { color: #778398; font-size: 17px; font-weight: 600; }
.billing-promo { margin: 22px 0 0; color: #0866e8; font-size: 15px; font-weight: 700; }
.billing-addon-summary { margin: 8px 0 0; color: #718095; font-size: 12px; font-weight: 650; }
.billing-payment-actions { display: grid; gap: 10px; margin-top: 38px; }
.billing-payment-actions button { min-height: 55px; border: 2px solid #0866e8; border-radius: 12px; background: #0866e8; color: #fff; font-size: 17px; font-weight: 800; opacity: 1; cursor: default; }
.billing-payment-actions button:last-child { background: transparent; color: #0866e8; }

@media (max-width: 700px) {
  .billing-panel { border-radius: 16px; }
  .billing-panel-head { display: grid; padding: 20px; }
  .billing-panel-head h2 { font-size: 19px; }
  .billing-table thead th:first-child, .billing-table tbody th, .billing-table tfoot th { padding-left: 18px; }
  .billing-bottom-grid { grid-template-columns: 1fr; gap: 16px; margin-top: 16px; }
  .billing-addon-card, .billing-payment-card { min-height: 0; padding: 22px; border-radius: 16px; }
  .billing-addon-row { margin-top: 26px; }
  .billing-addon-row strong { font-size: 16px; }
  .billing-counter { gap: 10px; }
  .billing-counter button { width: 40px; min-height: 40px; border-radius: 13px; }
  .billing-payment-card h2 { font-size: 24px; }
  .billing-periods button { min-height: 64px; font-size: 12px; }
  .billing-payment-price { font-size: 30px; }
}

.wide {
  grid-column: 1 / -1;
}

.list-panel {
  overflow-x: auto;
}

.logs-load-more {
  display: block;
  min-width: 190px;
  min-height: 46px;
  margin: 22px auto 4px;
  padding: 0 22px;
  border: 1px solid #b9c8da;
  border-radius: 8px;
  background: #f3f7fb;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.logs-load-more:hover {
  border-color: var(--blue);
  background: #eaf2ff;
  color: var(--blue);
}

.logs-load-more:disabled {
  cursor: wait;
  opacity: 0.65;
}

.logs-load-more[hidden] {
  display: none;
}

.logs-empty {
  margin: 18px 0 4px;
  color: var(--muted);
  text-align: center;
}

.employees-settings {
  display: grid;
  gap: 18px;
}

.employees-settings-head h2,
.employee-list-section h3 {
  margin: 0 0 6px;
}

.employee-invite-form,
.employee-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.employee-permissions {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.employee-permissions summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 0 14px;
  cursor: pointer;
  list-style: none;
  color: var(--ink);
  font-weight: 800;
}

.employee-permissions summary::-webkit-details-marker {
  display: none;
}

.employee-permissions summary small {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.employee-permissions-chevron {
  color: var(--muted);
  transition: transform 0.18s ease;
}

.employee-permissions[open] .employee-permissions-chevron {
  transform: rotate(180deg);
}

.employee-permission-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: #f8fbff;
}

.employee-permission-grid .settings-check {
  min-width: 0;
  margin: 0;
}

.employee-list-section {
  display: grid;
  gap: 12px;
}

.employee-list {
  display: grid;
  gap: 14px;
}

.employee-row,
.employee-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
}

.employee-row {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.employee-row > div,
.employee-card-head > div {
  display: grid;
  gap: 4px;
}

.employee-row span,
.employee-row small,
.employee-card-head span {
  color: var(--muted);
}

.employee-invite-link {
  width: fit-content;
  margin-top: 4px;
  color: #2563eb;
  font-weight: 800;
  text-decoration: none;
}

.employee-invite-link:hover {
  text-decoration: underline;
}

.employee-card-head label {
  min-width: 190px;
}

.employee-invite-panel {
  width: min(100%, 560px);
}

.access-denied {
  max-width: 680px;
  margin: 70px auto;
  text-align: center;
}

.reports-layout {
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(520px, 1.1fr);
  gap: 22px;
  align-items: start;
}

.report-settings-panel {
  margin-bottom: 22px;
}

.report-settings-summary,
.report-bank-fields > summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
  list-style: none;
}

.report-settings-summary::-webkit-details-marker,
.report-bank-fields > summary::-webkit-details-marker {
  display: none;
}

.report-settings-summary > span:first-child,
.report-bank-fields > summary > span:first-child {
  display: grid;
  gap: 5px;
}

.report-settings-summary strong {
  font-size: 22px;
}

.report-settings-summary small,
.report-bank-fields summary small {
  color: var(--muted);
  font-weight: 500;
}

.report-settings-chevron {
  width: 12px;
  height: 12px;
  margin: 5px 4px 0 0;
  border-right: 2px solid #708096;
  border-bottom: 2px solid #708096;
  transform: rotate(45deg);
  transition: transform 180ms ease;
}

.report-settings-panel[open] > .report-settings-summary .report-settings-chevron,
.report-bank-fields[open] > summary .report-settings-chevron {
  transform: rotate(225deg);
}

.report-settings-panel[open] > .report-settings-form {
  margin-top: 22px;
}

.report-settings-form,
.report-bank-fields {
  display: grid;
  gap: 16px;
}

.report-bank-fields {
  padding: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
  border-radius: 8px;
}

.report-bank-fields[open] > .grid-2 {
  margin-top: 16px;
}

.report-settings-save {
  width: fit-content;
  min-width: 240px;
}

.report-create-form,
.reports-library {
  display: grid;
  gap: 18px;
}

.report-create-form h2,
.reports-library h2 {
  margin: 0;
}

.report-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.report-upload-grid label {
  padding: 16px;
  border: 1px dashed #b8c7da;
  border-radius: 8px;
  background: #f8fbff;
}

.report-upload-grid small {
  color: var(--muted);
  line-height: 1.35;
}

.report-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.report-checks .settings-check {
  margin: 0;
}

.report-create-form .wide-field {
  grid-column: 1 / -1;
}

.report-vat-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.report-vat-picker legend {
  width: 100%;
  margin-bottom: 3px;
  color: var(--muted);
  font-weight: 700;
}

.report-vat-picker label {
  cursor: pointer;
}

.report-vat-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.report-vat-picker span {
  display: block;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f4f6f9;
  color: #293548;
  font-weight: 750;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.report-vat-picker input:checked + span {
  border-color: #327ce4;
  background: #eaf2ff;
  color: #1d63c4;
}

.report-vat-picker input:focus-visible + span {
  outline: 3px solid rgba(50, 124, 228, .2);
  outline-offset: 2px;
}

.report-object-map {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.report-object-map summary {
  cursor: pointer;
  font-weight: 800;
}

.report-object-map > div {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  color: var(--muted);
}

.report-list {
  display: grid;
  gap: 14px;
}

.report-library-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.report-library-filters label {
  margin: 0;
}

.report-library-filters button {
  min-height: 42px;
}

.report-library-income {
  margin: -6px 0 0;
  color: var(--muted);
}

.report-library-income strong {
  color: var(--text);
}

.report-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.report-card-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.report-card-summary::-webkit-details-marker {
  display: none;
}

.report-card-summary > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.report-card-summary strong {
  font-size: 18px;
}

.report-card-summary > div span,
.report-card small {
  color: var(--muted);
}

.report-card-summary-side {
  display: flex;
  align-items: center;
  gap: 12px;
}

.report-card[open] .report-card-summary-side .report-settings-chevron {
  transform: rotate(225deg);
}

.report-card-body {
  display: grid;
  gap: 14px;
  padding-top: 16px;
}

.report-kind {
  padding: 6px 9px;
  border-radius: 999px;
  background: #edf4ff;
  color: #2366bd !important;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.report-card-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 0;
}

.report-card-metrics div {
  padding: 10px;
  border-radius: 7px;
  background: #f4f7fb;
}

.report-card-metrics dt {
  color: var(--muted);
  font-size: 12px;
}

.report-card-metrics dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.report-actions form {
  margin: 0;
}

@media (max-width: 1180px) {
  .reports-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .employee-permission-grid {
    grid-template-columns: 1fr;
  }

  .employee-row,
  .employee-card-head {
    grid-template-columns: 1fr;
  }

  .employee-card-head label {
    min-width: 0;
  }

  .employee-invite-form,
  .employee-card {
    padding: 16px;
  }

  .reports-layout,
  .report-upload-grid,
  .report-library-filters {
    grid-template-columns: 1fr;
  }

  .report-library-filters button {
    width: 100%;
  }

  .report-settings-save {
    width: 100%;
  }

  .report-card-summary {
    align-items: flex-start;
  }

  .report-card-summary-side {
    gap: 8px;
  }

  .report-card-summary-side .report-kind {
    display: none;
  }

  .report-card-metrics {
    grid-template-columns: 1fr;
  }
}

.apt-row {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 130px auto auto;
  gap: 10px;
  min-width: 760px;
}

.objects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.object-card {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 20px;
  border: 1px solid rgba(50, 124, 228, 0.14);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.object-card.is-filtered-out,
.process-card.is-filtered-out {
  display: none !important;
}

.object-card:hover {
  transform: translateY(-2px);
  border-color: rgba(50, 124, 228, 0.32);
}

.object-card span {
  font-size: 20px;
  font-weight: 900;
}

.object-card strong {
  color: #536173;
  font-size: 15px;
}

.object-card small {
  color: var(--muted);
}

.object-card em {
  width: fit-content;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #e8f7ef;
  color: #16734f;
  font-style: normal;
  font-weight: 800;
}

.object-card.is-archived {
  opacity: 0.62;
}

.object-card.is-archived em {
  background: #eef1f5;
  color: #6d7786;
}

.copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

code {
  display: block;
  overflow-x: auto;
  padding: 12px;
  border-radius: 8px;
  background: #f3f7fa;
  color: #455468;
}

.notice {
  margin-bottom: 16px;
  padding: 13px 15px;
  border-radius: 10px;
  background: #e8f7ef;
  color: #16734f;
}

.notice.danger {
  background: #fff0f0;
  color: var(--danger);
}

.hint {
  margin: 0;
  color: var(--muted);
}

.settings-check {
  width: fit-content;
  display: flex;
  align-items: center;
  grid-auto-flow: column;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  background: #eef5ff;
  color: #1f67bd;
  font-weight: 800;
}

.settings-check .field-var {
  margin-left: 2px;
}

.settings-check input {
  width: auto;
  min-height: auto;
}

.wazzup-workspace {
  min-height: calc(100vh - 210px);
  padding: 0;
  overflow: hidden;
}

.wazzup-workspace iframe {
  display: block;
  width: 100%;
  min-height: calc(100vh - 210px);
  border: 0;
  background: #fff;
}

.wazzup-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.status-good,
.status-bad {
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 800;
}

.status-good {
  background: #e8f7ef;
  color: #16734f;
}

.status-bad {
  background: #fff0f0;
  color: var(--danger);
}

.empty-state {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.empty-state h2,
.empty-state p {
  margin: 0;
}

.locks-page {
  display: grid;
  gap: 18px;
}

.ttlock-settings-panel {
  padding: 0;
  overflow: hidden;
}

.ttlock-settings-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  cursor: pointer;
  list-style: none;
}

.ttlock-settings-panel summary::-webkit-details-marker {
  display: none;
}

.ttlock-settings-panel summary::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.ttlock-settings-panel[open] summary::after {
  transform: rotate(225deg);
}

.ttlock-settings-panel summary strong {
  display: block;
  font-size: 20px;
}

.ttlock-settings-panel summary small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 600;
}

.ttlock-settings-form {
  display: grid;
  gap: 16px;
  padding: 0 24px 24px;
}

.locks-note {
  padding: 14px 16px;
  border: 1px solid #dfe6ee;
  border-radius: 12px;
  background: #f5f7fb;
  color: var(--muted);
  line-height: 1.45;
}

.locks-alert {
  padding: 16px 18px;
  border-left: 4px solid #e5484d;
  border-radius: 12px;
  background: #fff1f1;
  color: #713033;
}

.locks-alert strong {
  color: #202938;
}

.locks-alert ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.locks-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 360px));
  gap: 14px;
}

.lock-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #e1e7ed;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(20, 35, 55, 0.06);
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.lock-card:hover {
  transform: translateY(-1px);
  border-color: #cad5e0;
  box-shadow: 0 16px 34px rgba(20, 35, 55, 0.1);
}

.lock-card-head,
.lock-card footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.lock-card h2 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.lock-card small {
  color: var(--muted);
  font-size: 13px;
}

.lock-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: #f2f5fa;
  color: #7c8795;
  flex: 0 0 auto;
}

.lock-card-icon svg {
  width: 18px;
  height: 18px;
}

.lock-card dl {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  align-items: baseline;
  gap: 6px 8px;
  margin: 0;
  padding-top: 10px;
  border-top: 1px solid #edf1f4;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.25;
}

.lock-card dt {
  margin: 0;
  white-space: nowrap;
}

.lock-card dd {
  margin: 0;
  color: #344154;
  min-width: 0;
  line-height: 1.25;
}

.lock-ok {
  color: #13895f;
  font-weight: 800;
}

.lock-online {
  color: #13895f;
  font-weight: 800;
}

.lock-offline {
  color: #d64545;
  font-weight: 800;
}

.lock-muted {
  color: #9aa3af;
  font-weight: 800;
}

.lock-battery-ok {
  color: #13895f;
  font-weight: 800;
}

.lock-battery-warning {
  color: #b7791f;
  font-weight: 800;
}

.lock-battery-danger {
  color: #d64545;
  font-weight: 800;
}

.lock-card footer {
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid #edf1f4;
  font-size: 14px;
}

.lock-card footer span {
  color: #344154;
  text-decoration: none;
  font-weight: 800;
}

.lock-card footer span::after {
  content: "›";
  margin-left: 8px;
}

.lock-empty {
  grid-column: 1 / -1;
}

.lock-detail-table {
  width: 100%;
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid #e3e9ef;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.lock-detail-table th,
.lock-detail-table td {
  padding: 0;
  text-align: left;
  vertical-align: top;
  font-size: 17px;
  line-height: 1.25;
}

.lock-detail-table th {
  width: 150px;
  padding-right: 18px;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

.lock-detail-table td {
  color: #344154;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.lock-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e3e9ef;
}

.lock-sync-status,
.lock-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.lock-sync-status {
  align-items: flex-start;
  flex-direction: column;
}

.lock-sync-status > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lock-api-error {
  color: #d64545;
  font-size: 14px;
  line-height: 1.25;
}

.lock-sync-status i,
.lock-loading i {
  width: 14px;
  height: 14px;
  border: 2px solid #d5dde7;
  border-top-color: #2f7df0;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.lock-loading {
  width: 100%;
  min-height: 96px;
  justify-content: center;
  border: 1px dashed #dce4ec;
  border-radius: 12px;
  background: #f8fafc;
}

.lock-detail-remote {
  margin-top: 16px;
}

.lock-detail-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.lock-detail-sections section {
  padding: 14px;
  border: 1px solid #e4eaf0;
  border-radius: 12px;
  background: #f8fafc;
}

.lock-detail-sections h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

.lock-mini-list {
  display: grid;
  gap: 8px;
}

.lock-mini-list p {
  margin: 0;
  color: #596678;
  overflow-wrap: anywhere;
}

.lock-code-row {
  display: grid;
  gap: 3px;
  padding: 8px 0;
  border-bottom: 1px solid #e7edf3;
}

.lock-code-row:last-child {
  border-bottom: 0;
}

.lock-code-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.lock-code-main strong,
.lock-code-main code {
  min-width: 0;
  overflow-wrap: anywhere;
}

.lock-code-main code {
  padding: 2px 7px;
  border-radius: 8px;
  background: #eef3f8;
  color: #243044;
  font-family: inherit;
  font-size: 0.9em;
  font-weight: 800;
}

.lock-code-period {
  color: #788496;
  font-size: 13px;
  line-height: 1.25;
}

.lock-record-status {
  color: #687384;
  font-size: 13px;
  line-height: 1.25;
}

.lock-record-status.is-danger {
  color: #d33b3b;
  font-weight: 700;
}

.lock-dialog {
  width: min(780px, calc(100vw - 48px));
  max-width: 780px;
  max-height: min(760px, calc(100dvh - 48px));
  overflow: auto;
  padding: 56px 28px 28px;
  border-radius: 22px;
}

.lock-dialog .dialog-close {
  top: 18px;
  left: 18px;
  right: auto;
}

.lock-dialog .dialog-card {
  padding: 0;
  box-shadow: none;
}

.lock-dialog .object-dialog-head {
  padding-right: 0;
}

.lock-dialog .object-dialog-head h2 {
  font-size: 34px;
}

.lock-refresh-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid #dce4ec;
  border-radius: 14px;
  background: #f3f6f9;
  color: #344154;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.16s ease, transform 0.16s ease;
}

.lock-refresh-button:hover {
  background: #e9eef5;
  transform: rotate(18deg);
}

.cleaning-shell {
  display: grid;
  gap: 16px;
}

.cleaning-toolbar {
  position: sticky;
  top: 76px;
  z-index: 15;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  background: rgba(247, 249, 252, .94);
  backdrop-filter: blur(14px);
}

.cleaning-search,
.cleaning-month,
.cleaning-range input {
  border: 1px solid #dbe3ed;
  border-radius: 12px;
  background: #fff;
  color: #202a38;
  font: inherit;
  font-size: 15px;
  min-height: 44px;
  padding: 0 14px;
}

.cleaning-search {
  flex: 1 1 260px;
  min-width: 220px;
}

.cleaning-month {
  width: 165px;
}

.cleaning-range {
  display: flex;
  gap: 8px;
}

.cleaning-range input {
  width: 148px;
}

.cleaning-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.cleaning-actions button {
  border: 0;
  border-radius: 12px;
  background: #edf1f6;
  color: #202a38;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  min-height: 44px;
  padding: 0 15px;
  transition: background .18s ease, color .18s ease, transform .18s ease;
}

.cleaning-actions button:hover {
  background: #e1e7ef;
  transform: translateY(-1px);
}

.cleaning-actions button.active {
  background: #111827;
  color: #fff;
}

.cleaning-grid-wrap {
  max-height: calc(100dvh - 230px);
  overflow: auto;
  border: 1px solid #dfe6ee;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .08);
}

.cleaning-grid {
  --cleaning-day-width: 112px;
  min-width: max-content;
}

.cleaning-header,
.cleaning-row {
  display: grid;
  grid-template-columns: 280px max-content;
}

.cleaning-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid #edf1f5;
}

.cleaning-corner,
.cleaning-object {
  position: sticky;
  left: 0;
  z-index: 9;
  background: #fff;
  border-right: 1px solid #edf1f5;
}

.cleaning-corner {
  z-index: 25;
}

.cleaning-corner {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  color: #6b7686;
  font-weight: 800;
}

.cleaning-days,
.cleaning-cells {
  display: grid;
}

.cleaning-days > div {
  display: grid;
  align-content: center;
  min-height: 64px;
  padding: 10px 12px;
  border-left: 1px solid #edf1f5;
  background: #fff;
  color: #202a38;
}

.cleaning-days b {
  font-size: 14px;
}

.cleaning-days span {
  color: #7b8796;
  font-size: 13px;
  font-weight: 700;
}

.cleaning-days .weekend b,
.cleaning-days .weekend span {
  color: #f04455;
}

.cleaning-days .today {
  background: #111827;
  border-radius: 9px;
  color: #fff;
  margin: 8px;
  min-height: 48px;
  padding: 8px 10px;
}

.cleaning-days .today b,
.cleaning-days .today span {
  color: #fff;
}

.cleaning-row {
  min-height: 96px;
  border-bottom: 1px solid #edf1f5;
}

.cleaning-object {
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 16px 18px;
}

.cleaning-object strong {
  overflow: hidden;
  color: #202a38;
  font-size: 16px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cleaning-object span {
  overflow: hidden;
  color: #7b8796;
  font-size: 13px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cleaning-cells {
  position: relative;
  width: calc(var(--cleaning-days) * var(--cleaning-day-width));
  min-height: 96px;
  grid-template-rows: 96px;
  overflow: hidden;
}

.cleaning-cells > span {
  grid-row: 1;
  min-height: 96px;
  border-left: 1px solid #edf1f5;
}

.cleaning-cells > span.weekend {
  background: #fbfcfe;
}

.cleaning-cells > span.today {
  background: #f1f5fb;
}

.cleaning-booking {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: calc((var(--start) - 1 + var(--start-shift, 0)) * var(--cleaning-day-width) + 6px);
  width: calc((var(--span) - var(--start-shift, 0) - var(--end-shrink, 0)) * var(--cleaning-day-width) - 12px);
  transform: translateY(-50%);
  min-width: 0;
  max-width: calc(100% - 12px);
  min-height: 54px;
  margin: 0 6px;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: #cdefff;
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, .14);
  color: #182231;
  cursor: pointer;
  padding: 8px 12px;
  text-align: left;
}

.cleaning-booking strong,
.cleaning-booking span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cleaning-booking strong {
  font-size: 14px;
  line-height: 1.25;
}

.cleaning-booking span {
  color: #526071;
  font-size: 13px;
  margin-top: 2px;
}

.cleaning-loader,
.cleaning-empty {
  padding: 28px;
  color: #7b8796;
  font-weight: 700;
}

.cleaning-row[hidden] {
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

.pagination a {
  display: inline-flex;
  min-width: 38px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: #536173;
  font-weight: 800;
  text-decoration: none;
}

.pagination a.active,
.pagination a:hover {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  color: var(--muted);
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

.danger-button {
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff1f2;
  color: #be123c;
  font-weight: 800;
}

.danger-button:hover {
  background: #ffe4e6;
}

dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  max-width: calc(100vw - 28px);
  max-height: calc(100vh - 28px);
  overflow: hidden;
  border: 0;
  border-radius: 16px;
  margin: 0;
  padding: 0;
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%);
}

dialog::backdrop {
  background: rgba(7, 26, 45, 0.42);
}

.dialog-card {
  width: min(520px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 24px;
  background: #fff;
}

.dialog-card h2 {
  margin: 0;
}

.booking-detail-dialog {
  width: min(620px, calc(100vw - 28px));
}

.object-dialog {
  width: min(1180px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  border-radius: 22px;
}

.booking-detail-card {
  position: relative;
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 18px;
  max-height: calc(100vh - 28px);
  overflow: auto;
  padding: 72px 26px 26px;
  border-radius: inherit;
  background: #fff;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.dialog-close {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 0;
  border: 0;
  color: #111827;
  background: transparent;
  box-shadow: none;
  font-size: 34px;
  font-weight: 500;
  line-height: 0;
  outline: none;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.dialog-close:hover {
  color: #2f7df0;
  background: transparent;
  transform: translateY(-1px);
}

.dialog-close:focus-visible {
  color: #2f7df0;
  background: transparent;
  box-shadow: none;
}

.object-form {
  position: relative;
  display: grid;
  gap: 20px;
  max-height: calc(100vh - 28px);
  overflow: auto;
  padding: 82px 28px 0;
  border-radius: inherit;
  background: #eef3f7;
}

.object-dialog-head {
  padding-right: 54px;
}

.object-dialog-head h2 {
  margin: 0 0 6px;
  font-size: clamp(28px, 4vw, 44px);
}

.object-dialog-head p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.object-dialog.lock-dialog {
  width: min(760px, calc(100vw - 48px));
  max-width: 760px;
  max-height: min(760px, calc(100dvh - 48px));
  overflow: auto;
  padding: 56px 28px 28px;
  border-radius: 22px;
}

.object-dialog.lock-dialog .dialog-close {
  top: 18px;
  left: 18px;
  right: auto;
}

.object-dialog.lock-dialog .dialog-card {
  width: 100%;
  max-height: none;
  overflow: visible;
  gap: 12px;
  padding: 0;
  box-shadow: none;
}

.object-dialog.lock-dialog .object-dialog-head {
  padding-right: 0;
}

.object-dialog.lock-dialog .object-dialog-head h2 {
  font-size: 32px;
}

.object-sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.object-section {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 18px 42px rgba(19, 39, 64, 0.08);
}

.object-section h3 {
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: #536173;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wide-object-section {
  grid-column: 1 / -1;
}

.object-form menu {
  position: sticky;
  bottom: 0;
  display: none;
  grid-template-columns: auto auto;
  justify-content: center;
  justify-items: center;
  align-items: center;
  grid-auto-flow: column;
  gap: 10px;
  width: calc(100% + 56px);
  margin: 16px -28px 0;
  padding: 12px 28px;
  border-top: 1px solid rgba(183, 197, 209, 0.72);
  border-radius: 0 0 22px 22px;
  background: rgba(248, 251, 253, 0.98);
  box-shadow: 0 -18px 38px rgba(19, 39, 64, 0.12);
  z-index: 3;
}

.object-form.is-editing menu,
.object-form.is-dirty menu {
  display: grid;
}

.object-form menu button {
  min-width: 126px;
  min-height: 40px;
  border-radius: 10px;
  box-shadow: none;
  font-weight: 800;
}

.detail-heading {
  display: grid;
  gap: 6px;
  padding-right: 44px;
}

.detail-heading span {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef5ff;
  color: #1f67bd;
  font-size: 13px;
  font-weight: 800;
}

.detail-heading h2 {
  margin: 0;
  font-size: 30px;
}

.detail-heading p {
  margin: 0;
  color: #657386;
  font-size: 17px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.detail-actions a,
.muted-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #e8f7ef;
  color: #16734f;
  font-weight: 800;
  text-decoration: none;
}

.muted-link {
  background: #f2f5f7;
  color: #718094;
}

.booking-detail-tabs {
  display: flex;
  align-self: start;
  gap: 6px;
  min-height: 46px;
  max-height: 46px;
  padding: 4px;
  border-radius: 10px;
  background: #eef3f7;
}

.booking-detail-tabs button {
  flex: 1;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  padding: 8px 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #687689;
  box-shadow: none;
  font-weight: 800;
}

.booking-detail-tabs button.active {
  background: #fff;
  color: #256fda;
  box-shadow: 0 4px 12px rgba(29, 65, 104, 0.1);
}

.booking-log-list {
  display: grid;
  gap: 10px;
}

.booking-log-item {
  display: grid;
  gap: 7px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f9fbfd;
}

.booking-log-item > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.booking-log-item time {
  color: #7b8797;
  font-size: 12px;
  font-weight: 700;
}

.booking-log-item code {
  padding: 3px 6px;
  border-radius: 5px;
  background: #e9f1fb;
  color: #295f9c;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.booking-log-item p {
  margin: 0;
  color: #344154;
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.booking-log-item.is-danger {
  border-color: #f0b8b8;
  background: #fff5f5;
}

.booking-log-item.is-danger p,
.booking-log-item.is-danger code {
  color: #c73535;
}

.booking-log-empty {
  margin: 0;
  padding: 18px;
  border-radius: 9px;
  background: #f5f7fa;
  color: var(--muted);
  text-align: center;
}

.detail-list {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 11px 16px;
  margin: 0;
}

.detail-list dt {
  margin: 0;
  color: #7b8492;
}

.detail-list dd {
  margin: 0;
  color: #243041;
  font-weight: 750;
  min-width: 0;
  overflow-wrap: anywhere;
}

.detail-status-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 10px 12px;
  border: 1px solid #f3c8da;
  border-radius: 999px;
  background: #fff4f8;
  color: #b84f7d;
  font-weight: 800;
}

.status-badge.is-done {
  border-color: #b9ead0;
  background: #e8f7ef;
  color: #16734f;
}

.detail-status-badges .status-badge {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 13px;
}

.detail-stage-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.detail-stage-form label {
  display: grid;
  gap: 7px;
  color: #7b8492;
  font-weight: 700;
}

.detail-stage-form .hint {
  margin: 0;
}

.detail-stage-form button {
  justify-self: start;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

menu {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 900px) {
  .home-header {
    align-items: flex-start;
  }

  .home-header nav {
    display: none;
  }

  .home-hero {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .hero-product {
    transform: none;
  }

  .service-grid,
  .workflow-band,
  .launch-band {
    grid-template-columns: 1fr;
  }

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .apartment-hero,
  .apartment-content {
    grid-template-columns: 1fr;
  }

  .booking-widget {
    position: static;
  }

  .availability-calendar {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    z-index: 88;
    width: min(360px, 86vw);
    height: 100dvh;
    max-height: none;
    gap: 14px;
    padding: 22px 16px;
    border-right: 0;
    border-left: 1px solid #dfe5ec;
    background: #fff;
    box-shadow: -24px 0 70px rgba(24, 36, 52, 0.18);
    transform: translateX(105%);
    transition: transform 0.22s ease;
  }

  .sidebar-logo {
    display: inline-flex;
  }

  .sidebar-collapse-button {
    display: none;
  }

  .app-shell.sidebar-open {
    grid-template-columns: 1fr;
  }

  .mobile-sidebar-head {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .app-shell:not(.sidebar-open) .mobile-sidebar-head {
    flex-direction: row;
  }

  .app-shell:not(.sidebar-open) .logo {
    display: flex;
    justify-content: flex-start;
  }

  .nav-label,
  .logo div {
    display: block;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .mobile-menu-button {
    display: inline-flex;
    width: 44px;
    min-height: 44px;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
  }

  .mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: #d7e3f0;
  }

  .sidebar nav {
    display: grid;
    margin-top: 0;
    gap: 8px;
    justify-items: stretch;
  }

  .sidebar.menu-open {
    transform: translateX(0);
  }

  .sidebar nav {
    padding-right: 8px;
  }

  .sidebar-account {
    grid-template-columns: 34px minmax(0, 1fr) 34px 34px;
    gap: 8px;
    margin: 0 -16px -22px;
    padding: 10px 16px;
  }

  .sidebar-avatar {
    width: 34px;
    height: 34px;
    font-size: 17px;
  }

  .sidebar-account a {
    font-size: 14px;
  }

  .sidebar-account small {
    font-size: 12px;
  }

  .sidebar-notifications,
  .sidebar .sidebar-logout {
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
  }

  .sidebar-notifications svg,
  .sidebar .sidebar-logout svg {
    width: 23px;
    height: 23px;
  }

  .sidebar .sidebar-logout {
    color: #687789 !important;
  }

  .sidebar-collapse-button {
    width: auto;
    min-height: 48px;
    flex: 0 0 auto;
    flex-direction: row;
    justify-content: center;
    gap: 0;
    margin-top: 8px;
    padding: 0 14px;
    border: 1px solid #dfe5ec;
    background: #f3f6f9;
    color: #5d6773;
  }

  .sidebar-collapse-button .collapse-icon {
    display: none;
  }

  .sidebar-collapse-button:hover {
    background: #e8edf3;
    color: #1f2937;
  }

  .app-shell:not(.sidebar-open) .sidebar.menu-open a,
  .sidebar.menu-open a {
    width: 100%;
    height: auto;
    justify-content: flex-start;
    gap: 14px;
    padding: 13px 14px;
  }

  .app-shell:not(.sidebar-open) .sidebar.menu-open a.active,
  .sidebar.menu-open a.active {
    background: #e4e9f1;
    color: #1f2937;
  }

  .sidebar a {
    white-space: normal;
    width: auto;
    height: auto;
    justify-content: flex-start;
    padding: 13px 14px;
  }

  .app-shell:not(.sidebar-open) .sidebar a .nav-label {
    display: inline;
  }

  .list-panel {
    overflow-x: visible;
  }

  .wazzup-workspace,
  .wazzup-workspace iframe {
    min-height: 72vh;
  }

  .wazzup-status-grid {
    grid-template-columns: 1fr;
  }

  .responsive-table,
  .responsive-table thead,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table th,
  .responsive-table td {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table {
    border-collapse: separate;
    border-spacing: 0 12px;
  }

  .responsive-table tr {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
  }

  .responsive-table td {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid #eef2f5;
    overflow-wrap: anywhere;
  }

  .responsive-table td:last-child {
    border-bottom: 0;
  }

  .responsive-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 800;
  }

  .content {
    padding: 20px 14px;
  }

  .profile-chip {
    top: 14px;
    right: 14px;
    width: 46px;
    height: 46px;
  }

  .profile-chip span {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .profile-menu {
    top: 66px;
    right: 14px;
    width: min(238px, calc(100vw - 28px));
  }

  .dialog-close {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 30px;
    height: 30px;
    min-height: 30px;
    font-size: 32px;
  }

  .booking-detail-dialog {
    top: 0;
    left: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    transform: none;
  }

  .kanban-settings-dialog {
    top: 0;
    left: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    transform: none;
  }

  .kanban-settings-card {
    height: 100dvh;
    max-height: 100dvh;
    padding: 66px 16px 22px;
  }

  .kanban-stage-settings {
    grid-template-columns: 1fr;
  }

  .booking-detail-card {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    padding: 74px 24px 28px;
    overflow-y: auto;
  }

  .object-form {
    padding: 72px 14px 0;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    padding-right: 0;
  }

  .topbar-actions {
    align-items: stretch;
  }

  .topbar-actions > * {
    flex: 1;
  }

  .filters,
  .settings-grid,
  .instructions-form,
  .process-grid,
  .object-sections,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .process-card-head {
    display: grid;
  }

  .process-card .detail-list {
    grid-template-columns: 130px minmax(0, 1fr);
  }

  .instruction-panel-head {
    display: grid;
  }

  .variable-help {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .variable-help dt {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .variable-help dd {
    padding-bottom: 12px;
  }

  .filters select {
    display: none;
  }

  .kanban-picker-button {
    width: 100%;
    justify-content: center;
  }

  .mobile-stage-tabs {
    display: none;
  }

  .board {
    display: grid;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: 1fr;
    gap: 18px;
    overflow: visible;
  }

  .column {
    display: grid;
    gap: 12px;
  }

  .column[hidden] {
    display: none;
  }

  .column header {
    position: static;
    cursor: pointer;
    margin-bottom: 0;
    padding: 14px 16px;
    border-radius: 14px;
  }

  .column header::after {
    content: "Раскрыть";
    display: block;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 13px;
    font-weight: 800;
  }

  .column.mobile-open header::after {
    content: "Скрыть";
  }

  .column header strong {
    font-size: 18px;
  }

  .column header b {
    margin-top: 10px;
    font-size: 24px;
  }

  .column .cards {
    display: none;
  }

  .column.mobile-open .cards {
    display: grid;
  }

  .wide {
    grid-column: auto;
  }

  .wide-object-section {
    grid-column: auto;
  }

  .object-dialog {
    top: 0;
    left: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    transform: none;
    background: #eef3f7;
  }

  .object-dialog .dialog-close {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 20;
    width: 36px;
    height: 36px;
    min-height: 36px;
    font-size: 38px;
  }

  .object-dialog.lock-dialog {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 58px 10px 18px;
    border-radius: 0;
    background: #eef3f7;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .object-dialog.lock-dialog .dialog-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: auto;
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
    background: #fff;
  }

  .object-dialog.lock-dialog *,
  .lock-detail-content,
  .lock-detail-remote,
  .lock-detail-sections,
  .lock-mini-list {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .object-dialog.lock-dialog .object-dialog-head h2 {
    font-size: 24px;
    line-height: 1.05;
  }

  .object-dialog.lock-dialog .object-dialog-head p {
    font-size: 18px;
  }

  .object-dialog.lock-dialog .dialog-close {
    top: 12px;
    left: 12px;
    color: #111827;
  }

  .lock-detail-toolbar {
    margin-top: 6px;
    padding-top: 10px;
  }

  .lock-sync-status,
  .lock-loading {
    font-size: 16px;
  }

  .lock-detail-table {
    table-layout: fixed;
    margin-top: 10px;
    padding-top: 12px;
    border-spacing: 0 8px;
  }

  .lock-detail-table th,
  .lock-detail-table td {
    font-size: 16px;
    font-weight: 500;
  }

  .lock-detail-table th {
    width: 112px;
    padding-right: 10px;
  }

  .lock-detail-table td {
    font-weight: 500;
    word-break: break-word;
  }

  .lock-detail-sections section {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    padding: 10px;
  }

  .lock-mini-list p {
    max-width: 100%;
    font-size: 16px;
    line-height: 1.35;
  }

  .lock-code-main {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
    min-width: 0;
  }

  .lock-code-main strong,
  .lock-code-main code {
    max-width: 100%;
  }

  .lock-code-main code {
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
    font-size: 15px;
    font-weight: 500;
  }

  .lock-code-period {
    display: block;
    max-width: 100%;
    font-size: 15px;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .lock-code-main strong {
    font-size: 15px;
    font-weight: 500;
  }

  .lock-record-main {
    display: block;
  }

  .lock-record-main code {
    display: none;
  }

  .object-form {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    padding: 74px 14px 18px;
    border-radius: 0;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .object-dialog-head {
    padding: 0 6px;
  }

  .object-dialog-head h2 {
    font-size: clamp(34px, 12vw, 56px);
    line-height: 0.95;
  }

  .object-dialog-head p {
    font-size: 17px;
  }

  .object-sections {
    grid-template-columns: 1fr;
  }

  .object-section {
    border-radius: 16px;
    padding: 18px;
  }

  .object-form menu {
    align-items: center;
    grid-template-columns: auto auto;
    justify-content: center;
    gap: 8px;
    width: calc(100% + 28px);
    margin: 14px -14px 0;
    padding: 10px 14px;
    border-radius: 0 0 22px 22px;
    background: rgba(248, 251, 253, 0.98);
  }

  .object-form menu button {
    width: auto;
    min-width: 108px;
    min-height: 38px;
    border-radius: 10px;
    padding: 8px 11px;
    font-size: 14px;
  }

  .object-form menu button.primary {
    min-width: 118px;
  }
}

@media (max-width: 520px) {
  .sidebar {
    padding: 14px 12px;
  }

  .sidebar-account {
    margin: 0 -12px -14px;
    padding: 9px 12px;
  }

  .logo {
    gap: 10px;
  }

  .logo span {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    font-size: 22px;
  }

  .logo strong {
    font-size: 19px;
  }

  .logo small {
    max-width: 210px;
    font-size: 12px;
    line-height: 1.25;
  }

  .mobile-menu-button {
    width: 42px;
    min-height: 42px;
    flex-basis: 42px;
  }

  .responsive-table td {
    grid-template-columns: 92px minmax(0, 1fr);
    font-size: 15px;
  }

  .home-header {
    width: min(100% - 24px, 1180px);
  }

  .home-logo-image {
    width: 170px;
    height: 48px;
  }

  .home-login {
    padding: 9px 12px;
  }

  .home-hero {
    width: min(100% - 24px, 1180px);
    padding: 22px;
    border-radius: 20px;
  }

  .hero-copy h1 {
    font-size: 40px;
  }

  .hero-copy p {
    font-size: 17px;
  }

  .domain-search {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .domain-search span {
    padding: 10px 10px 0;
  }

  .domain-search input {
    padding-left: 10px;
  }

  .product-board {
    grid-template-columns: 1fr;
  }

  .product-board article {
    min-height: 190px;
  }

  .detail-list {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .process-card .detail-list {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .process-card .detail-list dd {
    margin-bottom: 7px;
  }

  .process-card-head {
    grid-template-columns: 1fr;
  }

  .process-status {
    max-width: none;
    justify-self: start;
  }

  .detail-list dd {
    margin-bottom: 9px;
  }

  .booking-log-item > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .catalog-section-head h2 {
    font-size: 30px;
  }

  .availability-calendar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workflow-band,
  .launch-band {
    width: min(100% - 24px, 1180px);
    padding: 22px;
  }

  .login-panel {
    padding: 24px;
  }

  .column header b {
    font-size: 28px;
  }

  .card-head {
    display: grid;
  }

  .chips label {
    width: 100%;
  }

  .copy-row {
    grid-template-columns: 1fr;
  }

  .contract-sign-page {
    padding: 16px 10px;
  }

  .contract-sign-card {
    padding: 18px;
    border-width: 4px;
  }

  .contract-sign-header {
    align-items: flex-start;
    text-align: left;
  }

  .contract-sign-header h1,
  .contract-sign-card.success h1 {
    font-size: 32px;
  }

  .contract-sign-header p,
  .contract-sign-subtitle {
    font-size: 17px;
  }

  .contract-code-request {
    grid-template-columns: 1fr;
  }

  .contract-code-request button,
  .contract-code-input input {
    width: 100%;
    max-width: none;
  }

  .contract-modal {
    padding: 0;
  }

  .contract-modal-panel {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
    padding: 22px 18px;
  }

  .contract-modal-close {
    top: 14px;
    right: 14px;
  }
}

@media (max-width: 900px) {
  .content {
    padding: 22px 18px 28px;
  }

  .cleaning-toolbar {
    position: static;
    align-items: stretch;
    flex-direction: column;
    padding-top: 0;
  }

  .cleaning-search,
  .cleaning-month,
  .cleaning-range input {
    width: 100%;
  }

  .cleaning-range {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .cleaning-actions {
    display: grid;
    grid-template-columns: 44px 1fr 1fr 1fr 44px;
    margin-left: 0;
  }

  .cleaning-actions button {
    padding: 0 10px;
  }

  .cleaning-grid-wrap {
    max-height: calc(100dvh - 300px);
    border-radius: 14px;
  }

  .cleaning-header,
  .cleaning-row {
    grid-template-columns: 210px max-content;
  }

  .cleaning-grid {
    --cleaning-day-width: 92px;
  }

  .cleaning-corner,
  .cleaning-object {
    width: 210px;
  }

  .cleaning-object {
    padding: 12px;
  }

  .cleaning-object strong {
    font-size: 14px;
  }

  .cleaning-days > div {
    min-height: 54px;
    padding: 8px 10px;
  }

  .cleaning-row,
  .cleaning-cells,
  .cleaning-cells > span {
    min-height: 84px;
  }

  .cleaning-cells {
    grid-template-rows: 84px;
  }

  .cleaning-booking {
    min-height: 48px;
  }

  .locks-grid {
    grid-template-columns: 1fr;
  }

  .lock-detail-sections {
    grid-template-columns: 1fr;
  }

  .ttlock-settings-panel summary {
    padding: 18px;
  }

  .ttlock-settings-form {
    padding: 0 18px 18px;
  }

  .app-topbar {
    position: fixed;
    z-index: 100;
    top: 12px;
    right: 12px;
    left: auto;
    min-height: 0;
    padding: 0;
    background: transparent;
    backdrop-filter: none;
  }

  .app-topbar-left,
  .app-topbar-logo {
    display: none;
  }

  .app-topbar-brand {
    display: none;
  }

  .app-topbar-actions {
    width: auto;
    justify-content: flex-end;
    gap: 8px;
  }

  .shell-menu-button {
    border-color: #d8e0e7;
    background: #fff;
    box-shadow: 0 4px 14px rgba(24, 36, 52, 0.12);
  }

  .shell-menu-button span {
    background: #65717e;
  }

  .app-topbar-logo {
    font-size: 18px;
  }

  .app-topbar-logo-img {
    width: 162px;
    height: 40px;
  }

  .knowledge-link {
    font-size: 0;
    min-height: 42px;
  }

  .knowledge-link::before {
    margin-right: 0;
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .profile-chip b {
    display: none;
  }

  .profile-chip {
    top: auto;
    right: auto;
    width: 36px;
    height: 36px;
    padding: 0;
  }

  .profile-chip span {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .shell-menu-button {
    display: inline-flex;
    width: 34px;
    min-height: 34px;
    flex-basis: 34px;
  }

  .profile-menu {
    top: 58px;
    right: 18px;
  }

  .dashboard-metrics {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .dashboard-summary-grid,
  .dashboard-panels,
  .stage-overview,
  .knowledge-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-summary-card,
  .dashboard-info-card,
  .dashboard-panel {
    border-radius: 16px;
    padding: 20px;
  }

  .dashboard-home-head h1 {
    font-size: 28px;
  }

  .topbar h1 {
    font-size: 28px;
  }

  .mobile-menu-button:not(.sidebar-collapse-button):not(.shell-menu-button) {
    border-color: #d8e0e7;
    background: #fff;
  }

  .mobile-menu-button:not(.sidebar-collapse-button):not(.shell-menu-button) span {
    background: #65717e;
  }
}

@media (max-width: 700px) {
  .dashboard-period-bar {
    align-items: stretch;
    padding: 8px;
  }

  .dashboard-period-form {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    width: auto;
    gap: 8px;
  }

  .dashboard-date-range {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .dashboard-date-apply {
    grid-column: 1 / -1;
    width: 100%;
  }

  .dashboard-calendar-icon {
    display: none;
  }

  .dashboard-date-range > span:not(.dashboard-calendar-icon) {
    display: none;
  }

  .dashboard-date-range label {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 44px;
    min-width: 0;
    padding: 0 10px;
    border: 1px solid #e2e7ed;
    border-radius: 10px;
    background: #fff;
    color: #778395;
    font-size: 12px;
    line-height: 1;
  }

  .dashboard-date-range input {
    width: min(100%, 132px);
    max-width: 100%;
    min-height: 32px;
    height: 32px;
    color: #273242;
    font-size: 13px;
    font-weight: 750;
  }

  .dashboard-source-filter {
    min-width: 0;
  }

  .dashboard-source-filter summary {
    gap: 6px;
  }

  .dashboard-apply-filter {
    white-space: nowrap;
  }

  .dashboard-presets {
    width: 100%;
    gap: 3px;
  }

  .dashboard-presets a, .dashboard-presets button {
    padding: 8px 9px;
    font-size: 12px;
  }

  .dashboard-settings-button {
    grid-column: 2;
    justify-self: end;
    min-height: 42px;
    padding: 0 13px;
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  .dashboard-date-range {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .knowledge-layout { display: block; }
  .knowledge-navigation { position: static; display: flex; gap: 8px; max-height: none; margin: 0 42px 26px 0; padding: 0 0 12px; overflow-x: auto; }
  .knowledge-nav-group { display: flex; gap: 8px; }
  .knowledge-nav-secondary { margin: 0; padding: 0; border: 0; }
  .knowledge-nav-label, .knowledge-contact-card { display: none; }
  .knowledge-nav-item { display: inline-flex; width: auto; min-width: max-content; padding: 9px 12px; border: 1px solid #e5e9ef; background: #fff; }
  .knowledge-nav-item i, .knowledge-nav-item small { display: none; }
  .knowledge-nav-item.active { border-color: #c8ecd8; }
  .knowledge-hero { margin-top: 0; }
}

@media (max-width: 700px) {
  .knowledge-grid { gap: 16px; }
  .knowledge-card-cover { height: 155px; }
  .knowledge-card-body { min-height: 215px; }
  .knowledge-hero h1 { font-size: 34px; }
  .knowledge-hero > p { font-size: 15px; }
  .knowledge-article-content { padding: 30px 22px 48px; }
  .knowledge-article-drawer > header,
  .knowledge-editor-drawer > header { padding: 14px 18px; }
  .knowledge-article-visual { height: 190px; }
  .knowledge-editor-form { padding: 24px 20px 42px; }
  .knowledge-editor-form .primary { width: 100%; }
  body.knowledge-article-open { overflow: hidden; }
}

html.theme-dark {
  color-scheme: dark;
  --bg: #0b1220;
  --panel: #151f2e;
  --ink: #edf3fb;
  --muted: #98a8bd;
  --line: #2a3a50;
  --nav: #0b1220;
  --blue: #3685f5;
  --green: #27ba83;
  --danger: #fb6370;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
}

html.theme-dark body,
html.theme-dark .app-shell,
html.theme-dark .content {
  background: #0b1220;
  color: var(--ink);
}

html.theme-dark body {
  background: linear-gradient(rgba(11, 18, 32, 0.95), rgba(11, 18, 32, 0.95)), var(--bg);
}

html.theme-dark .sidebar,
html.theme-dark .sidebar-account,
html.theme-dark .notification-drawer,
html.theme-dark .dashboard-settings-drawer,
html.theme-dark .kanban-menu,
html.theme-dark .kanban-settings-card,
html.theme-dark dialog {
  background: #101a29;
  color: var(--ink);
  border-color: var(--line);
}

html.theme-dark .knowledge-card,
html.theme-dark .knowledge-update-card,
html.theme-dark .knowledge-search,
html.theme-dark .knowledge-article-drawer,
html.theme-dark .knowledge-editor-drawer {
  border-color: var(--line);
  background: #151f2e;
  color: var(--ink);
}

html.theme-dark .knowledge-nav-item { color: var(--muted); }
html.theme-dark .knowledge-nav-item:hover { background: #1b293b; color: var(--ink); }
html.theme-dark .knowledge-nav-item.active { background: rgba(39, 186, 131, .14); color: #39d497; }
html.theme-dark .knowledge-nav-secondary,
html.theme-dark .knowledge-contact-card { border-color: var(--line); }
html.theme-dark .knowledge-contact-card a { color: var(--ink); }
html.theme-dark .knowledge-contact-card a:hover { background: #1b293b; }
html.theme-dark .knowledge-search input { color: var(--ink); }
html.theme-dark .knowledge-article-drawer > header { border-color: var(--line); background: rgba(16, 26, 41, .92); }
html.theme-dark .knowledge-editor-drawer > header { border-color: var(--line); background: #101a29; }
html.theme-dark .knowledge-editor-form label { color: var(--muted); }
html.theme-dark .knowledge-editor-form input,
html.theme-dark .knowledge-editor-form select,
html.theme-dark .knowledge-editor-form textarea { border-color: var(--line); background: #101a29; color: var(--ink); }
html.theme-dark .knowledge-article-content > p:not(.knowledge-article-lead) { color: #c2cddd; }
html.theme-dark .knowledge-article-note { background: rgba(39, 186, 131, .12); }
html.theme-dark .knowledge-article-note p { color: #abd2bf; }

@media (max-width: 900px) {
  html.theme-dark .knowledge-nav-item { border-color: var(--line); background: #151f2e; }
}

html.theme-dark .sidebar,
html.theme-dark .sidebar-account,
html.theme-dark .notification-drawer,
html.theme-dark .dashboard-settings-drawer {
  box-shadow: none;
}

html.theme-dark .sidebar a,
html.theme-dark .nav-theme-toggle,
html.theme-dark .nav-group-title,
html.theme-dark .sidebar-account a,
html.theme-dark .sidebar-notifications,
html.theme-dark .sidebar-logout {
  color: #c8d4e3 !important;
}

html.theme-dark .sidebar a.active,
html.theme-dark .sidebar a:hover,
html.theme-dark .nav-theme-toggle:hover,
html.theme-dark .sidebar-notifications:hover,
html.theme-dark .sidebar-notifications[aria-expanded="true"] {
  background: #1c2a3d;
  color: #fff !important;
}

html.theme-dark .sidebar-account,
html.theme-dark .notification-drawer-header {
  border-color: var(--line);
}

html.theme-dark .sidebar-collapse-button,
html.theme-dark .mobile-menu-button,
html.theme-dark .shell-menu-button {
  border-color: #32445d;
  background: #172337;
  color: #c8d4e3;
}

html.theme-dark .theme-switch {
  background: #3a4b61;
}

html.theme-dark input,
html.theme-dark select,
html.theme-dark textarea,
html.theme-dark .ghost,
html.theme-dark .secondary,
html.theme-dark .pagination a,
html.theme-dark .kanban-picker-button,
html.theme-dark .dashboard-settings-button,
html.theme-dark .dashboard-date-range,
html.theme-dark .dashboard-date-range label,
html.theme-dark .billing-counter button,
html.theme-dark .billing-periods,
html.theme-dark .billing-select.is-selected {
  border-color: var(--line);
  background: #172337;
  color: var(--ink);
}

html.theme-dark .panel,
html.theme-dark .list-panel,
html.theme-dark .booking-card,
html.theme-dark .report-card,
html.theme-dark .kanban-settings-group,
html.theme-dark .kanban-stage-setting,
html.theme-dark .report-library-filters,
html.theme-dark .report-object-map,
html.theme-dark .billing-panel,
html.theme-dark .billing-addon-card,
html.theme-dark .billing-payment-card,
html.theme-dark .finance-tabs,
html.theme-dark .finance-filter-bar,
html.theme-dark .finance-metric,
html.theme-dark .finance-bulk-bar,
html.theme-dark .finance-split-row,
html.theme-dark .finance-history-list details,
html.theme-dark .apartment-content article,
html.theme-dark .apartment-summary {
  border-color: var(--line);
  background: #151f2e;
  color: var(--ink);
}

html.theme-dark .billing-table thead th,
html.theme-dark .billing-table td.is-current,
html.theme-dark .billing-table tfoot th,
html.theme-dark .billing-table tfoot td,
html.theme-dark .billing-table tfoot td.is-current,
html.theme-dark .billing-table thead .is-current,
html.theme-dark .finance-table th,
html.theme-dark .cleaning-header,
html.theme-dark .cleaning-object,
html.theme-dark .cleaning-cells > span {
  border-color: var(--line);
  background: #172337;
  color: var(--ink);
}

html.theme-dark .billing-table th,
html.theme-dark .billing-table td,
html.theme-dark .finance-table td,
html.theme-dark th,
html.theme-dark td,
html.theme-dark .topbar p,
html.theme-dark .hint,
html.theme-dark label,
html.theme-dark .muted,
html.theme-dark .notification-empty p {
  color: var(--muted);
}

html.theme-dark .topbar h1,
html.theme-dark .panel h2,
html.theme-dark .billing-addon-card h2,
html.theme-dark .billing-payment-card h2,
html.theme-dark .billing-payment-price,
html.theme-dark .notification-drawer-header h2,
html.theme-dark .notification-empty strong,
html.theme-dark .report-card-summary strong,
html.theme-dark .card-head strong {
  color: var(--ink);
}

html.theme-dark .kanban-menu-option,
html.theme-dark .kanban-menu-caption,
html.theme-dark .dashboard-settings-header h2,
html.theme-dark .dashboard-settings-section h3,
html.theme-dark .dashboard-settings-sources label,
html.theme-dark .dashboard-settings-sources label:hover span {
  color: var(--ink);
}

html.theme-dark .dashboard-settings-charts label,
html.theme-dark .dashboard-settings-charts label:hover span {
  color: var(--ink);
}

html.theme-dark .kanban-menu-option:hover,
html.theme-dark .kanban-menu-option.active,
html.theme-dark .dashboard-settings-sources label.is-drag-over {
  background: #1c2a3d;
}

html.theme-dark .finance-tabs a,
html.theme-dark .finance-filter-bar label,
html.theme-dark .finance-table td,
html.theme-dark .finance-table th,
html.theme-dark .cleaning-booking span,
html.theme-dark .cleaning-object span {
  color: var(--muted);
}

html.theme-dark .finance-tabs a.active,
html.theme-dark .primary,
html.theme-dark .billing-select,
html.theme-dark .billing-periods button.is-active {
  color: #fff;
}

html.theme-dark .referral-stats article,
html.theme-dark .referral-card,
html.theme-dark .referral-how {
  border-color: var(--line);
  background: #151f2e;
}

html.theme-dark .referral-stats strong,
html.theme-dark .referral-card h2,
html.theme-dark .referral-how h2,
html.theme-dark .referral-code strong { color: var(--ink); }

@media (max-width: 700px) {
  .referral-stats { grid-template-columns: 1fr; }
  .referral-link-row { grid-template-columns: 1fr 1fr; }
  .referral-link-row code { grid-column: 1 / -1; }

  .dashboard-chart-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
  }

  .dashboard-chart-card {
    width: 100%;
    box-sizing: border-box;
  }

  .dashboard-chart-head { flex-wrap: wrap; }
  .dashboard-chart-head small { text-align: left; }
}
