@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap");

:root {
  --bg-top: #dbeafe;
  --bg: #dbeafe;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --text: #182233;
  --muted: #526076;
  --brand: #0f766e;
  --brand-2: #115e59;
  --border: #d9e0ea;
  --chip-bg: #f8fbff;
  --chip-border: #e3ebf5;
  --chip-text: #334155;
  --nav-bg: rgba(24, 34, 51, 0.94);
  --nav-text: #c6d1df;
  --nav-hover: rgba(255, 255, 255, 0.08);
  --nav-active-bg: rgba(255, 255, 255, 0.14);
  --nav-active-border: rgba(255, 255, 255, 0.18);
  --danger: #b42318;
  --shadow: 0 10px 25px rgba(9, 30, 66, 0.08);
}

[hidden] {
  display: none !important;
}

:root[data-theme="dark"] {
  --bg-top: #0b1118;
  --bg: #0f1722;
  --surface: #162130;
  --surface-soft: #1b2a3c;
  --text: #e8eef7;
  --muted: #9fb0c6;
  --brand: #14b8a6;
  --brand-2: #2dd4bf;
  --border: #2a3b52;
  --chip-bg: #1a2738;
  --chip-border: #31445e;
  --chip-text: #d2deee;
  --nav-bg: rgba(10, 16, 26, 0.94);
  --nav-text: #c8d4e5;
  --nav-hover: rgba(45, 212, 191, 0.12);
  --nav-active-bg: rgba(45, 212, 191, 0.18);
  --nav-active-border: rgba(45, 212, 191, 0.3);
  --shadow: 0 14px 30px rgba(2, 7, 16, 0.55);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Avenir Next", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg) 100%);
  color: var(--text);
}

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

a {
  color: var(--brand-2);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a.btn:hover,
a.btn.btn-outline:hover {
  text-decoration: none;
}

.container {
  width: min(1040px, 92%);
  margin: 0 auto;
}

.narrow {
  width: min(640px, 92%);
}

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1200;
  transition: top 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.has-offline-banner .site-header {
  top: var(--offline-banner-offset, 56px);
}

body.has-online-sync-banner .site-header {
  top: var(--online-sync-banner-offset, 56px);
}

body.has-system-notice-banner .site-header {
  top: var(--system-notice-offset, 56px);
}

body.has-offline-banner.has-system-notice-banner .site-header,
body.has-online-sync-banner.has-system-notice-banner .site-header {
  top: calc(var(--system-notice-offset, 56px) + var(--offline-banner-offset, var(--online-sync-banner-offset, 56px)));
}

.nav {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  margin: 0;
  font-size: 1.35rem;
}

.section {
  padding: 28px 0;
}

.hero {
  padding: 56px 0 38px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
  align-items: start;
}

.kicker {
  color: var(--brand-2);
  font-weight: 600;
  margin: 0 0 8px;
}

.hero h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0 0 14px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.disclaimer {
  color: var(--muted);
  margin-top: 14px;
  font-size: 0.92rem;
}

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

.card p {
  margin: 6px 0;
}

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

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

.form-grid {
  display: grid;
  gap: 12px;
  min-width: 0;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  min-width: 0;
}

.platform-group {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  margin: 0;
}

.platform-group legend {
  font-weight: 700;
  padding: 0 6px;
}

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

.platform-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  cursor: pointer;
}

.platform-grid .platform-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.platform-grid .platform-option span {
  min-width: 0;
}

.platform-logo {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  flex: 0 0 auto;
}

.platform-grid input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--text);
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

select,
input[type="date"],
input[type="datetime-local"],
input[type="checkbox"],
input[type="radio"],
input[type="file"],
input[list] {
  cursor: pointer;
}

input[type="date"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: block;
  -webkit-appearance: none;
  appearance: none;
}

input[type="datetime-local"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  font-size: 16px;
}

#shift-edit-start-time,
#shift-edit-end-time {
  inline-size: 100%;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-inline-size: 0;
  display: block;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-appearance: none;
  appearance: none;
}

#shift-edit-start-time::-webkit-datetime-edit,
#shift-edit-end-time::-webkit-datetime-edit {
  padding: 0;
}

#shift-edit-start-time::-webkit-calendar-picker-indicator,
#shift-edit-end-time::-webkit-calendar-picker-indicator {
  margin: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 10px;
  padding: 10px 15px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

.btn:hover {
  background: var(--brand-2);
}

.btn-start {
  background: linear-gradient(135deg, #0f766e, #0ea5a1);
}

.btn-start:hover {
  background: linear-gradient(135deg, #0c665f, #0c8f8b);
}

.btn-outline {
  background: transparent;
  color: var(--brand-2);
  border: 1px solid var(--brand-2);
}

.btn-outline:hover {
  background: rgba(17, 94, 89, 0.08);
}

.btn-danger {
  background: #b42318;
  color: #fff;
}

.btn-danger:hover {
  background: #912018;
}

.btn-disabled {
  opacity: 0.5;
  pointer-events: none;
  filter: grayscale(0.4);
}

.app-update-btn {
  position: relative;
  min-width: 104px;
  padding: 8px 12px;
  line-height: 1.1;
}

.app-update-btn.is-updating {
  pointer-events: none;
  opacity: 0.88;
}

.app-update-btn.is-updating .app-update-btn-label {
  padding-left: 18px;
}

.app-update-btn.is-updating .app-update-btn-label::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -6px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--brand) 30%, transparent);
  border-top-color: var(--brand);
  animation: appUpdateSpin 0.7s linear infinite;
}

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

.btn-on-shift {
  background: linear-gradient(135deg, #16a34a, #22c55e);
  color: #fff;
}

.btn-on-shift:hover {
  background: linear-gradient(135deg, #15803d, #16a34a);
}

.message {
  min-height: 22px;
  color: var(--muted);
}

#end-mileage-warning {
  min-height: 0;
  margin: 0;
}

#end-mileage-warning:not(:empty) {
  margin-top: 4px;
}

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

.message.success {
  color: #15803d;
}

#shift-status.message.success {
  color: #15803d;
}

.reset-inline-message {
  min-height: 0;
  max-height: 0;
  opacity: 0;
  margin: 0;
  transform: translateY(-2px);
  overflow: hidden;
  transition: max-height 260ms ease, opacity 200ms ease, margin-top 220ms ease, transform 220ms ease;
}

.reset-inline-message.is-visible {
  max-height: 80px;
  opacity: 1;
  margin-top: 2px;
  transform: translateY(0);
}

#shift-status.status-on-shift {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #166534;
  background: #dcfce7;
  border: 1px solid #86efac;
  border-radius: 999px;
  padding: 6px 12px;
  min-height: 0;
}

#shift-status.status-on-shift::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  animation: statusDotPulse 1.2s ease-in-out infinite;
}

#shift-status.status-ending {
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 999px;
  padding: 6px 12px;
  display: inline-flex;
  min-height: 0;
}

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

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

.trend-chart {
  margin-top: 8px;
}

.trend-svg {
  width: 100%;
  height: auto;
  display: block;
}

.trend-grid line {
  stroke: color-mix(in srgb, var(--border) 70%, transparent);
  stroke-dasharray: 4 4;
  stroke-width: 1;
}

.trend-grid text,
.trend-x-labels text {
  fill: var(--muted);
  font-size: 11px;
}

.trend-line {
  fill: none;
  stroke: var(--brand);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-dots circle {
  fill: var(--brand);
}

.trend-point {
  cursor: pointer;
  outline: none;
}

.trend-point circle {
  fill: var(--brand);
}

.trend-point.neg circle {
  fill: #ef4444;
}

.trend-point-value {
  display: none;
  fill: var(--text);
  font-size: 11px;
  font-weight: 800;
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 4px;
  stroke-linejoin: round;
}

.trend-point:hover .trend-point-value,
.trend-point:focus .trend-point-value,
.trend-point.active .trend-point-value {
  display: block;
}

.trend-zero {
  stroke: color-mix(in srgb, var(--text) 30%, transparent);
  stroke-width: 1.2;
  stroke-dasharray: 3 4;
}

.insights-view-select {
  min-width: 190px;
  cursor: pointer;
}

.insights-chart {
  margin-top: 8px;
}

.donut-wrap {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 14px;
  align-items: center;
}

.donut-svg {
  width: 120px;
  height: 120px;
  display: block;
}

.donut-total-label {
  fill: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.donut-total-value {
  fill: var(--text);
  font-size: 10px;
  font-weight: 800;
}

.donut-legend {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.donut-legend li {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
}

.donut-key {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.weekday-heatmap {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.heatmap-cell {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px 6px;
  display: grid;
  gap: 3px;
  text-align: center;
  color: #0f172a;
}

.heatmap-day {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.heatmap-cell strong {
  font-size: 0.88rem;
  color: inherit;
}

.heatmap-meta {
  font-size: 0.74rem;
  opacity: 0.9;
}

.heatmap-tier-low {
  background: #dbe7f2;
  border-color: #b6c8da;
  color: #223247;
}

.heatmap-tier-medium {
  background: #ffedd5;
  border-color: #fdba74;
  color: #7c2d12;
}

.heatmap-tier-high {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #7f1d1d;
}

.profit-status-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.profit-day-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 8px;
  display: grid;
  gap: 6px;
  color: var(--text);
}

.profit-day-card.profit {
  border-color: #86efac;
  background: #f0fdf4;
  color: #14532d;
}

.profit-day-card.loss {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #7f1d1d;
}

.profit-day-card.flat {
  background: var(--surface);
}

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

.profit-day-name {
  font-size: 0.8rem;
  font-weight: 800;
}

.profit-day-date {
  font-size: 0.72rem;
  color: currentColor;
  opacity: 0.78;
}

.profit-day-total {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

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

.profit-hour-group {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 88%, var(--brand) 12%);
  padding: 12px;
  min-width: 0;
}

.profit-hour-group h3 {
  margin: 0 0 10px;
  font-size: 0.95rem;
}

.profit-hour-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.profit-hour-list li {
  display: grid;
  gap: 6px;
}

.profit-hour-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.86rem;
}

.profit-hour-row-head span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.profit-hour-row-head strong {
  flex: 0 0 auto;
  color: var(--brand-strong);
  font-size: 0.88rem;
}

.profit-hour-bar {
  height: 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 76%, transparent);
  overflow: hidden;
}

.profit-hour-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 64%, #f59e0b));
}

.week-total-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-weight: 800;
  font-size: 0.9rem;
}

.week-total-pill.profit {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.week-total-pill.loss {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #991b1b;
}

.week-total-pill.flat {
  background: var(--surface);
  color: var(--text);
}

html[data-theme="dark"] .heatmap-tier-low {
  background: #223247;
  border-color: #36506c;
  color: #d9e7f5;
}

html[data-theme="dark"] .heatmap-tier-medium {
  background: #5a3a1e;
  border-color: #a16207;
  color: #ffedd5;
}

html[data-theme="dark"] .heatmap-tier-high {
  background: #5a2323;
  border-color: #b91c1c;
  color: #fee2e2;
}

html[data-theme="dark"] .profit-day-card.profit {
  background: #193528;
  border-color: #2f7d52;
  color: #d8fbe8;
}

html[data-theme="dark"] .profit-day-card.loss {
  background: #462323;
  border-color: #b64646;
  color: #ffe5e5;
}

html[data-theme="dark"] .week-total-pill.profit {
  background: #193528;
  border-color: #2f7d52;
  color: #d8fbe8;
}

html[data-theme="dark"] .week-total-pill.loss {
  background: #462323;
  border-color: #b64646;
  color: #ffe5e5;
}

.platform-chart {
  display: grid;
  gap: 10px;
}

.platform-row {
  display: grid;
  gap: 6px;
}

.platform-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
}

.platform-row-head strong {
  font-size: 0.9rem;
}

.platform-bar {
  height: 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 72%, transparent);
  overflow: hidden;
}

