:root {
  /* Color: superficies y marca */
  --background: lab(98.8505% -.00655651 .761843);
  --bg-accent: #e6dfd5;
  --surface: #ffffff;
  --surface-soft: #f8f4ee;
  --surface-muted: #f3ede5;
  --foreground: #efebe4;
  --text: #000; /* #261d19 */
  --muted: #6c6158;
  --primary: #1f9f63; /* #241611 */
  --primary-hover: #0e0d0d;
  --primary-contrast: #ffffff;
  --success: #1f9f63;
  --danger: #d83a4b;
  --warning: #c78717;
  --border: lab(89.5757% -.00873208 1.1435); /* #ddd3c8; */
  --border-strong: #cec0b2;
  --focus: #7bb6ff;
  --color-red-600: lab(48.4493% 77.4328 61.5452);
  --color-green-600: lab(59.0978% -58.6621 41.2579);
  --color-black: #000000;
  --color-white: #ffffff;
  --color-logo-gradient-start: #1ea167;
  --color-logo-gradient-end: #0c8352;
  --accent: #1ea167;

  /* Color: overlays y estados */
  --color-overlay-white-70: rgba(255, 255, 255, 0.7);
  --color-overlay-surface-98: rgba(255, 255, 255, 0.98);
  --color-overlay-surface-96: rgba(255, 255, 255, 0.96);
  --color-overlay-surface-88: rgba(255, 255, 255, 0.88);
  --color-overlay-light-24: rgba(255, 255, 255, 0.24);
  --color-overlay-light-07: rgba(255, 255, 255, 0.07);
  --color-overlay-dark-50: rgba(17, 8, 5, 0.5);
  --color-border-soft: rgba(34, 24, 19, 0.1);
  --color-focus-ring: rgba(123, 182, 255, 0.24);
  --color-success-500: #22c55e;
  --color-danger-500: #ef4444;
  --color-danger-soft-bg: #fff4f6;
  --color-danger-soft-border: #edc9cf;
  --color-warning-soft: #ffefca;
  --color-warning-chip: #f5c977;
  --color-select-active-text: #0b7a49;

  /* Color: texto y etiquetas semánticas */
  --color-text-subtle: #9a8e86;
  --color-text-soft: #7c726b;
  --color-text-caption: #6d625a;
  --color-text-emphasis: #3b312b;
  --color-text-secondary: #5f544e;
  --color-text-placeholder: #9d928a;
  --color-text-nav: #000;
  --color-text-nav-icon: #000;
  --color-text-hint: #72675f;
  --color-text-label: #7b716b;
  --color-text-dropdown-group: #7a6f67;
  --color-text-action-icon: #685e58;
  --color-text-action-menu-icon: #695f59;
  --color-text-warning-strong: #9a4b00;
  --color-text-warning: #b26a0e;
  --color-text-recurrence: #766a62;
  --color-text-button-secondary: #2f241e;
  --color-text-account-icon: #2a1f1a;
  --color-tag-neutral-bg: #eee;
  --color-tag-asset-bg: #e8f6ee;
  --color-tag-liability-bg: #ffecef;
  --color-tag-tx-bg: #eceffb;
  --color-tag-tx-text: #3754c0;
  --color-toggle-track: #e7e0d7;

  /* Layout */
  --topbar-height: 62px;
  --sidebar-width: 228px;

  /* Bordes y elevación */
  --radius-xs: 10px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 18px;
  --shadow-xs: 0 1px 2px rgba(30, 14, 7, 0.06);
  --shadow-sm: 0 1px 2px rgba(30, 14, 7, 0.08), 0 8px 22px rgba(30, 14, 7, 0.04);
  --shadow-md: 0 1px 2px rgba(30, 14, 7, 0.12), 0 14px 30px rgba(30, 14, 7, 0.08);

  /* Tipografía: pesos */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Tipografía: escala */
  --text-xs: .75rem;
  --text-xs--line-height: calc(1 / .75);
  --text-sm: .875rem;
  --text-sm--line-height: calc(1.25 / .875);
  --text-base: 1rem;
  --text-base--line-height: calc(1.5 / 1);
  --text-lg: 1.125rem;
  --text-lg--line-height: calc(1.75 / 1.125);
  --text-xl: 1.25rem;
  --text-xl--line-height: calc(1.75 / 1.25);
  --text-2xl: 1.5rem;
  --text-2xl--line-height: calc(2 / 1.5);
  --text-3xl: 1.875rem;
  --text-3xl--line-height: calc(2.25 / 1.875);
  --text-4xl: 2.25rem;
  --text-4xl--line-height: calc(2.5 / 2.25);
  --line-height-tight: 1;

  /* Botones y acciones */
  --btn-gap: 8px;
  --btn-border-radius: 12px;
  --btn-min-height: 42px;
  --btn-padding-y: 9px;
  --btn-padding-x: 14px;
  --btn-font-weight: 400;
  --btn-font-size: .875rem;
  --btn-line-height: calc(1.25 / .875);
  --btn-letter-spacing: -0.01em;
  --btn-icon-size: 18px;
  --btn-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.06);
  --btn-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.10), 0 1px 2px -1px rgba(0, 0, 0, 0.10);
  --btn-shadow-md: 0 4px 8px -2px rgba(0, 0, 0, 0.12), 0 2px 4px -2px rgba(0, 0, 0, 0.12);
  --btn-shadow-lg: 0 10px 15px -4px rgba(0, 0, 0, 0.12), 0 4px 6px -4px rgba(0, 0, 0, 0.12);
  --btn-primary-bg: #000; /* #241611 */
  --btn-primary-bg-hover: #0e0d0d;
  --btn-primary-color: #ffffff;
  --btn-primary-shadow: var(--btn-shadow-md);
  --btn-primary-shadow-hover: var(--btn-shadow-lg);
  --btn-primary-shadow-active: var(--btn-shadow-sm);
  --btn-secondary-bg: #ffffff;
  --btn-secondary-bg-hover: #f8f4ee;
  --btn-secondary-color: #261d19;
  --btn-secondary-border: #ddd3c8;
  --btn-secondary-shadow: var(--btn-shadow-sm);
  --btn-secondary-shadow-hover: var(--btn-shadow-md);
  --btn-secondary-shadow-active: var(--btn-shadow-xs);
  --btn-danger-bg: #d83a4b;
  --btn-danger-bg-hover: #bf3141;
  --btn-danger-color: #ffffff;
  --btn-danger-shadow: var(--btn-shadow-md);
  --btn-danger-shadow-hover: var(--btn-shadow-lg);
  --btn-danger-shadow-active: var(--btn-shadow-sm);
  --btn-social-bg: #ffffff;
  --btn-social-color: #261d19;
  --btn-social-font-weight: 700;
  --btn-social-border: #ddd3c8;
  --btn-social-shadow: var(--btn-shadow-sm);
  --btn-social-shadow-hover: var(--btn-shadow-md);
  --btn-social-shadow-active: var(--btn-shadow-xs);
  --topbar-action-min-height: 44px;
  --topbar-action-radius: 14px;
  --topbar-action-padding-inline: 14px;
  --topbar-action-mobile-min-height: 38px;
  --topbar-action-mobile-padding-y: 7px;
  --topbar-action-mobile-padding-x: 11px;
  --topbar-action-mobile-font-size: .875rem;
  --topbar-action-mobile-line-height: calc(1.25 / .875);
  --action-menu-item-gap: 10px;
  --action-menu-item-min-height: 0;
  --action-menu-item-padding-y: 11px;
  --action-menu-item-padding-x: 12px;
  --action-menu-item-font-weight: 700;
  --action-menu-item-font-size: 1rem;
  --action-menu-item-icon-size: 18px;
  --action-menu-item-icon-color: #695f59;
  --action-menu-item-hover-bg: #f8f4ee;

  /* Botones de icono */
  --icon-btn-size: 34px;
  --icon-btn-border-radius: 10px;
  --icon-btn-color: #685e58;
  --icon-btn-icon-size: 18px;
  --icon-btn-hover-bg: #f8f4ee;
  --icon-btn-hover-border: #ddd3c8;
  --icon-btn-hover-color: #261d19;

  /* Iconografía */
  --icon-size-base: 20px;
  --icon-size-nav: 22px;
  --icon-size-breadcrumb: 14px;
  --icon-size-sm: 16px;
  --icon-size-md: 18px;
  --icon-size-lg: 20px;
  --icon-size-xl: 21px;
  --icon-size-2xl: 22px;
  --icon-size-3xl: 24px;
}

.table-snapshots .snapshot-col-date,
.table-snapshots .snapshot-col-time,
.table-snapshots .snapshot-col-amount,
.table-snapshots .snapshot-col-actions {
  white-space: nowrap;
}

.table-snapshots .snapshot-col-description {
  min-width: 220px;
}

@media (max-width: 760px) {
  .table-wrap-snapshots {
    overflow-x: visible;
  }

  .table-snapshots {
    width: 100%;
  }

  .table-snapshots thead {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .table-snapshots tbody {
    display: grid;
    gap: 10px;
  }

  .table-snapshots tbody tr {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
  }

  .table-snapshots tbody td {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .table-snapshots tbody td::before {
    content: attr(data-label);
    color: var(--color-text-label);
    font-size: var(--text-xs);
    line-height: var(--text-xs--line-height);
    font-weight: var(--font-weight-normal);
  }

  .table-snapshots .snapshot-col-amount {
    font-weight: var(--font-weight-semibold);
    overflow-wrap: break-word;
  }

  .table-snapshots .snapshot-col-actions {
    text-align: left !important;
  }

  .table-snapshots .snapshot-col-actions .snapshot-actions {
    justify-content: flex-start;
  }

  .table-snapshots .snapshot-empty-row {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
  }

  .table-snapshots .snapshot-empty-cell {
    display: block;
    padding: 12px 0;
    border: 0;
  }

  .table-snapshots .snapshot-empty-cell::before {
    content: none;
  }

  .tx-recent-panel .tx-movement-actions-inline {
    display: none;
  }

  .tx-recent-panel .tx-movement-actions-menu-wrap {
    display: block;
  }
}

@font-face {
  font-family: "Inter Fallback";
  src: local("Inter"), local("Segoe UI"), local("Helvetica Neue"), local("Arial");
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: var(--text);
  font-family: "Inter", "Inter Fallback", "Avenir Next", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  letter-spacing: -0.015em;
  background: var(--background);
}

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

.material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-weight: var(--font-weight-normal);
  font-style: normal;
  font-size: var(--icon-size-base);
  line-height: var(--line-height-tight);
  letter-spacing: normal;
  text-transform: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

h1,
h2,
h3,
h4,
p,
ul {
  margin: 0;
}

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

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--color-text-placeholder);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--border-strong);
}

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  outline: 0;
  border-color: color-mix(in srgb, var(--focus) 58%, var(--border));
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}

select {
  cursor: pointer;
}

input[type="color"] {
  min-height: 44px;
  padding: 2px;
  cursor: pointer;
}

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

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

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

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

.btn {
  --btn-shadow: var(--btn-shadow-sm);
  --btn-shadow-hover: var(--btn-shadow-md);
  --btn-shadow-active: var(--btn-shadow-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--btn-gap);
  border: 1px solid transparent;
  border-radius: var(--btn-border-radius);
  min-height: var(--btn-min-height);
  padding: var(--btn-padding-y) var(--btn-padding-x);
  cursor: pointer;
  font-weight: var(--btn-font-weight);
  font-size: var(--btn-font-size);
  line-height: var(--btn-line-height);
  letter-spacing: var(--btn-letter-spacing);
  white-space: nowrap;
  box-shadow: var(--btn-shadow);
  transition: transform 0.08s ease, box-shadow 0.14s ease, background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.btn .material-symbols-rounded {
  font-size: var(--btn-icon-size);
}

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

.btn:active {
  transform: translateY(0);
  box-shadow: var(--btn-shadow-active);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-color);
  --btn-shadow: var(--btn-primary-shadow);
  --btn-shadow-hover: var(--btn-primary-shadow-hover);
  --btn-shadow-active: var(--btn-primary-shadow-active);
}

.btn-primary:hover {
  background: var(--btn-primary-bg-hover);
}

.btn-secondary {
  background: var(--btn-secondary-bg);
  color: var(--btn-secondary-color);
  border-color: var(--btn-secondary-border);
  --btn-shadow: var(--btn-secondary-shadow);
  --btn-shadow-hover: var(--btn-secondary-shadow-hover);
  --btn-shadow-active: var(--btn-secondary-shadow-active);
}

.btn-secondary:hover {
  background: var(--btn-secondary-bg-hover);
}

