﻿@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --bg: #f6f4f1;
  --surface: #ffffff;
  --primary: #1e5b52;
  --primary-dark: #0f4038;
  --accent: #f0b429;
  --text: #1c2428;
  --muted: #6a767c;
  --border: #e2e5e8;
  --donut-empty: #e6eaee;
  --radius: 16px;
  --shadow: 0 18px 40px rgba(15, 24, 30, 0.08);
}

body[data-theme="dark"] {
  --bg: #0b0f0f;
  --surface: #141a19;
  --primary: #49a193;
  --primary-dark: #2f6b61;
  --accent: #f0b429;
  --text: #eef2f1;
  --muted: #9aa6a9;
  --border: #2a3432;
  --donut-empty: #27312f;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}

@media (prefers-color-scheme: dark) {
  body[data-theme="auto"] {
    --bg: #0b0f0f;
    --surface: #141a19;
    --primary: #49a193;
    --primary-dark: #2f6b61;
    --accent: #f0b429;
    --text: #eef2f1;
    --muted: #9aa6a9;
    --border: #2a3432;
    --donut-empty: #27312f;
    --shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", "Space Grotesk", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top right, #ffffff 0%, #f5f2ee 45%, #efeae4 100%);
  min-height: 100vh;
}

body[data-theme="dark"],
body[data-theme="auto"] {
  background: radial-gradient(circle at top right, #1d2422 0%, #111615 55%, #0c1010 100%);
}

body[data-theme="dark"] .card,
body[data-theme="dark"] .statement-row,
body[data-theme="dark"] .future-row,
body[data-theme="dark"] .statement-card,
body[data-theme="dark"] .settings-order-row,
body[data-theme="dark"] .settings-session-row,
body[data-theme="dark"] .table.is-mobile-card .table-row-mobile td,
body[data-theme="dark"] .form-details,
body[data-theme="dark"] .bottom-nav,
body[data-theme="dark"] .sheet-panel {
  background: var(--surface);
  border-color: var(--border);
}

body[data-theme="dark"] .list-item {
  background: rgba(255, 255, 255, 0.04);
}

body[data-theme="dark"] .more-item {
  background: #1b2221;
  border-color: var(--border);
}

body[data-theme="dark"] .progress.light,
body[data-theme="dark"] .category-bar {
  background: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .form-details {
  background: #121716;
}

body[data-theme="dark"] .form-details[open] {
  background: var(--surface);
}

body[data-theme="dark"] .table th,
body[data-theme="dark"] .table td {
  border-bottom-color: var(--border);
}

body[data-theme="dark"] .table,
body[data-theme="dark"] .table-wrap {
  background: var(--surface);
}

body[data-theme="dark"] .day-summary-row {
  background: #1a2120;
  border: 1px solid var(--border);
}

body[data-theme="dark"] .table th,
body[data-theme="dark"] .table td,
body[data-theme="dark"] .table tr {
  background: transparent;
}

body[data-theme="dark"] .budget-group td,
body[data-theme="dark"] .budget-group-total td,
body[data-theme="dark"] .table-row-mobile.is-group .table-mobile-row,
body[data-theme="dark"] .table-row-mobile.is-group-total .table-mobile-row {
  background: #1b2221;
  border-color: var(--border);
}

body[data-theme="dark"] .budget-group-toggle,
body[data-theme="dark"] .account-group-toggle {
  background: #1f2624;
  border-color: var(--border);
  color: var(--muted);
}

body[data-theme="dark"] .input,
body[data-theme="dark"] select.input,
body[data-theme="dark"] textarea.input,
body[data-theme="dark"] .input-static,
body[data-theme="dark"] .suggest-box .input,
body[data-theme="dark"] .field-suggest .input {
  background: #131817;
  color: var(--text);
  border-color: var(--border);
}

body[data-theme="dark"] .input::placeholder {
  color: rgba(238, 242, 241, 0.5);
}

@media (prefers-color-scheme: dark) {
  body[data-theme="auto"] .card,
  body[data-theme="auto"] .statement-row,
  body[data-theme="auto"] .future-row,
  body[data-theme="auto"] .statement-card,
  body[data-theme="auto"] .settings-order-row,
  body[data-theme="auto"] .settings-session-row,
  body[data-theme="auto"] .table.is-mobile-card .table-row-mobile td,
  body[data-theme="auto"] .form-details,
  body[data-theme="auto"] .bottom-nav,
  body[data-theme="auto"] .sheet-panel {
    background: var(--surface);
    border-color: var(--border);
  }

  body[data-theme="auto"] .list-item {
    background: rgba(255, 255, 255, 0.04);
  }

  body[data-theme="auto"] .more-item {
    background: #1b2221;
    border-color: var(--border);
  }

  body[data-theme="auto"] .progress.light,
  body[data-theme="auto"] .category-bar {
    background: rgba(255, 255, 255, 0.08);
  }

  body[data-theme="auto"] .form-details {
    background: #121716;
  }

  body[data-theme="auto"] .form-details[open] {
    background: var(--surface);
  }

  body[data-theme="auto"] .table th,
  body[data-theme="auto"] .table td {
    border-bottom-color: var(--border);
  }

  body[data-theme="auto"] .table,
  body[data-theme="auto"] .table-wrap {
    background: var(--surface);
  }

  body[data-theme="auto"] .day-summary-row {
    background: #1a2120;
    border: 1px solid var(--border);
  }

  body[data-theme="auto"] .table th,
  body[data-theme="auto"] .table td,
  body[data-theme="auto"] .table tr {
    background: transparent;
  }

  body[data-theme="auto"] .budget-group td,
  body[data-theme="auto"] .budget-group-total td,
  body[data-theme="auto"] .table-row-mobile.is-group .table-mobile-row,
  body[data-theme="auto"] .table-row-mobile.is-group-total .table-mobile-row {
    background: #1b2221;
    border-color: var(--border);
  }

  body[data-theme="auto"] .budget-group-toggle,
  body[data-theme="auto"] .account-group-toggle {
    background: #1f2624;
    border-color: var(--border);
    color: var(--muted);
  }

  body[data-theme="auto"] .input,
  body[data-theme="auto"] select.input,
  body[data-theme="auto"] textarea.input,
  body[data-theme="auto"] .input-static,
  body[data-theme="auto"] .suggest-box .input,
  body[data-theme="auto"] .field-suggest .input {
    background: #131817;
    color: var(--text);
    border-color: var(--border);
  }

  body[data-theme="auto"] .input::placeholder {
    color: rgba(238, 242, 241, 0.5);
  }
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  margin: 0;
}

p {
  margin: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 32px 24px;
  background: linear-gradient(160deg, #16493f 0%, #1e5b52 60%, #2a6b60 100%);
  color: #fff;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f0b429 0%, #f7d774 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.brand-name {
  font-weight: 700;
  font-size: 18px;
}

.brand-sub {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.75;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.8);
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.nav-item.is-active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.nav-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  color: inherit;
}

.nav-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.user-card {
  background: rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 4px;
}

.user-name {
  font-weight: 600;
}

.user-meta,
.user-role {
  font-size: 12px;
  opacity: 0.8;
}

.main {
  padding: 24px 32px 96px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.topbar-title {
  display: grid;
  gap: 4px;
}

.topbar-heading-mobile {
  display: none;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-weight: 600;
  font-size: 16px;
}

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

.workspace-switch .input.small {
  min-width: 180px;
}

.topbar-user {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: rgba(30, 91, 82, 0.12);
  padding: 8px 12px;
  border-radius: 999px;
}

.topbar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(30, 91, 82, 0.12);
  color: var(--primary);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.topbar-avatar.profile-toggle {
  border: none;
  padding: 0;
  cursor: pointer;
}

.profile-panel {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: flex-end;
  z-index: 45;
}

.profile-panel.is-open {
  display: flex;
}

.profile-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 24, 30, 0.35);
  border: none;
}

.profile-card {
  position: relative;
  margin: 68px 14px 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  min-width: 220px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(30, 91, 82, 0.12);
  color: var(--primary);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.profile-actions {
  display: grid;
  gap: 8px;
}

.profile-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 14px;
  color: inherit;
  cursor: pointer;
}

.profile-item .nav-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 960px) {
  .profile-card {
    margin: 60px 12px 0 auto;
    min-width: 200px;
  }
}

.eyebrow {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.dashboard-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.dashboard-section.is-hidden {
  display: none;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

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

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  align-items: start;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(15, 24, 30, 0.12);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

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

.stat-card .value {
  font-size: 24px;
  margin-top: 10px;
  display: block;
}

.value.positive {
  color: #1e8f4a;
}

.value.negative {
  color: #c04b3f;
}

.hint {
  font-size: 12px;
  color: var(--muted);
}

body.hide-values .mask-value {
  color: transparent;
  text-shadow: 0 0 10px rgba(28, 36, 40, 0.45);
  user-select: none;
}

body[data-theme="dark"].hide-values .mask-value {
  text-shadow: 0 0 12px rgba(238, 242, 241, 0.45);
}

@media (prefers-color-scheme: dark) {
  body[data-theme="auto"].hide-values .mask-value {
    text-shadow: 0 0 12px rgba(238, 242, 241, 0.45);
  }
}

body.hide-values .mask-value::selection {
  background: transparent;
}

.hint.delta {
  margin-top: 4px;
  font-weight: 600;
}

.hint.delta.positive {
  color: #1e8f4a;
}

.hint.delta.negative {
  color: #c04b3f;
}

.pill {
  font-size: 12px;
  padding: 4px 10px;
  background: rgba(240, 180, 41, 0.15);
  border-radius: 999px;
  color: #7a5a11;
}

.chart-placeholder {
  height: 180px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(30, 91, 82, 0.08), rgba(240, 180, 41, 0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
}

.action-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.actions-inline {
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.actions-inline .btn,
.actions-inline .inline-form {
  flex: 0 0 auto;
}

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.action-group form {
  margin: 0;
}

.cards-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.statement-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  background: #ffffff;
}

.card-visual {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  min-height: 110px;
  background: linear-gradient(135deg, #1a4a43, #2f6b61);
  color: #fff;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.card-visual.has-image {
  background-color: #e7eaef;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.card-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10, 25, 22, 0.15), rgba(10, 25, 22, 0.68));
}

.card-visual.has-image .card-visual-overlay {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.35));
}

.card-visual-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
}

.card-visual.has-image .card-visual-content {
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 8px;
  border-radius: 10px;
  backdrop-filter: blur(6px);
}

.card-brand {
  font-size: 14px;
  font-weight: 600;
}

.card-meta {
  font-size: 12px;
  opacity: 0.8;
}

.statement-info {
  display: grid;
  gap: 8px;
}

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

.statement-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
}

.statement-row-main {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}

.statement-row-content {
  display: grid;
  gap: 8px;
}

.statement-row-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.statement-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.statement-row-values {
  display: grid;
  gap: 8px;
  text-align: right;
  align-content: center;
}

.card-thumb {
  width: 48px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(30, 91, 82, 0.9), rgba(240, 180, 41, 0.6));
  box-shadow: 0 8px 18px rgba(15, 24, 30, 0.16);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}

.card-thumb.has-image {
  background-color: #0f1514;
  background-size: cover;
  background-position: center;
  padding: 0;
}

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

.future-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 320px) 120px;
  gap: 20px;
  align-items: center;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
}