.platform-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 72%, #60a5fa));
}

@media (max-width: 640px) {
  .insights-view-select {
    min-width: 0;
    width: 100%;
  }

  .insights-chart {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .trend-svg {
    min-width: 680px;
  }

  .trend-grid text,
  .trend-x-labels text {
    font-size: 12px;
  }

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

  .donut-legend {
    width: 100%;
  }

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

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

  .profit-hour-insight {
    grid-template-columns: 1fr;
  }
}

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

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

.btn-delete {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  background: #fee2e2;
  color: #b42318;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-delete:hover {
  background: #fecaca;
  color: #991b1b;
}

.btn-delete svg {
  width: 15px;
  height: 15px;
  pointer-events: none;
}

.btn-delete * {
  pointer-events: none;
}

.shift-action-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.btn-file-shift {
  height: 36px;
  min-height: 36px;
  min-width: 58px;
  border: 1px solid color-mix(in srgb, var(--chip-border) 75%, var(--brand) 25%);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-soft) 75%, var(--surface) 25%);
  color: color-mix(in srgb, var(--text) 82%, var(--muted) 18%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.btn-file-shift:hover {
  background: color-mix(in srgb, var(--brand) 7%, var(--surface-soft));
  border-color: color-mix(in srgb, var(--brand) 42%, var(--chip-border));
  color: color-mix(in srgb, var(--brand) 72%, var(--text));
}

.btn-edit-shift {
  height: 36px;
  min-height: 36px;
  min-width: 76px;
  border: 1px solid color-mix(in srgb, var(--brand) 45%, var(--chip-border));
  border-radius: 10px;
  background: color-mix(in srgb, var(--brand) 10%, var(--surface));
  color: color-mix(in srgb, var(--brand) 78%, var(--text));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 10px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.btn-edit-shift:hover {
  background: color-mix(in srgb, var(--brand) 18%, var(--surface));
  border-color: color-mix(in srgb, var(--brand) 60%, var(--chip-border));
}

.btn-edit-shift svg {
  width: 14px;
  height: 14px;
  pointer-events: none;
}

.btn-edit-shift span {
  pointer-events: none;
}

.receipt-link {
  display: inline-flex;
  text-decoration: none;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.receipt-thumb {
  width: 30px;
  height: 30px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  display: block;
}

.receipt-modal {
  position: fixed;
  inset: 0;
  z-index: 2080;
  --modal-top-offset: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    calc(18px + env(safe-area-inset-top, 0px) + var(--modal-top-offset))
    16px
    calc(18px + env(safe-area-inset-bottom, 0px));
  overflow: auto;
  overscroll-behavior: contain;
}

.receipt-modal-backdrop {
  position: absolute;
  top: var(--modal-top-offset);
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(2, 6, 23, 0.55);
}

.receipt-modal-card {
  position: relative;
  flex: 0 0 auto;
  width: min(640px, 92vw);
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  gap: 10px;
  max-height: calc(100dvh - var(--modal-top-offset) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 36px);
  overflow: auto;
  overscroll-behavior: contain;
}

.start-shift-modal-card {
  width: min(520px, 92vw);
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.confirm-modal-card {
  width: min(500px, 92vw);
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 14px;
}

.reset-password-modal-card {
  width: min(520px, 92vw);
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.logout-modal-card {
  width: min(500px, 92vw);
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.shift-edit-modal-card {
  width: min(620px, 94vw);
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-height: 74vh;
  overflow: auto;
}

.expense-edit-modal-card {
  width: min(620px, 94vw);
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-height: 74vh;
  overflow: auto;
}

.expense-edit-receipt-actions {
  display: grid;
  gap: 10px;
}

.expense-action-group {
  justify-content: flex-start;
}

.onboarding-modal-card {
  width: min(560px, 94vw);
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 16px;
  padding: 16px;
  gap: 8px;
  max-height: min(82vh, calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 28px));
  overflow: auto;
  overscroll-behavior: contain;
}

.edited-tag {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  color: var(--chip-text);
  font-size: 0.72rem;
  font-weight: 700;
}

.onboarding-kicker {
  margin: 0;
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.onboarding-progress {
  font-size: 0.85rem;
  font-weight: 600;
}

.onboarding-subtitle {
  font-size: 0.92rem;
  font-weight: 700;
  color: #374151;
  line-height: 1.25;
}

.onboarding-body {
  white-space: pre-line;
  line-height: 1.42;
}

.onboarding-body p {
  margin-top: 0;
}

.onboarding-body-intro {
  margin: 0 0 8px;
  line-height: 1.35;
}

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

.onboarding-value-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: color-mix(in srgb, var(--surface) 86%, var(--brand) 14%);
}

.onboarding-value-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
}

.onboarding-value-card strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.2;
}

.onboarding-modal-card #onboarding-next-btn {
  gap: 8px;
}

.onboarding-next-icon {
  width: 17px;
  height: 17px;
  display: block;
  flex: 0 0 auto;
}

.onboarding-confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 51;
  pointer-events: none;
  overflow: hidden;
}

.onboarding-confetti-piece {
  position: absolute;
  top: -18px;
  width: 9px;
  height: 12px;
  border-radius: 2px;
  opacity: 0.95;
  animation-name: onboardingConfettiFall;
  animation-timing-function: ease-out;
  animation-fill-mode: none;
}

@keyframes onboardingConfettiFall {
  0% {
    transform: translateY(-12px) rotate(0deg);
    opacity: 0;
  }

  12% {
    opacity: 1;
  }

  100% {
    transform: translateY(110vh) rotate(680deg);
    opacity: 0;
  }
}

.confirm-modal-title {
  margin: 0;
}

.confirm-modal-message {
  margin: 0;
  line-height: 1.45;
}

.version-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(5, 10, 20, 0.6);
  display: grid;
  place-items: center;
  padding: 16px;
}

.version-gate-card {
  width: min(520px, 96vw);
  border-radius: 16px;
  border: 1px solid #fecaca;
  background: #fff7f7;
  color: #1f2937;
  box-shadow: var(--shadow);
  padding: 20px;
  display: grid;
  gap: 12px;
}

.release-notes-card {
  border: 1px solid color-mix(in srgb, var(--brand) 28%, #cbd5e1);
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--brand) 10%, #ffffff) 0%, transparent 28%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 94%, #ffffff) 0%, color-mix(in srgb, var(--surface-soft) 96%, #ffffff) 100%);
  color: var(--text);
}

.release-notes-kicker {
  color: var(--brand-strong);
}

.release-notes-icon {
  color: var(--brand-strong);
}

.release-notes-head {
  display: grid;
  gap: 4px;
}

.release-notes-release {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--brand-strong);
}

.release-notes-copy {
  margin: 0;
}

.release-notes-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--text);
}

.release-notes-list li {
  line-height: 1.45;
}

.release-notes-toggle-btn {
  width: 100%;
}

.release-notes-more-wrap {
  max-height: min(180px, 28vh);
  overflow: auto;
  padding-right: 4px;
}

.release-notes-more-list {
  padding-top: 2px;
}

.release-notes-card .btn {
  width: 100%;
  min-height: 50px;
  border-radius: 14px;
}

.version-gate-kicker {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #b42318;
}

.version-gate-card h2 {
  margin: 0;
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  line-height: 1.2;
  color: #111827;
}

.version-gate-title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.version-gate-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  flex: 0 0 24px;
  color: #b42318;
  margin-top: 1px;
}

.version-gate-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

#version-gate-message {
  margin: 0;
  line-height: 1.4;
  color: #475569;
}

#version-gate-update-btn {
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  font-size: 1rem;
  background: #b42318;
  color: #fff;
}

#version-gate-update-btn:hover {
  background: #991b1b;
}

#version-gate-status {
  margin: 0;
  min-height: 0;
  font-size: 0.92rem;
  color: #475569;
}

#version-gate-status:empty {
  display: none;
}

@media (max-width: 640px) {
  .version-gate-overlay {
    padding: 12px;
    align-items: center;
  }

  .version-gate-card {
    width: 100%;
    max-width: 100%;
    border-radius: 14px;
    padding: 16px;
    gap: 10px;
  }

  .release-notes-list {
    gap: 7px;
  }

  .version-gate-kicker {
    font-size: 0.74rem;
  }

  .version-gate-card h2 {
    font-size: 1.09rem;
    line-height: 1.18;
  }

  .version-gate-icon {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
  }

  #version-gate-message {
    font-size: 0.95rem;
  }

  #version-gate-update-btn {
    min-height: 48px;
    border-radius: 12px;
    font-size: 0.98rem;
  }
}

body.version-gate-locked {
  overflow: hidden;
}

.receipt-modal-card img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  transform-origin: center center;
  transition: transform 120ms ease;
}

.receipt-image-wrap {
  overflow: auto;
  max-height: 72vh;
  border-radius: 8px;
}

.receipt-tool-btn {
  min-width: 44px;
  padding: 8px 10px;
}

.feedback-fab {
  position: fixed;
  right: 14px;
  left: auto;
  bottom: 92px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--text);
  box-shadow: var(--shadow);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 36;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.feedback-fab:hover {
  background: color-mix(in srgb, var(--brand) 20%, var(--surface));
}