.btn-danger {
  background: var(--btn-danger-bg);
  color: var(--btn-danger-color);
  --btn-shadow: var(--btn-danger-shadow);
  --btn-shadow-hover: var(--btn-danger-shadow-hover);
  --btn-shadow-active: var(--btn-danger-shadow-active);
}

.btn-danger:hover {
  background: var(--btn-danger-bg-hover);
}

.btn-social {
  border: 1px solid var(--btn-social-border);
  background: var(--btn-social-bg);
  color: var(--btn-social-color);
  font-weight: var(--btn-social-font-weight);
  --btn-shadow: var(--btn-social-shadow);
  --btn-shadow-hover: var(--btn-social-shadow-hover);
  --btn-shadow-active: var(--btn-social-shadow-active);
}

.w-100 {
  width: 100%;
}

.icon-btn {
  border: 1px solid transparent;
  background: transparent;
  border-radius: var(--icon-btn-border-radius);
  width: var(--icon-btn-size);
  height: var(--icon-btn-size);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  color: var(--icon-btn-color);
  font-size: var(--icon-btn-icon-size);
}

.icon-btn .material-symbols-rounded {
  font-size: var(--icon-btn-icon-size);
}

.icon-btn:hover {
  background: var(--icon-btn-hover-bg);
  border-color: var(--icon-btn-hover-border);
  color: var(--icon-btn-hover-color);
}


body:not([data-page="landing"]).public-page {
  display: grid;
  place-items: center;
}

body[data-page="landing"].public-page {
  display: block;
  padding: 0;
}

.auth-wrap {
  width: min(100%, 520px);
}

.lp-shell {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 14px 20px 60px;
  display: grid;
  gap: clamp(36px, 5vw, 72px);
}

.lp-topbar {
  position: sticky;
  top: 10px;
  z-index: 40;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 62px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}

.lp-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-2xl);
  line-height: var(--text-2xl--line-height);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.02em;
}

.lp-nav {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  background: var(--surface);
  border-radius: 999px;
  border: 1px solid var(--border);
}

.lp-nav a {
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  color: var(--muted);
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: var(--font-weight-normal);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.lp-nav a:hover {
  background: var(--surface-soft);
  color: var(--text);
  transform: translateY(-1px);
}

.lp-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.lp-login-link {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  font-weight: var(--font-weight-medium);
  padding: 0 6px;
}

.lp-login-link:hover {
  color: var(--text);
}

.lp-hero {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 16px;
}

.lp-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--success) 28%, var(--border));
  background: color-mix(in srgb, #eafbf0 74%, var(--surface));
  color: var(--success);
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  font-weight: var(--font-weight-medium);
}

.lp-hero-badge .material-symbols-rounded {
  font-size: var(--icon-size-sm);
}

.lp-hero-title {
  display: grid;
  gap: 4px;
  justify-items: center;
  font-size: clamp(2.6rem, 8vw, 4.7rem);
  line-height: 0.94;
  letter-spacing: -0.05em;
  font-weight: var(--font-weight-bold);
}

.lp-hero-title .accent {
  color: var(--success);
}

.lp-hero-subtitle {
  max-width: 62ch;
  color: var(--color-text-secondary);
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
}

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

.lp-hero-actions .btn {
  min-height: 44px;
  padding-inline: 18px;
}

.lp-hero-actions .material-symbols-rounded {
  font-size: var(--icon-size-md);
}

.lp-link-inline {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  font-weight: var(--font-weight-medium);
}

.lp-link-inline:hover {
  color: var(--text);
}

.lp-showcase-card {
  width: min(100%, 560px);
  margin-top: 6px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 18px 18px 16px;
  display: grid;
  gap: 14px;
}

.lp-showcase-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.lp-showcase-card header p {
  color: var(--color-text-soft);
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
}

.lp-pill {
  border-radius: 999px;
  background: color-mix(in srgb, #eafbf0 72%, var(--surface));
  color: var(--success);
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  padding: 5px 9px;
  font-weight: var(--font-weight-semibold);
}

.lp-showcase-card > strong {
  font-size: clamp(var(--text-2xl), 5vw, 2.8rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
}

.lp-bar-chart {
  height: 130px;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  align-items: end;
}

.lp-bar-chart span {
  border-radius: 999px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--success) 56%, #bbebca), color-mix(in srgb, var(--success) 70%, #7ec49b));
}

.lp-bar-chart span:nth-child(1) { height: 28%; }
.lp-bar-chart span:nth-child(2) { height: 36%; }
.lp-bar-chart span:nth-child(3) { height: 44%; }
.lp-bar-chart span:nth-child(4) { height: 39%; }
.lp-bar-chart span:nth-child(5) { height: 51%; }
.lp-bar-chart span:nth-child(6) { height: 58%; }
.lp-bar-chart span:nth-child(7) { height: 53%; }
.lp-bar-chart span:nth-child(8) { height: 64%; }
.lp-bar-chart span:nth-child(9) { height: 68%; }
.lp-bar-chart span:nth-child(10) { height: 73%; }
.lp-bar-chart span:nth-child(11) { height: 79%; }
.lp-bar-chart span:nth-child(12) { height: 83%; }
.lp-bar-chart span:nth-child(13) { height: 87%; }
.lp-bar-chart span:nth-child(14) { height: 82%; }
.lp-bar-chart span:nth-child(15) { height: 91%; }
.lp-bar-chart span:nth-child(16) { height: 95%; }

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

.lp-showcase-metrics article {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 10px 9px;
  text-align: center;
  background: color-mix(in srgb, var(--surface) 82%, #f8fcfa);
}

.lp-showcase-metrics p {
  color: var(--color-text-soft);
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
}

.lp-showcase-metrics strong {
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  font-weight: var(--font-weight-semibold);
}

.lp-section {
  display: grid;
  gap: 22px;
}

.lp-section-head {
  display: grid;
  gap: 8px;
  justify-items: center;
  text-align: center;
}

.lp-kicker {
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  font-weight: var(--font-weight-semibold);
}

.lp-section-head h2 {
  font-size: clamp(2rem, 5.2vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: var(--font-weight-semibold);
}

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

.lp-feature-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 188px;
  box-shadow: var(--shadow-xs);
}

.lp-feature-card .material-symbols-rounded {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #eafbf0;
  color: var(--success);
  font-size: var(--icon-size-lg);
}

.lp-feature-card h3 {
  font-size: var(--text-lg);
  line-height: var(--text-lg--line-height);
  letter-spacing: -0.02em;
  font-weight: var(--font-weight-medium);
}

.lp-feature-card p {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

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

.lp-step-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 18px;
  display: grid;
  gap: 8px;
}

.lp-step-number {
  color: var(--border-strong);
  font-size: clamp(2.2rem, 5vw, 3rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: var(--font-weight-semibold);
}

.lp-step-card h3 {
  font-size: var(--text-lg);
  line-height: var(--text-lg--line-height);
  letter-spacing: -0.02em;
  font-weight: var(--font-weight-semibold);
}

.lp-step-card p {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

.lp-step-visual {
  margin-top: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 78%, #f5f8f6);
  height: 68px;
}

.lp-step-input {
  position: relative;
}

.lp-step-input::before {
  content: "";
  position: absolute;
  inset: 50% 14px auto;
  transform: translateY(-50%);
  height: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--success) 25%, #d6efe1);
}

.lp-step-list {
  padding: 10px;
  display: grid;
  gap: 6px;
}

.lp-step-list span {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--success) 32%, #d8f2e2);
}

.lp-step-bars {
  display: grid;
  gap: 6px;
  padding: 10px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
}

.lp-step-bars span {
  border-radius: 999px;
  background: color-mix(in srgb, var(--success) 70%, #79c49a);
}

.lp-step-bars span:nth-child(1) { height: 36%; }
.lp-step-bars span:nth-child(2) { height: 54%; }
.lp-step-bars span:nth-child(3) { height: 48%; }
.lp-step-bars span:nth-child(4) { height: 67%; }
.lp-step-bars span:nth-child(5) { height: 73%; }
.lp-step-bars span:nth-child(6) { height: 82%; }

.lp-metric-strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 18px 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.lp-metric-strip article {
  text-align: center;
  display: grid;
  gap: 4px;
}

.lp-metric-strip strong {
  font-size: clamp(var(--text-xl), 3vw, var(--text-3xl));
  line-height: var(--text-3xl--line-height);
  letter-spacing: -0.03em;
  font-weight: var(--font-weight-semibold);
}

.lp-metric-strip p {
  color: var(--color-text-soft);
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
}

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

.lp-testimonial-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  padding: 18px;
  display: grid;
  gap: 12px;
}

.lp-stars {
  color: var(--success);
  letter-spacing: 0.14em;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  font-weight: var(--font-weight-semibold);
}

.lp-testimonial-card > p {
  font-size: var(--text-sm);
  line-height: 1.55;
  color: var(--color-text-secondary);
}

.lp-testimonial-card footer {
  display: grid;
  gap: 2px;
}

.lp-testimonial-card footer strong {
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  font-weight: var(--font-weight-semibold);
}

.lp-testimonial-card footer span {
  color: var(--color-text-soft);
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
}

.lp-faq {
  gap: 14px;
}

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

.lp-faq details {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 12px 14px;
}

.lp-faq summary {
  list-style: none;
  cursor: pointer;
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  font-weight: var(--font-weight-medium);
}

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

.lp-faq p {
  margin-top: 8px;
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

.lp-final-cta {
  border: 1px solid var(--border);
  border-radius: 20px;
  background:
    radial-gradient(460px 220px at 88% 0%, color-mix(in srgb, #eafbf0 65%, transparent), transparent 72%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, #f7fbf8), var(--surface));
  padding: clamp(20px, 4vw, 34px);
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}

.lp-final-cta h2 {
  font-size: clamp(var(--text-2xl), 4.8vw, var(--text-4xl));
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: var(--font-weight-semibold);
}

.lp-final-cta p {
  color: var(--color-text-secondary);
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
}

.lp-footer {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: grid;
  gap: 16px;
  grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr));
}

.lp-footer article {
  display: grid;
  align-content: start;
  gap: 7px;
}

.lp-footer h3 {
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  letter-spacing: -0.01em;
  font-weight: var(--font-weight-semibold);
}

.lp-footer article > p,
.lp-footer article > a {
  color: var(--color-text-soft);
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
}

.lp-footer a:hover {
  color: var(--text);
}

@keyframes lp-fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lp-hero > * {
  animation: lp-fade-up 0.4s ease both;
}

.lp-showcase-card {
  animation: lp-fade-up 0.45s ease both;
  animation-delay: 0.08s;
}

.logo-mark {
  width: 34px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: transparent;
  font-size: 0;
  line-height: 0;
  border-radius: 0;
  background: url("/assets/branding/svg/logo-netia-isotipo.svg") center / contain no-repeat;
  box-shadow: none;
  overflow: hidden;
}

.landing-page {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 18px;
  display: grid;
  gap: 18px;
}

.landing-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 12px 14px;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-3xl);
  line-height: var(--text-3xl--line-height);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.03em;
}

.landing-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.landing-hero {
  padding: 22px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.logo-mark {
  width: 34px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: transparent;
  font-size: 0;
  line-height: 0;
  border-radius: 0;
  background: url("/assets/branding/svg/logo-netia-isotipo.svg") center / contain no-repeat;
  box-shadow: none;
  overflow: hidden;
}

.landing-hero-copy {
  display: grid;
  align-content: start;
  gap: 12px;
}

.landing-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  padding: 6px 10px;
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  color: var(--color-text-caption);
}

.landing-badge .material-symbols-rounded {
  font-size: var(--icon-size-sm);
  color: var(--primary);
}

.landing-hero h1 {
  font-size: clamp(var(--text-3xl), 3.4vw, 3.2rem);
  line-height: var(--text-4xl--line-height);
  letter-spacing: -0.045em;
}

.landing-lead {
  color: var(--color-text-secondary);
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  max-width: 58ch;
}

.landing-checks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  color: var(--color-text-emphasis);
}

.landing-checks li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

.landing-checks .material-symbols-rounded {
  font-size: var(--icon-size-sm);
  color: var(--success);
  margin-top: 1px;
}

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

.landing-note {
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  color: var(--color-text-subtle);
}

.landing-hero-aside {
  display: grid;
  gap: 10px;
  align-content: start;
}

.landing-metric-card,
.landing-mini-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 12px;
  display: grid;
  gap: 4px;
}

.landing-metric-card p {
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  color: var(--color-text-caption);
}

.landing-metric-card strong {
  font-size: clamp(var(--text-xl), 2vw, 2rem);
  line-height: var(--text-2xl--line-height);
  letter-spacing: -0.03em;
  font-weight: var(--font-weight-bold);
}

