:root {
  color-scheme: light;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  --background: #f4f6fb;
  --surface: #fff;
  --text: #17243d;
  --muted: #65748c;
  --faint: #7a879c;
  --line: #e7ecf4;
  --primary: #3063e9;
  --primary-hover: #2452d3;
  --sidebar-width: 224px;
  --radius: 15px;
  --shadow: 0 1px 2px rgb(29 52 99 / 3%), 0 5px 16px rgb(29 52 99 / 4%);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--background); }
button, input, select, textarea { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; text-decoration: none; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid #3465ed; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p, dl, dd { margin: 0; }
svg { display: block; flex-shrink: 0; }

.skip-link {
  position: fixed;
  top: 12px;
  left: 14px;
  z-index: 20;
  transform: translateY(-160%);
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--primary);
  color: white;
}
.skip-link:focus { transform: translateY(0); }
.shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: 100dvh; }
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  min-height: 0;
  padding: 24px 15px 14px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  z-index: 12;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 5px;
  margin: 0 0 35px;
  white-space: nowrap;
  font-weight: 740;
  font-size: 1rem;
  letter-spacing: -.035em;
  line-height: 1.35;
}
.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 41px;
  height: 41px;
  color: white;
  border-radius: 13px;
  background: linear-gradient(145deg, #4677ff, #2558e4);
  box-shadow: 0 4px 8px rgb(39 97 234 / 23%);
}
.navigation { flex: 1; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 45px;
  padding: 9px 12px;
  margin: 3px 0;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #52627c;
  font-size: .91rem;
  font-weight: 550;
  transition: background-color .15s, color .15s;
}
.nav-item:hover { background: #f5f7fc; color: var(--text); }
.nav-item.nav-active { background: linear-gradient(105deg, #e9f0ff, #f3f6ff); color: #2859d6; border-color: #e3ebff; font-weight: 680; }
.nav-active::after {
  position: absolute;
  inset: 11px 6px 11px auto;
  width: 3px;
  content: "";
  border-radius: 3px;
  background: #3c6bf0;
}
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 12px 8px 2px;
  border-top: 1px solid var(--line);
}
.account-icon { display: grid; place-items: center; flex: 0 0 36px; height: 36px; color: #3966d7; background: #eff4ff; border-radius: 10px; }
.account-text { min-width: 0; }
.account-text strong { display: block; overflow: hidden; text-overflow: ellipsis; font-size: .87rem; font-weight: 650; white-space: nowrap; }
.account-text small { display: block; color: var(--faint); margin-top: 3px; font-size: .75rem; }
.nav-scrim { display: none; }

.workspace { min-width: 0; background: radial-gradient(ellipse at 92% 0, #eaf1ff, transparent 540px); }
.topbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 64px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 93%);
  backdrop-filter: blur(12px);
  z-index: 10;
}
.topbar-left, .topbar-right, .breadcrumb { display: flex; align-items: center; gap: 10px; }
.breadcrumb { color: var(--muted); font-size: .875rem; white-space: nowrap; }
.breadcrumb svg { color: #9ea9bc; }
.breadcrumb strong { color: var(--text); font-weight: 620; }
.topbar-right { gap: 9px; }
.demo-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid #e0e8fc; border-radius: 6px; color: #3d5fa7; background: #f3f6ff; font-size: .75rem; white-space: nowrap; }
.demo-badge span { width: 6px; height: 6px; border-radius: 50%; background: #6486e5; }
.topbar-divider { height: 23px; width: 1px; margin: 0 6px; background: var(--line); }
.topbar-divider:first-child { display: none; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: #2859d6; background: #eaf0ff; font-size: .875rem; font-weight: 700; }
.operator { color: #35425a; font-size: .875rem; font-weight: 600; white-space: nowrap; }
.signout { margin-left: 5px; border-left: 1px solid var(--line); padding-left: 10px; }
.icon-button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
}
.icon-button:hover { color: var(--text); background: #f2f5fb; }
.menu-button { display: none; }

.main { max-width: 1600px; min-height: calc(100vh - 64px); margin: 0 auto; padding: 27px 30px 36px; }
.main:focus { outline: none; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 23px; }
.page-heading h1 { color: #111d35; font-size: clamp(1.7rem, 2.2vw, 2rem); line-height: 1.31; font-weight: 745; letter-spacing: -.045em; }
.page-heading p { margin-top: 6px; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  line-height: 1.4;
  font-size: .875rem;
  font-weight: 640;
  white-space: nowrap;
  transition: background-color .14s, border-color .14s, box-shadow .14s, transform .14s;
}
.button-primary { color: white; border-color: var(--primary); background: linear-gradient(130deg, #2e65eb, #2956d9); box-shadow: 0 3px 7px rgb(39 89 217 / 21%); }
.button-primary:hover:not(:disabled) { background: var(--primary-hover); border-color: var(--primary-hover); box-shadow: 0 5px 12px rgb(39 89 217 / 25%); }
.button:active:not(:disabled) { transform: translateY(1px); }
.button-secondary { color: #35445d; background: #fff; border-color: #dfe6f1; }
.button-secondary:hover { background: #f7f9fe; border-color: #c7d6f2; }
.button-danger { background: #b92d40; border-color: #b92d40; color: #fff; }
.button-danger:hover { background: #a52537; }
.button:disabled { opacity: .55; }
.button-compact { min-height: 34px; padding: 6px 11px; font-size: .825rem; }
.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; animation: ui-appear .23s ease-out; }
.kpi {
  position: relative;
  isolation: isolate;
  display: block;
  min-width: 0;
  min-height: 133px;
  padding: 15px 17px 16px;
  overflow: hidden;
  background: linear-gradient(150deg, var(--surface) 65%, var(--kpi-tint, #f7f9ff));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color .16s, box-shadow .16s, transform .16s;
}
@media (hover: hover) {
  a.kpi:hover { transform: translateY(-2px); border-color: #bfd1f1; box-shadow: 0 7px 16px rgb(37 62 125 / 10%); }
}
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: #52627d; font-size: .895rem; font-weight: 620; }
.kpi-icon { display: grid; place-items: center; flex: 0 0 34px; height: 34px; border-radius: 9px; }
.kpi-value { margin: 6px 0 7px; color: #192741; font-size: clamp(1.24rem, 1.9vw, 2rem); font-weight: 735; line-height: 1.15; letter-spacing: -.045em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.kpi-value > span { font-size: .67em; margin-right: 3px; letter-spacing: normal; vertical-align: .08em; }
.kpi-detail { color: var(--muted); font-size: .8rem; line-height: 1.45; }
.kpi-blue {
  color: #fff;
  background: linear-gradient(110deg, #2759df, #3972f1);
  border-color: #3266e8;
  box-shadow: 0 4px 10px rgb(38 93 221 / 16%);
}
.kpi-blue::before {
  position: absolute;
  z-index: -1;
  top: -86px;
  right: -78px;
  width: 197px;
  height: 197px;
  border: 1px solid rgb(255 255 255 / 19%);
  border-radius: 50%;
  box-shadow: 0 0 0 19px rgb(255 255 255 / 6%), 0 0 0 38px rgb(255 255 255 / 5%);
  content: "";
}
.kpi-blue .kpi-top, .kpi-blue .kpi-value { color: #fff; }
.kpi-blue .kpi-icon { color: #fff; background: rgb(255 255 255 / 20%); }
.kpi-blue .kpi-detail { color: #edf3ff; }
.kpi-green { --kpi-tint: #eefaf5; }
.kpi-green .kpi-icon { color: #098867; background: #e4f7ef; }
.kpi-amber { --kpi-tint: #fff8ec; }
.kpi-amber .kpi-icon { color: #a56112; background: #fff3e0; }
.kpi-red { --kpi-tint: #fdf1f3; }
.kpi-red .kpi-icon { color: #b94554; background: #fcecf0; }
.kpi-teal { --kpi-tint: #edf9fa; }
.kpi-teal .kpi-icon { color: #087782; background: #dff4f5; }
.kpi-violet { --kpi-tint: #f6f1fd; }
.kpi-violet .kpi-icon { color: #7752b1; background: #f0e8fb; }

@keyframes ui-appear {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 15px; }
.panel-heading h2 { color: #1b2842; font-size: 1.08rem; font-weight: 720; line-height: 1.3; }
.panel-heading p { color: var(--muted); margin-top: 5px; font-size: .8rem; line-height: 1.4; }
.chart-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; margin-bottom: 18px; }
.chart-keys { display: flex; align-items: center; gap: 13px; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.chart-keys span { display: flex; align-items: center; gap: 5px; }
.chart-keys i, .ring-row i { display: block; flex: 0 0 9px; width: 9px; height: 9px; border-radius: 3px; }
.key-due { background: #c9d8fc; }
.key-paid { background: #3465ed; }
.chart {
  --plot-height: 163px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  padding: 13px 20px 19px;
}
.chart-axis { display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; height: calc(var(--plot-height) + 14px); margin-top: -7px; color: #78869e; font-size: .74rem; line-height: 14px; font-variant-numeric: tabular-nums; }
.chart-main { position: relative; }
.chart-lines { position: absolute; inset: 0 0 auto; display: flex; flex-direction: column; justify-content: space-between; height: calc(var(--plot-height) + 1px); pointer-events: none; }
.chart-lines i { width: 100%; border-top: 1px dashed #e6edf7; }
.chart-lines i:last-child { border-top-style: solid; border-color: #e2eaf5; }
.chart-columns { position: relative; display: grid; grid-template-columns: repeat(var(--chart-months,6),minmax(0,1fr)); gap: 2px; }
.chart-month { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; border-radius: 6px; }
.chart-bars { display: flex; justify-content: center; align-items: flex-end; gap: 4px; width: 100%; height: var(--plot-height); }
.bar { display: block; width: clamp(8px, 27%, 23px); border-radius: 4px 4px 0 0; }
.bar-due { background: #cedbfa; }
.bar-paid { background: #3e70f2; }
.chart-current .bar-paid { background: #2859e3; }
.chart-month:hover .bar-due, .chart-month:focus-visible .bar-due { background: #b2c7f9; }
.chart-label { display: block; padding: 8px 7px 0; color: #687994; font-size: .79rem; line-height: 16px; }
.chart-current .chart-label { color: #2859df; font-weight: 720; }
.chart-tooltip {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 50%;
  display: none;
  min-width: max-content;
  transform: translateX(-50%);
  padding: 8px 10px;
  border-radius: 7px;
  background: #1c2c4c;
  color: white;
  font-size: .75rem;
  line-height: 1.55;
  pointer-events: none;
}
.chart-month:hover .chart-tooltip, .chart-month:focus-visible .chart-tooltip { display: block; }
.chart-month:first-child .chart-tooltip { left: 0; transform: none; }
.chart-month:last-child .chart-tooltip { right: 0; left: auto; transform: none; }
.status-panel { container-type: inline-size; }
.ring-layout { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 139px; padding: 2px 20px 8px; }
.ring { position: relative; display: grid; place-items: center; width: 132px; height: 132px; flex: 0 0 132px; border-radius: 50%; }
.ring::before { position: absolute; inset: 15px; border-radius: inherit; background: #fff; content: ""; }
.ring-center { position: relative; display: grid; gap: 3px; justify-items: center; }
.ring-center strong { color: #162747; font-size: 1.825rem; font-weight: 750; line-height: 1; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.status-panel .ring-center strong { font-size: 1.45rem; }
.status-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 10px 20px 17px; padding-top: 12px; border-top: 1px solid #edf1f7; color: var(--muted); font-size: .83rem; }
.ring-center span { color: var(--muted); font-size: .75rem; }
.ring-legend { display: grid; flex: 1; gap: 3px; }
.ring-row { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 28px; padding: 3px 4px; border-radius: 5px; color: #536581; font-size: .825rem; white-space: nowrap; }
.ring-row:hover { background: #f2f6ff; color: var(--primary-hover); }
.ring-row strong { color: #273851; font-weight: 720; font-variant-numeric: tabular-nums; }
@container (max-width: 300px) {
  .ring-layout { gap: 8px; }
  .ring { height: 106px; width: 106px; flex-basis: 106px; }
  .ring::before { inset: 12px; }
  .ring-center strong { font-size: 1.55rem; }
  .ring-row { gap: 6px; }
}

.list-panel { overflow: clip; }
.table-scroll { overflow-x: auto; }
.table-scroll:focus-visible { outline-offset: -3px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .875rem; }
th { padding: 12px 13px; border-top: 1px solid #edf1f8; border-bottom: 1px solid #eaf0f8; background: #f8faff; color: #54657f; font-size: .81rem; font-weight: 660; white-space: nowrap; }
td { padding: 11px 13px; border-bottom: 1px solid #eef2f8; color: #36465f; white-space: nowrap; line-height: 1.45; }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcff; }
.cell-title { display: block; color: #24334d; font-weight: 650; }
.cell-meta { display: block; margin-top: 3px; color: var(--muted); font-size: .79rem; }
.amount-cell { color: #1d304e; font-weight: 700; font-variant-numeric: tabular-nums; }
.numerals { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.overdue-text { color: #b75b11; }
.row-actions { display: flex; align-items: center; gap: 10px; }
.text-button { border: 0; padding: 3px 0; color: #315dcf; background: transparent; font-size: .85rem; font-weight: 580; white-space: nowrap; cursor: pointer; }
.text-button:hover { color: #1e459f; text-decoration: underline; text-underline-offset: 3px; }
.text-button-strong { font-weight: 720; }
.pill { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; border-radius: 6px; font-size: .79rem; font-weight: 610; line-height: 1.4; white-space: nowrap; }
.pill-paid { color: #087651; background: #e5f7ee; }
.pill-partial { color: #146d9e; background: #e5f4fb; }
.pill-unpaid { color: #425c8c; background: #eef3fe; }
.pill-overdue { color: #a85a12; background: #fff1db; }
.pill-void { color: #607088; background: #edf0f5; }
.list-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 57px; padding: 10px 20px; border-top: 1px solid #edf1f7; color: var(--muted); font-size: .85rem; }
.footer-amount { display: inline-block; margin-left: 17px; }
.footer-amount strong { margin-left: 4px; color: var(--text); font-variant-numeric: tabular-nums; }
.pager { display: flex; align-items: center; gap: 8px; }
.pager a, .pager-disabled { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 1.25rem; line-height: 1; }
.pager a { color: #2d54b6; }
.pager a:hover { background: #edf3ff; }
.pager-disabled { color: #aab4c6; }
.page-number { min-width: 46px; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }

.filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding: 15px 20px; }
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  min-width: 180px;
  width: min(100%, 250px);
  padding: 0 10px;
  border: 1px solid #dfe6f1;
  border-radius: 8px;
  background: #fff;
  color: #6a7b98;
}
.search-box:focus-within { border-color: #81a0f1; box-shadow: 0 0 0 3px #ebf1ff; }
.search-box input { width: 100%; min-width: 0; padding: 8px 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: .875rem; }
.search-box input::placeholder, .field input::placeholder, .field textarea::placeholder { color: #77869c; }
select {
  appearance: none;
  min-height: 40px;
  max-width: 100%;
  padding: 8px 31px 8px 12px;
  border: 1px solid #dfe6f1;
  border-radius: 8px;
  background-color: #fff;
  background-image: linear-gradient(45deg, transparent 50%, #697c9b 50%), linear-gradient(135deg, #697c9b 50%, transparent 50%);
  background-position: calc(100% - 15px) 17px, calc(100% - 10px) 17px;
  background-repeat: no-repeat;
  background-size: 5px 5px;
  color: #35445d;
  font-size: .875rem;
}
.reset-link { margin-left: 4px; padding: 8px 4px; }
.empty-state, .loading-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 240px; padding: 25px 16px; gap: 9px; color: var(--muted); text-align: center; }
.empty-state strong { color: var(--text); font-weight: 670; }
.empty-state p { font-size: .875rem; line-height: 1.5; }
.empty-state .button { margin-top: 5px; }
.empty-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 3px; border-radius: 13px; background: #edf3ff; color: #3a68dd; }

dialog {
  position: fixed;
  width: min(540px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 40px));
  padding: 0;
  overflow: auto;
  border: 1px solid #e2e9f7;
  border-radius: 17px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 24px 90px rgb(14 29 69 / 26%);
}
dialog::backdrop { background: rgb(17 30 54 / 42%); }
.modal-heading {
  position: sticky;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  z-index: 1;
  padding: 19px 22px 15px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.modal-heading h2 { font-size: 1.22rem; font-weight: 740; line-height: 1.4; }
.modal-heading p { margin-top: 5px; color: var(--muted); font-size: .87rem; line-height: 1.55; overflow-wrap: anywhere; }
.modal-heading .icon-button { margin: -3px -5px 0 0; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; padding: 19px 22px; }
.field { display: grid; align-content: start; gap: 6px; min-width: 0; color: #364660; font-size: .875rem; font-weight: 590; }
.field-wide { grid-column: 1 / -1; }
.field input, .field select, .field textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid #dbe4f3;
  border-radius: 8px;
  background-color: #fff;
  color: var(--text);
  font-size: .92rem;
  font-weight: 400;
}
.field select { padding-right: 29px; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #7b9bf2; outline: 2px solid #e8efff; outline-offset: 1px; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; padding: 13px 22px; border-top: 1px solid var(--line); background: #fbfcff; }
.modal-info, .modal-content { padding: 18px 22px; }
.modal-info { color: var(--muted); line-height: 1.5; }
.modal-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 13px; border: 1px solid #e2ebff; border-radius: 9px; background: #f3f7ff; color: #38598f; font-size: .875rem; }
.modal-summary strong { color: #2457d6; font-size: 1.22rem; font-variant-numeric: tabular-nums; }
.form-error { margin: 0 22px 14px; padding: 10px 12px; border-radius: 8px; background: #fdf0f2; color: #9c2a3b; font-size: .875rem; line-height: 1.45; }
.details { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.modal-summary + .details { margin-top: 16px; }
.details dt { color: var(--muted); font-size: .82rem; line-height: 1.4; }
.details dd { margin-top: 3px; color: #25354c; font-size: .9rem; line-height: 1.45; overflow-wrap: anywhere; }
.detail-note { margin-top: 14px; padding: 9px 11px; border-radius: 7px; color: var(--muted); background: #f5f7fb; overflow-wrap: anywhere; font-size: .85rem; }
.detail-heading { margin: 17px 0 6px; font-size: .91rem; }
.detail-receipts { display: grid; gap: 5px; }
.detail-receipt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #e7edf7;
  border-radius: 7px;
  background: #fff;
  color: #405370;
  text-align: left;
  font-size: .85rem;
}
.detail-receipt:hover { background: #f5f8ff; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 15; display: grid; gap: 7px; max-width: min(400px, calc(100vw - 40px)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border: 1px solid #d8eee4; border-radius: 10px; background: #fff; color: #22594a; box-shadow: 0 7px 24px rgb(18 49 96 / 12%); font-size: .875rem; line-height: 1.4; }
.toast-error { color: #a13446; border-color: #f3dee3; }

.login-view .shell { display: block; min-height: 100dvh; background: radial-gradient(ellipse at 76% 8%, #e5edff, transparent 65%), var(--background); }
.login-view .sidebar, .login-view .topbar { display: none; }
.login-view .workspace { background: none; }
.login-view .main { display: grid; place-items: center; min-height: 100dvh; padding: 28px; }
.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  width: min(100%, 980px);
  min-height: 500px;
  overflow: hidden;
  border: 1px solid #dce5f4;
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 22px 60px rgb(27 53 108 / 12%), 0 4px 14px rgb(24 50 94 / 5%);
  animation: ui-appear .28s ease-out;
}
.login-visual { position: relative; background: linear-gradient(140deg, #355970, #1f3348); }
.login-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 53% 50%; }
.login-card { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: clamp(32px, 4.5vw, 65px); }
.login-card .brand-mark { flex: none; width: 48px; height: 48px; margin-bottom: 20px; }
.login-card h1 { color: #111d35; font-size: clamp(1.7rem, 3vw, 2.1rem); letter-spacing: -.03em; line-height: 1.24; }
.login-property { margin: 8px 0 26px; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.demo-roles, .login-form { display: grid; gap: 14px; }
.demo-roles { grid-template-columns: 1fr 1fr; }
.demo-roles > :first-child { grid-column: 1 / -1; }
.login-form .field input { min-height: 46px; }
.login-password { position: relative; }
.login-password input { padding-inline-end: 48px; }
.login-password .icon-button { position: absolute; inset: 3px 3px auto auto; width: 40px; height: 40px; }
.login-form .button { margin-top: 5px; min-height: 46px; }
.login-card .login-error { margin: 12px 0 0; padding: 8px 11px; border-radius: 8px; background: #fdf1f3; color: #982d3e; }
.inline-field { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .86rem; white-space: nowrap; }
.inline-field input { min-height: 39px; min-width: 0; padding: 7px 9px; max-width: 138px; border: 1px solid #dbe4f3; border-radius: 8px; background: white; }
.period-actions { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.year-filter input { width:86px; }
.permission-summary { display:block; max-width:340px; white-space:normal; line-height:1.55; }
.permission-fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(185px,1fr)); gap:12px; }
.permission-fields small { margin-left:auto; color:var(--muted); font-size:.7rem; }
.small-balances { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin-bottom: 17px; }
.small-balances article { padding: 18px 20px; }
.small-balances article > span { display: block; color: var(--muted); font-size: .89rem; }
.small-balances article > strong { display: block; margin-top: 7px; font-size: 1.48rem; }
.finance-panel { margin-top: 18px; }
.closing-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 11px 20px; border-top: 1px solid #e4edf9; border-bottom: 1px solid #e4edf9; background: #f3f7ff; color: #3b4c69; font-size: .875rem; }
.closing-banner .button { margin-left: auto; min-height: 32px; }
.audit-data { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: #32496d; font-size: .85rem; }
.project-switch { max-width: 245px; min-height: 36px; padding-top: 6px; padding-bottom: 6px; background-position-y: 15px; }
.project-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 15px; }
.project-card { padding: 19px; }
.project-card > div:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.project-card h2 { font-size: 1.07rem; line-height: 1.45; }
.project-card p { margin: 8px 0 17px; color: var(--muted); font-size: .88rem; }
.project-card .row-actions { flex-wrap:wrap; }
.project-period { margin-bottom:14px; }
.project-tree details { margin: 6px 0 6px 13px; padding-left: 10px; border-left: 1px solid var(--line); }
.project-tree .tree-kind { margin-left: 0; }
.project-tree summary { cursor: pointer; padding: 5px 0; color: #294775; font-weight: 630; }
.project-tree ul { margin: 4px 0; padding-left: 28px; color: var(--muted); font-size: .86rem; line-height: 1.7; }
.checkline { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .88rem; }
.cash-categories { grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr)); }
.print-attempts { color: var(--muted); font-size: .85rem; }
.section-tabs { display: flex; align-items: center; gap: 7px; margin: 0 0 18px; overflow-x: auto; }
.section-tabs a { padding: 8px 12px; border: 1px solid transparent; border-radius: 8px; color: #53617b; font-size: .88rem; white-space: nowrap; }
.section-tabs a:hover { background: #ecf1fb; }
.section-tabs [aria-current=page] { border-color: #dbe6ff; background: #eaf1ff; color: #2456c9; font-weight: 680; }
.desk-tools { position: relative; }
.desk-tools > summary { list-style: none; cursor: pointer; }
.desk-tools > summary::-webkit-details-marker { display: none; }
.desk-tools-menu { position: absolute; z-index: 8; top: calc(100% + 6px); right: 0; width: max-content; min-width: 164px; padding: 5px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 9px 25px rgb(36 56 92 / 14%); }
.desk-tools-menu a, .desk-tools-menu .button { display: flex; align-items: center; justify-content: flex-start; gap: 9px; width: 100%; min-height: 37px; padding: 8px 10px; border: 0; border-radius: 6px; color: #35445d; font-size: .86rem; }
.desk-tools-menu a:hover, .desk-tools-menu .button:hover { background: #edf3ff; color: #2859d6; }
.desk-search { padding: 16px 19px; margin-bottom: 16px; }
.desk-search-form { position: relative; display: flex; align-items: center; gap: 8px; }
.desk-search-input { min-width: 0; flex: 1; display: flex; align-items: center; gap: 10px; border: 1px solid #dbe4f4; border-radius: 8px; padding: 0 12px; color: #6582af; background: #f8faff; }
.desk-search-input:focus-within { box-shadow: 0 0 0 2px #dbe6ff; border-color: #8eafff; background: #fff; }
.desk-search-input input { width: 100%; min-width: 0; min-height: 42px; padding: 8px 0; border: 0; outline: 0; background: transparent; color: #1f2c46; }
.desk-results { position: absolute; z-index: 6; top: calc(100% + 6px); left: 0; right: 0; border: 1px solid #dce6f7; max-height: 290px; overflow: auto; border-radius: 9px; background: #fff; box-shadow: 0 13px 28px rgb(30 52 92 / 13%); }
.desk-match { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border-bottom: 1px solid var(--line); color: #263a61; }
.desk-match:hover, .desk-match:focus-visible { background: #edf4ff; }
.desk-match:last-child { border-bottom: 0; }
.desk-match small { color: var(--muted); }
.desk-start { display: flex; align-items: center; gap: 13px; padding: 20px; }
.desk-start h2, .desk-resource h2 { margin-bottom: 4px; font-size: 1rem; }
.desk-start p, .desk-resource p, .import-upload p { color: var(--muted); font-size: .86rem; line-height: 1.45; }
.desk-resource-icon { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 10px; color: #2e62db; background: #eaf1ff; }
.desk-resource { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.desk-resource h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.desk-resource h2 > span { padding: 2px 6px; border-radius: 4px; background: #f0f4fa; color: #52627c; font-size: .78rem; font-weight: 570; overflow-wrap: anywhere; }
.desk-area { flex: 0 0 auto; margin-left: auto; padding-left: 15px; border-left: 1px solid var(--line); }
.desk-area span, .desk-area strong { display: block; }
.desk-area span { margin-bottom: 4px; color: var(--muted); font-size: .78rem; }
.desk-area strong { font-size: .94rem; }
.desk-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 30%); align-items: start; gap: 16px; }
.desk-charges, .desk-payment { min-width: 0; }
.desk-charges > .panel-heading { align-items: center; }
.desk-payment { position: sticky; top: 80px; }
.desk-payment-form { display: grid; gap: 13px; padding: 18px; }
.desk-payment-form h2 { font-size: 1.08rem; }
.desk-payment-form .form-error { margin: 0; }
.desk-total { display: grid; gap: 5px; padding: 0 0 14px; border-bottom: 1px solid var(--line); }
.desk-total span { color: var(--muted); font-size: .83rem; }
.desk-total strong { color: #2256cd; font-size: clamp(1.65rem, 2.7vw, 2.2rem); font-variant-numeric: tabular-nums; line-height: 1.14; overflow-wrap: anywhere; }
.desk-payment-form > .button { min-height: 44px; }
.desk-payment-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 116px), 1fr)); gap: 9px; }
.desk-payment-meta .field { min-width: 0; }
.desk-payment-meta input, .desk-payment-meta select { width: 100%; min-width: 0; padding-inline-start: 8px; font-size: .875rem; }
.desk-fund-note { padding: 8px 9px; border-radius: 7px; background: #eef4ff; color: #38598f; font-size: .82rem; }
.desk-split { display: grid; grid-template-columns: repeat(auto-fit,minmax(100px,1fr)); gap: 9px; }
.desk-split input { width: 100%; min-width: 0; }
#desk-split-total { grid-column: 1 / -1; color: var(--muted); font-size: .83rem; }
.desk-discount { margin-top: 4px; white-space: normal; }
.desk-discount summary { width: fit-content; color: #315dcf; cursor: pointer; font-size: .79rem; }
.desk-discount .field { margin-top: 6px; min-width: 0; }
.desk-discount input { min-height: 32px; padding: 5px 7px; }
.desk-remark summary { color: #486189; font-size: .84rem; cursor: pointer; }
.desk-remark textarea { display: block; width: 100%; margin-top: 7px; padding: 8px; border: 1px solid #dce4f1; border-radius: 7px; resize: vertical; font-size: .88rem; }
.desk-editor { margin: 0 16px 14px; padding: 13px 14px; border: 1px solid #e0e8f6; border-radius: 9px; background: #f7faff; }
.desk-add-type, .desk-charge-fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.desk-add-type > .field { flex: 1 1 200px; min-width: 0; }
.desk-charge-fields { margin-top: 12px; }
.desk-charge-fields .field { flex: 1 1 120px; min-width: 0; }
.desk-charge-fields .field input, .desk-add-type select { min-width: 0; width: 100%; }
.desk-charge-fields .button { margin-left: auto; border-color: #c9d8fc; color: #2456c9; }
.desk-fee-hint, .desk-fee-setup { margin-top: 11px; color: #5b6b85; font-size: .84rem; }
.desk-fee-setup { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.desk-panes { display: flex; gap: 17px; padding: 0 18px; box-shadow: inset 0 -1px var(--line); }
.desk-panes button { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 5px 1px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #5f6f87; white-space: nowrap; font-size: .88rem; }
.desk-panes button span { min-width: 21px; padding: 2px 5px; border-radius: 5px; background: #f0f3f9; text-align: center; font-size: .75rem; }
.desk-panes button[aria-pressed=true] { color: #2456c9; border-bottom-color: #3263e5; font-weight: 650; }
.desk-panes button[aria-pressed=true] span { background: #ebf1ff; }
.desk-empty { padding: 20px 18px; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.desk-choice-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 7px; padding: 8px 16px; color: var(--muted); font-size: .82rem; }
.desk-choice-head > div { display: flex; gap: 6px; }
.desk-choice-head .button { min-height: 30px; padding: 4px 8px; font-size: .8rem; }
.desk-table .table-scroll { max-height: 442px; overflow: auto; }
.desk-table th { position: sticky; top: 0; }
.desk-table th, .desk-table td { padding: 9px 12px; }
.desk-table th:first-child, .desk-table td:first-child { padding-left: 18px; }
.desk-table th:last-child, .desk-table td:last-child { padding-right: 18px; }
.desk-table .cell-title, .desk-table .cell-meta { white-space: normal; overflow-wrap: anywhere; }
.desk-table input[type=checkbox] { width: 17px; height: 17px; margin: 0; vertical-align: middle; accent-color: #3063e9; cursor: pointer; }
.desk-amount { width: 100%; max-width: 105px; min-width: 69px; padding: 7px 6px; border: 1px solid #dbe4f2; border-radius: 7px; font-variant-numeric: tabular-nums; }
.import-upload { display: flex; align-items: center; flex-wrap: wrap; gap: 11px; padding: 18px; margin-bottom: 14px; }
.import-upload p { margin-top: 4px; }
.upload-button { position: relative; margin-left: auto; cursor: pointer; }
.upload-button input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-button:focus-within { outline: 2px solid #93b1ff; outline-offset: 2px; }
.import-filters input { min-height: 38px; max-width: 170px; padding: 7px 9px; border: 1px solid #dbe4f3; border-radius: 8px; background: #fff; }
.import-empty { padding: 25px 18px; color: var(--muted); text-align: center; font-size: .89rem; }
.import-footer { flex-wrap: wrap; }
.ticket-topline { margin: -9px 0 5px; }
.ticket-adjust { margin-top: 7px; }
.ticket-adjust summary, .ticket-details summary { width: fit-content; color: #4064aa; font-size: .875rem; cursor: pointer; }
.ticket-adjust .filter-bar { margin: 8px 0 0; }
.ticket-scroll { overflow: auto; padding: 10px 0 18px; }
.ticket-details { margin-top: 3px; padding: 12px 0 0; }
.ticket-details summary { margin: 0 16px 12px; }
.ticket-paper { position: relative; width: 241mm; height: 93.1mm; margin: 0 auto; overflow: hidden; background: white; box-shadow: 0 2px 15px rgb(25 45 77 / 14%); color: #142036; font-variant-numeric: tabular-nums; }
.ticket-content {
  --ticket-line: #26303f;
  --ticket-detail-height: 3.8mm;
  position: absolute;
  inset: 4mm 10mm;
  display: grid;
  grid-template-rows: 10mm 20.8mm minmax(0, 1fr) 6.2mm 12.3mm;
  border: .38mm solid var(--ticket-line);
  transform: translate(var(--ticket-x, 0mm), var(--ticket-y, 0mm));
}
.ticket-content.ticket-with-breakdown { --ticket-detail-height: 3.2mm; grid-template-rows: 10mm 20.8mm minmax(0, 1fr) 6.2mm 17.2mm; }
.ticket-heading { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: .45mm; border-bottom: .25mm solid var(--ticket-line); text-align: center; }
.ticket-heading h2 { padding-left: .4mm; font-size: 4.8mm; font-weight: 740; line-height: 1.08; letter-spacing: .4mm; }
.receipt-stamp { color: #873340; font-size: 2.45mm; line-height: 1; }
.ticket-meta { display: grid; grid-template-columns: 60% 40%; grid-template-rows: repeat(4, minmax(0, 1fr)); margin: 0; }
.ticket-meta div { display: grid; grid-template-columns: 16mm minmax(0, 1fr); align-items: center; padding: 0 2.4mm; border-bottom: .25mm solid var(--ticket-line); font-size: 2.65mm; line-height: 2.4mm; }
.ticket-meta div:nth-child(odd) { border-right: .25mm solid var(--ticket-line); }
.ticket-meta dt { color: #4a5567; }
.ticket-meta dd { font-weight: 590; overflow-wrap: anywhere; }
.ticket-items { height: 100%; table-layout: fixed; }
.ticket-items th, .ticket-items td { padding: 0 2.4mm; border: 0; border-right: .25mm solid var(--ticket-line); border-bottom: .25mm solid var(--ticket-line); font-size: 2.65mm; line-height: 2.4mm; white-space: normal; overflow-wrap: anywhere; }
.ticket-items th { height: 4.4mm; color: #28364d; background: #f4f6fa; }
.ticket-items tbody tr { height: var(--ticket-detail-height); }
.ticket-items th:first-child { width: 51%; }
.ticket-items th:nth-child(2) { width: 26%; }
.ticket-items th:nth-child(3), .ticket-items td:nth-child(3) { width: 8%; padding-inline: 1mm; text-align: center; }
.ticket-items th:last-child, .ticket-items td:last-child { border-right: 0; text-align: right; }
.ticket-items td:last-child { padding-inline: 1.5mm; }
.ticket-items tbody tr:hover { background: transparent; }
.ticket-items tbody tr:last-child td { border-bottom: .25mm solid var(--ticket-line); }
.ticket-total { display: grid; grid-template-columns: 1fr 1fr; border-bottom: .25mm solid var(--ticket-line); font-size: 2.85mm; }
.ticket-total span { display: flex; align-items: center; gap: 4mm; padding: 0 2.4mm; }
.ticket-total span:first-child { border-right: .25mm solid var(--ticket-line); }
.ticket-total b { font-size: 3.45mm; }
.ticket-foot { display: grid; grid-template-rows: 7.5mm minmax(0, 1fr); font-size: 2.65mm; }
.ticket-with-breakdown .ticket-foot { grid-template-rows: 4.9mm 7.5mm minmax(0, 1fr); }
.ticket-breakdown { display: flex; flex-wrap: wrap; align-content: center; gap: 0 4.5mm; padding: 0 2.4mm; border-bottom: .25mm solid var(--ticket-line); font-size: 2.55mm; line-height: 2.3mm; }
.ticket-breakdown span { white-space: nowrap; }
.ticket-remark { display: grid; grid-template-columns: 12mm minmax(0, 1fr); align-items: center; padding: 0 2.4mm; border-bottom: .25mm solid var(--ticket-line); line-height: 2.35mm; }
.ticket-remark p { overflow-wrap: anywhere; }
.ticket-signatures { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 3mm; padding: 0 2.4mm; }
.ticket-signatures span:last-child { justify-self: end; }
.ticket-signatures strong { margin-left: 2mm; }
.ticket-signatures i { display: inline-block; min-width: 37mm; margin-left: 2mm; border-bottom: .25mm solid var(--ticket-line); }

.statement-paper { width: min(100%,210mm); margin: 0 auto; padding: clamp(14px,3vw,36px); background: #fff; color: #1a2639; border: 1px solid var(--line); }
.statement-heading { padding: 0 0 15px; text-align: center; }
.statement-heading h1 { font-size: 1.65rem; line-height: 1.2; }
.statement-heading p { margin-top: 6px; color: var(--muted); font-size: .88rem; }
.statement-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 7px; margin: 0 0 8px; font-size: .82rem; }
.statement-paper h2 { margin: 14px 0 7px; font-size: .99rem; }
.statement-table { table-layout: fixed; font-variant-numeric: tabular-nums; }
.statement-table th, .statement-table td { padding: 6px 5px; border: 1px solid #8a94a3; white-space: normal; overflow-wrap: anywhere; font-size: .77rem; }
.statement-table tr:last-child td { border-bottom: 1px solid #8a94a3; }
.statement-table th:last-child, .statement-table td:last-child { text-align: right; }
.statement-bank { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin-top: 10px; padding: 10px; border: 1px solid #8a94a3; font-size: .83rem; }
.statement-bank div { display: grid; gap: 4px; overflow-wrap: anywhere; }
.statement-bank p { grid-column: 1 / -1; overflow-wrap: anywhere; }
.statement-signature { display: flex; justify-content: space-between; margin: 20px 0 0; flex-wrap: wrap; gap: 10px; font-size: .82rem; }

@media print {
  @page property-receipt { size: 241mm 93.1mm; margin: 0; }
  @page property-statement { size: A4 portrait; margin: 12mm; }
  body:not(.print-view):not(.statement-view) > * { display:none !important; }
  body.print-view, .print-view .shell, .print-view .workspace, .print-view .main,
  body.statement-view, .statement-view .shell, .statement-view .workspace, .statement-view .main {
    display: block; width: auto; min-height: auto; margin: 0; padding: 0; background: white; color: black;
  }
  .print-view .sidebar, .print-view .topbar, .print-view .toasts, .print-view .skip-link,
  .print-view .print-controls, .print-view .ticket-details, .statement-view .sidebar, .statement-view .topbar,
  .statement-view .toasts, .statement-view .skip-link, .statement-view .statement-controls { display: none !important; }
  .ticket-scroll { padding: 0; overflow: visible; }
  .ticket-paper { page: property-receipt; margin: 0; box-shadow: none; color: black; break-inside: avoid; }
  .ticket-content { --ticket-line: #000; }
  .ticket-content th, .ticket-content td, .ticket-content dt, .ticket-content .receipt-stamp { color: #000; background: transparent; }
  .statement-paper { page: property-statement; width: auto; border: 0; padding: 0; color: #000; }
  .statement-paper p, .statement-table th, .statement-table td { color: #000; background: #fff; }
  .statement-table th, .statement-table td, .statement-table tr:last-child td { border-color: #4a4a4a; }
  .statement-table thead { display: table-header-group; }
  .statement-table tr, .statement-bank, .statement-signature { break-inside: avoid; }
}

@media (min-width: 1550px) {
  .main { padding-left: 36px; padding-right: 36px; }
  .topbar { padding-left: 36px; padding-right: 36px; }
  .kpi { min-height: 144px; padding: 16px 20px; }
  .chart { --plot-height: 184px; }
  .ring-layout { min-height: 160px; }
  .ring { width: 144px; height: 144px; flex-basis: 144px; }
}
@media (max-width: 1320px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1120px) {
  :root { --sidebar-width: 200px; }
  .main, .topbar { padding-left: 21px; padding-right: 21px; }
  .kpi-grid, .chart-grid { gap: 12px; }
  .kpi { padding: 13px; }
  th, td { padding-left: 10px; padding-right: 10px; }
}
@media (max-height: 800px) {
  .sidebar { padding-top: 19px; }
  .brand { margin-bottom: 18px; }
  .nav-item { min-height: 36px; padding-top: 6px; padding-bottom: 6px; margin: 2px 0; }
  .nav-active::after { inset-block: 8px; }
}
@media (max-width: 920px) {
  .chart-grid { grid-template-columns: 1fr; }
  .ring-layout { max-width: 440px; margin: 0 auto; }
  .ring { width: 136px; height: 136px; flex-basis: 136px; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-value { font-size: clamp(1.35rem, 3.4vw, 1.8rem); }
  .desk-layout { grid-template-columns: minmax(0, 1fr); }
  .desk-payment { position: static; }
}
@media (max-width: 720px) {
  .shell { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; height: 100dvh; width: 224px; transform: translateX(-102%); visibility: hidden; transition: transform .18s, visibility .18s; }
  .sidebar-open { transform: none; visibility: visible; }
  .nav-scrim { position: fixed; z-index: 11; inset: 0; display: block; width: 100%; height: 100%; border: 0; background: rgb(11 27 57 / 34%); }
  .menu-button { display: inline-grid; margin-left: -6px; }
  .topbar { height: 56px; padding: 0 14px; }
  .topbar-left { gap: 5px; }
  .project-switch { max-width: 136px; font-size: .78rem; padding-left: 7px; }
  .topbar-left .breadcrumb { display: none; }
  .desk-search { padding: 13px; }
  .desk-search-form { flex-wrap: wrap; }
  .desk-search-input { flex-basis: 100%; }
  .desk-match { align-items: flex-start; flex-direction: column; gap: 4px; }
  .desk-resource { flex-wrap: wrap; }
  .desk-resource > div { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
  .desk-area { border: 0; padding: 0; }
  .desk-table th, .desk-table td { padding-inline: 8px; }
  .desk-table th { white-space: normal; }
  .desk-table th:first-child, .desk-table td:first-child { padding-left: 12px; }
  .desk-table th:last-child, .desk-table td:last-child { padding-right: 12px; }
  .section-tabs { margin-bottom: 12px; }
  .topbar-right { gap: 6px; }
  .operator { display: none; }
  .topbar-divider { margin: 0 2px; }
  .avatar { width: 29px; height: 29px; }
  .main { padding: 18px 14px 25px; min-height: calc(100dvh - 56px); }
  .page-heading { flex-wrap: wrap; align-items: flex-start; gap: 11px; margin-bottom: 15px; }
  .page-heading h1 { font-size: 1.67rem; }
  .page-heading p { font-size: .85rem; }
  .page-actions { gap: 7px; }
  .kpi-grid, .chart-grid { gap: 10px; margin-bottom: 12px; }
  .kpi { min-height: 110px; }
  .kpi-top { font-size: .835rem; }
  .kpi-icon { flex-basis: 29px; height: 29px; }
  .kpi-detail { font-size: .75rem; }
  .panel-heading { padding: 15px 14px 12px; }
  .chart { --plot-height: 142px; padding: 10px 14px 14px; gap: 5px; }
  .ring-layout { padding: 2px 14px 8px; }
  .status-footer { margin-left: 14px; margin-right: 14px; }
  .filter-bar { padding: 12px; }
  .filter-bar .search-box { flex: 1 0 100%; }
  .filter-bar select, .filter-bar .button { min-height: 36px; }
  .filter-bar select { background-position-y: 15px; }
  th:first-child, td:first-child { padding-left: 14px; }
  th:last-child, td:last-child { padding-right: 14px; }
  .list-footer { padding-left: 14px; padding-right: 14px; }
  .footer-amount { display: block; margin: 4px 0 0; }
  .login-view .main { padding: 22px 16px; }
  .login-layout { width: min(100%, 430px); grid-template-columns: minmax(0, 1fr); min-height: auto; border-radius: 20px; }
  .login-visual { height: clamp(124px, 34vw, 176px); }
  .login-visual img { object-position: 53% 58%; }
  .login-card { padding: 26px; }
  .login-card .brand-mark { width: 40px; height: 40px; margin-bottom: 14px; }
  .login-property { margin-bottom: 21px; }
}
@media (max-width: 390px) {
  .breadcrumb { font-size: .79rem; gap: 4px; }
  .topbar-right .topbar-divider { display: none; }
  .kpi { padding: 11px; }
  .kpi-value { font-size: 1.26rem; }
  .login-card { padding: 22px; }
  .fields { gap: 12px; padding-left: 15px; padding-right: 15px; }
  .modal-heading, .modal-content, .modal-footer {
    padding-left: 15px;
    padding-right: 15px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