.feedback-modal-card {
  width: min(560px, 92vw);
}

.subscribe-modal-card {
  width: min(620px, 94vw);
  max-height: min(82vh, calc(100dvh - var(--modal-top-offset) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 36px));
  overflow: auto;
  gap: 12px;
}

.subscribe-hero {
  display: grid;
  gap: 6px;
}

.subscribe-hero h3 {
  margin: 0;
  font-size: clamp(1.45rem, 4vw, 2rem);
  line-height: 1.08;
}

.subscribe-hero p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.subscribe-price-card {
  display: grid;
  gap: 2px;
  border: 1px solid color-mix(in srgb, var(--brand) 46%, var(--border));
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 16%, var(--surface)), var(--surface));
}

.subscribe-price-card strong {
  font-size: 1.15rem;
  color: var(--text);
}

.subscribe-price-card span,
.subscribe-support-copy {
  color: var(--muted);
  font-weight: 700;
}

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

.subscribe-benefits article {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: color-mix(in srgb, var(--surface) 90%, var(--brand) 10%);
}

.subscribe-benefits strong,
.subscribe-benefits span {
  display: block;
}

.subscribe-benefits strong {
  color: var(--text);
  margin-bottom: 4px;
}

.subscribe-benefits span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.subscribe-support-copy {
  margin: 0;
  line-height: 1.35;
}

#subscribe-status {
  margin: 0;
  min-height: 0;
}

#subscribe-status:empty {
  display: none;
}

.manage-subscription-modal-card {
  margin: 0;
  transform: none;
}

.pro-welcome-modal-card {
  margin: 0;
  transform: none;
}

.rainbow-title {
  background-image: linear-gradient(
    90deg,
    #ef4444 0%,
    #f59e0b 16%,
    #eab308 32%,
    #22c55e 48%,
    #06b6d4 64%,
    #3b82f6 80%,
    #a855f7 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rainbowShift 4s linear infinite;
}

@keyframes rainbowShift {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 220% 50%;
  }
}

.terms-consent-wrap {
  display: grid;
  gap: 8px;
}

.terms-consent-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 600;
}

.terms-consent-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.terms-body {
  max-height: min(44vh, 320px);
  overflow: auto;
  padding-right: 4px;
}

.terms-body p {
  margin: 0 0 8px;
}

.terms-body ul {
  margin: 0;
  padding-left: 18px;
}

#changelog-full-wrap {
  max-height: 240px;
  overflow: auto;
  padding-right: 6px;
}

.app-updates-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 10px;
}

.app-updates-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  justify-self: start;
}

.app-updates-title-row h2 {
  margin: 0;
  line-height: 1.15;
}

.app-updates-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}

.site-env-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  color: var(--chip-text);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
}

.site-env-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.9;
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.18);
}

.site-env-pill.beta {
  background: #fff7ed;
  border-color: #fdba74;
  color: #9a3412;
}

.site-env-pill.beta::before {
  display: none;
}

.site-env-pill.official {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
}

.profile-plan-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  color: var(--chip-text);
}

.profile-plan-pill.pro {
  border-color: #d4a629;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 46%),
    linear-gradient(135deg, #18181b 0%, #09090b 100%);
  color: #fbbf24;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 0 1px rgba(212, 166, 41, 0.26);
}

.profile-plan-pill.pro::before {
  content: "♛";
  margin-right: 5px;
  font-size: 1rem;
  line-height: 1;
  transform: translateY(-0.5px);
}

.leaderboard-pro-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  border: 1px solid #d4a629;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0) 46%),
    linear-gradient(135deg, #16171b 0%, #0a0b0f 100%);
  color: #fbbf24;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 0 1px rgba(212, 166, 41, 0.22);
  vertical-align: middle;
}

.leaderboard-pro-badge::before {
  content: "♛";
  margin-right: 4px;
  font-size: 0.9rem;
  line-height: 1;
  transform: translateY(-0.5px);
}

.profile-username-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.profile-username-pro-badge {
  margin-top: 0;
}

.profile-meta-grid {
  display: grid;
  gap: 8px;
  margin: 10px 0 4px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-soft) 80%, var(--surface) 20%);
}

.profile-meta-row {
  display: grid;
  gap: 2px;
}

.profile-meta-row-inline {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
}

.profile-meta-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.profile-meta-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
  word-break: break-word;
}

.profile-weekly-summary-card {
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--surface) 92%, var(--brand) 8%);
}

.goals-form-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.goals-form-grid.form-locked {
  opacity: 0.62;
}

.goals-form-grid .row {
  flex-wrap: wrap;
}

#changelog-latest,
#changelog-full {
  margin: 8px 0 0;
  padding-left: 1.1rem;
}

#changelog-latest li,
#changelog-full li {
  margin: 0 0 8px;
  line-height: 1.35;
}

.profile-roadmap-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--border));
  background: color-mix(in srgb, var(--surface) 88%, var(--brand) 12%);
  color: var(--brand-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profile-roadmap {
  position: relative;
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.profile-roadmap::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: color-mix(in srgb, var(--brand) 16%, var(--border));
}

.profile-roadmap-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.profile-roadmap-dot {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-top: 4px;
  background: linear-gradient(145deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 65%, #ffffff) 100%);
  box-shadow:
    0 0 0 4px color-mix(in srgb, var(--surface) 92%, transparent),
    0 8px 18px color-mix(in srgb, var(--brand) 20%, transparent);
}

.profile-roadmap-copy {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 94%, var(--brand) 6%);
}

.profile-roadmap-phase {
  margin: 0 0 6px;
  color: var(--brand-strong);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.profile-roadmap-copy h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.profile-roadmap-copy p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

@media (min-width: 900px) {
  .feedback-fab {
    bottom: 92px;
  }
}

@media (max-width: 640px) {
  .feedback-fab {
    position: fixed !important;
    left: auto !important;
    right: 10px !important;
    bottom: calc(92px + env(safe-area-inset-bottom, 0px)) !important;
    width: auto;
    max-width: calc(100vw - 20px);
    min-height: 42px;
    padding: 0 10px;
    font-size: 0.86rem;
    transform: none;
    margin: 0;
  }

  .app-updates-controls {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: space-between;
  }

  .app-updates-title-row {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: space-between;
  }

  .app-update-btn {
    min-width: 120px;
  }
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 32px;
  padding: 20px 0;
  color: var(--muted);
}

@media (max-width: 840px) {

  .hero-grid,
  .three-col {
    grid-template-columns: 1fr;
  }
}

.app-shell {
  font-family: "Plus Jakarta Sans", "Avenir Next", "Segoe UI", sans-serif;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 92% 5%, rgba(6, 189, 109, 0.15) 0%, rgba(6, 189, 109, 0) 32%),
    radial-gradient(circle at 8% 18%, rgba(255, 128, 0, 0.12) 0%, rgba(255, 128, 0, 0) 28%),
    linear-gradient(180deg, #ffffff 0%, #f5f6f7 100%);
}

:root[data-theme="dark"] .app-shell {
  background: var(--bg);
}

.app-main {
  width: min(640px, 94%);
  margin: 0 auto;
  padding: 20px 0 110px;
  display: grid;
  gap: 14px;
  transition: padding-top 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.has-offline-banner .app-main {
  padding-top: calc(20px + var(--offline-banner-offset, 56px));
}

body.has-online-sync-banner .app-main {
  padding-top: calc(20px + var(--online-sync-banner-offset, 56px));
}

body.has-system-notice-banner .app-main {
  padding-top: calc(20px + var(--system-notice-offset, 56px));
}

body.has-offline-banner.has-system-notice-banner .app-main,
body.has-online-sync-banner.has-system-notice-banner .app-main {
  padding-top: calc(20px + var(--system-notice-offset, 56px) + var(--offline-banner-offset, var(--online-sync-banner-offset, 56px)));
}

.app-hero h1 {
  margin: 0;
  font-size: clamp(1.6rem, 5vw, 2rem);
}

.app-hero .kicker {
  margin-bottom: 4px;
}

.app-hero {
  position: relative;
}

.app-hero-badges {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.app-hero-pro-chip {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 2px 8px;
  min-height: 22px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  border: 1px solid #d4a629;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.09) 0%, rgba(255, 255, 255, 0) 46%),
    linear-gradient(135deg, #16171b 0%, #0a0b0f 100%);
  color: #fbbf24;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 0 0 1px rgba(212, 166, 41, 0.22);
}

.app-hero-pro-chip::before {
  content: "♛";
  margin-right: 4px;
  font-size: 0.9rem;
  line-height: 1;
  transform: translateY(-0.5px);
}

.app-main .card h2,
.app-main .card h3 {
  margin-top: 0;
}

.danger-zone-card h2 {
  margin-bottom: 4px;
}

.danger-zone-subhead {
  margin-top: 0;
  margin-bottom: 14px;
}

.app-main .card {
  min-width: 0;
}

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

.report-stats .card p {
  margin: 4px 0 0;
}

.app-main>.card .report-stats .card {
  background: var(--surface-soft);
  box-shadow: none;
  border-color: var(--chip-border);
  padding: 14px;
}

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

.quick-actions .btn {
  text-align: center;
}

.period-switch {
  gap: 8px;
  flex-wrap: wrap;
}

.period-switch .period-btn {
  border-radius: 999px;
  padding: 8px 12px;
}

.period-switch .period-btn.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.period-nav {
  margin-top: 8px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.period-row > .muted {
  margin: 0;
}

.period-row .period-btn {
  min-width: 0;
}

#period-range-label {
  margin: 0;
  text-align: center;
  flex: 1;
}

.csv-export-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--chip-border);
  border-radius: 12px;
  background: var(--surface-soft);
  margin-bottom: 10px;
}

.statement-import-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--chip-border);
  border-radius: 12px;
  background: var(--surface-soft);
  margin-bottom: 10px;
}

.statement-import-head .muted {
  margin: 0;
}

.statement-import-head-row {
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.statement-import-beta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: color-mix(in srgb, #f59e0b 18%, var(--surface));
  color: color-mix(in srgb, #b45309 82%, var(--text));
  border: 1px solid color-mix(in srgb, #f59e0b 48%, var(--chip-border));
}

.statement-import-warning {
  margin: 6px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, #f59e0b 40%, var(--chip-border));
  background: color-mix(in srgb, #f59e0b 10%, var(--surface));
  color: color-mix(in srgb, #92400e 75%, var(--text));
  font-size: 0.88rem;
  line-height: 1.35;
  font-weight: 600;
}

.statement-import-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

.statement-import-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.statement-import-actions .btn {
  width: 100%;
}

#statement-provider {
  cursor: pointer;
}

.statement-file-picker {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

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

.statement-file-trigger {
  width: auto;
  min-width: 220px;
  text-align: center;
  cursor: pointer;
}

#statement-file-name {
  display: block;
  min-height: 1.1em;
  margin: 0;
  line-height: 1.2;
}

.statement-file-name {
  margin-top: -2px;
  margin-bottom: 0;
}

.csv-export-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.csv-export-head .muted {
  margin: 0;
}

.csv-export-periods {
  gap: 6px;
}

.csv-export-periods .csv-period-btn {
  border-radius: 999px;
  padding: 7px 12px;
}

.csv-export-periods .csv-period-btn.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.csv-export-nav {
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.csv-export-nav .btn {
  width: auto;
}

#export-period-range-label {
  margin: 0;
  text-align: center;
  flex: 1;
  font-weight: 600;
}

.csv-export-btn {
  width: 100%;
}

.csv-export-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

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

.forecast-stat {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface) 88%, var(--brand) 12%);
  display: grid;
  gap: 6px;
}

.forecast-label {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.forecast-stat strong {
  font-size: 1.35rem;
  line-height: 1.05;
  color: var(--text);
}

.goal-progress-grid {
  display: grid;
  gap: 10px;
}

.goal-progress-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface) 90%, var(--brand) 10%);
  display: grid;
  gap: 7px;
}

.goal-progress-card.complete {
  border-color: #86efac;
  background: color-mix(in srgb, #22c55e 14%, var(--surface));
}

.goal-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.goal-progress-head strong {
  font-size: 0.98rem;
}

.goal-progress-head span {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--muted);
}

.goal-progress-bar {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: color-mix(in srgb, var(--border) 78%, transparent);
}

.goal-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 62%, #f59e0b));
}

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