.landing-metric-card span {
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  color: var(--color-text-soft);
}

.landing-mini-card h3 {
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  font-weight: var(--font-weight-semibold);
}

.landing-mini-bars {
  height: 72px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
}

.landing-mini-bars span {
  border-radius: 999px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 86%, #4f392f), var(--primary));
  box-shadow: inset 0 1px 0 var(--color-overlay-light-24);
}

.landing-mini-bars span:nth-child(1) { height: 24%; }
.landing-mini-bars span:nth-child(2) { height: 38%; }
.landing-mini-bars span:nth-child(3) { height: 31%; }
.landing-mini-bars span:nth-child(4) { height: 54%; }
.landing-mini-bars span:nth-child(5) { height: 66%; }
.landing-mini-bars span:nth-child(6) { height: 84%; }

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

.landing-section-head {
  display: grid;
  gap: 4px;
}

.landing-section-head h2 {
  font-size: clamp(var(--text-xl), 2.2vw, var(--text-3xl));
  line-height: var(--text-3xl--line-height);
  letter-spacing: -0.03em;
  font-weight: var(--font-weight-semibold);
}

.landing-section-head p {
  color: var(--color-text-soft);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

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

.landing-flow-card {
  padding: 14px;
  display: grid;
  gap: 8px;
}

.landing-step {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: var(--primary);
  color: var(--surface);
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  font-weight: var(--font-weight-bold);
}

.landing-flow-card h3 {
  font-size: var(--text-lg);
  line-height: var(--text-lg--line-height);
  letter-spacing: -0.02em;
  font-weight: var(--font-weight-semibold);
}

.landing-flow-card p {
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

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

.landing-feature {
  padding: 14px;
  display: grid;
  gap: 8px;
}

.landing-feature h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.01em;
}

.landing-feature h3 .material-symbols-rounded {
  font-size: var(--icon-size-lg);
  color: var(--primary);
}

.landing-feature p {
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  color: var(--color-text-secondary);
}

.landing-cta {
  padding: 20px;
  display: grid;
  gap: 10px;
  border-style: dashed;
}

.landing-cta h2 {
  font-size: clamp(var(--text-xl), 2.2vw, var(--text-3xl));
  line-height: var(--text-3xl--line-height);
  letter-spacing: -0.03em;
  font-weight: var(--font-weight-semibold);
}

.landing-cta p {
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  color: var(--color-text-secondary);
}

.landing-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  color: var(--color-text-subtle);
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
}

.logo-mark.small {
  width: 28px;
  height: 18px;
  border-radius: 0;
  font-size: 0;
}

.auth-wrap {
  display: grid;
  gap: 20px;
}

.auth-brand {
  text-align: center;
  display: grid;
  gap: 8px;
}

.auth-brand h1 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: clamp(var(--text-3xl), 4vw, 2.5rem);
  line-height: var(--text-3xl--line-height);
  letter-spacing: -0.04em;
}

.auth-brand h1::before {
  content: "";
  width: 36px;
  height: 23px;
  flex: 0 0 auto;
  background: url("/assets/branding/svg/logo-netia-isotipo.svg") center / contain no-repeat;
}

.auth-brand p {
  color: var(--muted);
  font-weight: var(--font-weight-semibold);
}

.auth-card {
  padding: 22px;
  display: grid;
  gap: 12px;
}

.auth-card h2 {
  font-size: var(--text-3xl);
  letter-spacing: -0.03em;
  line-height: var(--text-3xl--line-height);
  font-weight: var(--font-weight-semibold);
}

.auth-card > p {
  color: var(--muted);
  line-height: var(--text-base--line-height);
}

.auth-card label {
  display: grid;
  gap: 6px;
  font-weight: var(--font-weight-medium);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

.auth-links-row {
  display: flex;
  justify-content: flex-end;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

.auth-foot {
  text-align: center;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  color: var(--muted);
}

.auth-foot a,
.auth-links-row a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--primary) 35%, transparent);
  text-underline-offset: 3px;
}

.social-row {
  display: flex;
  gap: 8px;
}

.social-row .btn {
  flex: 1;
}

.auth-separator {
  position: relative;
  text-align: center;
  margin: 2px 0;
}

.auth-separator::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid var(--border);
}

.auth-separator span {
  position: relative;
  background: var(--surface);
  padding: 0 10px;
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  font-weight: var(--font-weight-normal);
  letter-spacing: 0.04em;
  color: var(--color-text-subtle);
}

body[data-page="login"].public-page,
body[data-page="signup"].public-page,
body[data-page="forgot-password"].public-page,
body[data-page="reset-password"].public-page,
body[data-page="verify-email"].public-page {
  place-items: stretch;
  background: var(--background);
}

.auth-screen {
  width: 100%;
  align-self: stretch;
}

.auth-screen__frame {
  min-height: calc(100vh - 16px);
  background: #f6f6f6;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}

.auth-screen__header {
  display: flex;
  justify-content: center;
  padding: 34px 20px 14px;
}

.auth-screen__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #111111;
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(1.65rem, 1.35rem + 0.75vw, 2rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.auth-screen__brand::before {
  content: "";
  width: 30px;
  height: 19px;
  flex: 0 0 auto;
  background: url("/assets/branding/svg/logo-netia-isotipo.svg") center / contain no-repeat;
}

.auth-screen__brand:hover {
  text-decoration: none;
}

.auth-screen__main {
  display: grid;
  place-items: center;
  padding: 36px 20px 44px;
}

.auth-form {
  width: min(100%, 470px);
  display: grid;
  gap: 16px;
}

.auth-form--compact {
  width: min(100%, 440px);
}

.auth-form__intro {
  text-align: center;
  display: grid;
  gap: 10px;
  margin-bottom: 6px;
}

.auth-form__intro h1 {
  margin: 0;
  color: #0f0f10;
  font-size: var(--text-4xl);
  line-height: 1.05;
  letter-spacing: -0.045em;
  font-weight: var(--font-weight-semibold);
}

.auth-form__intro p {
  margin: 0;
  color: #6a6f79;
  font-size: 1rem;
  line-height: 1.45;
}

.auth-form__intro--left p {
  max-width: 34ch;
  margin-inline: auto;
}

.auth-form__social {
  display: grid;
  gap: 12px;
  margin-top: 2px;
}

.auth-oauth-btn {
  width: 100%;
  min-height: 56px;
  border-radius: 16px;
  border-color: #dfdfdf;
  background: #fbfbfb;
  color: #111111;
  justify-content: center;
  gap: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.2;
  padding-inline: 16px;
}

.auth-oauth-btn:hover {
  transform: none;
  background: #ffffff;
  border-color: #d5d5d5;
}

.auth-oauth-btn__icon {
  width: 18px;
  min-width: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111111;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1;
}

.auth-oauth-btn__icon svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor;
}

.auth-oauth-btn__icon--apple {
  width: 16px;
  min-width: 16px;
}

.auth-form__divider {
  position: relative;
  text-align: center;
  margin: 2px 0 4px;
}

.auth-form__divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid #e1e1e1;
}