.future-main {
  display: grid;
  gap: 6px;
}

.future-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.future-title-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.future-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.future-sparkline {
  display: flex;
  justify-content: center;
}

.sparkline {
  width: 100%;
  height: auto;
  aspect-ratio: var(--spark-aspect, 4);
  display: block;
  stroke: #1e5b52;
  stroke-width: 2;
  fill: none;
}

.sparkline circle {
  fill: #1e5b52;
}

.sparkline-wrap {
  display: grid;
  gap: 8px;
  justify-items: stretch;
  width: 100%;
  max-width: 260px;
  margin: 0 auto;
}

.sparkline-wrap.is-compact {
  max-width: 160px;
  gap: 6px;
}

.sparkline-labels {
  display: grid;
  gap: 8px;
  font-size: 10px;
  color: var(--muted);
  grid-template-columns: repeat(var(--spark-count, 1), minmax(0, 1fr));
  justify-items: center;
}

.sparkline-wrap.is-compact .sparkline-labels {
  font-size: 9px;
}

.sparkline-values {
  display: grid;
  gap: 8px;
  font-size: 9px;
  font-weight: 600;
  color: var(--text);
  margin-top: 0;
  grid-template-columns: repeat(var(--spark-count, 1), minmax(0, 1fr));
  justify-items: center;
}