.nudge-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface) 92%, var(--brand) 8%);
  display: grid;
  gap: 6px;
}

.nudge-item.warn {
  border-color: color-mix(in srgb, #f59e0b 42%, var(--border));
  background: color-mix(in srgb, #f59e0b 11%, var(--surface));
}

.nudge-item.ok {
  border-color: color-mix(in srgb, #22c55e 42%, var(--border));
  background: color-mix(in srgb, #22c55e 10%, var(--surface));
}

.nudge-item strong {
  font-size: 0.95rem;
}

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

@media (min-width: 700px) {
  .csv-export-actions {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .period-nav .btn {
    min-width: 112px;
  }

  .csv-export-nav .btn {
    min-width: 112px;
  }
}

.delta-up {
  color: #15803d;
  font-weight: 700;
}

.delta-down {
  color: #b42318;
  font-weight: 700;
}

.prediction-value {
  font-size: clamp(1.5rem, 5vw, 2rem);
  margin: 6px 0;
  font-weight: 800;
}

.sa-deadline-pill {
  margin: 10px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 12px;
  border: 1px solid #86efac;
  background: #dcfce7;
  color: #166534;
  font-weight: 700;
}

#sa-deadline-text {
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    filter 160ms ease;
  transform-origin: left center;
}

#sa-deadline-text.sa-deadline-text-exit {
  opacity: 0;
  transform: translateY(-3px);
  filter: blur(1px);
}

#sa-deadline-text.sa-deadline-text-enter {
  opacity: 0;
  transform: translateY(3px);
  filter: blur(1px);
  animation: saDeadlineTextEnter 220ms ease forwards;
}

.sa-deadline-pill.upcoming {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.sa-deadline-dot {
  width: 9px;
  height: 9px;
  min-width: 9px;
  min-height: 9px;
  flex: 0 0 9px;
  align-self: center;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 50%, transparent);
  animation: statusDotPulse 1.2s ease-in-out infinite;
}

.sa-deadline-rotate-indicator {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface, #ffffff) 96%, transparent);
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, currentColor 14%, transparent),
    0 1px 2px color-mix(in srgb, #000000 8%, transparent);
  opacity: 0.98;
}

.sa-deadline-pill.warn {
  border-color: #fcd34d;
  background: #fef3c7;
  color: #92400e;
}

.sa-deadline-rotate-indicator-value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: transparent;
  color: currentColor;
  font-size: 0.46rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.sa-deadline-pill.critical {
  border-color: #fca5a5;
  background: #fee2e2;
  color: #991b1b;
}

@keyframes saDeadlineTextEnter {
  from {
    opacity: 0;
    transform: translateY(3px);
    filter: blur(1px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.expense-nudge-pill {
  margin: 10px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 7px 12px;
  border: 1px solid #fcd34d;
  background: #fef3c7;
  color: #92400e;
  font-weight: 700;
}

.expense-nudge-pill.ok {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}

.expense-nudge-pill.critical {
  border-color: #fca5a5;
  background: #fee2e2;
  color: #991b1b;
}

.expense-nudge-dot {
  width: 9px;
  height: 9px;
  min-width: 9px;
  min-height: 9px;
  flex: 0 0 9px;
  align-self: center;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 50%, transparent);
  animation: statusDotPulse 1.2s ease-in-out infinite;
}

.system-notice-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2110;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
  background: #bfdbfe;
  color: #0f172a;
  box-shadow: 0 10px 24px rgba(59, 130, 246, 0.18);
  opacity: 0;
  transform: translateY(-12px) scale(0.98);
  filter: blur(6px);
  transform-origin: top center;
  transition: top 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.system-notice-banner.is-visible {
  animation: offlineBannerDropIn 380ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

.system-notice-banner.warn {
  background: #92400e;
  color: #fffbeb;
  box-shadow: 0 10px 24px rgba(146, 64, 14, 0.22);
}

.system-notice-banner.critical {
  background: #991b1b;
  color: #fef2f2;
  box-shadow: 0 10px 24px rgba(127, 29, 29, 0.22);
}

.system-notice-icon {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 50%;
  display: inline-block;
  position: relative;
  margin-top: 11px;
  background: #60a5fa;
  box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.34);
  animation: noticeInfoDotPulse 1.2s ease-in-out infinite;
}

.system-notice-icon::before {
  content: none;
}

.system-notice-banner.warn .system-notice-icon {
  background: #fbbf24;
}

.system-notice-banner.critical .system-notice-icon {
  background: #fca5a5;
}

.system-notice-banner.is-visible .system-notice-icon {
  animation: noticeInfoDotPulse 1.2s ease-in-out infinite;
}

.system-notice-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.system-notice-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.system-notice-title {
  margin: 0;
  line-height: 1.1;
}

.system-notice-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.system-notice-updated {
  margin: 2px 0 0;
  font-size: 0.72rem;
  line-height: 1.3;
  color: rgba(15, 23, 42, 0.68);
}

.system-notice-description {
  font-size: 0.78rem;
  line-height: 1.35;
  max-width: 72ch;
  margin: 4px 0 0;
  color: rgba(15, 23, 42, 0.82);
}

.system-notice-banner.warn .system-notice-description {
  color: rgba(255, 251, 235, 0.9);
}

.system-notice-banner.critical .system-notice-description {
  color: rgba(254, 242, 242, 0.9);
}

.system-notice-banner.warn .system-notice-updated {
  color: rgba(255, 251, 235, 0.8);
}

.system-notice-banner.critical .system-notice-updated {
  color: rgba(254, 242, 242, 0.8);
}

.system-notice-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.92;
}

.system-notice-level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.58);
  color: #1d4ed8;
}

.system-notice-level-badge.warn {
  background: rgba(255, 251, 235, 0.16);
  border-color: rgba(255, 251, 235, 0.26);
  color: #fffbeb;
}

.system-notice-level-badge.critical {
  background: rgba(254, 242, 242, 0.14);
  border-color: rgba(254, 242, 242, 0.24);
  color: #fef2f2;
}

.system-notice-toggle {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: currentColor;
  cursor: pointer;
  white-space: nowrap;
  opacity: 0.92;
}

@media (max-width: 640px) {
  .system-notice-banner {
    padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px;
  }

  .system-notice-toggle {
    margin: 0;
    text-align: right;
  }
}

.system-notice-description-wrap {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 240ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 200ms ease;
}

.system-notice-description-wrap.open {
  opacity: 1;
}

.notice-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: capitalize;
}

.notice-pill.info {
  background: #e0f2fe;
  color: #075985;
}

.notice-pill.warn {
  background: #fef3c7;
  color: #92400e;
}

.notice-pill.critical {
  background: #fee2e2;
  color: #991b1b;
}

.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.theme-toggle-wrap {
  position: relative;
  width: 46px;
  height: 26px;
  display: inline-flex;
  flex: 0 0 auto;
  cursor: pointer;
}

.theme-toggle-wrap input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.theme-toggle-slider {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 70%, transparent);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: background 180ms ease, border-color 180ms ease;
  cursor: pointer;
}

.theme-toggle-slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(2, 6, 23, 0.28);
  transition: transform 180ms ease, background 180ms ease;
}

#theme-toggle:checked+.theme-toggle-slider {
  background: color-mix(in srgb, var(--brand) 28%, transparent);
  border-color: color-mix(in srgb, var(--brand) 55%, var(--border));
}

#theme-toggle:checked+.theme-toggle-slider::after {
  transform: translateX(20px);
}

#theme-toggle:disabled+.theme-toggle-slider {
  opacity: 0.5;
}

.theme-auto-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  cursor: pointer;
}

.theme-auto-wrap input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.leaderboard-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  cursor: pointer;
}

.leaderboard-toggle-wrap input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.leaderboard-toggle-wrap.disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.leaderboard-toggle-wrap input:checked+.theme-toggle-slider {
  background: color-mix(in srgb, var(--brand) 28%, transparent);
  border-color: color-mix(in srgb, var(--brand) 55%, var(--border));
}

.leaderboard-toggle-wrap input:checked+.theme-toggle-slider::after {
  transform: translateX(20px);
}

.profile-avatar-shell {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.profile-avatar-fallback {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--chip-text);
}

.profile-avatar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
}

.profile-avatar-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.profile-avatar-actions .btn,
.profile-avatar-actions .profile-avatar-label {
  min-height: 42px;
  padding: 0 14px;
}

#profile-avatar-status {
  margin: 0;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.leaderboard-row:hover {
  background: color-mix(in srgb, var(--brand) 10%, var(--surface));
  border-color: color-mix(in srgb, var(--brand) 35%, var(--chip-border));
}

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

.leaderboard-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  flex-shrink: 0;
  cursor: pointer;
}

.leaderboard-avatar-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--chip-text);
  cursor: pointer;
}