.auth-form__divider span {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #f6f6f6;
  color: #6a6f79;
  font-size: 1rem;
  line-height: 1;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field__error {
  margin: 0;
  color: #b42318;
  font-size: 0.86rem;
  line-height: 1.35;
  font-weight: 500;
}

.auth-field > label,
.auth-field__head > label {
  margin: 0;
  color: #17181b;
  font-size: 0.95rem;
  line-height: 1.2;
  font-weight: 600;
}

.auth-field__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.auth-link-inline {
  color: #10863a;
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.2;
  font-weight: 500;
}

.auth-link-inline:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-field input {
  min-height: 56px;
  border-radius: 16px;
  border-color: #dfdfdf;
  background: #fbfbfb;
  padding: 14px 16px;
  color: #111111;
  font-size: 1rem;
  line-height: 1.25;
  box-shadow: none;
}

.auth-field input:hover {
  border-color: #d5d5d5;
}

.auth-field.is-error input {
  border-color: #e25555;
  background: #fffdfd;
  box-shadow: 0 0 0 3px rgba(226, 85, 85, 0.14);
}

.auth-field input:focus {
  border-color: #cecece;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.10);
}

.auth-field.is-error input:focus {
  border-color: #cf3f3f;
  box-shadow: 0 0 0 3px rgba(226, 85, 85, 0.16);
}

.auth-field input::placeholder {
  color: #848992;
}

.auth-form__status {
  border-radius: 14px;
  border: 1px solid transparent;
  padding: 11px 13px;
  font-size: 0.93rem;
  line-height: 1.35;
}

.auth-form__status.is-error {
  background: #fff1f1;
  border-color: #f3c4c4;
  color: #b42318;
}

.auth-form__status.is-success {
  background: #eef8f0;
  border-color: #cfe7d4;
  color: #146c30;
}

.auth-submit {
  --btn-shadow: var(--btn-primary-shadow);
  --btn-shadow-hover: var(--btn-primary-shadow-hover);
  --btn-shadow-active: var(--btn-primary-shadow-active);
  width: 100%;
  min-height: 56px;
  border-radius: 16px;
  background: #02050a;
  color: #ffffff;
  border: 1px solid #02050a;
  font-size: 1.05rem;
  line-height: 1.2;
}

.auth-submit:hover {
  transform: none;
  background: #0b0f15;
}

.auth-submit:focus-visible {
  border-color: #02050a;
}

.auth-form__legal,
.auth-form__switch {
  margin: 0;
  text-align: center;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: fit-content;
  margin-inline: auto;
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
  font-size: 1rem;
  line-height: 1.25;
  text-decoration: none;
  margin-top:20px;
}

.auth-back-link:hover {
  color: var(--text);
}

.auth-back-link__icon {
  font-size: 1.1rem;
  line-height: 1;
}

.auth-back-link--centered {
  justify-self: center;
}

.auth-form[hidden],
.auth-forgot-success[hidden] {
  display: none !important;
}

.auth-forgot-success {
  text-align: center;
  justify-items: center;
  gap: 18px;
}

.auth-forgot-success__icon {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background-color: color-mix(in oklab, var(--accent) 12%, transparent);
}

.auth-forgot-success__icon .material-symbols-rounded {
  color: var(--accent);
  font-size: 38px;
  line-height: 1;
}

[data-auth-forgot-email] {
  color: #111111;
  word-break: break-word;
}

.auth-forgot-success__hint {
  margin: 0;
  color: #6a6f79;
  font-size: 1rem;
  line-height: 1.45;
  max-width: 38ch;
}

.auth-form__legal {
  color: #6a6f79;
  font-size: 0.92rem;
  line-height: 1.45;
  margin-top: 2px;
}

.auth-form__legal a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-form__switch {
  color: #6a6f79;
  font-size: 1rem;
  line-height: 1.35;
  margin-top: 2px;
}

.auth-form__switch a {
  color: #111111;
  text-decoration: none;
  font-weight: 600;
}

.auth-form__switch a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-screen__footer {
  padding: 18px 16px 26px;
  text-align: center;
  color: #747b86;
  font-size: 0.95rem;
  line-height: 1.35;
}

body[data-page="signup"] .auth-form {
  gap: 15px;
}

.verify-email-panel {
  width: min(100%, 620px);
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.verify-email-panel__icon {
  width: 108px;
  height: 108px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #dfe8df;
  color: #177c2a;
}

.verify-email-panel__icon .material-symbols-rounded {
  font-size: 52px;
  line-height: 1;
  font-variation-settings: "FILL" 0;
}

.verify-email-panel__intro {
  display: grid;
  gap: 12px;
  max-width: 540px;
}

.verify-email-panel__intro h1 {
  margin: 0;
  color: #0f0f10;
  font-size: clamp(2.2rem, 1.6rem + 1.2vw, 2.85rem);
  line-height: 1.06;
  letter-spacing: -0.045em;
  font-weight: 700;
}

.verify-email-panel__intro p {
  margin: 0;
  color: #5f6570;
  font-size: 1rem;
  line-height: 1.55;
}

.verify-email-panel__intro strong {
  color: #101114;
  font-weight: 600;
}

.verify-email-note {
  width: min(100%, 600px);
  border-radius: 14px;
  padding: 12px 14px;
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.4;
  border: 1px solid transparent;
}

.verify-email-note--success {
  background: #eef8f0;
  color: #146c30;
  border-color: #cfe7d4;
}

.verify-email-note--error {
  background: #fff1f1;
  color: #b42318;
  border-color: #f7c9c9;
}

.verify-email-help {
  width: min(100%, 600px);
  border-radius: 20px;
  background: #f0f0f0;
  border: 1px solid #e6e6e6;
  padding: 22px 24px;
  text-align: left;
  display: grid;
  gap: 12px;
}

.verify-email-help h2 {
  margin: 0;
  color: #15161a;
  font-size: 1.05rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.verify-email-help ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
  color: #5f6570;
}

.verify-email-help li::marker {
  color: #177c2a;
}

.verify-email-actions {
  width: min(100%, 600px);
  display: grid;
  gap: 12px;
}

.verify-email-actions .btn {
  width: 100%;
}

.verify-email-btn-secondary {
  background: #fbfbfb;
}

.verify-email-links {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 2px;
}

.verify-email-links a,
.verify-email-link-btn {
  color: #1a1b1f;
  font-size: 1rem;
  line-height: 1.35;
  text-decoration: none;
}

.verify-email-links a:hover,
.verify-email-link-btn:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.verify-email-link-btn {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font-weight: 500;
}

@media (max-width: 820px) {
  body[data-page="login"].public-page,
  body[data-page="signup"].public-page,
  body[data-page="forgot-password"].public-page,
  body[data-page="reset-password"].public-page,
  body[data-page="verify-email"].public-page {
    padding: 0;
  }

  .auth-screen__frame {
    min-height: 100vh;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .auth-screen__header {
    padding: 24px 16px 10px;
  }

  .auth-screen__main {
    padding: 22px 16px 26px;
  }

  .auth-form {
    width: min(100%, 430px);
    gap: 14px;
  }

  .auth-form__intro {
    gap: 8px;
    margin-bottom: 2px;
  }

  .auth-form__intro h1 {
    font-size: clamp(2rem, 1.35rem + 3vw, 2.5rem);
  }

  .auth-form__intro p {
    font-size: 0.95rem;
  }

  .auth-oauth-btn,
  .auth-field input,
  .auth-submit {
    min-height: 52px;
    border-radius: 14px;
    font-size: 0.98rem;
  }

  .auth-field__head {
    flex-wrap: wrap;
    align-items: baseline;
    row-gap: 4px;
  }

  .auth-link-inline {
    font-size: 0.9rem;
  }

  .auth-form__legal,
  .auth-form__switch,
  .auth-screen__footer {
    font-size: 0.9rem;
  }

  .auth-screen__footer {
    padding: 14px 14px calc(22px + env(safe-area-inset-bottom));
  }

  .verify-email-panel {
    width: min(100%, 520px);
    gap: 16px;
  }

  .verify-email-panel__icon {
    width: 92px;
    height: 92px;
  }

  .verify-email-panel__icon .material-symbols-rounded {
    font-size: 44px;
  }

  .verify-email-help {
    padding: 18px 18px;
    border-radius: 16px;
  }

  .verify-email-links a,
  .verify-email-link-btn {
    font-size: 0.95rem;
  }
}

.app-page {
  min-height: 100vh;
  overflow-x: hidden;
}

.topbar {
  min-height: var(--topbar-height);
  border-bottom: 1px solid var(--border);
  background: var(--color-overlay-surface-96);
  backdrop-filter: saturate(160%) blur(6px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.brand-text {
  font-size: clamp(var(--text-2xl), 1.5vw, var(--text-4xl));
  font-weight: var(--font-weight-bold);
  line-height: var(--text-2xl--line-height);
  letter-spacing: -0.045em;
}

.topbar-actions {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: center;
}

.topbar-actions .btn {
  min-height: var(--topbar-action-min-height);
  border-radius: var(--topbar-action-radius);
  padding-inline: var(--topbar-action-padding-inline);
}

.topbar-actions .btn .material-symbols-rounded {
  font-size: var(--btn-icon-size);
}

.menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  min-width: 250px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  z-index: 60;
}

.menu-dropdown.is-floating {
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  min-width: 220px;
  max-width: calc(100vw - 24px);
  z-index: 120;
}

.menu-dropdown button {
  display: flex;
  align-items: center;
  gap: var(--action-menu-item-gap);
  min-height: var(--action-menu-item-min-height);
  width: 100%;
  text-align: left;
  border: 0;
  padding: var(--action-menu-item-padding-y) var(--action-menu-item-padding-x);
  background: var(--surface);
  cursor: pointer;
  font-weight: var(--action-menu-item-font-weight);
  font-size: var(--action-menu-item-font-size);
}

.menu-dropdown button .material-symbols-rounded {
  font-size: var(--action-menu-item-icon-size);
  color: var(--action-menu-item-icon-color);
}

.menu-dropdown button:hover {
  background: var(--action-menu-item-hover-bg);
}

.shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: calc(100vh - var(--topbar-height));
}

.sidebar {
  border-right: 1px solid var(--border);
  background: var(--color-overlay-surface-88);
  backdrop-filter: blur(2px);
  padding: 16px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 12px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 6px 4px;
  font-weight: var(--font-weight-bold);
  font-size: var(--text-2xl);
  line-height: var(--text-2xl--line-height);
  letter-spacing: -0.035em;
}

.sidebar nav {
  display: grid;
  gap: 6px;
  align-content: start;
  overflow: auto;
  padding-right: 1px;
  padding-top: 2px;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--color-text-nav);
  font-weight: var(--font-weight-normal);
  border: 1px solid transparent;
}

.nav-icon {
  width: 17px;
  font-size: var(--icon-size-nav);
  opacity: 0.9;
  color: var(--color-text-nav-icon);
}

.sidebar .nav-label {
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
}

.sidebar nav a.active {
  color: var(--accent);
  background-color: color-mix(in oklab, var(--accent) 10%, transparent);
}

.sidebar nav a:hover {
  background: var(--foreground);
  color: var(--color-text-nav);
}

.sidebar nav a.active,
.sidebar nav a:hover {
  box-shadow: inset 0 1px 0 var(--color-overlay-light-07);
}

.sidebar nav a.active .nav-icon {color: var(--accent);
}

.sidebar nav a:hover .nav-icon {
  color: var(--color-text-nav);
}


.sidebar-footer {
  display: grid;
  gap: 10px;
}

.user-mini {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: var(--surface);
  font: inherit;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.user-mini:hover {
  background: color-mix(in srgb, var(--surface-soft) 82%, var(--surface));
}

.user-mini:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 36%, transparent);
  outline-offset: 2px;
}

.user-mini-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.01em;
  color: var(--accent);
  background-color: color-mix(in oklab, var(--accent) 10%, transparent);
}

.user-mini-meta {
  min-width: 0;
  display: grid;
}

.user-mini-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  color: var(--text);
  font-weight: var(--font-weight-normal);
}

.content {
  padding: 24px;
  display: grid;
  gap: 24px;
  align-content: start;
  min-width: 0;
}

@media (min-width: 981px) {
  .app-page {
    height: 100vh;
    overflow: hidden;
  }

  .shell {
    min-height: 0;
    height: calc(100vh - var(--topbar-height));
    overflow: hidden;
  }

  .sidebar {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .content {
    min-height: 0;
    overflow: auto;
    padding-bottom: 104px;
  }
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.page-head-stack {
  display: grid;
  gap: 16px;
}

.page-head-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.page-inline-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 10px;
}

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

.breadcrumbs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

.breadcrumbs a {
  color: inherit;
}

.breadcrumbs a:hover {
  color: var(--text);
}

.breadcrumbs .material-symbols-rounded {
  font-size: var(--icon-size-breadcrumb);
  color: var(--color-text-subtle);
}

.page-title h1,
.page-head h1 {
  font-size: var(--text-3xl);
  line-height: var(--text-3xl--line-height);
  letter-spacing: -0.04em;
  font-weight: var(--font-weight-medium);
}

.page-title p {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  font-weight: var(--font-weight-normal);
}

.panel-head-inline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-head-inline > div {
  min-width: 0;
}

.account-panel-description {
  margin-top: 4px;
}

.account-detail-actions {
  margin-top: 2px;
  margin-bottom: 2px;
}

.account-snapshots-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

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

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

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

.kpi-card {
  padding: 16px 18px;
  display: grid;
  gap: 6px;
}

.kpi-card .muted {
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-soft);
}

.kpi-value {
  font-size: clamp(var(--text-3xl), 2.6vw, var(--text-4xl));
  line-height: var(--text-3xl--line-height);
  letter-spacing: -0.03em;
  font-weight: var(--font-weight-bold);
}

.panel {
  padding: 24px;
  display: grid;
  gap: 10px;
  min-width: 0;
}

.panel h3 {
  font-size: var(--text-lg);
  line-height: var(--text-lg--line-height);
  letter-spacing: -0.015em;
  font-weight: var(--font-weight-medium);
}

.settings-trm-calc {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  display: grid;
  gap: 8px;
}

.settings-trm-calc-head {
  display: grid;
  gap: 2px;
}

.settings-trm-calc-head h4 {
  margin: 0;
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  font-weight: var(--font-weight-semibold);
}

.period-filter-trigger {
  min-width: 0;
  max-width: min(100%, 340px);
  justify-content: flex-start;
}

.period-filter-trigger .material-symbols-rounded {
  font-size: var(--icon-size-md);
}

.period-filter-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tx-page-head-stack {
  gap: 14px;
}

.tx-section-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tx-section-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.settings-trm-calc-head .muted {
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  font-weight: var(--font-weight-normal);
}

.settings-trm-calc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.settings-trm-calc-grid label {
  display: grid;
  gap: 6px;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  font-weight: var(--font-weight-normal);
}

.settings-trm-calc-grid input[readonly] {
  background: var(--surface-soft);
  color: var(--color-text-hint);
}

.settings-trm-calc-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.settings-trm-calc-meta {
  margin: 0;
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  font-weight: var(--font-weight-normal);
}

#trmCalcBtn.is-loading .material-symbols-rounded {
  animation: spin 0.9s linear infinite;
}

.profile-settings-grid {
  display: grid;
  gap: 14px;
}

.profile-card {
  gap: 14px;
}

.profile-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.profile-summary-avatar {
  width: 56px;
  height: 56px;
  font-size: var(--text-2xl);
  line-height: var(--text-2xl--line-height);
}

.profile-summary-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.profile-summary-meta strong {
  font-size: var(--text-lg);
  line-height: var(--text-lg--line-height);
  color: var(--text);
  font-weight: var(--font-weight-semibold);
}

.profile-summary-meta span {
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-form {
  display: grid;
  gap: 10px;
}

.profile-form .muted {
  margin: -2px 0 0;
}

.profile-email-field input[readonly] {
  background: var(--surface-soft);
  color: var(--color-text-hint);
}

.profile-form-actions {
  justify-content: flex-start;
}

.profile-action-card {
  gap: 12px;
}

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

.profile-action-row > div {
  display: grid;
  gap: 4px;
}

.profile-action-row > div strong {
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  color: var(--text);
  font-weight: var(--font-weight-semibold);
}

.profile-action-row > div p {
  margin: 0;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

.profile-action-card-danger {
  border-color: color-mix(in srgb, var(--btn-danger-bg) 18%, var(--border));
  background: color-mix(in srgb, var(--surface) 95%, var(--btn-danger-bg));
}

.profile-action-card-danger h3 {
  color: var(--btn-danger-bg);
}

.dashboard-section-head {
  display: grid;
  gap: 2px;
}

.dashboard-estado-panel {
  gap: 14px;
}

.dashboard-estado-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 1fr);
  gap: 14px;
  align-items: stretch;
}

.dashboard-estado-chart-wrap {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 4px;
  width: 100%;
}

.dashboard-patrimonial-chart-box {
  width: min(100%, 320px);
  aspect-ratio: 1 / 1;
}

.dashboard-estado-chart-wrap canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: none !important;
}

.dashboard-estado-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  color: var(--color-text-caption);
}

.dashboard-estado-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dashboard-estado-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.dashboard-estado-legend .dot-success {
  background: var(--color-success-500);
}

.dashboard-estado-legend .dot-danger {
  background: var(--color-danger-500);
}

.dashboard-estado-right {
  display: grid;
  gap: 10px;
  align-content: start;
}

.dashboard-breakdown-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 12px;
  display: grid;
  gap: 8px;
}

.dashboard-breakdown-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.dashboard-breakdown-head h4 {
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  font-weight: var(--font-weight-medium);
  letter-spacing: -0.01em;
}

.dashboard-breakdown-head strong {
  font-size: var(--text-2xl);
  line-height: var(--text-2xl--line-height);
  letter-spacing: -0.02em;
  font-weight: var(--font-weight-semibold);
  text-align: right;
}

.dashboard-breakdown-list {
  display: grid;
  gap: 7px;
}