.sparkline-labels span,
.sparkline-values span {
  text-align: center;
}

.sparkline-values span {
  white-space: nowrap;
}

.sparkline polyline {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.future-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  align-self: center;
}

.statement-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.statement-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.statement-bulk {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -4px 0 12px;
  flex-wrap: wrap;
}

.statement-sort .field {
  margin: 0;
}

.statement-sort .muted.small {
  font-weight: 600;
}

.statement-label {
  color: var(--muted);
  font-size: 12px;
}

.statement-value {
  font-size: 17px;
  font-weight: 600;
}

.status-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: rgba(30, 91, 82, 0.12);
  color: #1e5b52;
}

.status-pill.is-closed {
  background: rgba(240, 180, 41, 0.18);
  color: #7a5a11;
}

.status-pill.is-paid {
  background: rgba(46, 140, 79, 0.18);
  color: #1e8f4a;
}

.progress {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(30, 91, 82, 0.12);
  overflow: hidden;
}

.progress span {
  position: absolute;
  inset: 0;
  width: 0;
  background: linear-gradient(90deg, #1e5b52, #2f6b61);
  border-radius: 999px;
}

.progress.light {
  background: rgba(30, 91, 82, 0.08);
}

.progress.is-over {
  background: rgba(192, 75, 63, 0.15);
}

.progress.is-over span {
  background: linear-gradient(90deg, #c04b3f, #e07a70);
}

.progress.is-warning {
  background: rgba(240, 180, 41, 0.2);
}

.progress.is-warning span {
  background: linear-gradient(90deg, #f0b429, #f7d774);
}

.statement-meta,
.statement-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
}

.pay-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.pay-summary strong {
  color: var(--text);
  font-weight: 600;
}

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

.list-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8f6f1;
}

.list-title {
  font-weight: 600;
}

.list-value {
  font-weight: 600;
}

.list-value.positive {
  color: #1e8f4a;
}

.list-value.negative {
  color: #c04b3f;
}

.list-footer {
  margin-top: 12px;
}

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

.category-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
}

.category-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-value {
  font-weight: 600;
}

.category-bar {
  grid-column: 1 / -1;
  height: 8px;
  border-radius: 999px;
  background: rgba(30, 91, 82, 0.08);
  overflow: hidden;
}

.category-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, rgba(30, 91, 82, 0.6), rgba(30, 91, 82, 0.2));
}

.donut-layout {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 18px;
  align-items: center;
}

.donut-chart-wrap {
  position: relative;
  width: 160px;
  height: 160px;
}

.donut-chart {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--donut, conic-gradient(var(--donut-empty) 0% 100%));
}

.donut-chart::after {
  content: "";
  position: absolute;
  inset: 20px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
}

.donut-center {
  position: absolute;
  inset: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  z-index: 1;
}

.donut-total {
  font-size: 16px;
  font-weight: 600;
}

.donut-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.donut-legend {
  display: grid;
  gap: 10px;
}

.donut-legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.donut-legend-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.donut-legend-value {
  font-weight: 600;
}

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

.report-tab {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.report-tab:hover {
  border-color: rgba(30, 91, 82, 0.35);
  color: var(--primary);
}

.report-tab.is-active {
  background: rgba(30, 91, 82, 0.12);
  border-color: rgba(30, 91, 82, 0.45);
  color: var(--primary);
}

.flow-list {
  display: grid;
  gap: 16px;
}

.flow-item {
  display: grid;
  gap: 8px;
}

.flow-label {
  font-size: 12px;
  color: var(--muted);
}

.flow-value {
  font-weight: 600;
}

.flow-value.positive {
  color: #1e8f4a;
}

.flow-value.negative {
  color: #c04b3f;
}

.budget-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.budget-indent {
  padding-left: calc(var(--depth, 0) * 16px);
}

.budget-group td {
  background: #f7f4ee;
  font-weight: 600;
}

.budget-group .muted {
  font-weight: 500;
}

.budget-detail td {
  color: var(--muted);
}

.budget-group-total td {
  background: #fbfaf7;
  font-weight: 600;
  border-top: 1px solid var(--border);
}

.budget-group-toggle,
.account-group-toggle {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--muted);
}

.budget-group-toggle svg,
.account-group-toggle svg {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

.budget-group-toggle.is-collapsed svg,
.account-group-toggle.is-collapsed svg {
  transform: rotate(-90deg);
}

.budget-row.is-hidden,
.table-row-mobile.is-hidden {
  display: none;
}

.table-row-mobile.is-group .table-mobile-row {
  background: #f7f4ee;
  border: 1px solid var(--border);
}

.table-row-mobile.is-group-total .table-mobile-row {
  background: #fbfaf7;
  border: 1px solid var(--border);
}

.budget-overview {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  align-items: start;
}

.budget-overview-main {
  display: grid;
  gap: 10px;
}

.budget-overview-value {
  font-size: 28px;
  font-weight: 700;
}

.budget-overview-meta {
  font-size: 12px;
  color: var(--muted);
}

.budget-overview-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

.budget-alerts {
  display: grid;
  gap: 10px;
}

.budget-alert-item {
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #ffffff;
}

.budget-alert-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.budget-alert-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.budget-alert-trend {
  max-width: 160px;
}

@media (max-width: 720px) {
  .cards-grid {
    grid-template-columns: 1fr;
  }

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

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

  .card-grid .card {
    padding: 14px;
  }

  .stat-card .value {
    font-size: 20px;
  }

  .stat-card .label,
  .stat-card .hint {
    font-size: 11px;
  }

  .donut-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .donut-legend {
    width: 100%;
  }

  .report-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .report-tab {
    white-space: nowrap;
  }
}

@media (max-width: 1200px) {
  .cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

.form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.field {
  display: grid;
  gap: 8px;
  font-size: 14px;
  align-content: start;
  justify-items: stretch;
  min-width: 0;
}

.field.is-hidden {
  display: none;
}

.field-suggest .suggest-box,
.suggest-box {
  position: relative;
  width: 100%;
}

.field-suggest .input,
.suggest-box .input {
  width: 100%;
}

.suggest-list {
  position: absolute;
  inset: calc(100% + 6px) 0 auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-height: 240px;
  overflow-y: auto;
  padding: 6px;
  display: none;
  z-index: 20;
}

.suggest-list.is-open {
  display: grid;
  gap: 4px;
}

.suggest-item {
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  display: grid;
  gap: 4px;
}

.suggest-item:hover {
  background: #f8f6f1;
}

.suggest-title {
  font-weight: 600;
  font-size: 14px;
}

.suggest-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}

.input {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 15px;
  font-family: "Manrope", "Space Grotesk", sans-serif;
}

.input-static {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  background: #f8f6f1;
  color: var(--text);
}

.input-readonly {
  display: flex;
  align-items: center;
  color: var(--muted);
  background: #f7f7f5;
}

.input[type="color"] {
  padding: 4px;
  height: 46px;
}

.input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 4px;
}