.leaderboard-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar-preview-modal-card {
  width: min(420px, 92vw);
  display: grid;
  gap: 14px;
  padding: 16px;
}

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

.avatar-preview-copy {
  display: grid;
  gap: 4px;
}

body.has-offline-banner .receipt-modal {
  --modal-top-offset: var(--offline-banner-offset, 56px);
}

body.has-online-sync-banner .receipt-modal {
  --modal-top-offset: var(--online-sync-banner-offset, 56px);
}

body.has-system-notice-banner .receipt-modal {
  --modal-top-offset: var(--system-notice-offset, 56px);
}

body.has-offline-banner.has-system-notice-banner .receipt-modal,
body.has-online-sync-banner.has-system-notice-banner .receipt-modal {
  --modal-top-offset: calc(var(--system-notice-offset, 56px) + var(--offline-banner-offset, var(--online-sync-banner-offset, 56px)));
}

.avatar-preview-shell {
  width: 180px;
  height: 180px;
  margin: 0 auto;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  overflow: hidden;
  position: relative;
}

.avatar-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-preview-fallback {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 800;
  color: var(--chip-text);
}

.avatar-preview-name {
  margin: 0;
  text-align: center;
  font-weight: 700;
  font-size: 1.22rem;
  line-height: 1.15;
}

.avatar-preview-subtitle {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
}

.avatar-preview-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.avatar-preview-stat {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface) 88%, var(--brand) 12%);
  display: grid;
  gap: 6px;
}

.avatar-preview-stat-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.avatar-preview-stat strong {
  font-size: 1rem;
  line-height: 1.2;
  color: var(--text);
}

@media (max-width: 520px) {
  .leaderboard-toggle-wrap {
    width: 100%;
    justify-content: flex-start;
  }

  .avatar-preview-modal-card {
    width: min(400px, 94vw);
    padding: 14px;
  }

  .avatar-preview-meta {
    grid-template-columns: 1fr;
  }

  .avatar-preview-shell {
    width: 156px;
    height: 156px;
  }

  .avatar-preview-fallback {
    font-size: 2.7rem;
  }
}

.section-title {
  margin-bottom: 6px;
}

.timer-grid {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.timer-label {
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  border-radius: 12px;
  padding: 10px;
}

.timer-label span {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--chip-text);
}

.timer-actions {
  margin-top: 10px;
  gap: 12px;
}

.timer-actions .btn {
  min-width: 132px;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 14px 0;
}

#fuel-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 6px;
}

#fuel-list li {
  line-height: 1.35;
}

@media (min-width: 680px) {
  .report-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .quick-actions {
    grid-template-columns: 1fr;
  }

  .platform-grid {
    grid-template-columns: 1fr;
  }

  .app-main {
    width: min(640px, 96%);
  }

  .onboarding-value-grid {
    grid-template-columns: 1fr;
  }

  .onboarding-modal-card {
    width: min(420px, 94vw);
    max-height: min(78vh, calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 32px));
    padding: 14px;
    gap: 10px;
  }

  .onboarding-value-card {
    padding: 8px;
  }

  .subscribe-benefits {
    grid-template-columns: 1fr;
  }

  .subscribe-modal-card {
    max-height: min(80vh, calc(100dvh - var(--modal-top-offset) - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 36px));
  }

  .card {
    padding: 14px;
  }

  .form-grid,
  .form-grid label {
    width: 100%;
    min-width: 0;
  }

  input,
  select,
  button {
    width: 100%;
    min-width: 0;
  }

  input[type="date"] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    font-size: 16px;
  }

  input[type="datetime-local"] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    font-size: 16px;
  }

  .period-row > .muted {
    flex-basis: 100%;
  }

  .period-row .period-btn {
    flex: 1 1 calc(50% - 10px);
    width: auto;
  }

  .period-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
  }

  .period-nav .btn {
    min-width: 0;
    width: 100%;
  }

  #expense-period-range-label {
    min-width: 0;
    font-size: 0.84rem;
    overflow-wrap: anywhere;
  }

  .timer-actions .btn {
    min-width: 0;
    width: 100%;
  }

  .csv-export-periods {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .csv-export-periods .csv-period-btn {
    width: auto;
    min-width: 0;
    padding: 7px 8px;
    text-align: center;
  }

  .profile-avatar-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: start;
  }

  .profile-avatar-actions .btn,
  .profile-avatar-actions .profile-avatar-label {
    width: 100%;
    min-width: 0;
    text-align: center;
  }

  #profile-avatar-status {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .shift-edit-modal-card {
    width: min(620px, 96vw);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    max-height: min(72vh, calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 28px));
    overflow: auto;
  }

  .expense-edit-modal-card {
    width: min(620px, 96vw);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    max-height: min(72vh, calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 28px));
    overflow: auto;
  }
}

.between {
  justify-content: space-between;
}

.mobile-nav {
  --nav-count: 5;
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 14px;
  width: min(680px, calc(100% - 18px));
  background: var(--nav-bg);
  border-radius: 18px;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(var(--nav-count), minmax(0, 1fr));
  gap: 8px;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.25);
  z-index: 20;
  overflow: hidden;
}

.mobile-nav-item {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  color: var(--nav-text);
  border-radius: 12px;
  padding: 10px 6px;
  font-size: 0.8rem;
  text-align: center;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 54px;
}

.nav-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.nav-label {
  line-height: 1;
  display: block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.66rem;
}

@media (hover: hover) and (pointer: fine) {
  .mobile-nav-item:hover {
    text-decoration: none;
    color: #fff;
    background: var(--nav-hover);
  }
}

.mobile-nav-item.active {
  color: #fff;
}

.mobile-nav-item.nav-locked {
  opacity: 0.45;
  filter: grayscale(0.35);
}

.mobile-nav-item.nav-cta {
  background: linear-gradient(135deg, #0f766e, #0ea5a1);
  color: #fff;
}

.mobile-nav-item.nav-cta.on-shift {
  background: linear-gradient(135deg, #16a34a, #22c55e);
}

.mobile-nav-item.nav-cta.on-shift .nav-label {
  position: relative;
  padding-left: 10px;
  display: inline-block;
  width: auto;
  max-width: 100%;
  margin: 0 auto;
}

.mobile-nav-item.nav-cta.on-shift .nav-label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #bbf7d0;
  box-shadow: 0 0 0 0 rgba(187, 247, 208, 0.7);
  animation: navLiveDotPulse 1.1s ease-in-out infinite;
}

.nav-ticker {
  display: block;
  overflow: hidden;
  width: 100%;
}

.nav-ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  min-width: max-content;
  animation: navTickerSlide 8s linear infinite;
}

.nav-ticker-track>span {
  display: inline-block;
}

.nav-indicator {
  position: absolute;
  top: 8px;
  left: 8px;
  width: calc((100% - (var(--nav-count) * 8px + 8px)) / var(--nav-count));
  height: calc(100% - 16px);
  border-radius: 12px;
  background: var(--nav-active-bg);
  box-shadow: inset 0 0 0 1px var(--nav-active-border);
  pointer-events: none;
  transform: translateX(calc(var(--from-index, 0) * (100% + 8px)));
}

.mobile-nav.nav-animate .nav-indicator {
  transform: translateX(calc(var(--to-index, 0) * (100% + 8px)));
  transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes navLiveDotPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(187, 247, 208, 0.65);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(187, 247, 208, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(187, 247, 208, 0);
  }
}

@keyframes navTickerSlide {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(calc(-50% - 8px));
  }
}

@keyframes statusDotPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.48);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

@keyframes noticeInfoDotPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.34);
  }

  70% {
    transform: scale(1.04);
    box-shadow: 0 0 0 6px rgba(96, 165, 250, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(96, 165, 250, 0);
  }
}

@media (min-width: 900px) {
  .app-main {
    width: min(760px, 94%);
  }
}

@media (max-width: 768px) {
  .mobile-nav-item.nav-cta.on-shift .nav-label {
    padding-left: 12px;
  }

  .mobile-nav-item.nav-cta.on-shift .nav-label::before {
    left: 2px;
  }
}

.page-loader {
  position: fixed;
  z-index: 999;
  opacity: 0;
  transition: opacity 170ms ease;
  pointer-events: none;
}

.page-loader.visible {
  opacity: 1;
}

.db-status-chip {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 998;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--text);
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
  font-size: 0.8rem;
}

.offline-status-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
  border-radius: 0;
  border: 0;
  background: #7f1d1d;
  color: #fef2f2;
  box-shadow:
    0 10px 24px rgba(69, 10, 10, 0.22);
  opacity: 0;
  transform: translateY(-12px) scale(0.98);
  filter: blur(6px);
  transform-origin: top center;
}

.offline-status-banner.is-visible {
  animation: offlineBannerDropIn 380ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

.offline-status-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: #fecaca;
  background: rgba(69, 10, 10, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 4px rgba(69, 10, 10, 0.18);
}

.offline-status-banner.is-visible .offline-status-icon {
  animation: offlineBannerIconPulse 1.6s ease-in-out infinite;
}

.offline-status-icon svg {
  width: 18px;
  height: 18px;
}

.offline-status-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.offline-status-copy strong {
  font-size: 0.9rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.offline-status-copy span {
  font-size: 0.78rem;
  line-height: 1.35;
  color: rgba(254, 226, 226, 0.88);
}

@keyframes offlineBannerDropIn {
  0% {
    opacity: 0;
    transform: translateY(-14px) scale(0.97);
    filter: blur(6px);
  }
  58% {
    opacity: 1;
    transform: translateY(2px) scale(1.01);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes offlineBannerIconPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.7),
      0 0 0 4px rgba(127, 29, 29, 0.18);
  }
  50% {
    transform: scale(1.06);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.7),
      0 0 0 7px rgba(127, 29, 29, 0.26);
  }
}

.offline-sync-chip {
  position: fixed;
  top: calc(74px + env(safe-area-inset-top, 0px));
  left: 14px;
  z-index: 2050;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #93c5fd;
  background: rgba(239, 246, 255, 0.98);
  color: #1d4ed8;
  box-shadow: 0 12px 26px rgba(29, 78, 216, 0.12);
  backdrop-filter: blur(8px);
  font-size: 0.8rem;
  font-weight: 700;
  transition: top 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.offline-sync-spinner {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.8px solid rgba(37, 99, 235, 0.2);
  border-top-color: #2563eb;
  border-right-color: #2563eb;
  flex: 0 0 12px;
}

.offline-sync-chip.is-syncing .offline-sync-spinner {
  animation: offlineSyncSpin 0.85s linear infinite;
}

.online-sync-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2120;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
  border-radius: 0;
  border: 0;
  background: #166534;
  color: #f0fdf4;
  box-shadow: 0 10px 24px rgba(20, 83, 45, 0.22);
  opacity: 0;
  transform: translateY(-12px) scale(0.98);
  filter: blur(6px);
  transform-origin: top center;
}