.dashboard-breakdown-list .empty-state {
  padding: 12px;
  border-style: solid;
  background: var(--surface-soft);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

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

.dashboard-breakdown-name {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  font-weight: var(--font-weight-normal);
}

.dashboard-breakdown-row strong {
  color: var(--color-text-emphasis);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
}

.dashboard-breakdown-net {
  gap: 6px;
}

.dashboard-breakdown-net.is-negative {
  border-color: color-mix(in srgb, var(--danger) 36%, var(--border));
  background: color-mix(in srgb, var(--surface) 93%, var(--danger));
}

.dashboard-breakdown-net.is-positive {
  border-color: color-mix(in srgb, var(--success) 34%, var(--border));
  background: color-mix(in srgb, var(--surface) 93%, var(--success));
}

.dashboard-breakdown-net .item-sub {
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

.dashboard-month-cards .kpi-card {
  border-width: 1px;
}

.dashboard-month-card {
  gap: 8px;
}

.dashboard-month-income {
  border-color: color-mix(in srgb, var(--success) 34%, var(--border));
  background: color-mix(in srgb, var(--surface) 92%, var(--success));
}

.dashboard-month-expense {
  border-color: color-mix(in srgb, var(--danger) 34%, var(--border));
  background: color-mix(in srgb, var(--surface) 92%, var(--danger));
}

.dashboard-month-balance-save {
  border-color: color-mix(in srgb, var(--success) 34%, var(--border));
  background: color-mix(in srgb, var(--surface) 93%, var(--success));
}

.dashboard-month-balance-deficit {
  border-color: color-mix(in srgb, var(--warning) 44%, var(--border));
  background: color-mix(in srgb, var(--surface) 91%, var(--color-warning-soft));
}

.dashboard-month-balance-neutral {
  border-color: color-mix(in srgb, var(--border) 78%, var(--surface));
  background: color-mix(in srgb, var(--surface) 94%, var(--bg-accent));
}

.dashboard-trend-panel {
  gap: 12px;
  min-height: 400px;
  align-content: stretch;
}

.dashboard-trend-canvas {
  width: 100% !important;
  height: 260px !important;
  max-height: 260px !important;
}

@media (max-width: 1220px) {
  .dashboard-estado-grid {
    grid-template-columns: 1fr;
  }
}

.list {
  display: grid;
  gap: 10px;
  margin-bottom: 75px;
}

.item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-xs);
}

button.item {
  width: 100%;
  text-align: left;
  cursor: pointer;
}

button.item:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.item-title {
  font-weight: var(--font-weight-medium);
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
}

.type-item-row .item-title {
  display: flex;
  align-items: center;
  font-weight: var(--font-weight-semibold);
}

.type-item-row .type-meta .item-title {
  display: block;
  width: 100%;
}

.type-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.type-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.types-panel {
  padding: 0;
  gap: 0;
  padding-bottom: 14px;
  overflow: visible;
}

.types-panel > .chips {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
}

.types-panel > .types-list {
  padding: 12px 16px 10px;
}

.types-panel > .deleted-items-panel {
  margin-bottom: 0;
}

.inline-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  font-size: var(--text-sm);
  vertical-align: middle;
}

.inline-icon .material-symbols-rounded {
  font-size: var(--icon-size-md);
}

.types-list .inline-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  margin-right: 0;
}

.types-list .inline-icon .material-symbols-rounded {
  font-size: var(--icon-size-3xl);
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
}

.types-list .inline-icon.type-visual .material-symbols-rounded {
  font-size: var(--icon-size-2xl);
}

.tx-categories-list .tx-cat-visual {
  font-size: var(--icon-size-lg);
  line-height: var(--line-height-tight);
}

.tx-categories-list .tx-cat-visual .material-symbols-rounded {
  font-size: var(--icon-size-xl);
}

.tx-category-item.is-subcategory {
  border-style: dashed;
  margin-left: 30px;
  margin-right: 10px;
}

.tx-categories-panel {
  padding-bottom: 14px;
  overflow: visible;
}

.tx-categories-panel > .tx-categories-list {
  padding-bottom: 16px;
}

.tx-categories-panel > .deleted-items-panel {
  margin-bottom: 0;
}

.icon-action {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  display: inline-grid;
  place-items: center;
  color: var(--color-text-action-icon);
  cursor: pointer;
}

.icon-action .material-symbols-rounded {
  font-size: var(--icon-size-md);
}

.icon-action:hover {
  border-color: var(--border);
  background: var(--surface-soft);
}

.icon-action.danger {
  color: var(--danger);
}

.icon-action.danger:hover {
  border-color: var(--color-danger-soft-border);
  background: var(--color-danger-soft-bg);
}

.icon-action.is-disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}

.deleted-items-panel {
  border-style: dashed;
  box-shadow: none;
  margin: 12px 16px 16px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface-soft) 58%, var(--surface));
}

.deleted-items-panel h3 {
  font-size: var(--text-base);
}

.deleted-list .item {
  border-style: dashed;
  background: color-mix(in srgb, var(--surface-soft) 82%, var(--surface));
  box-shadow: none;
}

.btn-restore-type {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 10px;
  gap: 6px;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

.btn-restore-type .material-symbols-rounded {
  font-size: var(--icon-size-nav);
}

.item-sub {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  font-weight: var(--font-weight-normal);
}

.text-right {
    text-align: right;
}

.type-item-row .type-meta .item-sub {
  display: block;
  width: 100%;
}

.account-item-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.account-item-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  margin-right: 0;
  flex: 0 0 42px;
}

.account-item-icon .material-symbols-rounded {
  font-size: var(--icon-size-2xl);
}

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

.chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  min-height: 36px;
  padding: 6px 14px;
  background: var(--surface);
  cursor: pointer;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-nav);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

.chip:hover {
  border-color: var(--border-strong);
  background: var(--surface-soft);
}

.chip.active {
  background: var(--primary);
  color: var(--surface);
  border-color: var(--primary);
}

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

.row.wrap {
  flex-wrap: wrap;
}

.row.grow > * {
  flex: 1;
  min-width: 0;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table th,
.table td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--border);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.table th {
  color: var(--color-text-label);
  font-size: var(--text-sm);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.table-actions-col,
.table-actions-cell {
  text-align: right !important;
  width: 100px;
}

.snapshot-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  font-weight: var(--font-weight-bold);
  background: var(--color-tag-neutral-bg);
}

.tag.asset {
  background: var(--color-tag-asset-bg);
  color: var(--success);
}

.tag.liability {
  background: var(--color-tag-liability-bg);
  color: var(--danger);
}

.tag.tx {
  background: var(--color-tag-tx-bg);
  color: var(--color-tag-tx-text);
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 26px;
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  background: var(--surface-soft);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--color-overlay-dark-50);
  display: none;
  place-items: center;
  z-index: 80;
  backdrop-filter: blur(2px);
}

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

.modal-backdrop[hidden],
.modal-backdrop[aria-hidden="true"] {
  display: none !important;
}

.modal {
  width: min(100%, 650px);
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: 16px;
  overflow: hidden;
}

.modal-header {
  padding: 24px 24px 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: var(--text-lg);
  letter-spacing: -0.03em;
  line-height: var(--text-lg--line-height);
  font-weight: var(--font-weight-semibold);
}

.modal-body {
  padding: 12px 14px 14px;
  overflow: auto;
}

.modal.modal-transaction {
  overflow: visible;
  max-height: min(calc(100vh - 26px), 760px);
}

.modal.modal-transaction .modal-body {
  overflow: visible;
}

.modal.modal-confirm {
  width: min(100%, 572px);
}

.modal.modal-confirm .modal-header {
  padding: 16px 18px 12px;
}

.modal.modal-confirm .modal-body {
  padding: 6px 18px 18px;
}

.modal.modal-session-warning {
  width: min(100%, 540px);
}

.confirm-modal-copy {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  margin-bottom: 14px;
  font-weight: var(--font-weight-normal);
}

.confirm-modal-actions {
  justify-content: flex-end;
}

.confirm-modal-actions .btn {
  min-width: 108px;
}