.input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 8px;
}

.input.input-inline {
  padding: 8px 10px;
  font-size: 13px;
  min-width: 180px;
}

.table .input.input-inline {
  width: 100%;
}

.input-textarea {
  min-height: 88px;
  resize: vertical;
}

.input:focus {
  outline: 2px solid rgba(30, 91, 82, 0.18);
  border-color: rgba(30, 91, 82, 0.45);
}

.select-with-icon {
  display: flex;
  align-items: center;
  gap: 8px;
}

.select-with-icon .category-preview {
  display: flex;
  align-items: center;
}

.select-with-icon .icon-pill {
  flex: 0 0 auto;
}

.select-with-icon .input {
  flex: 1 1 auto;
  min-width: 160px;
}

.field-error {
  color: #c04b3f;
  font-size: 12px;
}

.hint-text {
  color: var(--muted);
  font-size: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 12px;
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 14px 24px rgba(30, 91, 82, 0.2);
}

.btn.secondary {
  background: rgba(30, 91, 82, 0.12);
  color: var(--primary);
}

.btn.ghost {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--border);
}

.sidebar .btn.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn.full {
  width: 100%;
}

[data-toggle-values-icon] .icon-eye {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

[data-toggle-values-icon] .icon-eye svg {
  width: 20px;
  height: 20px;
}

[data-toggle-values-icon] .icon-eye-closed {
  display: none;
}

.hide-values [data-toggle-values-icon] .icon-eye-open {
  display: none;
}

.hide-values [data-toggle-values-icon] .icon-eye-closed {
  display: inline-flex;
}

.btn:hover {
  transform: translateY(-1px);
}

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  border: 1px solid transparent;
}

.alert.error {
  background: rgba(192, 75, 63, 0.12);
  border-color: rgba(192, 75, 63, 0.4);
  color: #8f2e25;
}

.alert.success {
  background: rgba(30, 143, 74, 0.12);
  border-color: rgba(30, 143, 74, 0.35);
  color: #1a6a38;
}

.alert.is-hidden {
  display: none;
}

.link {
  color: var(--primary);
  font-weight: 600;
}

.form-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: start;
}

.form-grid .input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  min-width: 0;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

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

.icon-spot {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f0f3f2;
  display: grid;
  place-items: center;
  color: #ffffff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.icon-spot svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.icon-spot .icon-fallback {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
}

.icon-spot:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(15, 24, 30, 0.12);
}

.icon-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.icon-picker-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.icon-picker-modal.is-open {
  display: flex;
}

.icon-picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 24, 30, 0.45);
}

.icon-picker-panel {
  position: relative;
  width: min(520px, 92%);
  max-height: 80vh;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(15, 24, 30, 0.18);
  padding: 18px;
  display: grid;
  gap: 16px;
  overflow-y: auto;
}

.icon-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.icon-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
  gap: 10px;
}

.icon-option {
  border: 1px solid var(--border);
  background: #f5f6f4;
  border-radius: 14px;
  padding: 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--primary);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.icon-option svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.icon-option .icon-fallback {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.icon-option:hover {
  transform: translateY(-1px);
  border-color: rgba(30, 91, 82, 0.4);
  box-shadow: 0 10px 18px rgba(15, 24, 30, 0.12);
}

.goal-tabs {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(30, 91, 82, 0.08);
}

.goal-tab {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

.goal-tab span {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(30, 91, 82, 0.12);
}

.goal-tab.is-active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow);
}

.settings-tabs {
  display: flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(30, 91, 82, 0.08);
  flex-wrap: wrap;
  box-sizing: border-box;
}

.settings-tab {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.settings-tab.is-active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

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

.settings-row-info {
  display: grid;
  gap: 4px;
}

.settings-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.settings-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-track {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(30, 91, 82, 0.15);
  position: relative;
  transition: background 0.2s ease;
}

.toggle-track::after {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ffffff;
  position: absolute;
  top: 3px;
  left: 3px;
  box-shadow: 0 6px 12px rgba(15, 24, 30, 0.15);
  transition: transform 0.2s ease;
}

.settings-toggle input:checked + .toggle-track {
  background: rgba(30, 91, 82, 0.7);
}

.settings-toggle input:checked + .toggle-track::after {
  transform: translateX(20px);
}

.settings-order-list {
  display: grid;
  gap: 10px;
}

.settings-order-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.settings-order-row.is-dragging {
  opacity: 0.6;
}

.settings-drag-handle {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 91, 82, 0.12);
  color: var(--primary);
  cursor: grab;
}

.settings-drag-handle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.settings-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
}

.settings-check span {
  display: grid;
  gap: 4px;
}

.settings-order-actions {
  display: flex;
  gap: 6px;
}

.settings-session-list {
  display: grid;
  gap: 12px;
}

.settings-session-row {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.settings-session-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.settings-danger {
  border-color: rgba(192, 75, 63, 0.25);
}

.settings-danger .card-header h3 {
  color: #c04b3f;
}

.goal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

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

.goal-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.goal-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.goal-card-title strong {
  display: block;
}

.goal-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(30, 91, 82, 0.12);
  overflow: hidden;
}