.online-sync-banner.is-visible {
  animation: offlineBannerDropIn 380ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

.online-sync-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  flex: 0 0 34px;
  font-size: 0.92rem;
  font-weight: 900;
  background: rgba(20, 83, 45, 0.92);
  color: #dcfce7;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 4px rgba(20, 83, 45, 0.18);
}

.online-sync-banner.is-visible .online-sync-icon {
  animation: offlineBannerIconPulse 1.6s ease-in-out infinite;
}

.online-sync-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.online-sync-copy strong {
  font-size: 0.9rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.online-sync-copy span {
  font-size: 0.78rem;
  line-height: 1.35;
  color: rgba(220, 252, 231, 0.88);
}

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

@keyframes offlineSyncPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
}

.offline-sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2563eb;
  animation: navLiveDotPulse 1.2s ease-in-out infinite;
}

.db-status-chip.db-status-chip--hero {
  position: static;
  padding: 2px 8px;
  min-height: 22px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  gap: 6px;
}

.db-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
}

.db-status-chip.ok .db-status-dot {
  background: #22c55e;
  animation: navLiveDotPulse 1.1s ease-in-out infinite;
}

.db-status-chip.warn .db-status-dot {
  background: #f59e0b;
}

.db-status-chip.err .db-status-dot {
  background: #ef4444;
}

.db-refresh-chip {
  position: fixed;
  top: 52px;
  right: 14px;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #fca5a5;
  background: #fff1f2;
  color: #9f1239;
  box-shadow: var(--shadow);
  font-size: 0.8rem;
  font-weight: 700;
  transition: top 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.page-loader-refresh-chip {
  position: fixed;
  top: 52px;
  right: 14px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
  box-shadow: var(--shadow);
  font-size: 0.8rem;
  font-weight: 700;
  transition: top 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.global-data-error-banner {
  position: fixed;
  top: 92px;
  left: 14px;
  right: 14px;
  z-index: 1001;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #fca5a5;
  background: #fef2f2;
  color: #7f1d1d;
  box-shadow: var(--shadow);
  transition: top 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.global-data-error-content {
  min-width: 0;
}

.global-data-error-content strong {
  display: block;
  line-height: 1.1;
}

.global-data-error-text {
  margin: 4px 0 0;
  font-size: 0.9rem;
}

.global-data-error-meta {
  margin: 6px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  opacity: 0.9;
}

.global-data-error-dismiss {
  white-space: nowrap;
  padding: 6px 10px;
}

.toast-root {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: 16px;
  z-index: 2500;
  display: grid;
  gap: 10px;
  width: min(92vw, 360px);
  pointer-events: none;
  transition: top 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.has-offline-banner .db-status-chip:not(.db-status-chip--hero) {
  top: calc(12px + var(--offline-banner-offset, 56px));
}

body.has-online-sync-banner .db-status-chip:not(.db-status-chip--hero) {
  top: calc(12px + var(--online-sync-banner-offset, 56px));
}

body.has-system-notice-banner .db-status-chip:not(.db-status-chip--hero) {
  top: calc(12px + var(--system-notice-offset, 56px));
}

body.has-offline-sync-chip .db-status-chip:not(.db-status-chip--hero) {
  top: 60px;
}

body.has-offline-banner .db-refresh-chip,
body.has-offline-banner .page-loader-refresh-chip {
  top: calc(50px + var(--offline-banner-offset, 56px));
}

body.has-online-sync-banner .db-refresh-chip,
body.has-online-sync-banner .page-loader-refresh-chip {
  top: calc(50px + var(--online-sync-banner-offset, 56px));
}

body.has-system-notice-banner .db-refresh-chip,
body.has-system-notice-banner .page-loader-refresh-chip {
  top: calc(50px + var(--system-notice-offset, 56px));
}

body.has-offline-sync-chip .db-refresh-chip,
body.has-offline-sync-chip .page-loader-refresh-chip {
  top: 98px;
}

body.has-offline-banner .global-data-error-banner {
  top: calc(90px + var(--offline-banner-offset, 56px));
}

body.has-online-sync-banner .global-data-error-banner {
  top: calc(90px + var(--online-sync-banner-offset, 56px));
}

body.has-system-notice-banner .global-data-error-banner {
  top: calc(90px + var(--system-notice-offset, 56px));
}

body.has-offline-sync-chip .global-data-error-banner {
  top: 138px;
}

body.has-offline-banner .toast-root {
  top: calc(14px + env(safe-area-inset-top, 0px) + var(--offline-banner-offset, 56px));
}

body.has-online-sync-banner .toast-root {
  top: calc(14px + env(safe-area-inset-top, 0px) + var(--online-sync-banner-offset, 56px));
}

body.has-system-notice-banner .toast-root {
  top: calc(14px + env(safe-area-inset-top, 0px) + var(--system-notice-offset, 56px));
}

body.has-offline-sync-chip .toast-root {
  top: calc(62px + env(safe-area-inset-top, 0px));
}

body.has-offline-banner.has-offline-sync-chip .offline-sync-chip {
  top: calc(6px + env(safe-area-inset-top, 0px) + var(--offline-banner-offset, 56px));
}

body.has-offline-banner.has-offline-sync-chip .db-status-chip:not(.db-status-chip--hero) {
  top: calc(50px + var(--offline-banner-offset, 56px));
}

body.has-offline-banner.has-offline-sync-chip .db-refresh-chip,
body.has-offline-banner.has-offline-sync-chip .page-loader-refresh-chip {
  top: calc(88px + var(--offline-banner-offset, 56px));
}

body.has-offline-banner.has-offline-sync-chip .global-data-error-banner {
  top: calc(128px + var(--offline-banner-offset, 56px));
}

body.has-offline-banner.has-offline-sync-chip .toast-root {
  top: calc(52px + env(safe-area-inset-top, 0px) + var(--offline-banner-offset, 56px));
}

body.has-offline-banner.has-system-notice-banner .system-notice-banner,
body.has-online-sync-banner.has-system-notice-banner .system-notice-banner {
  top: var(--offline-banner-offset, var(--online-sync-banner-offset, 56px));
}

body.has-offline-banner.has-system-notice-banner .db-status-chip:not(.db-status-chip--hero),
body.has-online-sync-banner.has-system-notice-banner .db-status-chip:not(.db-status-chip--hero) {
  top: calc(12px + var(--system-notice-offset, 56px) + var(--offline-banner-offset, var(--online-sync-banner-offset, 56px)));
}

body.has-offline-banner.has-system-notice-banner .db-refresh-chip,
body.has-offline-banner.has-system-notice-banner .page-loader-refresh-chip,
body.has-online-sync-banner.has-system-notice-banner .db-refresh-chip,
body.has-online-sync-banner.has-system-notice-banner .page-loader-refresh-chip {
  top: calc(50px + var(--system-notice-offset, 56px) + var(--offline-banner-offset, var(--online-sync-banner-offset, 56px)));
}

body.has-offline-banner.has-system-notice-banner .global-data-error-banner,
body.has-online-sync-banner.has-system-notice-banner .global-data-error-banner {
  top: calc(90px + var(--system-notice-offset, 56px) + var(--offline-banner-offset, var(--online-sync-banner-offset, 56px)));
}

body.has-offline-banner.has-system-notice-banner .toast-root,
body.has-online-sync-banner.has-system-notice-banner .toast-root {
  top: calc(14px + env(safe-area-inset-top, 0px) + var(--system-notice-offset, 56px) + var(--offline-banner-offset, var(--online-sync-banner-offset, 56px)));
}

.toast {
  transform: translateY(-20px) scale(0.96);
  opacity: 0;
  filter: blur(6px);
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.4;
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.96);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.24);
  transform-origin: top right;
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    filter 0.22s ease;
}

.toast-content {
  display: block;
}

.toast-progress {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  transform-origin: left center;
  background: rgba(226, 232, 240, 0.82);
  opacity: 0.9;
}

.toast.is-visible {
  animation: toastDropIn 420ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
  filter: blur(0);
  opacity: 1;
}

.toast.is-visible .toast-progress {
  animation: toastProgressShrink linear forwards;
}

.toast:not(.is-visible) {
  animation: toastLiftOut 220ms ease forwards;
}

.toast--success {
  background: linear-gradient(135deg, rgba(12, 95, 70, 0.98) 0%, rgba(16, 138, 94, 0.98) 100%);
}

.toast--success .toast-progress {
  background: rgba(187, 247, 208, 0.94);
}

.toast--error {
  background: linear-gradient(135deg, rgba(122, 28, 28, 0.98) 0%, rgba(185, 28, 28, 0.98) 100%);
}

.toast--error .toast-progress {
  background: rgba(254, 202, 202, 0.94);
}

.toast--info {
  background: linear-gradient(135deg, rgba(31, 41, 55, 0.98) 0%, rgba(51, 65, 85, 0.98) 100%);
}

.toast--info .toast-progress {
  background: rgba(191, 219, 254, 0.94);
}

@keyframes toastDropIn {
  0% {
    opacity: 0;
    transform: translateY(-22px) scale(0.94);
    filter: blur(6px);
  }
  58% {
    opacity: 1;
    transform: translateY(3px) scale(1.01);
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes toastLiftOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    filter: blur(3px);
  }
}

@keyframes toastProgressShrink {
  0% {
    transform: scaleX(1);
    opacity: 0.92;
  }
  85% {
    transform: scaleX(0.08);
    opacity: 0.82;
  }
  100% {
    transform: scaleX(0);
    opacity: 0.4;
  }
}

.admin-notice-row {
  cursor: pointer;
  transition: background-color 140ms ease;
}

.admin-notice-row:hover {
  background: color-mix(in srgb, var(--brand) 10%, transparent);
}

@media (min-width: 760px) {
  .global-data-error-banner {
    left: auto;
    right: 14px;
    width: min(560px, calc(100vw - 28px));
  }
}

@media (max-width: 640px) {
  .offline-status-banner {
    top: 0;
    left: 0;
    right: 0;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px;
  }

  .offline-sync-chip {
    top: calc(66px + env(safe-area-inset-top, 0px));
    left: 12px;
    right: 12px;
    width: fit-content;
    max-width: calc(100vw - 24px);
  }

  .toast-root {
    right: 12px;
    left: 12px;
    width: auto;
    top: calc(12px + env(safe-area-inset-top, 0px));
  }

  body.has-offline-banner .db-status-chip:not(.db-status-chip--hero) {
    top: calc(12px + var(--offline-banner-offset, 56px));
  }

  body.has-online-sync-banner .db-status-chip:not(.db-status-chip--hero) {
    top: calc(12px + var(--online-sync-banner-offset, 56px));
  }

  body.has-system-notice-banner .db-status-chip:not(.db-status-chip--hero) {
    top: calc(12px + var(--system-notice-offset, 56px));
  }

  body.has-offline-sync-chip .db-status-chip:not(.db-status-chip--hero) {
    top: 78px;
  }

  body.has-offline-banner .db-refresh-chip,
  body.has-offline-banner .page-loader-refresh-chip {
    top: calc(50px + var(--offline-banner-offset, 56px));
  }

  body.has-online-sync-banner .db-refresh-chip,
  body.has-online-sync-banner .page-loader-refresh-chip {
    top: calc(50px + var(--online-sync-banner-offset, 56px));
  }

  body.has-system-notice-banner .db-refresh-chip,
  body.has-system-notice-banner .page-loader-refresh-chip {
    top: calc(50px + var(--system-notice-offset, 56px));
  }

  body.has-offline-sync-chip .db-refresh-chip,
  body.has-offline-sync-chip .page-loader-refresh-chip {
    top: 116px;
  }

  body.has-offline-banner .global-data-error-banner {
    top: calc(90px + var(--offline-banner-offset, 56px));
  }

  body.has-online-sync-banner .global-data-error-banner {
    top: calc(90px + var(--online-sync-banner-offset, 56px));
  }

  body.has-system-notice-banner .global-data-error-banner {
    top: calc(90px + var(--system-notice-offset, 56px));
  }

  body.has-offline-sync-chip .global-data-error-banner {
    top: 156px;
  }

  body.has-offline-banner .toast-root {
    top: calc(14px + env(safe-area-inset-top, 0px) + var(--offline-banner-offset, 56px));
  }

  body.has-online-sync-banner .toast-root {
    top: calc(14px + env(safe-area-inset-top, 0px) + var(--online-sync-banner-offset, 56px));
  }

  body.has-system-notice-banner .toast-root {
    top: calc(14px + env(safe-area-inset-top, 0px) + var(--system-notice-offset, 56px));
  }

  body.has-offline-sync-chip .toast-root {
    top: calc(82px + env(safe-area-inset-top, 0px));
  }

  body.has-offline-banner.has-offline-sync-chip .offline-sync-chip {
    top: calc(6px + env(safe-area-inset-top, 0px) + var(--offline-banner-offset, 56px));
  }

  body.has-offline-banner.has-offline-sync-chip .db-status-chip:not(.db-status-chip--hero) {
    top: calc(50px + var(--offline-banner-offset, 56px));
  }

  body.has-offline-banner.has-offline-sync-chip .db-refresh-chip,
  body.has-offline-banner.has-offline-sync-chip .page-loader-refresh-chip {
    top: calc(88px + var(--offline-banner-offset, 56px));
  }

  body.has-offline-banner.has-offline-sync-chip .global-data-error-banner {
    top: calc(128px + var(--offline-banner-offset, 56px));
  }

  body.has-offline-banner.has-offline-sync-chip .toast-root {
    top: calc(52px + env(safe-area-inset-top, 0px) + var(--offline-banner-offset, 56px));
  }

  body.has-offline-banner.has-system-notice-banner .db-status-chip:not(.db-status-chip--hero),
  body.has-online-sync-banner.has-system-notice-banner .db-status-chip:not(.db-status-chip--hero) {
    top: calc(12px + var(--system-notice-offset, 56px) + var(--offline-banner-offset, var(--online-sync-banner-offset, 56px)));
  }

  body.has-offline-banner.has-system-notice-banner .db-refresh-chip,
  body.has-offline-banner.has-system-notice-banner .page-loader-refresh-chip,
  body.has-online-sync-banner.has-system-notice-banner .db-refresh-chip,
  body.has-online-sync-banner.has-system-notice-banner .page-loader-refresh-chip {
    top: calc(50px + var(--system-notice-offset, 56px) + var(--offline-banner-offset, var(--online-sync-banner-offset, 56px)));
  }

  body.has-offline-banner.has-system-notice-banner .global-data-error-banner,
  body.has-online-sync-banner.has-system-notice-banner .global-data-error-banner {
    top: calc(90px + var(--system-notice-offset, 56px) + var(--offline-banner-offset, var(--online-sync-banner-offset, 56px)));
  }

  body.has-offline-banner.has-system-notice-banner .toast-root,
  body.has-online-sync-banner.has-system-notice-banner .toast-root {
    top: calc(14px + env(safe-area-inset-top, 0px) + var(--system-notice-offset, 56px) + var(--offline-banner-offset, var(--online-sync-banner-offset, 56px)));
  }
}

.page-loader-top-right {
  top: 14px;
  right: 14px;
}

.page-loader-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
}

.page-loader-card p {
  margin: 0;
  font-weight: 600;
  font-size: 0.9rem;
}

.loader-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(15, 118, 110, 0.25);
  border-top-color: var(--brand);
  animation: loaderSpin 0.8s linear infinite;
}