.session-expiring-copy {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.session-expiring-copy p {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

.session-expiring-countdown {
  font-size: clamp(2rem, 4vw, 2.6rem);
  line-height: 1;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.06em;
}

.session-expiring-actions {
  justify-content: flex-end;
}

.delete-account-confirm-copy {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  margin-bottom: 12px;
}

.delete-account-confirm-input {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.delete-account-confirm-input span {
  color: var(--text);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

.delete-account-confirm-input strong {
  color: var(--btn-danger-bg);
}

.delete-account-confirm-input input {
  min-height: 42px;
  border-radius: 12px;
}

.modal-loading {
  min-height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  font-weight: var(--font-weight-medium);
}

.modal-loading .material-symbols-rounded {
  font-size: var(--icon-size-md);
  animation: spin 0.9s linear infinite;
}

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

.form {
  display: grid;
  gap: 10px;
}

.form label {
  display: grid;
  gap: 6px;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  font-weight: var(--font-weight-normal);
}

.modal .form label,
.modal .row.grow > *,
.modal .recurrence-inline-row > *,
.modal .account-create-money-row > * {
  min-width: 0;
  max-width: 100%;
}

.modal input[type="date"],
.modal input[type="month"] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  justify-self: stretch;
  align-self: stretch;
  overflow: hidden;
}

.modal input[type="date"]::-webkit-date-and-time-value,
.modal input[type="month"]::-webkit-date-and-time-value,
.modal input[type="date"]::-webkit-datetime-edit,
.modal input[type="month"]::-webkit-datetime-edit,
.modal input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.modal input[type="month"]::-webkit-datetime-edit-fields-wrapper {
  min-width: 0;
  max-width: 100%;
}

@supports (-webkit-touch-callout: none) {
  .modal input[type="date"],
  .modal input[type="month"] {
    width: -webkit-fill-available;
    max-width: -webkit-fill-available;
    inline-size: -webkit-fill-available;
    max-inline-size: -webkit-fill-available;
  }

  .modal input[type="date"]::-webkit-date-and-time-value,
  .modal input[type="month"]::-webkit-date-and-time-value {
    display: block;
    width: 100%;
    max-width: 100%;
    text-align: left;
  }
}

.modal-section-title {
  margin: 2px 0 0;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-text-label);
}

.account-form input,
.account-form select {
  min-height: 46px;
  border-radius: 14px;
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  font-weight: var(--font-weight-semibold);
}

.account-form input[readonly] {
  background: var(--surface-soft);
  cursor: default;
}

.account-form .row.grow {
  gap: 12px;
}

.account-form .form-actions {
  margin-top: 4px;
}

.account-form .color-readonly {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.modal.modal-account-create {
  width: min(100%, 520px);
  max-height: min(calc(100vh - 26px), 700px);
}

.modal.modal-date-filter {
  width: min(100%, 460px);
  max-height: min(calc(100vh - 26px), 540px);
}

.modal.modal-account-edit,
.modal.modal-snapshot {
  width: min(100%, 520px);
  max-height: min(calc(100vh - 26px), 700px);
}

.modal.modal-account-create .modal-header {
  padding: 12px 16px 10px;
}

.modal.modal-date-filter .modal-header {
  padding: 12px 16px 10px;
}

.modal.modal-account-edit .modal-header,
.modal.modal-snapshot .modal-header {
  padding: 12px 16px 10px;
}

.modal.modal-account-create .modal-header h3 {
  font-size: var(--text-3xl);
  line-height: var(--text-3xl--line-height);
  letter-spacing: -0.025em;
}

.modal.modal-account-create .modal-body {
  padding: 10px 16px 14px;
}

.modal.modal-date-filter .modal-body {
  padding: 10px 16px 14px;
}

.modal.modal-account-edit .modal-body,
.modal.modal-snapshot .modal-body {
  padding: 10px 16px 14px;
}

.period-filter-form {
  gap: 14px;
}

.period-filter-mode-switch {
  margin-bottom: 2px;
}

.period-filter-section {
  display: grid;
  gap: 10px;
}

.period-filter-section[hidden] {
  display: none !important;
}

.account-create-form {
  gap: 12px;
}

.account-create-field {
  gap: 6px;
}

.account-create-field > span {
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  font-weight: var(--font-weight-semibold);
}

.account-create-form input,
.account-create-form select,
.account-create-form textarea,
.netia-select-trigger {
  font-weight: var(--font-weight-normal);
}

.account-create-money-row {
  gap: 8px;
}

.account-create-money-row > input {
  min-width: 0;
}

.account-create-currency {
  width: 104px;
  flex: 0 0 104px;
}

.account-create-more-link {
  border: 0;
  background: transparent;
  color: var(--color-text-label);
  cursor: pointer;
  padding: 0;
  justify-self: start;
  font-size: var(--text-lg);
  line-height: var(--text-lg--line-height);
  font-weight: var(--font-weight-medium);
}

.account-create-more-link:hover {
  color: var(--text);
  text-decoration: underline;
}

.account-create-more-fields {
  display: grid;
  gap: 10px;
}

.account-create-more-fields[hidden] {
  display: none;
}

.netia-select {
  position: relative;
}

.netia-select-trigger {
  width: 100%;
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

.netia-select-trigger .material-symbols-rounded {
  font-size: var(--icon-size-md);
  color: var(--muted);
}

.netia-select-trigger:hover {
  border-color: var(--border-strong);
}

.netia-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 4px;
  display: grid;
  gap: 2px;
  z-index: 140;
  max-height: 280px;
  overflow: auto;
}

.netia-select-menu.is-floating {
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
}

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

.netia-select-option {
  border: 0;
  min-height: 36px;
  border-radius: 8px;
  background: transparent;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  cursor: pointer;
  font-weight: var(--font-weight-normal);
}

.netia-select-option-main {
  min-width: 0;
}

.netia-select-option-meta {
  margin-left: auto;
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  padding-right: 4px;
  white-space: nowrap;
}

.netia-select-group {
  padding: 7px 10px 4px;
  color: var(--color-text-dropdown-group);
  font-weight: var(--font-weight-semibold);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

.netia-select-option .material-symbols-rounded {
  opacity: 0;
  font-size: var(--icon-size-md);
}

.netia-select-option:hover {
  background: var(--surface-soft);
}

.netia-select-option.is-selected {
  background: color-mix(in srgb, var(--success) 18%, var(--surface));
  color: var(--color-select-active-text);
}

.netia-select-option.is-selected .material-symbols-rounded {
  opacity: 1;
}

.tx-movement-list {
  gap: 12px;
}

.tx-movement-item {
  padding: 12px 14px;
  gap: 14px;
}

.tx-movement-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.tx-movement-meta {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.tx-movement-meta .item-title {
  font-size: var(--text-md);
  line-height: var(--text-md--line-height);
  font-weight: var(--font-weight-medium);
  letter-spacing: -0.02em;
}

.tx-movement-meta .item-sub {
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  font-weight: var(--font-weight-normal);
}

.tx-movement-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  margin-right: 0;
  flex: 0 0 42px;
  font-size: var(--icon-size-lg);
}

.tx-movement-icon .material-symbols-rounded {
  font-size: var(--icon-size-lg);
}

.tx-movement-right {
  display: grid;
  justify-items: end;
  align-content: center;
  gap: 2px;
}

.tx-movement-amount {
  font-size: var(--text-md);
  line-height: var(--text-md--line-height);
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.02em;
}

.tx-movement-amount.tx-amount-expense {
  color: var(--color-red-600);
  width: max-content;
}

.tx-movement-amount.tx-amount-income {
  color: var(--color-green-600);
}

.tx-movement-currency {
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  font-weight: var(--font-weight-normal);
}

.tx-movement-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.tx-movement-actions-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tx-movement-actions-menu-wrap {
  position: relative;
  display: none;
}

.tx-movement-actions-menu-btn .material-symbols-rounded {
  font-size: var(--icon-size-md);
}

.tx-movement-actions-menu {
  min-width: 168px;
  right: 0;
  top: calc(100% + 6px);
  z-index: 65;
}

.tx-movement-actions-menu .danger-option {
  color: var(--color-red-600);
}

.tx-movement-actions-menu .danger-option .material-symbols-rounded {
  color: var(--color-red-600);
}

.account-movement-list {
  display: grid;
  gap: 0;
}

.account-movement-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.account-movement-item:last-child {
  border-bottom: 0;
  padding-bottom: 2px;
}

.account-movement-item .tx-movement-main {
  min-width: 0;
}

.account-movement-item .tx-movement-right {
  margin-left: auto;
}

.account-movement-item .tx-movement-meta .item-title {
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  font-weight: var(--font-weight-semibold);
}

.account-movement-item .tx-movement-meta .item-sub {
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

.account-movement-item .tx-movement-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
}

.account-movement-item-boxed {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.account-movement-item-boxed + .account-movement-item-boxed {
  margin-top: 10px;
}

.account-movement-item-boxed:last-child {
  padding-bottom: 12px;
}

.tx-description-input::placeholder {
  color: var(--muted);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  font-weight: var(--font-weight-normal);
}

.tx-balance-toggle {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 10px !important;
}

.tx-balance-toggle-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.tx-balance-toggle-copy strong {
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  font-weight: var(--font-weight-medium);
}

.tx-balance-toggle-control {
  display: inline-flex;
  align-items: center;
  position: relative;
  height: 100%;
}

.tx-balance-toggle-control input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.tx-balance-toggle-track {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--color-toggle-track);
  position: relative;
  transition: background-color 0.16s ease, border-color 0.16s ease;
}

.tx-balance-toggle-track::after {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--color-border-soft);
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.16s ease;
}

.tx-balance-toggle-control input:checked + .tx-balance-toggle-track {
  background: color-mix(in srgb, var(--success) 34%, var(--surface));
  border-color: color-mix(in srgb, var(--success) 58%, var(--border));
}

.tx-balance-toggle-control input:checked + .tx-balance-toggle-track::after {
  transform: translateX(18px);
}

.tx-summary-grid .tx-kpi-card {
  border-width: 1px;
}

.tx-kpi-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tx-kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 40%, var(--surface));
  color: var(--color-text-caption);
}

.tx-kpi-icon .material-symbols-rounded {
  font-size: var(--icon-size-md);
}

.tx-kpi-card-expense {
  border-color: color-mix(in srgb, var(--danger) 35%, var(--border));
  background: color-mix(in srgb, var(--surface) 92%, var(--danger));
}

.tx-kpi-card-expense .tx-kpi-icon {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 20%, var(--surface));
}

.tx-kpi-card-income {
  border-color: color-mix(in srgb, var(--success) 34%, var(--border));
  background: color-mix(in srgb, var(--surface) 92%, var(--success));
}

.tx-kpi-card-income .tx-kpi-icon {
  color: var(--success);
  background: color-mix(in srgb, var(--success) 20%, var(--surface));
}