.goal-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #1e5b52, #2f6b61);
}

.goal-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

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

.goal-empty {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.goal-detail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  align-items: start;
}

.goal-detail-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

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

.goal-detail-body {
  display: grid;
  gap: 16px;
}

.goal-ring {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: conic-gradient(#1e5b52 var(--goal-progress), #e6ecea 0);
  display: grid;
  place-items: center;
  margin: 8px 0;
}

.goal-ring > div {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #ffffff;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.goal-ring strong {
  font-size: 20px;
  color: var(--text);
}

.goal-detail-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.goal-detail-info strong {
  display: block;
  margin-top: 4px;
}

.goal-detail-tip {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(240, 180, 41, 0.12);
  color: #7a5a11;
  font-size: 12px;
}

.goal-deposit-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

@media (max-width: 960px) {
  .goal-empty {
    flex-direction: column;
    align-items: flex-start;
  }
  .goal-tabs {
    flex-wrap: wrap;
  }
}

.form-details {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fbfaf7;
}

.form-details + .form-details {
  margin-top: 6px;
}

.form-details summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.details-chevron {
  color: var(--muted);
  font-size: 14px;
  transition: transform 0.2s ease;
}

.form-details[open] .details-chevron {
  transform: rotate(90deg);
}

.form-details[open] {
  background: #ffffff;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.budget-toolbar {
  align-items: center;
}

.budget-toolbar form {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.budget-toolbar .input,
.budget-toolbar .btn {
  height: 44px;
}

.budget-toolbar .btn {
  padding: 0 16px;
}

.competence-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.input.small {
  padding: 8px 10px;
  font-size: 13px;
  min-height: 36px;
}

.table-wrap {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table-row-mobile {
  display: none;
}

.table-mobile-row {
  display: grid;
  gap: 10px;
  padding: 10px 6px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  width: 100%;
  position: relative;
  z-index: 1;
}

.table-mobile-swipe {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: var(--surface);
}

.table-mobile-swipe .table-mobile-row {
  transition: transform 0.2s ease;
}

.table-mobile-swipe.is-revealed .table-mobile-row {
  transform: translateX(-72px);
}

.table-mobile-action {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(192, 75, 63, 0.12);
  border-left: 1px solid var(--border);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 0;
}

.table-mobile-action .btn.icon {
  width: 36px;
  height: 36px;
}

.table-mobile-swipe.is-revealed .table-mobile-action {
  opacity: 1;
  pointer-events: auto;
}

.table-mobile-row.compact {
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 8px 6px 10px;
  cursor: pointer;
}

.table-mobile-row.compact:focus-visible {
  outline: 2px solid rgba(30, 91, 82, 0.25);
  outline-offset: 2px;
  border-radius: 12px;
}

.table-mobile-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.table-mobile-row.compact .table-mobile-main {
  gap: 4px;
}

.table-mobile-row.compact .table-mobile-title {
  gap: 2px;
}

.table-mobile-row.compact .table-mobile-title strong {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-mobile-row.compact .table-mobile-meta {
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

  .table-mobile-row.compact .table-mobile-side {
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
  }

.table-mobile-row.compact .table-mobile-value {
  font-size: 13px;
}

.table-mobile-row.compact .status {
  font-size: 10px;
  padding: 3px 8px;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  padding: 0;
}

.table-mobile-main {
  display: grid;
  gap: 6px;
}

.table-mobile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.table-mobile-head .table-mobile-title {
  min-width: 0;
}

.table-mobile-title {
  display: grid;
  gap: 4px;
}

.table-mobile-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.table-mobile-side {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.table-mobile-value {
  font-weight: 600;
}

.table-mobile-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.table-mobile-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.icon-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.icon-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.table th,
.table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table td strong {
  display: block;
}

.table tr.is-inactive {
  opacity: 0.6;
}

.day-summary td {
  padding: 0;
  border-bottom: none;
}

.day-summary-row {
  margin: 8px 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f3f4f2;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.day-summary-title {
  font-weight: 600;
  color: var(--text);
}

.day-summary-values {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
}

.day-summary-item strong {
  color: var(--text);
  font-weight: 600;
  margin-left: 4px;
}

.day-summary-item.positive strong {
  color: #1e8f4a;
}

.day-summary-item.negative strong {
  color: #c04b3f;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(30, 91, 82, 0.12);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

.tag.small {
  padding: 2px 8px;
  font-size: 10px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(240, 180, 41, 0.18);
  color: #7a5a11;
  font-size: 11px;
  font-weight: 600;
}

.chip-remove {
  border: none;
  background: transparent;
  color: inherit;
  margin-left: 6px;
  font-size: 12px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.keyword-editor {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.keyword-label {
  font-size: 11px;
  color: var(--muted);
}

.status {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.status-active {
  background: rgba(30, 143, 74, 0.12);
  color: #1a6a38;
}

.status-warning {
  background: rgba(240, 180, 41, 0.18);
  color: #7a5a11;
}

.status-inactive {
  background: rgba(192, 75, 63, 0.12);
  color: #8f2e25;
}

.card-label {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-dot {
  width: 28px;
  height: 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(30, 91, 82, 0.8), rgba(240, 180, 41, 0.6));
  box-shadow: 0 6px 12px rgba(15, 24, 30, 0.12);
}

.muted.small {
  font-size: 12px;
}

.status-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.status-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.toggle-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  cursor: pointer;
}

.toggle-field .settings-toggle {
  pointer-events: auto;
}
.statement-box {
  display: grid;
  gap: 4px;
}

.account-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.color-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

.icon-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #eef3f2;
  color: var(--primary);
  font-size: 15px;
  font-weight: 600;
}

.icon-pill svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon-pill.is-filled {
  color: #fff;
}

.icon-pill.is-filled.is-empty {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
}

.icon-pill.is-outline,
.icon-pill.is-color {
  background: transparent;
  border: 1px solid var(--border);
}

.btn.small {
  padding: 8px 12px;
  font-size: 12px;
}

.btn.icon {
  padding: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.btn.icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.btn.danger {
  background: rgba(192, 75, 63, 0.12);
  color: #c04b3f;
  border: 1px solid rgba(192, 75, 63, 0.25);
  box-shadow: none;
}

.btn.danger:hover {
  background: rgba(192, 75, 63, 0.18);
}

.auth {
  background: radial-gradient(circle at 20% 20%, #ffffff 0%, #f7f4ef 50%, #f0ece6 100%);
}

.auth-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.auth-panel {
  padding: 48px 64px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.auth-brand {
  color: var(--primary-dark);
}

.auth-side {
  background: linear-gradient(160deg, #16493f 0%, #1e5b52 60%, #2a6b60 100%);
  color: #fff;
  padding: 48px;
  display: flex;
  align-items: center;
}

.auth-side-content {
  display: grid;
  gap: 16px;
  max-width: 360px;
}

.auth-metrics {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.metric-value {
  font-size: 24px;
  font-weight: 700;
  display: block;
}

.metric-label {
  font-size: 13px;
  opacity: 0.8;
}

.bottom-nav {
  position: fixed;
  bottom: 14px;
  left: 14px;
  right: 14px;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 10px 12px;
  display: none;
  gap: 8px;
  align-items: center;
  z-index: 10;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.bottom-item {
  flex: 1;
  text-align: center;
  font-size: 12px;
  display: grid;
  gap: 6px;
  padding: 8px 6px;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  min-width: 0;
  justify-items: center;
  -webkit-tap-highlight-color: transparent;
}

.bottom-item:focus,
.bottom-item:focus-visible {
  outline: none;
  box-shadow: none;
}

.bottom-item.is-active {
  background: rgba(30, 91, 82, 0.1);
  color: var(--primary);
}

.bottom-item .nav-icon {
  margin: 0 auto;
}

.bottom-item.is-fab {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 16px 24px rgba(30, 91, 82, 0.35);
  margin-top: -30px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
}

.bottom-item.is-fab .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.bottom-item.is-fab .nav-icon svg {
  stroke: #fff;
  transition: transform 0.25s ease;
}

.bottom-item.is-fab.is-open .nav-icon svg {
  transform: rotate(45deg);
}

.notify-toggle {
  position: relative;
}

.notify-badge {
  position: absolute;
  top: -4px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #e4574f;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.notify-panel {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-start;
  justify-content: flex-end;
  z-index: 45;
}

.notify-panel.is-open {
  display: flex;
}

.notify-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 24, 30, 0.4);
  border: none;
}

.notify-card {
  position: relative;
  width: min(420px, 92vw);
  max-height: 80vh;
  margin: 80px 18px 18px;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  gap: 16px;
  overflow: hidden;
}

.notify-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

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

.notify-list {
  display: grid;
  gap: 10px;
  overflow-y: auto;
  padding-right: 4px;
}

.notify-item {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #ffffff;
  position: relative;
}

.notify-item::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  position: absolute;
  top: 14px;
  right: 14px;
}

.notify-item.is-read {
  opacity: 0.7;
}

.notify-item.is-read::before {
  background: transparent;
}

.notify-title {
  font-weight: 600;
}

.notify-body {
  font-size: 12px;
  color: var(--muted);
}

.notify-time {
  font-size: 11px;
  color: var(--muted);
}

.notify-empty {
  padding: 14px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  font-size: 12px;
  color: var(--muted);
}

.fab-menu {
  position: fixed;
  inset: 0;
  display: block;
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.fab-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.fab-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 24, 30, 0.5);
  opacity: 0;
  border: none;
  transition: opacity 0.2s ease;
}

.fab-menu.is-open .fab-backdrop {
  opacity: 1;
}

.fab-actions {
  position: absolute;
  bottom: 110px;
  left: 50%;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  pointer-events: none;
}

.fab-action {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%) translate(0, 0) scale(0.2);
  opacity: 0;
  width: 90px;
  display: grid;
  gap: 6px;
  justify-items: center;
  text-align: center;
  color: #f5f7f6;
  font-size: 11px;
  pointer-events: auto;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  transition-delay: var(--delay, 0ms);
  -webkit-tap-highlight-color: transparent;
}

.fab-action:focus,
.fab-action:focus-visible {
  outline: none;
  box-shadow: none;
}

.fab-action:active {
  transform: translate(-50%, -50%) translate(var(--x, 0px), var(--y, 0px)) scale(0.98);
}

.bottom-item:active {
  transform: scale(0.98);
}

.fab-menu.is-open .fab-action {
  transform: translate(-50%, -50%) translate(var(--x, 0px), var(--y, 0px)) scale(1);
  opacity: 1;
  animation: fab-pop 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
  animation-delay: var(--delay, 0ms);
}

@keyframes fab-pop {
  0% {
    transform: translate(-50%, -50%) translate(0, 0) scale(0.2);
    opacity: 0;
  }
  70% {
    transform: translate(-50%, -50%) translate(var(--x, 0px), var(--y, 0px)) scale(1.08);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) translate(var(--x, 0px), var(--y, 0px)) scale(1);
    opacity: 1;
  }
}

.fab-icon {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: 0 12px 24px rgba(15, 24, 30, 0.18);
  display: grid;
  place-items: center;
  color: var(--primary);
}

.fab-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.fab-label {
  font-size: 11px;
}

.more-sheet {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 42;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.more-sheet.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.more-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 24, 30, 0.45);
  border: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.more-panel {
  position: relative;
  width: min(520px, 94vw);
  max-height: 70vh;
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  padding: 18px 18px 24px;
  box-shadow: 0 -16px 32px rgba(15, 24, 30, 0.18);
  display: grid;
  gap: 14px;
  overflow-y: auto;
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.more-sheet.is-open .more-backdrop {
  opacity: 1;
}

.more-sheet.is-open .more-panel {
  transform: translateY(0);
  opacity: 1;
}

.dialog-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 24, 30, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 60;
}

.dialog-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.dialog-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: transparent;
}

.dialog-card {
  position: relative;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow);
  width: min(420px, 100%);
  padding: 18px;
  display: grid;
  gap: 12px;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.2s ease;
}

.dialog-overlay.is-open .dialog-card {
  transform: translateY(0) scale(1);
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dialog-header h4 {
  margin: 0;
  font-size: 18px;
}

.dialog-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.dialog-close {
  width: 32px;
  height: 32px;
  font-size: 18px;
  line-height: 1;
}

.is-dialog-open {
  overflow: hidden;
}

.calc-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 60;
}

.calc-overlay.is-open {
  display: flex;
}

.calc-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 24, 30, 0.5);
  border: none;
}

.calc-panel {
  position: relative;
  width: min(420px, 100%);
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  padding: 20px;
  box-shadow: 0 -16px 36px rgba(15, 24, 30, 0.25);
  display: grid;
  gap: 16px;
  z-index: 1;
}

[data-theme="dark"] .calc-panel {
  background: #141a1c;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.calc-display {
  display: grid;
  gap: 6px;
}

.calc-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.calc-value {
  font-size: 24px;
  font-weight: 700;
}

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

.calc-key {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

[data-theme="dark"] .calc-key {
  background: #1a2124;
  border-color: rgba(255, 255, 255, 0.08);
  color: #e7ecef;
}

.calc-key-func {
  color: var(--primary);
}

.calc-key-op {
  color: var(--accent);
  font-weight: 700;
}

[data-theme="dark"] .calc-key-op {
  color: #f2c14f;
}

.calc-key-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  box-shadow: 0 12px 22px rgba(30, 91, 82, 0.25);
}

.calc-key-equals {
  background: var(--accent);
  color: #1c2428;
  border: none;
  box-shadow: 0 12px 22px rgba(240, 180, 41, 0.3);
}

[data-theme="dark"] .calc-key-equals {
  background: var(--accent);
  color: #1c2428;
  border: none;
}

.calc-key-wide {
  grid-column: span 2;
}

@media (min-width: 961px) {
  .calc-overlay {
    align-items: center;
  }

  .calc-panel {
    border-radius: 20px;
  }
}

.category-sheet {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 45;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.category-sheet.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.category-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 24, 30, 0.45);
  border: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.category-panel {
  position: relative;
  width: min(520px, 94vw);
  max-height: 72vh;
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  padding: 18px 18px 20px;
  box-shadow: 0 -16px 32px rgba(15, 24, 30, 0.18);
  display: grid;
  gap: 12px;
  overflow-y: auto;
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.category-sheet.is-open .category-backdrop {
  opacity: 1;
}

.category-sheet.is-open .category-panel {
  transform: translateY(0);
  opacity: 1;
}

.category-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.category-search {
  width: 100%;
}

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

.category-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #ffffff;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.category-option:hover {
  border-color: rgba(30, 91, 82, 0.35);
  background: rgba(30, 91, 82, 0.06);
}

.category-option.is-selected {
  border-color: rgba(30, 91, 82, 0.55);
  background: rgba(30, 91, 82, 0.08);
}

.category-option-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.category-option-label {
  flex: 1;
}

.category-option.is-hidden {
  display: none;
}

.category-quick-btn.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.filter-sheet {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 44;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.filter-sheet.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.filter-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 24, 30, 0.45);
  border: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.filter-panel {
  position: relative;
  width: min(520px, 94vw);
  max-height: 78vh;
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  padding: 18px 18px 24px;
  box-shadow: 0 -16px 32px rgba(15, 24, 30, 0.18);
  display: grid;
  gap: 12px;
  overflow-y: auto;
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.filter-sheet.is-open .filter-backdrop {
  opacity: 1;
}

.filter-sheet.is-open .filter-panel {
  transform: translateY(0);
  opacity: 1;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.filters-inline {
  display: flex;
}

.only-mobile {
  display: none;
}

.only-desktop {
  display: block;
}

.show-mobile {
  display: none;
}

.hide-mobile {
  display: inline-flex;
}

.more-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

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

.more-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #ffffff;
  font-size: 14px;
}

.is-overlay-open {
  overflow: hidden;
}

.sheet {
  position: fixed;
  inset: 0;
  display: none;
  align-items: stretch;
  justify-content: flex-end;
  z-index: 40;
}

.sheet.is-open {
  display: flex;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 24, 30, 0.4);
}

.sheet-panel {
  position: relative;
  height: 100%;
  width: min(560px, 100%);
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: -20px 0 40px rgba(15, 24, 30, 0.15);
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.report-trend {
  display: grid;
  gap: 12px;
}

.report-trend-row {
  display: grid;
  grid-template-columns: 90px 1fr 160px;
  gap: 12px;
  align-items: center;
}

.report-trend-label {
  font-size: 12px;
  color: var(--muted);
}

.report-trend-bars {
  display: grid;
  gap: 6px;
}

.report-trend-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(30, 91, 82, 0.12);
  overflow: hidden;
}

.report-trend-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
}

.report-trend-income span {
  background: linear-gradient(90deg, rgba(30, 143, 74, 0.7), rgba(30, 143, 74, 0.3));
}

.report-trend-expense span {
  background: linear-gradient(90deg, rgba(192, 75, 63, 0.7), rgba(192, 75, 63, 0.3));
}

.report-trend-values {
  display: grid;
  gap: 4px;
  justify-items: end;
  font-size: 12px;
}

.report-trend-legend {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-right: 6px;
}

.legend-income {
  background: rgba(30, 143, 74, 0.7);
}

.legend-expense {
  background: rgba(192, 75, 63, 0.7);
}

@media (max-width: 960px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding: 14px 12px 120px;
  }

  .page-header {
    align-items: flex-start;
    gap: 12px;
  }

  .card {
    padding: 12px;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 8px;
  }

  .form-inline {
    flex-direction: column;
    align-items: stretch;
  }

  .form-inline .input,
  .form-inline .btn {
    width: 100%;
  }

  .settings-tabs {
    width: 100%;
    flex-wrap: wrap;
    overflow: visible;
    border-radius: 16px;
    padding: 8px;
    gap: 6px;
  }

  .settings-tab {
    white-space: nowrap;
    flex: 0 0 auto;
  }

  .settings-order-row {
    grid-template-columns: 30px 1fr auto;
    align-items: flex-start;
  }

  .col-hide-sm {
    display: none;
  }

  .table.is-mobile-card thead {
    display: none;
  }

  .table.is-mobile-card tbody tr:not(.table-row-mobile) {
    display: none;
  }

  .table.is-mobile-card .table-row-mobile {
    display: table-row;
  }

  .table.is-mobile-card .table-row-mobile.is-hidden {
    display: none;
  }

  .table.is-mobile-card .table-row-mobile td {
    padding: 0;
  }

  .table {
    font-size: 12px;
  }

  .table th,
  .table td {
    padding: 8px 6px;
  }

  .page {
    gap: 10px;
  }

  .reports-page {
    width: 100%;
    overflow-x: hidden;
  }

  .reports-page .card-grid {
    grid-template-columns: 1fr;
  }

  .reports-page .report-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
  }

  .reports-page .report-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    white-space: normal;
    text-align: center;
    padding: 8px 10px;
    font-size: 12px;
  }

  .donut-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .donut-chart-wrap {
    width: 140px;
    height: 140px;
  }

  .donut-center {
    inset: 18px;
  }

  .donut-legend {
    width: 100%;
  }

  .donut-legend-row {
    align-items: center;
  }

  .donut-legend-info {
    min-width: 0;
  }

  .donut-legend-info span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 150px;
  }

  .donut-legend-value {
    flex-shrink: 0;
  }

  .dashboard-stack {
    grid-template-columns: 1fr;
  }

  .filters-inline {
    display: none;
  }

  .only-mobile {
    display: block;
  }

  .only-desktop {
    display: none !important;
  }

  .show-mobile {
    display: inline-flex;
  }

  .hide-mobile {
    display: none !important;
  }

  .competence-form {
    margin-bottom: 12px;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }

  .competence-form .input {
    min-width: 120px;
  }

  .period-pill {
    display: none;
  }

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

  .summary-grid .stat-card {
    padding: 12px;
  }

  .summary-grid .stat-card .label {
    font-size: 11px;
  }

  .summary-grid .stat-card .value {
    font-size: 16px;
  }

  .summary-grid .stat-card .hint {
    font-size: 10px;
  }

  .summary-accordion {
    border: none;
    padding: 0;
    box-shadow: none;
    background: transparent;
    margin: 0;
  }

  .summary-accordion summary {
    padding: 6px 0;
  }

  .summary-accordion .summary-content {
    margin-top: 6px;
  }

  .summary-accordion .card {
    box-shadow: none;
  }

  .summary-accordion .card-grid {
    margin-top: 6px;
  }

  .mobile-competence {
    display: flex;
    justify-content: center;
    margin: 0 0 4px;
  }

  .table-mobile-row {
    padding: 8px 4px 8px;
  }

  .table-mobile-row.compact {
    padding: 6px 4px 8px;
    gap: 10px;
  }

  .table-mobile-row.compact .icon-pill {
    width: 36px;
    height: 36px;
  }

  .table-mobile-row.compact .icon-pill svg {
    width: 20px;
    height: 20px;
  }

  .table-mobile-status {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .status-dot,
  .type-dot {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
  }

  .status-dot svg {
    width: 13px;
    height: 13px;
    stroke: currentColor;
  }

  .status-dot.is-confirmed {
    background: #5fb36d;
  }

  .status-dot.is-provisional {
    background: #c9b27a;
  }

.summary-accordion {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.summary-accordion summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.summary-accordion summary::after {
  content: '+';
  font-size: 18px;
  color: var(--primary);
}

.summary-accordion[open] summary::after {
  content: '–';
}

.summary-accordion .summary-content {
  margin-top: 12px;
}

.mobile-competence {
  margin: 8px 0 12px;
}

  .topbar {
    align-items: center;
    flex-wrap: nowrap;
  }

  .topbar-title .eyebrow,
  .topbar-heading {
    display: none;
  }

  .topbar-heading-mobile {
    display: block;
  }

  .topbar-user {
    display: none;
  }

  .topbar-actions {
    gap: 8px;
  }

  .sheet-panel {
    padding: 20px 16px 110px;
  }

  .sheet-panel .form-grid,
  .sheet-panel .form-row {
    grid-template-columns: 1fr;
  }

  .sheet-panel .form-grid .field {
    width: 100%;
  }

  .sheet-panel .form {
    margin-top: 8px;
    gap: 12px;
  }

  .sheet-panel .field {
    gap: 6px;
  }

  .sheet-panel .input {
    padding: 10px 12px;
    font-size: 14px;
  }

  .budget-overview {
    grid-template-columns: 1fr;
  }

  .budget-alert-trend {
    max-width: 100%;
  }

  .sheet-panel .input-textarea {
    min-height: 70px;
  }

  .statement-row,
  .future-row {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .statement-row-values {
    text-align: left;
  }

  .future-sparkline,
  .future-actions,
  .statement-actions {
    justify-content: flex-start;
  }

  .sparkline-wrap {
    justify-items: center;
    min-width: 0;
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .sparkline-wrap.is-compact {
    max-width: none;
  }

  .bottom-nav {
    display: grid;
    grid-template-columns: 1fr 1fr auto 1fr 1fr;
    align-items: center;
    justify-items: center;
  }

  .notify-card {
    width: calc(100% - 24px);
    margin: 70px 12px 12px;
  }

  .fab-actions {
    bottom: 120px;
  }

  .sheet {
    justify-content: center;
  }

  .sheet-panel {
    width: 100%;
    border-radius: 0;
    border-left: none;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-side {
    display: none;
  }

  .auth-panel {
    padding: 32px 24px;
  }

  .report-trend-row {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .report-trend-values {
    justify-items: start;
  }
}

@media (max-width: 720px) {
  .sparkline-wrap {
    overflow-x: auto;
    padding: 0 6px 6px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .sparkline {
    height: auto;
    min-width: calc(var(--spark-count, 1) * 72px);
    padding: 6px 0;
  }

  .sparkline-labels,
  .sparkline-values {
    gap: 4px;
    font-size: 9px;
    min-width: calc(var(--spark-count, 1) * 72px);
    grid-template-columns: repeat(var(--spark-count, 1), minmax(72px, 1fr));
  }

  .sparkline-values {
    font-size: 8px;
  }

  .sparkline-values span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 360px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}