.loader-success {
  display: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.page-loader.is-success .loader-spinner {
  display: none;
}

.page-loader.is-success .loader-success {
  display: inline-block;
}

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

.landing-page {
  font-family: "Plus Jakarta Sans", "Avenir Next", "Segoe UI", sans-serif;
  background: #f5f6f7;
  color: #0f1115;
}

.landing-page .site-footer {
  border-top: 1px solid #dcdfe4;
}

.auth-page {
  font-family: "Plus Jakarta Sans", "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 92% 5%, rgba(6, 189, 109, 0.12) 0%, rgba(6, 189, 109, 0) 32%),
    radial-gradient(circle at 8% 18%, rgba(255, 128, 0, 0.1) 0%, rgba(255, 128, 0, 0) 28%),
    linear-gradient(180deg, #ffffff 0%, #f5f6f7 100%);
  color: #0f1115;
  min-height: 100vh;
}

.auth-page .btn {
  border-radius: 999px;
  font-weight: 700;
}

.auth-main {
  padding-top: 34px;
  transition: padding-top 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.has-offline-banner .auth-main {
  padding-top: calc(34px + var(--offline-banner-offset, 56px));
}

body.has-online-sync-banner .auth-main {
  padding-top: calc(34px + var(--online-sync-banner-offset, 56px));
}

body.has-system-notice-banner .auth-main {
  padding-top: calc(34px + var(--system-notice-offset, 56px));
}

body.has-offline-banner.has-system-notice-banner .auth-main,
body.has-online-sync-banner.has-system-notice-banner .auth-main {
  padding-top: calc(34px + var(--system-notice-offset, 56px) + var(--offline-banner-offset, var(--online-sync-banner-offset, 56px)));
}

.auth-shell {
  animation: landingReveal 380ms ease both;
}

.auth-shell h1 {
  letter-spacing: -0.02em;
}

.auth-card {
  border: 1px solid #dce2e8;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 20px 40px rgba(17, 17, 17, 0.07);
}

.auth-card input {
  border-radius: 12px;
}

.auth-help-note {
  margin: 14px 0 0;
  color: #4b5563;
  font-weight: 600;
}

.auth-help-note a {
  color: #0f766e;
  font-weight: 700;
  text-decoration: none;
}

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

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 44px;
}

.password-toggle-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  color: #4b5563;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.password-toggle-btn:hover {
  background: #eef2f7;
  color: #111827;
}

.password-toggle-btn svg {
  width: 18px;
  height: 18px;
}

.password-toggle-btn::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  transform: rotate(-28deg) scaleX(0);
  transform-origin: center;
  transition: transform 140ms ease;
}

.password-toggle-btn.is-toggled::after {
  transform: rotate(-28deg) scaleX(1);
}

.landing-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #dcdfe4;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1200;
}