.tx-kpi-card-transfer {
  border-color: color-mix(in srgb, #3b82f6 36%, var(--border));
  background: color-mix(in srgb, var(--surface) 92%, #3b82f6);
}

.tx-kpi-card-transfer .tx-kpi-icon {
  color: #2563eb;
  background: color-mix(in srgb, #3b82f6 18%, var(--surface));
}

.tx-kpi-card-expected {
  border-color: color-mix(in srgb, var(--warning) 44%, var(--border));
  background: color-mix(in srgb, var(--surface) 91%, var(--color-warning-soft));
}

.tx-kpi-card-expected .kpi-value {
  color: var(--color-text-warning-strong);
}

.tx-kpi-card-expected .tx-kpi-icon {
  color: var(--color-text-warning);
  background: color-mix(in srgb, var(--color-warning-chip) 22%, var(--surface));
}

.tx-filter-panel {
  gap: 12px;
}

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

.tx-filter-panel-head h3 {
  margin-bottom: 3px;
}

.tx-filter-panel-description {
  margin: 0;
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  color: var(--muted);
  font-weight: var(--font-weight-normal);
}

.tx-filter-panel-summary {
  margin: 0;
  text-align: right;
  white-space: nowrap;
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
}

.tx-filter-panel-metrics {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.tx-filter-panel-total {
  margin: 0;
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.tx-filter-panel-total-value {
  font-weight: var(--font-weight-semibold);
}

.tx-filter-panel-total-value.expense {
  color: var(--color-red-600);
}

.tx-filter-panel-total-value.income {
  color: var(--color-green-600);
}

.kpi-value.transfer {
  color: #2563eb;
}

.tx-filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) repeat(2, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.tx-filter-field {
  display: grid;
  gap: 6px;
}

.tx-filter-field-label {
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  color: var(--muted);
  font-weight: var(--font-weight-medium);
}

.tx-filter-input-wrap {
  position: relative;
  display: block;
}

.tx-filter-input-wrap .material-symbols-rounded {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 18px;
  pointer-events: none;
}

.tx-filter-input-wrap input {
  padding-left: 38px;
  font-size: var(--text-sm);
}

.tx-filter-actions {
  display: flex;
  align-items: end;
}

.tx-recent-panel {
  gap: 12px;
}

.tx-recent-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.tx-recent-head h3 {
  margin: 0;
}

.tx-recent-count {
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  text-align: right;
  white-space: nowrap;
}

.recurring-panel {
  gap: 12px;
}

.recurring-panel-head {
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.recurring-panel-main {
  min-width: 0;
}

.recurring-panel-right {
  margin-left: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.recurring-panel-head h3 {
  margin-bottom: 3px;
}

.recurring-panel-description {
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  color: var(--muted);
  font-weight: var(--font-weight-normal);
}

.recurring-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.recurring-total-label {
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  color: var(--muted);
  font-weight: var(--font-weight-medium);
}

.recurring-total-value {
  font-size: var(--text-lg);
  line-height: var(--text-lg--line-height);
  font-weight: var(--font-weight-semibold);
}

.recurring-total-value.expense {
  color: var(--color-red-600);
}

.recurring-total-value.income {
  color: var(--color-green-600);
}

.recurring-list {
  gap: 10px;
}

.recurring-breakdown-panel {
  gap: 12px;
}

.recurring-breakdown-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

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

.recurring-breakdown-block {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 86%, var(--surface-soft));
  padding: 10px;
  display: grid;
  gap: 8px;
}

.recurring-breakdown-block-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.recurring-breakdown-block-title {
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  font-weight: var(--font-weight-semibold);
}

.recurring-breakdown-head h3 {
  margin-bottom: 3px;
}

.recurring-breakdown-description {
  margin: 0;
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  color: var(--muted);
  font-weight: var(--font-weight-normal);
}

.recurring-breakdown-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  margin-left: auto;
}

.recurring-breakdown-total-label {
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  color: var(--muted);
  font-weight: var(--font-weight-medium);
}

.recurring-breakdown-total-value {
  font-size: var(--text-md);
  line-height: var(--text-md--line-height);
  font-weight: var(--font-weight-semibold);
}

.recurring-breakdown-total-value.expense {
  color: var(--color-red-600);
}

.recurring-breakdown-total-value.income {
  color: var(--color-green-600);
}

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

.recurring-breakdown-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.recurring-breakdown-meta {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.recurring-breakdown-label {
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  font-weight: var(--font-weight-semibold);
}

.recurring-breakdown-sub {
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  color: var(--muted);
  font-weight: var(--font-weight-normal);
}

.recurring-breakdown-value {
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  font-weight: var(--font-weight-semibold);
  text-align: right;
  white-space: nowrap;
}

.recurring-breakdown-value.expense {
  color: var(--color-red-600);
}

.recurring-breakdown-value.income {
  color: var(--color-green-600);
}

.recurrence-month-separator {
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  font-weight: var(--font-weight-semibold);
  color: var(--muted);
  padding: 2px 2px 0;
}

.recurrence-item {
  gap: 14px;
}

.recurrence-item.is-due {
  border-color: color-mix(in srgb, var(--danger) 38%, var(--border));
  background: color-mix(in srgb, var(--surface) 94%, var(--danger));
}

.recurrence-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
}

.recurrence-right {
  margin-left: auto;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas:
    "amount actions"
    "currency actions";
  column-gap: 10px;
  row-gap: 2px;
  align-items: center;
  justify-items: end;
}

.recurrence-amount {
  grid-area: amount;
  font-size: var(--text-md);
  line-height: var(--text-md--line-height);
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.02em;
}

.recurrence-amount-neutral {
  color: var(--text);
}

.recurrence-amount-expense {
  color: var(--color-red-600);
}

.recurrence-amount-income {
  color: var(--color-green-600);
}

.recurrence-amount-variable {
  grid-area: amount;
  color: var(--color-text-recurrence);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  font-weight: var(--font-weight-medium);
}

.recurrence-currency {
  grid-area: currency;
  text-align: right;
  white-space: nowrap;
}

.recurrence-due-danger {
  color: var(--color-red-600);
  font-weight: var(--font-weight-medium);
}

.recurrence-mark-btn {
  min-width: 110px;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 12px;
  border-color: var(--border);
  background: var(--surface);
  color: var(--color-text-button-secondary);
  font-weight: var(--font-weight-medium);
}

.recurrence-mark-btn .material-symbols-rounded {
  font-size: var(--icon-size-sm);
}

.recurrence-mark-btn:hover {
  border-color: var(--border-strong);
  background: var(--surface-soft);
}

.recurrence-mark-btn.is-due {
  border-color: var(--color-red-600);
  background: var(--color-red-600);
  color: var(--surface);
}

.recurrence-mark-btn.is-due .material-symbols-rounded {
  color: var(--surface);
}

.recurrence-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  grid-area: actions;
  margin-left: 2px;
}

.recurrence-more {
  position: relative;
}

.recurrence-more-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
}

.recurrence-more-btn .material-symbols-rounded {
  font-size: var(--icon-size-lg);
}

.recurrence-menu {
  top: calc(100% + 6px);
  right: 0;
  min-width: 220px;
  z-index: 70;
}

.recurrence-menu button {
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  font-weight: var(--font-weight-normal);
}

.recurrence-menu button .material-symbols-rounded {
  color: var(--muted);
  font-size: var(--icon-size-md);
}

.recurrence-menu .danger-option {
  color: var(--color-red-600);
}

.recurrence-menu .danger-option .material-symbols-rounded {
  color: var(--color-red-600);
}

@media (max-width: 880px) {
  .recurring-panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .tx-filter-panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .tx-filter-panel-summary {
    text-align: left;
    white-space: normal;
  }

  .tx-filter-panel-metrics {
    align-items: flex-start;
  }

  .tx-filter-panel-total {
    text-align: left;
    white-space: normal;
  }

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

  .tx-filter-field-search {
    grid-column: 1 / -1;
  }

  .tx-filter-actions {
    grid-column: 1 / -1;
  }

  .recurring-panel-right {
    margin-left: 0;
    align-items: center;
    justify-content: space-between;
  }

  .recurring-total {
    align-items: flex-start;
  }

  .recurrence-right {
    grid-template-columns: 1fr;
    grid-template-areas:
      "amount"
      "currency"
      "actions";
    justify-items: end;
    row-gap: 4px;
  }

  .recurrence-actions {
    margin-left: 0;
  }

  .recurring-breakdown-head {
    flex-direction: column;
    align-items: stretch;
  }

  .recurring-breakdown-columns {
    grid-template-columns: 1fr;
  }

  .recurring-breakdown-block-head {
    flex-direction: column;
    align-items: stretch;
  }

  .recurring-breakdown-total {
    margin-left: 0;
    align-items: flex-start;
  }

  .recurring-breakdown-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .recurring-breakdown-value {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .tx-filter-grid {
    grid-template-columns: 1fr;
  }

  .tx-filter-actions .btn {
    width: 100%;
  }

  .tx-recent-head {
    flex-direction: column;
    align-items: stretch;
  }

  .tx-recent-count {
    text-align: left;
    white-space: normal;
  }
}

.recurrence-form,
.recurrence-pay-form {
  gap: 12px;
}

.recurrence-form {
  gap: 10px;
}

.recurrence-inline-row {
  align-items: flex-end;
  gap: 10px;
}

.recurrence-inline-row > label {
  margin: 0;
}

.recurrence-frequency-field {
  flex: 0.95;
}

.recurrence-date-field {
  flex: 1.05;
}

.recurrence-date-hint {
  display: block;
  margin-top: -2px;
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
}

.tx-balance-toggle-recurrence {
  justify-content: flex-start !important;
  gap: 8px;
  align-items: flex-start;
}

.tx-balance-toggle-recurrence .tx-balance-toggle-control {
  flex: 0 0 auto;
  margin-top: 0;
  align-self: flex-start;
}

.tx-balance-toggle-recurrence .tx-balance-toggle-copy {
  align-items: flex-start;
  gap: 0;
}

.tx-balance-toggle-recurrence .tx-balance-toggle-copy strong {
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  font-weight: var(--font-weight-medium);
}

.tx-balance-toggle-recurrence .tx-balance-toggle-copy .muted {
  display: block;
  margin-top: -1px;
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
}

.tx-balance-toggle-recurrence .tx-balance-toggle-track {
  width: 40px;
  height: 22px;
}

.tx-balance-toggle-recurrence .tx-balance-toggle-track::after {
  width: 16px;
  height: 16px;
  top: 2px;
  left: 2px;
}

.tx-balance-toggle-recurrence .tx-balance-toggle-control input:checked + .tx-balance-toggle-track::after {
  transform: translateX(18px);
}

.recurrence-amount-row.is-hidden {
  display: none !important;
}

.modal.modal-recurrence {
  width: min(100%, 560px);
  overflow: hidden;
  max-height: min(calc(100vh - 26px), 720px);
}

.modal.modal-recurrence .modal-body {
  padding: 0px 24px 24px 24px;
  max-height: min(calc(100vh - 106px), 650px);
  overflow-x: visible;
  overflow-y: auto;
}

.modal.modal-recurrence-pay {
  width: min(100%, 560px);
  overflow: hidden;
  max-height: min(calc(100vh - 26px), 520px);
}

.modal.modal-recurrence-pay .modal-body {
  padding: 10px 12px 12px;
  overflow-x: visible;
  overflow-y: auto;
}

.modal.modal-recurrence input,
.modal.modal-recurrence select,
.modal.modal-recurrence textarea,
.modal.modal-recurrence-pay input,
.modal.modal-recurrence-pay select,
.modal.modal-recurrence-pay textarea {
  min-height: 40px;
  padding: 7px 10px;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

.modal.modal-recurrence .netia-select-trigger,
.modal.modal-recurrence-pay .netia-select-trigger {
  min-height: 40px;
  padding: 7px 10px;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
}

.modal.modal-recurrence textarea,
.modal.modal-recurrence-pay textarea {
  min-height: 78px;
}

.modal.modal-account-type {
  width: min(100%, 448px);
}

.modal.modal-account-type .modal-header {
  padding: 10px 16px 8px;
}

.modal.modal-account-type .modal-header h3 {
  font-size: var(--text-lg);
  line-height: var(--text-lg--line-height);
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.02em;
}

.modal.modal-account-type .modal-body {
  padding: 8px 16px 12px;
}

.account-type-form {
  gap: 10px;
}

.account-type-field {
  gap: 4px;
}

.account-type-field > span,
.account-type-section h4 {
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  font-weight: var(--font-weight-medium);
  letter-spacing: -0.015em;
  color: var(--text);
}

.account-type-field input {
  min-height: 42px;
  border-radius: 14px;
  padding-inline: 12px;
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  font-weight: var(--font-weight-normal);
}

.account-type-section {
  display: grid;
  gap: 4px;
}

.account-type-picker {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  padding: 7px;
}

.account-type-icon-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 6px;
}

.account-type-icon-option {
  border: 1px solid transparent;
  min-height: 32px;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--color-text-account-icon);
}

.account-type-icon-option .material-symbols-rounded {
  font-size: var(--icon-size-lg);
}

.account-type-icon-option:hover {
  border-color: var(--border);
  background: var(--surface-soft);
}

.account-type-icon-option.is-selected {
  background: var(--primary);
  color: var(--surface);
}

.account-type-color-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}

.account-type-color-option {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 2px solid transparent;
  background: var(--account-color);
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--surface);
  margin-inline: auto;
}

.account-type-color-option .material-symbols-rounded {
  opacity: 0;
  font-size: var(--icon-size-sm);
}

.account-type-color-option:hover {
  transform: translateY(-1px);
}

.account-type-color-option.is-selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px color-mix(in srgb, var(--primary) 26%, transparent);
}

.account-type-color-option.is-selected .material-symbols-rounded {
  opacity: 1;
}

.account-type-preview {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 9px;
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 9px;
}

.account-type-preview-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}

.account-type-preview-icon .material-symbols-rounded {
  font-size: var(--icon-size-2xl);
}

.account-type-preview-name {
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  font-weight: var(--font-weight-medium);
  letter-spacing: -0.02em;
}

.account-type-actions {
  margin-top: 2px;
}

.account-type-actions .btn {
  min-height: 36px;
  border-radius: 12px;
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  font-weight: var(--font-weight-medium);
}

.modal.modal-tx-category {
  width: min(100%, 520px);
  max-height: min(calc(100vh - 26px), 680px);
}

.modal.modal-tx-category .modal-header {
  padding: 12px 16px 10px;
}

.modal.modal-tx-category .modal-header h3 {
  font-size: var(--text-2xl);
  line-height: var(--text-2xl--line-height);
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.02em;
}

.modal.modal-tx-category .modal-body {
  padding: 10px 16px 14px;
}

.tx-cat-form {
  gap: 10px;
}

.tx-cat-field {
  gap: 5px;
}

.tx-cat-field > span,
.tx-cat-section h4 {
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.02em;
}

.tx-cat-field input,
.tx-cat-field select,
.tx-cat-custom-input {
  min-height: 42px;
  border-radius: 12px;
  font-size: var(--text-base);
  line-height: var(--text-base--line-height);
}

.tx-cat-section {
  display: grid;
  gap: 6px;
}

.tx-cat-emoji-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tx-cat-emoji-toggle {
  border: 0;
  background: transparent;
  color: var(--color-text-label);
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  padding: 0;
}

.tx-cat-emoji-toggle:hover {
  color: var(--text);
  text-decoration: underline;
}

.tx-cat-emoji-picker {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px;
  background: var(--surface);
}

.tx-cat-emoji-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 6px;
}

.tx-cat-emoji-option {
  min-height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  font-size: var(--icon-size-md);
  line-height: var(--line-height-tight);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tx-cat-emoji-option:hover {
  border-color: var(--border);
  background: var(--surface-soft);
}

.tx-cat-emoji-option.is-selected {
  background: var(--primary);
  color: var(--surface);
}

.tx-cat-custom-wrap[hidden] {
  display: none;
}

.tx-cat-custom-input {
  text-align: center;
}

.tx-cat-helper {
  margin: 0;
  font-size: var(--text-sm);
  line-height: var(--text-sm--line-height);
  color: var(--muted);
}

.tx-cat-actions .btn {
  min-height: 40px;
  border-radius: 12px;
}

.desktop-only {
  display: inline-flex;
}

#app.sidebar-collapsed {
  --sidebar-width: 78px;
}

#app.sidebar-collapsed .nav-label,
#app.sidebar-collapsed .sidebar-footer .btn,
#app.sidebar-collapsed .sidebar-footer .user-mini {
  display: none;
}

#app.sidebar-collapsed .sidebar nav a {
  justify-content: center;
  padding-inline: 0;
}

#app.sidebar-collapsed .nav-icon {
  margin: 0;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.toast-stack {
  position: fixed;
  right: 14px;
  bottom: 14px;
  display: grid;
  gap: 8px;
  z-index: 90;
}

.toast {
  min-width: 220px;
  max-width: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--success);
  border-radius: 12px;
  padding: 10px 10px 10px 12px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.toast-message {
  flex: 1 1 auto;
  min-width: 0;
}

.toast-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.toast-close:hover,
.toast-close:focus-visible {
  background: var(--surface-soft);
  color: var(--text);
}

.toast-close .material-symbols-rounded {
  font-size: 18px;
}

.toast.error {
  border-left-color: var(--danger);
}

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

.bottom-nav.mobile-only {
  display: none !important;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-overlay-surface-98);
  border-top: 1px solid var(--border);
  padding: 0px 10px 15px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  z-index: 70;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.10);
}

.bottom-nav a {
  display: grid;
  gap: 4px;
  place-items: center;
  text-align: center;
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
  color: var(--color-black);
  min-height: 40px;
  font-weight: var(--font-weight-normal);
  padding: 10px 0 10px 0;
}

.bottom-nav a .nav-icon {
  width: auto;
  font-size: var(--icon-size-2xl);
  color: inherit;
}

.bottom-nav .nav-label {
  font-size: var(--text-xs);
  line-height: var(--text-xs--line-height);
}

.bottom-nav a.active {
  color: var(--primary);
  border-top: 5px solid var(--primary);
}

.fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 0;
  background: var(--primary);
  color: var(--surface);
  font-size: var(--icon-size-3xl);
  z-index: 75;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

@media (max-width: 1160px) {
  .content {
    padding: 18px 18px 104px;
  }

  .page-title h1,
  .page-head h1 {
    font-size: clamp(var(--text-2xl), 3.2vw, var(--text-4xl));
    line-height: var(--text-2xl--line-height);
  }
}