.landing-header .logo {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.landing-page .btn {
  border-radius: 999px;
  font-weight: 700;
  background: #0f766e;
  border-color: #0f766e;
  color: #ffffff;
}

.landing-page .btn:hover {
  background: #115e59;
  border-color: #115e59;
  transform: translateY(-1px);
  text-decoration: none;
}

.landing-page .btn.btn-outline {
  background: #ffffff;
  color: #111111;
  border-color: #111111;
}

.landing-page .btn.btn-outline:hover {
  background: #f3f4f6;
  text-decoration: none;
}

.landing-main {
  background:
    radial-gradient(circle at 92% 5%, rgba(6, 189, 109, 0.15) 0%, rgba(6, 189, 109, 0) 32%),
    radial-gradient(circle at 8% 18%, rgba(255, 128, 0, 0.12) 0%, rgba(255, 128, 0, 0) 28%),
    linear-gradient(180deg, #ffffff 0%, #f5f6f7 100%);
  transition: padding-top 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.has-offline-banner .landing-main {
  padding-top: var(--offline-banner-offset, 56px);
}

body.has-online-sync-banner .landing-main {
  padding-top: var(--online-sync-banner-offset, 56px);
}

body.has-system-notice-banner .landing-main {
  padding-top: var(--system-notice-offset, 56px);
}

body.has-offline-banner.has-system-notice-banner .landing-main,
body.has-online-sync-banner.has-system-notice-banner .landing-main {
  padding-top: calc(var(--system-notice-offset, 56px) + var(--offline-banner-offset, var(--online-sync-banner-offset, 56px)));
}

.landing-main .section {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(6px);
  transition:
    opacity 520ms ease,
    transform 520ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 520ms ease;
  transition-delay: var(--landing-reveal-delay, 0ms);
  will-change: opacity, transform, filter;
}

.landing-main .section.is-visible {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

.landing-hero {
  padding-top: 48px;
}

.landing-hero .kicker {
  color: #006641;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.landing-hero h2 {
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  line-height: 1.03;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.landing-hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 22px;
  align-items: stretch;
}

.landing-lead {
  font-size: 1.06rem;
  line-height: 1.6;
  color: #4b5563;
  max-width: 62ch;
}

.landing-trust-copy {
  margin: 14px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: min(100%, 62ch);
  width: min(100%, 62ch);
  min-height: 84px;
  padding: 12px 18px;
  border-radius: 18px;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: #f8fafc;
  border: 1px solid rgba(184, 134, 11, 0.42);
  background:
    linear-gradient(135deg, rgba(10, 16, 28, 0.98) 0%, rgba(27, 39, 58, 0.98) 52%, rgba(12, 18, 31, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(184, 134, 11, 0.12),
    0 12px 28px rgba(15, 23, 42, 0.14);
  overflow: hidden;
}

.landing-trust-copy::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  flex: 0 0 30px;
  font-size: 0.82rem;
  font-weight: 900;
  color: #f0fdf4;
  border: 1.5px solid rgba(6, 95, 70, 0.34);
  background:
    radial-gradient(circle at 30% 28%, #6ee7b7 0%, #22c55e 42%, #0f766e 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 0 0 2px rgba(6, 95, 70, 0.14),
    0 4px 10px rgba(15, 118, 110, 0.22);
}

.landing-trust-rotator {
  display: inline-flex;
  align-items: center;
  min-height: 2.8em;
  width: 100%;
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    filter 180ms ease;
  transform-origin: left center;
}

.landing-trust-rotator.is-exiting {
  opacity: 0;
  transform: translateY(-4px);
  filter: blur(1px);
}

.landing-trust-rotator.is-entering {
  opacity: 0;
  transform: translateY(4px);
  filter: blur(1px);
  animation: landingTrustMessageIn 260ms ease forwards;
}

@keyframes landingTrustMessageIn {
  from {
    opacity: 0;
    transform: translateY(4px);
    filter: blur(1px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.landing-panel {
  align-self: start;
  border-radius: 26px;
  border: 1px solid #dce2e8;
  background: #ffffff;
  box-shadow: 0 20px 40px rgba(17, 17, 17, 0.08);
  overflow: hidden;
}

.landing-panel h3 {
  margin-top: 0;
}

.landing-panel-carousel {
  position: relative;
  transition: height 260ms ease;
}

.landing-panel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 260ms ease,
    transform 260ms ease;
}

.landing-panel-slide.is-active {
  position: relative;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.landing-panel-dots {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.landing-panel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d3dbe5;
  transition: transform 160ms ease, background-color 160ms ease;
}

.landing-panel-dot.is-active {
  background: #14b8a6;
  transform: scale(1.15);
}

.landing-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 14px;
}

.landing-kpis article {
  border: 1px solid #e3e8ef;
  background: #f8fafc;
  border-radius: 14px;
  padding: 10px;
}

.landing-kpis article .muted {
  color: #525866;
}

.landing-kpis strong {
  font-size: 1.22rem;
  letter-spacing: -0.01em;
}

.landing-thanks {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #99f6e4;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(16, 185, 129, 0.08));
}

.landing-thanks-kicker {
  margin: 0 0 4px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #0f766e;
}

.landing-thanks p {
  margin: 0;
  line-height: 1.4;
}

.landing-rider-accent {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(6, 189, 109, 0.18);
  background:
    linear-gradient(135deg, rgba(6, 189, 109, 0.1) 0%, rgba(255, 128, 0, 0.08) 100%),
    #ffffff;
}

.landing-rider-accent-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  font-size: 1.8rem;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.35) 40%, transparent 70%),
    linear-gradient(145deg, rgba(6, 189, 109, 0.22) 0%, rgba(255, 128, 0, 0.16) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 8px 20px rgba(15, 23, 42, 0.08);
}

.landing-rider-accent-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.landing-rider-accent-copy strong {
  color: #0f172a;
  font-size: 0.96rem;
  letter-spacing: -0.01em;
}

.landing-rider-accent-copy span {
  color: #4b5563;
  font-size: 0.88rem;
  line-height: 1.45;
}

.landing-pro-hero-card {
  margin: 12px 0 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(20, 184, 166, 0.18);
  background:
    linear-gradient(145deg, rgba(10, 16, 28, 0.98) 0%, rgba(27, 39, 58, 0.98) 100%);
  color: #f8fafc;
}

.landing-pro-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 183, 0, 0.14);
  border: 1px solid rgba(255, 183, 0, 0.34);
  color: #fbbf24;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.landing-pro-hero-card strong {
  display: block;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.landing-pro-hero-card p {
  margin: 0;
  color: rgba(248, 250, 252, 0.82);
  line-height: 1.5;
}

.landing-pro-hero-card--trust {
  border-color: rgba(6, 189, 109, 0.22);
  background:
    linear-gradient(145deg, rgba(7, 18, 34, 0.98) 0%, rgba(12, 58, 52, 0.94) 100%);
}

.landing-features-mini {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.landing-features-mini article {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #e3e8ef;
  background: #f8fafc;
}

.landing-features-mini span {
  display: block;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #0f766e;
  margin-bottom: 4px;
}

.landing-features-mini strong {
  color: #0f172a;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.landing-pro-badge--trust {
  background: rgba(6, 189, 109, 0.14);
  border-color: rgba(6, 189, 109, 0.34);
  color: #6ee7b7;
}

.landing-features-mini--trust article {
  border-color: rgba(6, 189, 109, 0.14);
  background: linear-gradient(135deg, rgba(6, 189, 109, 0.06), rgba(248, 250, 252, 0.94));
}

.landing-features-mini--trust span {
  color: #0f766e;
}

.landing-features-mini--trust {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-pro-section .landing-title {
  color: #0f172a;
}

.landing-pro-section .landing-features .card {
  border-color: rgba(255, 183, 0, 0.2);
  background:
    linear-gradient(145deg, rgba(10, 16, 28, 0.98) 0%, rgba(27, 39, 58, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 16px 34px rgba(15, 23, 42, 0.12);
}

.landing-pro-section .landing-features .card:hover {
  border-color: rgba(255, 183, 0, 0.34);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 18px 38px rgba(15, 23, 42, 0.16);
}

.landing-pro-section .landing-features .card h3 {
  color: #f8fafc;
}

.landing-pro-section .landing-features .card p {
  color: rgba(248, 250, 252, 0.82);
}

.landing-pro-section .landing-features .card:nth-child(1) {
  border-color: rgba(20, 184, 166, 0.22);
  background:
    linear-gradient(145deg, rgba(7, 18, 34, 0.98) 0%, rgba(16, 57, 74, 0.94) 100%);
}

.landing-pro-section .landing-features .card:nth-child(2) {
  border-color: rgba(255, 183, 0, 0.24);
  background:
    linear-gradient(145deg, rgba(18, 18, 28, 0.98) 0%, rgba(62, 42, 10, 0.94) 100%);
}

.landing-pro-section .landing-features .card:nth-child(3) {
  border-color: rgba(6, 189, 109, 0.22);
  background:
    linear-gradient(145deg, rgba(9, 18, 25, 0.98) 0%, rgba(11, 64, 55, 0.94) 100%);
}

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

.landing-strip p {
  margin: 0;
  text-align: center;
  border: 1px solid #d7dee7;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
  background: #ffffff;
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

.landing-pill-icon {
  display: inline-block;
  margin-right: 6px;
}

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

.landing-features .card,
.landing-steps .card {
  border: 1px solid #dce2e8;
  border-radius: 18px;
  background: #ffffff;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.landing-features .card:hover,
.landing-steps .card:hover {
  transform: translateY(-2px);
  border-color: #c8d2dd;
  box-shadow: 0 12px 30px rgba(17, 17, 17, 0.08);
}

.landing-title {
  margin-top: 0;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

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

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

.landing-compare-card {
  border: 1px solid #dce2e8;
  border-radius: 18px;
  background: #ffffff;
}

.landing-compare-card--featured {
  border-color: rgba(6, 189, 109, 0.28);
  background:
    linear-gradient(145deg, rgba(6, 189, 109, 0.08) 0%, rgba(255, 128, 0, 0.04) 100%),
    #ffffff;
  box-shadow: 0 14px 36px rgba(6, 189, 109, 0.08);
}

.landing-compare-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #44505c;
}

.landing-compare-list li + li {
  margin-top: 8px;
}

.landing-step-no {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #ff5a00;
}

.landing-steps h4 {
  margin: 8px 0 6px;
}

.landing-cta {
  text-align: center;
  border-radius: 26px;
  border: 1px solid #dce2e8;
  background:
    linear-gradient(125deg, rgba(6, 189, 109, 0.1) 0%, rgba(6, 189, 109, 0.02) 36%, rgba(255, 128, 0, 0.08) 100%),
    #ffffff;
}

.landing-cta .hero-actions {
  justify-content: center;
}

.landing-cta h3 {
  margin-top: 0;
  letter-spacing: -0.02em;
}

@keyframes landingReveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-main .section {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }
}

@media (max-width: 900px) {

  .landing-hero-grid,
  .landing-features,
  .landing-steps,
  .landing-compare,
  .landing-strip {
    grid-template-columns: 1fr;
  }

  .landing-panel-carousel {
    min-height: auto;
    height: 100%;
  }

  .landing-panel-slide,
  .landing-panel-slide.is-active {
    position: relative;
    inset: auto;
  }

  .landing-panel-slide:not(.is-active) {
    display: none;
  }

  .landing-panel {
    display: flex;
    flex-direction: column;
  }

  .landing-panel-slide.is-active {
    overflow: visible;
  }

  .landing-features-mini {
    grid-template-columns: 1fr;
  }

  .landing-hero {
    padding-top: 28px;
  }

  .landing-hero h2 {
    font-size: clamp(1.75rem, 8.2vw, 2.4rem);
  }

  .landing-kpis {
    grid-template-columns: 1fr 1fr;
  }

  .landing-strip p {
    text-align: center;
  }
}

@media (max-width: 520px) {
  .landing-header {
    background: rgba(255, 255, 255, 0.98);
  }

  .auth-main {
    padding-top: 20px;
  }

  #changelog-toggle + #redo-tour-btn {
    margin-top: 8px;
  }

  .landing-header .nav {
    min-height: 0;
    padding: 10px 0;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .landing-header .logo {
    width: 100%;
    text-align: center;
  }

  .landing-header .nav .row {
    width: 100%;
    justify-content: center;
    gap: 8px;
  }

  .landing-header .nav .btn,
  .landing-header .nav .btn-outline {
    width: auto;
    min-width: 130px;
    padding: 9px 12px;
  }

  .landing-hero .hero-actions,
  .landing-cta .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
  }

  .landing-hero .hero-actions .btn,
  .landing-hero .hero-actions .btn-outline,
  .landing-cta .hero-actions .btn,
  .landing-cta .hero-actions .btn-outline {
    width: 100%;
    min-width: 0;
    justify-content: center;
    text-align: center;
    padding-inline: 14px;
    white-space: normal;
    line-height: 1.25;
  }

}