@media (max-width: 980px) {
  :root {
    --topbar-height: 60px;
  }

  .lp-shell {
    padding: 12px 14px 38px;
    gap: 40px;
  }

  .lp-topbar {
    grid-template-columns: 1fr auto;
    row-gap: 10px;
  }

  .lp-nav {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: center;
  }

  .lp-hero-title {
    font-size: clamp(2.3rem, 8.5vw, 4rem);
  }

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

  .lp-steps-grid,
  .lp-testimonial-grid {
    grid-template-columns: 1fr;
  }

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

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

  .landing-page {
    padding: 14px;
    gap: 14px;
  }

  .landing-hero {
    grid-template-columns: 1fr;
  }

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

  .landing-mini-card {
    grid-column: 1 / -1;
  }

  .landing-flow {
    grid-template-columns: 1fr;
  }

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

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

  .sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    bottom: 0;
    width: min(86vw, 320px);
    z-index: 85;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-md);
  }

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

  .content {
    padding: 14px 14px 184px;
    overflow: visible;
  }

  .brand {
    gap: 8px;
  }

  .brand-text {
    font-size: var(--text-2xl);
    line-height: var(--text-2xl--line-height);
  }

  .toast-stack {
    top: calc(var(--topbar-height) + env(safe-area-inset-top) + 12px);
    right: 12px;
    bottom: auto;
    left: auto;
    width: min(340px, calc(100vw - 24px));
  }

  .toast {
    min-width: 0;
    max-width: none;
    width: 100%;
  }

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

  .mobile-only {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  .bottom-nav.mobile-only {
    display: grid !important;
  }

  .fab {
    right: 20px;
    bottom: 96px;
  }

  .page-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-head.page-head-period-filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .page-head.page-head-period-filter .page-title {
    min-width: 0;
  }

  .page-head .row {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
    min-width: 0;
  }

  .page-head.page-head-period-filter .page-head-actions {
    width: auto;
    justify-content: flex-end;
    align-self: start;
    margin-left: auto;
  }

  .page-head .row > * {
    min-width: 0;
  }

  .page-inline-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .page-inline-actions .btn {
    width: 100%;
  }

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

  .account-snapshots-head-actions {
    justify-content: flex-start;
  }

  .profile-summary-avatar {
    width: 52px;
    height: 52px;
  }

  .profile-action-row {
    flex-direction: column;
    align-items: stretch;
  }

  .profile-action-row .btn {
    width: 100%;
  }

  .period-filter-trigger {
    max-width: 100%;
    margin-left: auto;
  }

  .period-filter-label {
    display: none;
  }

  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .dashboard-patrimonial-chart-box {
    width: min(100%, 260px);
  }

  .dashboard-trend-panel {
    min-height: 320px;
  }

  .dashboard-trend-canvas {
    height: 220px !important;
    max-height: 220px !important;
  }

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

  .dashboard-breakdown-head strong {
    font-size: var(--text-xl);
    line-height: var(--text-xl--line-height);
  }

  .row.grow {
    flex-wrap: wrap;
  }

  .row.grow > * {
    min-width: min(100%, 180px);
  }

  .tx-summary-grid,
  .tx-chart-grid,
  .recurring-panel,
  .recurring-breakdown-panel,
  .account-movement-list {
    min-width: 0;
  }

  .tx-chart-grid .panel canvas,
  .dashboard-trend-panel canvas {
    max-width: 100% !important;
  }

  .settings-trm-calc-grid {
    grid-template-columns: 1fr;
  }

  .chips {
    flex-wrap: nowrap;
    overflow: auto;
    padding-bottom: 2px;
  }

  .chip {
    white-space: nowrap;
  }

  .tx-page-head-stack {
    position: -webkit-sticky;
    position: sticky;
    top: var(--topbar-height);
    align-self: start;
    z-index: 24;
    margin: -14px -14px 6px;
    padding: 14px 14px 0;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
  }

  .tx-page-head-stack .page-head {
    gap: 10px;
  }

  .tx-page-head-stack .tx-section-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 0 -14px;
    padding: 0 14px;
  }

  .tx-page-head-stack .tx-section-trigger {
    min-height: 52px;
    padding: 12px 8px 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--color-text-nav);
    box-shadow: none;
    position: relative;
  }

  .tx-page-head-stack .tx-section-trigger:hover {
    background: transparent;
    border-color: transparent;
  }

  .tx-page-head-stack .tx-section-trigger.active {
    background: transparent;
    color: var(--accent);
    border-color: transparent;
  }

  .tx-page-head-stack .tx-section-trigger.active::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 0;
    height: 3px;
    border-radius: 999px;
    background: var(--accent);
  }

  .menu-dropdown {
    right: 0;
    min-width: 210px;
  }

  .menu-dropdown.is-floating {
    --action-menu-item-min-height: 54px;
    --action-menu-item-padding-y: 14px;
    --action-menu-item-padding-x: 14px;
    --action-menu-item-gap: 12px;
    --action-menu-item-icon-size: 20px;
  }

  .modal.modal-account-create,
  .modal.modal-account-edit,
  .modal.modal-snapshot,
  .modal.modal-transaction,
  .modal.modal-date-filter,
  .modal.modal-recurrence,
  .modal.modal-recurrence-pay,
  .modal.modal-tx-category,
  .modal.modal-account-type {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .modal.modal-account-create .modal-header,
  .modal.modal-account-edit .modal-header,
  .modal.modal-snapshot .modal-header,
  .modal.modal-transaction .modal-header,
  .modal.modal-date-filter .modal-header,
  .modal.modal-recurrence .modal-header,
  .modal.modal-recurrence-pay .modal-header,
  .modal.modal-tx-category .modal-header,
  .modal.modal-account-type .modal-header {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
  }

  .modal.modal-account-create .modal-body,
  .modal.modal-account-edit .modal-body,
  .modal.modal-snapshot .modal-body,
  .modal.modal-transaction .modal-body,
  .modal.modal-date-filter .modal-body,
  .modal.modal-recurrence .modal-body,
  .modal.modal-recurrence-pay .modal-body,
  .modal.modal-tx-category .modal-body,
  .modal.modal-account-type .modal-body {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: none;
    padding: 10px 14px calc(96px + env(safe-area-inset-bottom));
  }

  .modal.modal-account-create .form-actions,
  .modal.modal-account-edit .form-actions,
  .modal.modal-snapshot .form-actions,
  .modal.modal-transaction .form-actions,
  .modal.modal-date-filter .form-actions,
  .modal.modal-recurrence .form-actions,
  .modal.modal-recurrence-pay .form-actions,
  .modal.modal-tx-category .form-actions,
  .modal.modal-account-type .form-actions {
    position: sticky;
    bottom: 0;
    padding: 10px 0 calc(2px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, var(--surface) 84%, transparent);
  }
}

@media (max-width: 680px) {
  .public-page {
    padding: 16px;
  }

  .lp-shell {
    padding: 8px 10px 32px;
    gap: 32px;
  }

  .lp-topbar {
    grid-template-columns: 1fr;
    row-gap: 8px;
    padding: 10px 12px;
    border-radius: 14px;
    position: static;
  }

  .lp-brand {
    font-size: var(--text-xl);
    line-height: var(--text-2xl--line-height);
  }

  .lp-top-actions {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .lp-top-actions .btn {
    min-height: 38px;
    padding: 8px 12px;
  }

  .lp-nav {
    display: none;
  }

  .lp-hero-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .lp-hero-actions .btn {
    width: 100%;
  }

  .lp-showcase-metrics,
  .lp-feature-grid,
  .lp-steps-grid,
  .lp-metric-strip,
  .lp-testimonial-grid,
  .lp-footer {
    grid-template-columns: 1fr;
  }

  .lp-showcase-card {
    padding: 14px;
  }

  .auth-wrap {
    width: 100%;
  }

  .auth-card {
    padding: 18px;
    border-radius: 16px;
  }

  .social-row,
  .form-actions {
    flex-direction: column;
  }

  body[data-page="landing"].public-page {
    padding: 0;
  }

  .landing-page {
    padding: 12px;
    gap: 12px;
  }

  .landing-topbar {
    padding: 10px;
    border-radius: 14px;
  }

  .landing-brand {
    font-size: var(--text-2xl);
    line-height: var(--text-2xl--line-height);
  }

  .landing-top-actions .btn {
    min-height: 38px;
    padding: 8px 11px;
  }

  .landing-hero {
    grid-template-columns: 1fr;
    padding: 16px;
    border-radius: 16px;
    gap: 14px;
  }

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

  .landing-mini-card {
    grid-column: 1 / -1;
  }

  .landing-checks li {
    font-size: var(--text-xs);
    line-height: var(--text-xs--line-height);
  }

  .landing-actions {
    width: 100%;
    flex-direction: column;
  }

  .landing-actions .btn {
    width: 100%;
  }

  .landing-flow,
  .landing-features-grid {
    grid-template-columns: 1fr;
  }

  .landing-flow-card,
  .landing-feature,
  .landing-cta {
    padding: 12px;
  }

  .landing-footer {
    flex-direction: column;
    gap: 4px;
  }

  .topbar {
    padding-inline: 10px;
  }

  .topbar .btn {
    min-height: var(--topbar-action-mobile-min-height);
    padding: var(--topbar-action-mobile-padding-y) var(--topbar-action-mobile-padding-x);
    font-size: var(--topbar-action-mobile-font-size);
    line-height: var(--topbar-action-mobile-line-height);
  }

  .modal {
    width: min(100%, 560px);
    max-height: calc(100vh - 26px);
  }

  .modal.modal-account-create,
  .modal.modal-account-edit,
  .modal.modal-snapshot,
  .modal.modal-transaction,
  .modal.modal-date-filter,
  .modal.modal-recurrence,
  .modal.modal-recurrence-pay,
  .modal.modal-tx-category,
  .modal.modal-account-type {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .modal.modal-confirm {
    width: min(100%, 560px);
  }

  .modal.modal-account-create .modal-header,
  .modal.modal-account-edit .modal-header,
  .modal.modal-snapshot .modal-header,
  .modal.modal-transaction .modal-header,
  .modal.modal-date-filter .modal-header,
  .modal.modal-recurrence .modal-header,
  .modal.modal-recurrence-pay .modal-header,
  .modal.modal-tx-category .modal-header,
  .modal.modal-account-type .modal-header {
    padding: 12px 14px 10px;
  }

  .modal.modal-account-create .modal-body,
  .modal.modal-account-edit .modal-body,
  .modal.modal-snapshot .modal-body,
  .modal.modal-transaction .modal-body,
  .modal.modal-date-filter .modal-body,
  .modal.modal-recurrence .modal-body,
  .modal.modal-recurrence-pay .modal-body,
  .modal.modal-tx-category .modal-body,
  .modal.modal-account-type .modal-body {
    padding: 10px 14px calc(92px + env(safe-area-inset-bottom));
  }

  .account-type-icon-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .account-create-money-row {
    flex-wrap: nowrap;
  }

  .account-create-currency {
    width: 92px;
    flex-basis: 92px;
  }

  .tx-cat-emoji-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .tx-category-item.is-subcategory {
    margin-left: 20px;
    margin-right: 6px;
  }

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

  .account-type-color-option {
    width: 40px;
    height: 40px;
  }

  .account-type-field input {
    min-height: 42px;
    border-radius: 12px;
    font-size: var(--text-base);
    line-height: var(--text-base--line-height);
  }

  .account-type-preview {
    border-radius: 12px;
    padding: 10px;
  }

  .account-type-preview-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .account-type-preview-icon .material-symbols-rounded {
    font-size: var(--icon-size-xl);
  }

  .account-type-preview-name {
    font-size: var(--text-lg);
    line-height: var(--text-lg--line-height);
  }

  .account-type-actions .btn {
    min-height: 38px;
    border-radius: 12px;
    font-size: var(--text-base);
    line-height: var(--text-base--line-height);
  }

  .tx-summary-grid .kpi-value {
    font-size: clamp(var(--text-2xl), 8vw, var(--text-3xl));
    line-height: var(--text-2xl--line-height);
  }

  .recurrence-item {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .recurrence-right {
    width: 100%;
    margin-left: 0;
    justify-items: start;
    grid-template-columns: 1fr;
    grid-template-areas:
      "amount"
      "currency"
      "actions";
    display: flex;
    justify-content: flex-end;
  }

  .recurrence-currency {
    text-align: left;
  }

  .recurrence-actions {
    justify-content: flex-start;
  }

  .tx-movement-amount, .recurrence-amount, .asset-amount  {
    font-size: var(--text-sm);
  }

  .asset-amount{
    width: max-content;
  }

  .panel {
    padding: 24px 12px;
  }
    
  .modal-header h3 {
    font-size: var(--text-2xl);
    line-height: var(--text-2xl--line-height);
  }

  .table th,
  .table td {
    padding-inline: 8px;
    font-size: var(--text-sm);
    line-height: var(--text-sm--line-height);
  }
}
