/* Debit Base — Premium visual overhaul
   Logic remains untouched; this file only redefines the presentation layer. */

:root {
  --primary: #0b3f99;
  --primary-strong: #082f74;
  --primary-bright: #147cff;
  --primary-electric: #248cff;
  --primary-soft: #eaf4ff;
  --accent: #2d90ff;
  --accent-soft: #d8ebff;
  --background: #eaf4ff;
  --background-deep: #d7eaff;
  --card: rgba(255, 255, 255, 0.92);
  --card-solid: #ffffff;
  --text: #0a2b63;
  --muted: #567093;
  --border: rgba(116, 161, 216, 0.34);
  --border-strong: rgba(68, 122, 196, 0.38);
  --danger: #de493d;
  --warning: #d58a1d;
  --success: #159460;
  --overlay: rgba(4, 28, 68, 0.52);
  --shadow-soft: 0 18px 55px rgba(17, 72, 149, 0.12);
  --shadow-card: 0 26px 82px rgba(16, 73, 151, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --shadow-blue: 0 18px 44px rgba(18, 108, 232, 0.24);
  --radius-xl: 2.25rem;
  --radius-lg: 1.85rem;
  --radius-md: 1.35rem;
  --radius-sm: 1rem;
  --chart-1: #147cff;
  --chart-2: #0b3f99;
  --chart-3: #37b6ff;
  --chart-4: #ff725f;
  --chart-5: #7d8ef7;
  --chart-6: #20a66f;
  color-scheme: light;
}

html {
  min-height: 100%;
  background: var(--background);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.94) 0, rgba(255, 255, 255, 0.62) 24rem, transparent 48rem),
    radial-gradient(circle at 88% 6%, rgba(58, 156, 255, 0.22) 0, transparent 27rem),
    radial-gradient(circle at 10% 15%, rgba(91, 181, 255, 0.18) 0, transparent 25rem),
    linear-gradient(180deg, #eaf5ff 0%, #dceeff 40%, #eaf5ff 100%);
  color: var(--text);
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -3;
  pointer-events: none;
  inset: auto;
}

body::before {
  top: -11rem;
  left: 50%;
  width: min(116rem, 138vw);
  height: 54rem;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.96) 0, rgba(255, 255, 255, 0.32) 34rem, transparent 47rem);
}

body::after {
  right: -8rem;
  bottom: -12rem;
  width: 46rem;
  height: 46rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(32, 139, 255, 0.18) 0, transparent 66%);
}

::selection {
  background: rgba(20, 124, 255, 0.22);
}

h1,
h2,
h3,
strong,
b {
  color: var(--text);
}

h1 {
  letter-spacing: -0.06em;
}

h2,
h3 {
  letter-spacing: -0.035em;
}

p,
small,
.microcopy {
  color: var(--muted);
}

input,
select,
textarea {
  border: 1px solid rgba(92, 138, 204, 0.28);
  border-radius: 1.15rem;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(20, 124, 255, 0.78);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 0 0 4px rgba(20, 124, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

label {
  color: var(--muted);
  font-weight: 760;
}

.surface,
.card,
.collapsible-card,
.modal-sheet,
.settings-panel,
.period-drawer-panel,
.settings-drawer-panel,
.widget-edit-panel,
.widget-page-toolbar,
.fab-menu,
.current-week-jump,
.personal-greeting,
.active-range-notice,
.settings-confirm-modal,
.tutorial-card {
  border: 1px solid var(--border);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(244, 250, 255, 0.84));
  box-shadow: var(--shadow-card);
  -webkit-backdrop-filter: blur(24px) saturate(1.16);
  backdrop-filter: blur(24px) saturate(1.16);
}

.app-shell {
  position: relative;
  isolation: isolate;
  width: min(1510px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0 4rem;
}

.app-shell::before {
  content: "";
  position: absolute;
  z-index: -2;
  top: -1rem;
  left: 50%;
  width: 100vw;
  height: clamp(18rem, 30vw, 30rem);
  transform: translateX(-50%);
  background:
    linear-gradient(180deg, rgba(234, 245, 255, 0.05) 0%, rgba(234, 245, 255, 0.18) 56%, rgba(234, 245, 255, 0.94) 100%),
    url("../brand-header.jpeg") center top / cover no-repeat;
}

.app-shell::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 19rem;
  left: 50%;
  width: 100vw;
  height: 28rem;
  transform: translateX(-50%);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.72), transparent 60%),
    linear-gradient(180deg, rgba(234, 245, 255, 0.72), rgba(234, 245, 255, 0));
  pointer-events: none;
}

.topbar {
  position: sticky;
  top: 0.78rem;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 6.1rem;
  margin-bottom: 1.1rem;
  padding: 0.72rem 0.82rem;
  border-radius: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.74);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(237, 247, 255, 0.82));
  box-shadow: 0 22px 70px rgba(11, 63, 153, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.98);
  -webkit-backdrop-filter: blur(28px) saturate(1.18);
  backdrop-filter: blur(28px) saturate(1.18);
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.6;
  background:
    radial-gradient(circle at 8% 50%, rgba(20, 124, 255, 0.16), transparent 15rem),
    radial-gradient(circle at 88% 24%, rgba(80, 176, 255, 0.16), transparent 17rem);
}

.topbar > * {
  position: relative;
  z-index: 1;
}

.topbar-brand {
  order: 1;
  min-width: 0;
  flex: 1 1 auto;
  justify-content: flex-start;
  gap: 0.9rem;
}

.topbar-brand::before {
  content: "";
  width: 4.15rem;
  height: 4.15rem;
  flex: 0 0 auto;
  border-radius: 1.35rem;
  background: url("../logo-mascot.png") center / cover no-repeat;
  box-shadow: 0 14px 34px rgba(11, 63, 153, 0.2);
}

.topbar-header-logo {
  display: block;
  width: min(32rem, 48vw);
  height: 4.6rem;
  max-height: none;
  object-fit: contain;
  object-position: left center;
  margin-inline: 0;
  filter: drop-shadow(0 8px 18px rgba(13, 68, 147, 0.16));
}

.topbar-actions {
  order: 2;
  margin-left: auto;
  gap: 0.55rem;
}

.topbar > .icon-pill:first-child {
  order: 3;
}

.icon-pill {
  width: 3.35rem;
  height: 3.35rem;
  border-radius: 1.2rem;
  border: 1px solid rgba(85, 136, 202, 0.28);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(232, 244, 255, 0.86));
  box-shadow: 0 15px 34px rgba(11, 63, 153, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.icon-pill:hover,
.primary:hover,
.outline:hover,
.ghost:hover,
.file-button:hover,
.fab:hover,
.transaction-action:hover,
.rail-nav button:hover,
.drawer-menu-item:hover,
.widget-add-card:hover {
  transform: translateY(-2px);
}

.toolbar-icon-img,
.nav-icon-img {
  filter: saturate(1.18);
}

.sync-chip {
  min-height: 3.25rem;
  max-width: 18.5rem;
  border-radius: 999px;
  border: 1px solid rgba(91, 143, 207, 0.28);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 28px rgba(11, 63, 153, 0.09);
}

.greeting-week-row {
  position: relative;
  z-index: 2;
  margin: 0 0 1.28rem;
  grid-template-columns: minmax(0, 1.35fr) minmax(15rem, 0.65fr);
  gap: 1rem;
}

.personal-greeting,
.current-week-jump {
  border-radius: 2rem;
}

.personal-greeting {
  position: relative;
  overflow: hidden;
  padding: 1.2rem 1.45rem;
  background:
    radial-gradient(circle at 86% 18%, rgba(20, 124, 255, 0.18), transparent 13rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(241, 249, 255, 0.82));
}

.personal-greeting::after {
  content: "";
  position: absolute;
  right: -1.6rem;
  bottom: -2.25rem;
  width: 13rem;
  height: 8.4rem;
  border-radius: 999px;
  background: radial-gradient(circle at center, rgba(37, 139, 255, 0.16), transparent 70%);
  pointer-events: none;
}

.personal-greeting h1 {
  position: relative;
  z-index: 1;
  font-size: clamp(1.55rem, 2.8vw, 2.25rem);
  font-weight: 900;
  letter-spacing: -0.052em;
}

.personal-greeting p {
  position: relative;
  z-index: 1;
  font-size: 0.98rem;
  font-weight: 640;
}

.current-week-jump {
  align-content: center;
  border: 1px solid rgba(86, 141, 207, 0.32);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(230, 243, 255, 0.88));
}

.current-week-jump strong {
  color: var(--primary-strong);
  font-size: clamp(1.08rem, 2vw, 1.34rem);
}

.current-week-jump span {
  font-weight: 760;
}

.active-range-notice {
  border-radius: 1.45rem;
  border-color: rgba(20, 124, 255, 0.34);
  background: linear-gradient(145deg, rgba(226, 241, 255, 0.94), rgba(255, 255, 255, 0.92));
}

.workspace {
  position: relative;
  z-index: 2;
  grid-template-columns: minmax(17rem, 19rem) minmax(0, 1fr);
  gap: 1.35rem;
}

.desktop-rail {
  top: 7.55rem;
  min-height: calc(100vh - 9rem);
  padding: 1rem;
  border-radius: 2.2rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.98), transparent 13rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(235, 246, 255, 0.86));
}

.brand-card {
  min-height: 4.55rem;
  padding: 0.82rem;
  border-radius: 1.5rem;
  border: 1px solid rgba(95, 147, 211, 0.28);
  background:
    radial-gradient(circle at 18% 50%, rgba(20, 124, 255, 0.18), transparent 5rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(230, 243, 255, 0.9));
  box-shadow: 0 16px 38px rgba(11, 63, 153, 0.1);
}

.brand-mascot {
  width: 3.3rem;
  height: 3.3rem;
  border-radius: 1.15rem;
  object-fit: cover;
  border: 1px solid rgba(8, 47, 116, 0.16);
  background: #0e6eea;
}

.brand-name {
  font-size: 1.08rem;
  font-weight: 920;
  letter-spacing: -0.035em;
}

.rail-nav {
  gap: 0.42rem;
}

.rail-nav button,
.drawer-menu-item,
.drawer-menu-summary {
  border: 1px solid transparent;
  border-radius: 1.15rem;
  min-height: 3.18rem;
  background: transparent;
  color: var(--muted);
  font-weight: 830;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.rail-nav button:hover,
.drawer-menu-item:hover,
.drawer-menu-summary:hover {
  color: var(--primary);
  border-color: rgba(20, 124, 255, 0.18);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 28px rgba(11, 63, 153, 0.08);
}

.rail-nav button.active,
.drawer-menu-item.active {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.28);
  background: linear-gradient(135deg, #0c5fe5, #1684ff);
  box-shadow: var(--shadow-blue);
}

.rail-nav button.active span,
.drawer-menu-item.active .drawer-menu-icon {
  color: #ffffff;
}

.profile-mini {
  border: 1px solid rgba(95, 147, 211, 0.28);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 32px rgba(11, 63, 153, 0.08);
}

.page-stack {
  gap: 1.35rem;
}

.card,
.collapsible-card,
.widget-page-toolbar,
.widget-edit-panel {
  border-radius: 2.15rem;
}

.card {
  padding: clamp(1rem, 2.2vw, 1.45rem);
}

.card-head {
  gap: 1rem;
}

.card-head h2 {
  font-size: clamp(1.2rem, 2vw, 1.62rem);
  font-weight: 920;
}

.card-head p {
  font-weight: 620;
}

.fixed-overview-card,
.hero-overview {
  overflow: hidden;
  border-color: rgba(20, 124, 255, 0.24);
  background:
    radial-gradient(circle at 95% 8%, rgba(20, 124, 255, 0.18), transparent 18rem),
    radial-gradient(circle at 12% 90%, rgba(61, 179, 255, 0.14), transparent 16rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(236, 247, 255, 0.88));
}

.metric-grid,
.delta-grid,
.mini-stat-grid,
.quick-access-grid,
.widget-add-grid {
  gap: 0.95rem;
}

.metric-card,
.delta-card,
.inline-total,
.metric-pill,
.settings-highlight,
.progress-block,
.mini-transaction,
.transaction-row,
.simple-list > div,
.helper-card,
.help-grid article,
.budget-category,
.week-summary,
.week-choice,
.cashflow-category-row,
.quick-access-source,
.widget-add-card,
.subscription-check-row,
.reminder-center-row,
.due-calendar-row,
.goal-row,
.pot-row,
.budget-target-row,
.import-status-card,
.nested-card {
  border: 1px solid rgba(94, 146, 210, 0.24);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(238, 247, 255, 0.82));
  box-shadow: 0 16px 38px rgba(11, 63, 153, 0.075), inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.metric-card,
.delta-card,
.inline-total,
.metric-pill,
.settings-highlight {
  border-radius: 1.45rem;
  padding: 1rem;
}

.metric-card strong,
.delta-card strong,
.inline-total strong,
.metric-pill strong {
  font-size: clamp(1.16rem, 2vw, 1.72rem);
  font-weight: 940;
}

.metric-card.primary strong,
.metric-pill strong {
  color: var(--primary-bright);
}

.progress-block {
  border-radius: 1.55rem;
  padding: 1rem;
}

.progress-track {
  height: 0.8rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(20, 124, 255, 0.14);
}

.progress-track i {
  border-radius: inherit;
  background: linear-gradient(90deg, #116cf0, #3ca4ff);
  box-shadow: 0 8px 20px rgba(20, 124, 255, 0.28);
}

.primary,
.transaction-action,
.fab {
  color: #ffffff;
  border: 0;
  background: linear-gradient(135deg, #0a5de2, #1686ff);
  box-shadow: var(--shadow-blue);
}

.primary,
.outline,
.ghost,
.file-button {
  border-radius: 1.15rem;
  min-height: 3.05rem;
  font-weight: 900;
}

.outline,
.file-button {
  border: 1px solid rgba(20, 124, 255, 0.34);
  background: rgba(255, 255, 255, 0.82);
  color: var(--primary);
  box-shadow: 0 14px 32px rgba(11, 63, 153, 0.08);
}

.ghost {
  border: 1px solid rgba(93, 145, 208, 0.18);
  background: rgba(240, 248, 255, 0.88);
  color: var(--text);
}

.expense-action {
  background: linear-gradient(135deg, #ef5a4d, #d83f37);
  box-shadow: 0 18px 38px rgba(222, 73, 61, 0.22);
}

.income-action {
  background: linear-gradient(135deg, #12a06a, #1cb97c);
  box-shadow: 0 18px 38px rgba(21, 148, 96, 0.22);
}

.transaction-icon,
.soft-pill,
.week-badge,
.sync-chip,
.drawer-status-card,
.io-section,
.import-preview-card,
.bank-import-analysis,
.settings-visibility-group,
.quick-booking-box,
.subscription-ignored-box,
.range-section,
.range-hint,
.inline-info,
.inline-warning,
.inline-success {
  border: 1px solid rgba(90, 143, 207, 0.22);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 28px rgba(11, 63, 153, 0.06);
}

.soft-pill,
.week-badge {
  color: var(--primary);
  font-weight: 900;
}

.transaction-row,
.mini-transaction {
  border-radius: 1.45rem;
}

.transaction-row > b,
.mini-transaction > b {
  font-weight: 940;
}

.transaction-row.income > b {
  color: var(--success);
}

.transaction-row.expense > b {
  color: var(--danger);
}

.transaction-icon {
  border-radius: 1.1rem;
}

.donut,
.bar-chart,
.line-chart {
  filter: drop-shadow(0 12px 22px rgba(11, 63, 153, 0.08));
}

.chart-frame,
.category-pie,
.cashflow-ladder,
.bank-import-analysis,
.import-preview-card {
  border-radius: 1.6rem;
}

.settings-drawer-backdrop,
.period-drawer-backdrop,
.settings-panel-backdrop,
.modal-backdrop,
.settings-confirm-backdrop {
  background: rgba(4, 28, 68, 0.54);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.period-drawer-panel {
  width: min(27rem, 94vw);
  border-radius: 2rem 0 0 2rem;
  background:
    radial-gradient(circle at 80% 8%, rgba(20, 124, 255, 0.18), transparent 15rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(236, 247, 255, 0.92));
}

.settings-drawer-panel {
  width: min(25rem, 94vw);
  border-radius: 0 2rem 2rem 0;
  background:
    radial-gradient(circle at 18% 8%, rgba(20, 124, 255, 0.16), transparent 14rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(236, 247, 255, 0.92));
}

.settings-panel {
  border-radius: 2.15rem 0 0 2.15rem;
  background:
    radial-gradient(circle at 90% 4%, rgba(20, 124, 255, 0.18), transparent 18rem),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(236, 247, 255, 0.92));
}

.modal-sheet,
.settings-confirm-modal,
.tutorial-card {
  border-radius: 2rem;
  background:
    radial-gradient(circle at 88% 4%, rgba(20, 124, 255, 0.14), transparent 14rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(236, 247, 255, 0.92));
}

.drawer-head,
.settings-panel-head,
.settings-confirm-head,
.modal-head,
.widget-edit-panel-head,
.widget-page-toolbar-head,
.import-preview-head {
  border-bottom-color: rgba(93, 145, 208, 0.22);
  background: rgba(255, 255, 255, 0.7);
}

.submenu-brand-icon {
  border-color: rgba(8, 47, 116, 0.16);
  background: #1279f8;
  box-shadow: 0 14px 34px rgba(11, 63, 153, 0.18);
}

.submenu-brand-divider {
  background: rgba(11, 63, 153, 0.18);
}

.drawer-status-bar {
  border-bottom-color: rgba(93, 145, 208, 0.22);
}

.io-section {
  border-radius: 1.35rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(236, 247, 255, 0.9));
}

.io-section-label,
.eyebrow {
  color: var(--primary-bright);
  font-weight: 950;
}

.widget-remove-x {
  background: linear-gradient(135deg, #ef5a4d, #d83f37);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(222, 73, 61, 0.22);
}

.widget-edit-panel,
.widget-page-toolbar {
  background:
    radial-gradient(circle at 88% 6%, rgba(20, 124, 255, 0.13), transparent 13rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(236, 247, 255, 0.92));
}

.widget-add-card {
  border-radius: 1.35rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.fab {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 1.55rem;
  box-shadow: 0 24px 52px rgba(17, 104, 235, 0.32);
}

.fab-menu {
  border-radius: 1.65rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(236, 247, 255, 0.92));
}

.toast {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 1.45rem;
  background: rgba(7, 35, 83, 0.94);
  box-shadow: 0 22px 60px rgba(4, 28, 68, 0.34);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.app-footer {
  position: relative;
  isolation: isolate;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-top: 1.35rem;
  min-height: 14rem;
  padding: 4rem max(1rem, calc((100vw - 1450px) / 2)) 1.2rem;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(234, 245, 255, 0.12) 0%, rgba(226, 241, 255, 0.72) 40%, rgba(220, 238, 255, 0.96) 100%),
    url("../brand-footer.jpeg") center bottom / cover no-repeat;
}

.app-footer::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgba(234, 245, 255, 0.2), rgba(234, 245, 255, 0.74));
}

.app-footer-rule {
  background: rgba(11, 63, 153, 0.16);
}

.app-footer-inner {
  width: min(68rem, 100%);
  padding: 1.08rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 1.8rem;
  background: rgba(255, 255, 255, 0.64);
  box-shadow: 0 18px 46px rgba(11, 63, 153, 0.1);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.app-footer-brand {
  display: none;
}

.app-footer-copy span,
.app-footer-copy small {
  color: rgba(10, 43, 99, 0.78);
  font-weight: 700;
}

.auth-shell {
  position: relative;
  isolation: isolate;
  width: min(1510px, calc(100% - 2rem));
  min-height: 100svh;
  grid-template-columns: minmax(0, 1.12fr) minmax(25rem, 0.82fr);
  gap: clamp(1rem, 4vw, 4rem);
  align-items: center;
  padding: clamp(1rem, 2vw, 2rem) 0 2.5rem;
}

.auth-shell::before {
  content: "";
  position: absolute;
  z-index: -2;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background:
    linear-gradient(90deg, rgba(234, 245, 255, 0.14) 0%, rgba(234, 245, 255, 0.12) 42%, rgba(234, 245, 255, 0.72) 72%, rgba(234, 245, 255, 0.96) 100%),
    url("../brand-auth.jpeg") center center / cover no-repeat;
}

.auth-shell::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -10vw;
  top: 8vh;
  width: 46rem;
  height: 46rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.84) 0, rgba(255, 255, 255, 0.18) 45%, transparent 72%);
  pointer-events: none;
}

.auth-hero {
  min-height: min(77vh, 780px);
  align-content: end;
  justify-items: start;
  text-align: left;
  gap: 1rem;
  padding: clamp(1.4rem, 3vw, 2.6rem);
  border-radius: 2.4rem;
  background: transparent;
}

.auth-logo-banner {
  display: none;
}

.auth-hero h1 {
  max-width: 37rem;
  font-size: clamp(2.2rem, 4vw, 4.4rem);
  line-height: 0.98;
  font-weight: 950;
  letter-spacing: -0.065em;
  color: var(--primary-strong);
  text-shadow: 0 8px 26px rgba(255, 255, 255, 0.82);
}

.auth-hero > p:not(.eyebrow) {
  max-width: 34rem;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  font-weight: 740;
  color: rgba(10, 43, 99, 0.82);
  text-shadow: 0 8px 24px rgba(255, 255, 255, 0.92);
}

.auth-feature-pills {
  justify-content: flex-start;
}

.auth-feature-pills span {
  border: 1px solid rgba(20, 124, 255, 0.24);
  background: rgba(255, 255, 255, 0.8);
  color: var(--primary);
  box-shadow: 0 14px 32px rgba(11, 63, 153, 0.09);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.auth-shell > .surface.card {
  position: relative;
  z-index: 2;
  border-radius: 2.4rem;
  padding: clamp(1.18rem, 2.8vw, 2rem);
  border-color: rgba(255, 255, 255, 0.66);
  background:
    radial-gradient(circle at 92% 8%, rgba(20, 124, 255, 0.14), transparent 13rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(241, 249, 255, 0.94));
  box-shadow: 0 32px 95px rgba(11, 63, 153, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.auth-shell .card-head h2 {
  font-size: clamp(1.55rem, 2.6vw, 2rem);
}

.auth-shell .primary.wide {
  min-height: 3.6rem;
  font-size: 1.02rem;
}

.auth-shell .ghost.wide,
.auth-shell .outline.wide {
  min-height: 3.35rem;
}

.center-screen {
  background:
    linear-gradient(180deg, rgba(234, 245, 255, 0.42), rgba(234, 245, 255, 0.94)),
    url("../brand-auth.jpeg") center center / cover no-repeat;
}

.loading-card {
  border-radius: 2rem;
}

.spinner {
  border-color: rgba(20, 124, 255, 0.2);
  border-top-color: var(--primary-bright);
}

.bottom-nav-shell,
.bottom-nav {
  display: none !important;
}

@media (max-width: 1180px) {
  .app-shell {
    width: min(100% - 1.2rem, 100%);
    padding-top: 0.55rem;
  }

  .app-shell::before {
    height: 25rem;
    background-position: 41% top;
  }

  .topbar {
    top: 0.48rem;
    min-height: 5.65rem;
  }

  .topbar-header-logo {
    width: min(26rem, 46vw);
    height: 4.15rem;
  }

  .topbar-brand::before {
    width: 3.75rem;
    height: 3.75rem;
  }

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

  .desktop-rail {
    display: none;
  }

  .fab {
    right: 1rem !important;
    bottom: 1.2rem !important;
  }

  .fab-menu {
    right: 1rem !important;
    bottom: 6rem !important;
  }

  .toast {
    bottom: 1rem !important;
  }

  .toast.undo {
    bottom: 5.6rem !important;
  }
}

@media (max-width: 900px) {
  body {
    background:
      radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.98) 0, rgba(255, 255, 255, 0.58) 18rem, transparent 31rem),
      linear-gradient(180deg, #e9f4ff 0%, #dbeeff 48%, #eaf5ff 100%);
  }

  .app-shell {
    width: min(100% - 0.8rem, 100%);
    padding-top: 0.4rem;
    padding-bottom: 2.8rem;
  }

  .app-shell::before {
    height: 24rem;
    background:
      linear-gradient(180deg, rgba(234, 245, 255, 0.06) 0%, rgba(234, 245, 255, 0.24) 55%, rgba(234, 245, 255, 0.96) 100%),
      url("../brand-header.jpeg") 39% top / auto 24rem no-repeat;
  }

  .app-shell::after {
    top: 16.8rem;
    height: 20rem;
  }

  .topbar {
    min-height: 5.3rem;
    padding: 0.55rem;
    border-radius: 1.6rem;
    gap: 0.45rem;
  }

  .topbar-brand {
    gap: 0.5rem;
  }

  .topbar-brand::before {
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 1rem;
  }

  .topbar-header-logo {
    width: min(14.8rem, 46vw);
    height: 3.45rem;
  }

  .icon-pill {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
  }

  .sync-chip {
    display: none;
  }

  .greeting-week-row {
    grid-template-columns: 1fr;
    gap: 0.72rem;
    margin-bottom: 0.95rem;
    padding-top: 0.3rem;
  }

  .personal-greeting,
  .current-week-jump {
    border-radius: 1.65rem;
  }

  .personal-greeting {
    min-height: 8.3rem;
    padding: 1.05rem 1.1rem;
    align-content: end;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(237, 247, 255, 0.76));
  }

  .personal-greeting h1 {
    font-size: clamp(1.42rem, 6vw, 2rem);
  }

  .current-week-jump {
    min-height: 4.65rem;
    padding: 0.86rem 1rem;
  }

  .workspace,
  .page-stack {
    gap: 0.95rem;
  }

  .card,
  .collapsible-card,
  .widget-page-toolbar,
  .widget-edit-panel,
  .surface {
    border-radius: 1.72rem;
  }

  .card {
    padding: 0.94rem;
  }

  .card-head {
    gap: 0.72rem;
  }

  .card-head h2 {
    font-size: 1.18rem;
  }

  .metric-grid.five,
  .metric-grid.four,
  .delta-grid,
  .mini-stat-grid,
  .dashboard-two,
  .dashboard-three,
  .helper-grid,
  .help-grid,
  .filter-grid,
  .form-grid.three,
  .quick-access-grid,
  .widget-add-grid {
    grid-template-columns: 1fr;
  }

  .metric-card,
  .delta-card,
  .inline-total,
  .metric-pill,
  .settings-highlight,
  .progress-block,
  .mini-transaction,
  .transaction-row,
  .simple-list > div,
  .helper-card,
  .help-grid article,
  .budget-category,
  .week-summary,
  .week-choice,
  .quick-access-source,
  .widget-add-card,
  .nested-card {
    border-radius: 1.3rem;
  }

  .transaction-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .transaction-row > b {
    grid-column: 2;
    justify-self: start;
  }

  .button-row,
  .button-row.compact,
  .button-row.wrap,
  .period-controls,
  .form-grid,
  .form-grid.two,
  .color-grid,
  .week-selector-grid {
    grid-template-columns: 1fr;
  }

  .period-drawer-panel,
  .settings-drawer-panel,
  .settings-panel {
    width: min(100%, 96vw);
  }

  .period-drawer-panel {
    border-radius: 1.7rem 0 0 1.7rem;
  }

  .settings-drawer-panel {
    border-radius: 0 1.7rem 1.7rem 0;
  }

  .settings-panel {
    border-radius: 1.7rem 0 0 1.7rem;
  }

  .modal-sheet,
  .settings-confirm-modal,
  .tutorial-card {
    border-radius: 1.7rem;
  }

  .app-footer {
    min-height: 12rem;
    margin-top: 0.9rem;
    padding-top: 3.4rem;
    background:
      linear-gradient(180deg, rgba(234, 245, 255, 0.22) 0%, rgba(226, 241, 255, 0.78) 50%, rgba(220, 238, 255, 0.96) 100%),
      url("../brand-footer.jpeg") 45% bottom / auto 15rem no-repeat;
  }

  .app-footer-inner {
    border-radius: 1.45rem;
    padding: 0.9rem 0.85rem;
  }

  .auth-shell {
    width: min(100% - 0.85rem, 100%);
    min-height: 100svh;
    grid-template-columns: 1fr;
    gap: 0.8rem;
    align-content: start;
    padding: 0.5rem 0 1rem;
  }

  .auth-shell::before {
    background:
      linear-gradient(180deg, rgba(234, 245, 255, 0.1) 0%, rgba(234, 245, 255, 0.18) 32%, rgba(234, 245, 255, 0.88) 64%, rgba(234, 245, 255, 0.98) 100%),
      url("../brand-auth.jpeg") 34% top / auto 30rem no-repeat;
  }

  .auth-shell::after {
    display: none;
  }

  .auth-hero {
    min-height: 20.5rem;
    align-content: end;
    justify-items: start;
    gap: 0.7rem;
    padding: 1rem 0.95rem 0.85rem;
  }

  .auth-hero h1 {
    max-width: 18rem;
    font-size: clamp(1.7rem, 7vw, 2.35rem);
  }

  .auth-hero > p:not(.eyebrow) {
    max-width: 21rem;
    font-size: 0.95rem;
  }

  .auth-feature-pills {
    gap: 0.45rem;
  }

  .auth-feature-pills span {
    padding: 0.48rem 0.68rem;
    font-size: 0.82rem;
  }

  .auth-shell > .surface.card {
    border-radius: 1.95rem;
    padding: 1rem;
  }
}

@media (max-width: 620px) {
  .app-shell {
    width: min(100% - 0.58rem, 100%);
  }

  .app-shell::before {
    height: 22rem;
    background:
      linear-gradient(180deg, rgba(234, 245, 255, 0.06) 0%, rgba(234, 245, 255, 0.26) 54%, rgba(234, 245, 255, 0.98) 100%),
      url("../brand-header.jpeg") 36% top / auto 22rem no-repeat;
  }

  .topbar {
    min-height: 4.95rem;
    border-radius: 1.4rem;
  }

  .topbar-brand::before {
    width: 2.85rem;
    height: 2.85rem;
    border-radius: 0.92rem;
  }

  .topbar-header-logo {
    width: min(10.8rem, 41vw);
    height: 2.95rem;
  }

  .icon-pill {
    width: 2.78rem;
    height: 2.78rem;
    border-radius: 0.92rem;
  }

  .toolbar-icon-img {
    width: 1.15rem;
    height: 1.15rem;
  }

  .personal-greeting {
    min-height: 7.65rem;
  }

  .fab {
    width: 4rem;
    height: 4rem;
    border-radius: 1.42rem;
  }

  .app-footer {
    padding-inline: 0.5rem;
  }

  .auth-shell::before {
    background:
      linear-gradient(180deg, rgba(234, 245, 255, 0.12) 0%, rgba(234, 245, 255, 0.2) 31%, rgba(234, 245, 255, 0.9) 63%, rgba(234, 245, 255, 0.99) 100%),
      url("../brand-auth.jpeg") 32% top / auto 27rem no-repeat;
  }

  .auth-hero {
    min-height: 18.8rem;
  }
}

/* --- Debit Base refinement pass: exact brand-aligned dashboard polish --- */

.app-shell,
.auth-shell {
  animation: debitbaseReveal 480ms ease both;
}

@keyframes debitbaseReveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.app-shell::before,
.auth-shell::before,
.app-footer {
  image-rendering: auto;
}

.app-shell .page-stack > .card,
.app-shell .page-stack > .collapsible-card,
.dashboard-two > .card,
.dashboard-three > .card,
.helper-grid > .card,
.quick-access-grid > *,
.widget-edit-shell,
.widget-page-toolbar,
.modal-sheet,
.settings-panel,
.settings-drawer-panel,
.period-drawer-panel {
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.app-shell .page-stack > .card:hover,
.app-shell .page-stack > .collapsible-card:hover,
.dashboard-two > .card:hover,
.dashboard-three > .card:hover,
.helper-grid > .card:hover,
.quick-access-grid > *:hover,
.widget-page-toolbar:hover {
  transform: translateY(-2px);
  border-color: rgba(20, 124, 255, 0.34);
  box-shadow: 0 30px 88px rgba(13, 67, 145, 0.17), inset 0 1px 0 rgba(255, 255, 255, 0.98);
}

.topbar {
  overflow: hidden;
}

.topbar::after {
  content: "";
  position: absolute;
  inset: auto -10% -82% 42%;
  height: 12rem;
  pointer-events: none;
  background: radial-gradient(circle, rgba(20, 124, 255, 0.2), rgba(20, 124, 255, 0));
}

.topbar-header-logo {
  max-width: 100%;
}

.topbar-actions .icon-pill,
.topbar > .icon-pill:first-child {
  position: relative;
  isolation: isolate;
}

.topbar-actions .icon-pill::before,
.topbar > .icon-pill:first-child::before {
  content: "";
  position: absolute;
  inset: 0.18rem;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.9), rgba(230, 243, 255, 0.42));
}

.greeting-week-row {
  align-items: stretch;
}

.personal-greeting {
  min-height: 8.2rem;
}

.personal-greeting::before {
  content: "";
  position: absolute;
  right: 0.9rem;
  top: 0.85rem;
  width: 6.25rem;
  height: 6.25rem;
  opacity: 0.14;
  pointer-events: none;
  background: url("../logo-mascot.png") center / contain no-repeat;
  filter: saturate(1.12);
}

.current-week-jump {
  position: relative;
  overflow: hidden;
}

.current-week-jump::after {
  content: "";
  position: absolute;
  right: -1.4rem;
  bottom: -1.7rem;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 124, 255, 0.18), transparent 72%);
}

.current-week-jump > * {
  position: relative;
  z-index: 1;
}

.desktop-rail {
  overflow: hidden;
}

.desktop-rail::before {
  content: "";
  position: absolute;
  inset: auto -4.2rem -3rem auto;
  width: 13rem;
  height: 13rem;
  opacity: 0.18;
  background: url("../logo-mascot.png") center / contain no-repeat;
  pointer-events: none;
}

.desktop-rail > * {
  position: relative;
  z-index: 1;
}

.brand-card {
  min-height: 4.75rem;
}

.brand-card p {
  color: rgba(10, 43, 99, 0.74);
}

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

.rail-nav button span:first-child {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 0.72rem;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(84, 138, 204, 0.18);
}

.rail-nav button.active span:first-child {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.26);
}

.rail-nav button.active .nav-icon-img,
.drawer-menu-item.active .nav-icon-img {
  filter: brightness(0) invert(1);
}

.profile-mini {
  border-radius: 1.4rem;
  overflow: hidden;
}

.profile-mini::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, rgba(20, 124, 255, 0.08), transparent 46%);
  pointer-events: none;
}

.profile-mini > * {
  position: relative;
  z-index: 1;
}

.fixed-overview-card,
.hero-overview {
  position: relative;
}

.fixed-overview-card::before,
.hero-overview::before {
  content: "";
  position: absolute;
  right: -3rem;
  top: -2.3rem;
  width: 16rem;
  height: 16rem;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(20, 124, 255, 0.16), transparent 68%);
}

.fixed-overview-card > *,
.hero-overview > * {
  position: relative;
  z-index: 1;
}

.metric-card,
.delta-card,
.metric-pill,
.inline-total {
  min-height: 7.1rem;
  align-content: center;
}

.metric-card span,
.delta-card span,
.metric-pill span,
.inline-total span {
  color: rgba(10, 43, 99, 0.68);
  font-weight: 760;
}

.metric-card small,
.delta-card small,
.metric-pill small,
.inline-total small {
  line-height: 1.35;
}

.metric-card.good strong,
.delta-card.good strong,
.inline-total.good strong {
  color: var(--success);
}

.metric-card.danger strong,
.delta-card.danger strong,
.inline-total.danger strong {
  color: var(--danger);
}

.transaction-row,
.mini-transaction,
.helper-card,
.budget-category,
.week-summary,
.week-choice,
.goal-row,
.pot-row,
.budget-target-row,
.subscription-check-row,
.reminder-center-row,
.due-calendar-row,
.cashflow-category-row,
.import-status-card,
.widget-add-card {
  position: relative;
  overflow: hidden;
}

.transaction-row::before,
.mini-transaction::before,
.helper-card::before,
.budget-category::before,
.week-summary::before,
.week-choice::before,
.goal-row::before,
.pot-row::before,
.budget-target-row::before,
.subscription-check-row::before,
.reminder-center-row::before,
.due-calendar-row::before,
.cashflow-category-row::before,
.import-status-card::before,
.widget-add-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.58;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.34), transparent 42%);
}

.transaction-row > *,
.mini-transaction > *,
.helper-card > *,
.budget-category > *,
.week-summary > *,
.week-choice > *,
.goal-row > *,
.pot-row > *,
.budget-target-row > *,
.subscription-check-row > *,
.reminder-center-row > *,
.due-calendar-row > *,
.cashflow-category-row > *,
.import-status-card > *,
.widget-add-card > * {
  position: relative;
  z-index: 1;
}

.donut,
.category-pie,
.bar-chart,
.line-chart,
.chart-frame {
  overflow: visible;
}

.chart-legend,
.line-key {
  color: rgba(10, 43, 99, 0.72);
  font-weight: 760;
}

.drawer-head,
.settings-panel-head,
.modal-head,
.widget-edit-panel-head,
.widget-page-toolbar-head,
.import-preview-head {
  min-height: 5rem;
}

.drawer-head h2,
.settings-panel-head h2,
.modal-head h2,
.widget-edit-panel-head h2,
.widget-page-toolbar-head h2 {
  letter-spacing: -0.045em;
}

.settings-drawer-panel,
.period-drawer-panel,
.settings-panel,
.modal-sheet {
  overflow: hidden;
}

.drawer-menu-group,
.drawer-status-card,
.settings-visibility-group,
.io-section,
.range-section,
.import-preview-card,
.bank-import-analysis,
.quick-booking-box,
.subscription-ignored-box {
  border-radius: 1.55rem;
}

.drawer-menu-item,
.drawer-menu-summary {
  padding-inline: 0.9rem;
}

.drawer-menu-summary .menu-label span {
  max-width: 19rem;
}

.drawer-status-bar {
  position: relative;
}

.drawer-status-bar::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(20, 124, 255, 0.28), transparent);
}

.settings-panel-body,
.settings-drawer-body,
.period-drawer-body {
  scrollbar-width: thin;
  scrollbar-color: rgba(20, 124, 255, 0.35) transparent;
}

.settings-panel-body::-webkit-scrollbar,
.settings-drawer-body::-webkit-scrollbar,
.period-drawer-body::-webkit-scrollbar {
  width: 0.5rem;
}

.settings-panel-body::-webkit-scrollbar-thumb,
.settings-drawer-body::-webkit-scrollbar-thumb,
.period-drawer-body::-webkit-scrollbar-thumb {
  background: rgba(20, 124, 255, 0.28);
  border-radius: 999px;
}

.settings-panel-body::-webkit-scrollbar-track,
.settings-drawer-body::-webkit-scrollbar-track,
.period-drawer-body::-webkit-scrollbar-track {
  background: transparent;
}

.widget-edit-panel,
.widget-page-toolbar {
  position: relative;
  overflow: hidden;
}

.widget-edit-panel::after,
.widget-page-toolbar::after {
  content: "";
  position: absolute;
  right: -2.6rem;
  bottom: -2.6rem;
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(20, 124, 255, 0.16), transparent 70%);
}

.widget-edit-panel > *,
.widget-page-toolbar > * {
  position: relative;
  z-index: 1;
}

.fab-menu {
  padding: 0.6rem;
}

.fab-menu button,
.fab-menu .outline,
.fab-menu .ghost,
.fab-menu .primary {
  border-radius: 1.08rem;
}

.auth-shell {
  min-height: 100vh;
}

.auth-hero {
  position: relative;
}

.auth-hero::before {
  content: "";
  position: absolute;
  left: clamp(0.2rem, 1vw, 1.25rem);
  top: clamp(0.2rem, 1vw, 1.25rem);
  width: min(25rem, 66%);
  height: 6rem;
  opacity: 0.98;
  background: none;
  pointer-events: none;
}

.auth-hero h1,
.auth-hero > p:not(.eyebrow),
.auth-feature-pills {
  max-width: 36rem;
}

.auth-hero h1 {
  margin-top: auto;
}

.auth-feature-pills span {
  min-height: 2.6rem;
  display: inline-flex;
  align-items: center;
}

.auth-shell > .surface.card {
  backdrop-filter: blur(28px) saturate(1.18);
  -webkit-backdrop-filter: blur(28px) saturate(1.18);
}

.auth-shell form,
.auth-shell .form-stack {
  gap: 0.95rem;
}

.auth-shell label {
  font-size: 0.94rem;
}

.auth-shell input {
  min-height: 3.55rem;
}

.auth-shell .button-row {
  gap: 0.72rem;
}

.center-screen .loading-card {
  min-width: min(30rem, calc(100vw - 1rem));
}

.app-footer-inner {
  gap: 0.9rem;
}

.app-footer-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
}

.app-footer-copy span,
.app-footer-copy small {
  text-wrap: balance;
}

@media (max-width: 1180px) {
  .auth-hero::before {
    width: min(22rem, 68%);
  }
}

@media (max-width: 900px) {
  .app-shell .page-stack > .card:hover,
  .app-shell .page-stack > .collapsible-card:hover,
  .dashboard-two > .card:hover,
  .dashboard-three > .card:hover,
  .helper-grid > .card:hover,
  .quick-access-grid > *:hover,
  .widget-page-toolbar:hover {
    transform: none;
  }

  .topbar::after {
    inset: auto -12% -105% 30%;
  }

  .personal-greeting {
    min-height: 8.9rem;
  }

  .personal-greeting::before {
    width: 5rem;
    height: 5rem;
    right: 0.65rem;
    top: 0.65rem;
  }

  .metric-card,
  .delta-card,
  .metric-pill,
  .inline-total {
    min-height: 6.2rem;
  }

  .drawer-head,
  .settings-panel-head,
  .modal-head,
  .widget-edit-panel-head,
  .widget-page-toolbar-head,
  .import-preview-head {
    min-height: 4.35rem;
  }

  .auth-hero::before {
    width: min(15rem, 72%);
    height: 4.6rem;
  }

  .auth-shell > .surface.card {
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 620px) {
  .personal-greeting {
    min-height: 8.35rem;
  }

  .metric-card,
  .delta-card,
  .metric-pill,
  .inline-total {
    min-height: 5.9rem;
  }

  .auth-hero::before {
    width: min(13rem, 75%);
    height: 4rem;
  }

  .auth-shell input {
    min-height: 3.28rem;
  }

  .app-footer-copy {
    gap: 0.42rem 0.75rem;
  }
}

/* --- Debit Base final precision pass — header, footer, auth, greeting, week jump --- */

body {
  background:
    radial-gradient(circle at 52% 6%, rgba(255, 255, 255, 0.96) 0, rgba(255, 255, 255, 0.54) 24rem, transparent 52rem),
    radial-gradient(circle at 90% 10%, rgba(87, 169, 255, 0.20) 0, transparent 31rem),
    radial-gradient(circle at 8% 18%, rgba(117, 193, 255, 0.18) 0, transparent 27rem),
    linear-gradient(180deg, #eaf5ff 0%, #dbeeff 42%, #eaf5ff 100%);
}

.app-shell {
  padding-top: 0;
}

.app-shell::before,
.app-shell::after {
  display: none !important;
}

/* The uploaded header artwork is the header itself: edge-to-edge, without card chrome. */
.topbar {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  display: block !important;
  isolation: isolate;
  width: 100vw !important;
  max-width: none !important;
  height: auto !important;
  aspect-ratio: 1536 / 614;
  min-height: 0 !important;
  margin: 0 calc(50% - 50vw) 1.35rem !important;
  padding: 0 !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: 0 !important;
  background: url("../brand-header.jpeg") center center / 100% 100% no-repeat !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.topbar::before,
.topbar::after,
.topbar-brand,
.topbar-brand::before,
.topbar-header-logo {
  display: none !important;
}

.header-help-link {
  position: absolute;
  z-index: 4;
  top: clamp(0.72rem, 1.45vw, 1.25rem);
  right: max(7rem, calc((100vw - 1450px) / 2 + 7rem));
  min-height: 2.45rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 14px 32px rgba(11, 63, 153, 0.12);
  color: #0a2b63;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.015em;
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  backdrop-filter: blur(18px) saturate(1.12);
}

.header-help-link:hover {
  transform: translateY(-1px);
  border-color: rgba(20, 124, 255, 0.44);
  background: rgba(255, 255, 255, 0.86);
}

.topbar-actions {
  position: absolute !important;
  z-index: 4;
  top: clamp(0.72rem, 1.45vw, 1.25rem);
  right: max(1rem, calc((100vw - 1450px) / 2 + 1rem));
  display: flex !important;
  align-items: center;
  gap: 0.58rem !important;
  margin: 0 !important;
}

.topbar-actions .icon-pill {
  width: 3rem !important;
  height: 3rem !important;
  min-width: 3rem;
  min-height: 3rem;
  border-radius: 1.05rem !important;
  border-color: rgba(255, 255, 255, 0.76) !important;
  background: rgba(255, 255, 255, 0.74) !important;
  box-shadow: 0 16px 34px rgba(11, 63, 153, 0.14) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  backdrop-filter: blur(18px) saturate(1.12);
}

.topbar-actions .icon-pill::before {
  display: none !important;
}

.topbar-actions .toolbar-icon-img {
  width: 1.28rem;
  height: 1.28rem;
}

/* Compact status indicator: keep the useful state, remove header clutter. */
.topbar .sync-chip {
  width: 2.8rem;
  height: 2.8rem;
  min-width: 2.8rem;
  min-height: 2.8rem;
  max-width: 2.8rem;
  display: inline-grid;
  place-items: center;
  padding: 0 !important;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.76) !important;
  background: rgba(255, 255, 255, 0.74) !important;
  box-shadow: 0 16px 34px rgba(11, 63, 153, 0.12) !important;
  color: transparent;
  font-size: 0;
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  backdrop-filter: blur(18px) saturate(1.12);
}

.topbar .sync-chip b {
  color: #0b3f99;
  font-size: 1.08rem;
  line-height: 1;
}

/* Greeting belongs visually to the page background, not to a glass card. */
.greeting-week-row {
  position: relative;
  z-index: 2;
  margin-top: clamp(0.15rem, 0.8vw, 0.8rem);
}

.personal-greeting.surface {
  min-height: auto !important;
  padding: clamp(0.45rem, 1.35vw, 1rem) 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.personal-greeting::before,
.personal-greeting::after {
  display: none !important;
}

.personal-greeting h1 {
  margin-bottom: 0.22rem;
  font-size: clamp(1.95rem, 3.7vw, 3.15rem) !important;
  line-height: 1.02;
  font-weight: 950;
  letter-spacing: -0.065em;
}

.personal-greeting p {
  max-width: 45rem;
  font-size: clamp(0.98rem, 1.45vw, 1.16rem) !important;
  font-weight: 720;
  color: rgba(10, 43, 99, 0.78);
}

.current-week-jump {
  min-height: 7.5rem;
  display: grid;
  align-content: center;
  gap: 0.38rem;
  padding: 1.15rem 1.3rem;
  border-radius: 1.8rem !important;
}

.current-week-jump strong {
  font-size: clamp(1.06rem, 1.8vw, 1.28rem) !important;
  line-height: 1.12;
}

.current-week-jump span {
  font-size: clamp(0.88rem, 1.15vw, 0.98rem);
  line-height: 1.36;
  color: rgba(10, 43, 99, 0.72);
}

/* Full-bleed footer artwork with the legal copy positioned to the right of the bear. */
.app-footer {
  position: relative;
  isolation: isolate;
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  width: 100vw !important;
  max-width: none !important;
  height: auto !important;
  aspect-ratio: 2172 / 724;
  min-height: 0 !important;
  margin: 1.45rem calc(50% - 50vw) 0 !important;
  padding: 0 !important;
  overflow: hidden;
  background: url("../brand-footer.jpeg") center center / 100% 100% no-repeat !important;
}

.app-footer::before,
.app-footer-rule,
.app-footer-brand {
  display: none !important;
}

.app-footer-inner {
  width: min(52rem, 57vw) !important;
  margin: 0 max(1.1rem, calc((100vw - 1450px) / 2 + 1.1rem)) 0 auto !important;
  padding: clamp(0.7rem, 1.6vw, 1.35rem) !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.app-footer-copy {
  display: grid !important;
  gap: 0.38rem !important;
  align-content: center;
  justify-items: start;
  text-align: left;
}

.app-footer-copy span,
.app-footer-copy small {
  max-width: 100%;
  color: rgba(10, 43, 99, 0.84) !important;
  font-weight: 760 !important;
  line-height: 1.35;
  text-wrap: balance;
}

.app-footer-copy span:first-child {
  color: #0a2b63 !important;
  font-weight: 900 !important;
}

/* Login / registration: the supplied artwork is a real hero above the form card. */
.auth-shell {
  position: relative;
  width: min(1510px, calc(100% - 2rem)) !important;
  min-height: 100svh !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: clamp(1rem, 2.5vw, 2rem) !important;
  padding: 0 0 clamp(2rem, 5vw, 4rem) !important;
}

.auth-shell::before,
.auth-shell::after {
  display: none !important;
}

.auth-hero {
  position: relative;
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  width: 100vw !important;
  max-width: none !important;
  height: auto !important;
  aspect-ratio: 1536 / 864;
  min-height: 0 !important;
  margin: 0 calc(50% - 50vw) 0 !important;
  padding: clamp(1.15rem, 3.2vw, 3.2rem) max(1.1rem, calc((100vw - 1450px) / 2 + 1.1rem)) !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: 0 !important;
  background: url("../brand-auth.jpeg") center center / 100% 100% no-repeat !important;
  text-align: left !important;
}

.auth-hero::before,
.auth-logo-banner,
.auth-feature-pills {
  display: none !important;
}

.auth-hero h1,
.auth-hero > p:not(.eyebrow) {
  width: min(42rem, 46vw) !important;
  max-width: min(42rem, 46vw) !important;
  margin-right: clamp(0rem, 1vw, 1rem);
  margin-left: 0 !important;
  text-align: left !important;
  text-shadow: 0 10px 26px rgba(255, 255, 255, 0.96);
}

.auth-hero h1 {
  margin-top: 0 !important;
  margin-bottom: 0.55rem !important;
  font-size: clamp(2.1rem, 4.1vw, 4.4rem) !important;
  line-height: 0.98 !important;
  letter-spacing: -0.067em !important;
}

.auth-hero > p:not(.eyebrow) {
  font-size: clamp(1rem, 1.55vw, 1.22rem) !important;
  line-height: 1.48;
  font-weight: 760 !important;
  color: rgba(10, 43, 99, 0.84) !important;
}

.auth-shell > .surface.card {
  width: min(46rem, calc(100vw - 2rem)) !important;
  margin: 0 auto !important;
  padding: clamp(1.18rem, 2.8vw, 2.3rem) !important;
  border-radius: 2.25rem !important;
}

.auth-shell .card-head {
  gap: 0.42rem;
}

.auth-shell .card-head h2 {
  letter-spacing: -0.045em;
}

.auth-shell input {
  background: rgba(255, 255, 255, 0.96) !important;
}

/* Keep the side navigation premium but remove the now-redundant Help entry through JSX changes. */
.drawer-menu-summary .menu-label span {
  max-width: 22rem;
}

@media (max-width: 1180px) {
  .header-help-link {
    right: 6.7rem;
  }

  .topbar-actions {
    right: 0.9rem;
  }

  .topbar .sync-chip {
    display: none !important;
  }

  .app-footer-inner {
    width: min(54rem, 61vw) !important;
    margin-right: 1rem !important;
  }

  .auth-hero h1,
  .auth-hero > p:not(.eyebrow) {
    width: min(38rem, 48vw) !important;
    max-width: min(38rem, 48vw) !important;
  }
}

@media (max-width: 900px) {
  .topbar {
    margin-bottom: 1rem !important;
  }

  .header-help-link {
    top: 0.72rem;
    right: 5.85rem;
    min-height: 2.35rem;
    padding-inline: 0.82rem;
    font-size: 0.86rem;
  }

  .topbar-actions {
    top: 0.72rem;
    right: 0.72rem;
  }

  .topbar-actions .icon-pill {
    width: 2.78rem !important;
    height: 2.78rem !important;
    min-width: 2.78rem;
    min-height: 2.78rem;
  }

  .greeting-week-row {
    grid-template-columns: 1fr !important;
    gap: 0.8rem !important;
  }

  .personal-greeting.surface {
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
  }

  .current-week-jump {
    min-height: 6.8rem;
  }

  .app-footer-copy span,
  .app-footer-copy small {
    font-size: 0.83rem;
  }

  .auth-hero h1,
  .auth-hero > p:not(.eyebrow) {
    width: min(24rem, 48vw) !important;
    max-width: min(24rem, 48vw) !important;
  }

  .auth-hero h1 {
    font-size: clamp(1.45rem, 4.7vw, 2.5rem) !important;
  }

  .auth-hero > p:not(.eyebrow) {
    font-size: clamp(0.78rem, 2.05vw, 1.02rem) !important;
    line-height: 1.38;
  }
}

@media (max-width: 620px) {
  .app-shell {
    width: min(100% - 1rem, 100%);
  }

  .topbar {
    aspect-ratio: 1536 / 614;
  }

  .header-help-link {
    top: 0.5rem;
    right: 4.85rem;
    min-height: 2.05rem;
    padding: 0.42rem 0.68rem;
    font-size: 0.75rem;
  }

  .topbar-actions {
    top: 0.5rem;
    right: 0.5rem;
  }

  .topbar-actions .icon-pill {
    width: 2.42rem !important;
    height: 2.42rem !important;
    min-width: 2.42rem;
    min-height: 2.42rem;
    border-radius: 0.88rem !important;
  }

  .topbar-actions .toolbar-icon-img {
    width: 1.08rem;
    height: 1.08rem;
  }

  .personal-greeting h1 {
    font-size: clamp(1.7rem, 8vw, 2.35rem) !important;
  }

  .current-week-jump {
    min-height: 6.35rem;
    padding: 1rem 1.05rem;
  }

  .app-footer {
    min-height: 11.2rem !important;
    aspect-ratio: auto;
    background-color: #eaf5ff !important;
    background-size: 100% 100% !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
  }

  .app-footer-inner {
    width: 61vw !important;
    margin-right: 0.65rem !important;
    padding: 0.45rem !important;
  }

  .app-footer-copy {
    gap: 0.24rem !important;
    transform: translateY(-0.5rem);
  }

  .app-footer-copy span,
  .app-footer-copy small {
    font-size: 0.68rem;
    line-height: 1.28;
  }

  .auth-shell {
    width: min(100% - 1rem, 100%) !important;
    gap: 0.9rem !important;
  }

  .auth-hero {
    min-height: 15rem !important;
    aspect-ratio: auto;
    background-size: cover !important;
    background-position: center center !important;
    justify-content: center;
    padding: 1rem 0.75rem !important;
  }

  .auth-hero h1,
  .auth-hero > p:not(.eyebrow) {
    width: 49vw !important;
    max-width: 49vw !important;
    margin-right: 0 !important;
  }

  .auth-hero h1 {
    margin-bottom: 0.35rem !important;
    font-size: clamp(1.35rem, 6.3vw, 1.95rem) !important;
  }

  .auth-hero > p:not(.eyebrow) {
    font-size: 0.76rem !important;
    line-height: 1.34;
  }

  .auth-shell > .surface.card {
    width: calc(100vw - 1rem) !important;
    border-radius: 1.7rem !important;
  }
}

/* --- Header settings trigger restored + persistent booking FAB hardening --- */
.header-settings-button {
  position: absolute !important;
  z-index: 4;
  top: clamp(0.72rem, 1.45vw, 1.25rem);
  left: max(1rem, calc((100vw - 1450px) / 2 + 1rem));
  width: 3rem !important;
  height: 3rem !important;
  min-width: 3rem;
  min-height: 3rem;
  margin: 0 !important;
  border-radius: 1.05rem !important;
  border-color: rgba(255, 255, 255, 0.76) !important;
  background: rgba(255, 255, 255, 0.74) !important;
  box-shadow: 0 16px 34px rgba(11, 63, 153, 0.14) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.12);
  backdrop-filter: blur(18px) saturate(1.12);
}

.header-settings-button::before {
  display: none !important;
}

.header-settings-button .toolbar-icon-img {
  width: 1.28rem;
  height: 1.28rem;
}

.header-settings-button:hover {
  transform: translateY(-2px);
}

.fab {
  position: fixed !important;
  z-index: 240 !important;
  right: max(1rem, calc((100vw - min(1450px, calc(100% - 2rem))) / 2));
  bottom: max(1.2rem, calc(env(safe-area-inset-bottom, 0px) + 1rem)) !important;
  display: inline-grid !important;
  place-items: center !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.fab-menu {
  position: fixed !important;
  z-index: 239 !important;
  right: max(1rem, calc((100vw - min(1450px, calc(100% - 2rem))) / 2));
  bottom: max(6rem, calc(env(safe-area-inset-bottom, 0px) + 5.8rem)) !important;
}

@media (max-width: 1180px) {
  .header-settings-button {
    left: 0.9rem;
  }

  .fab {
    right: 1rem !important;
    bottom: max(1.2rem, calc(env(safe-area-inset-bottom, 0px) + 1rem)) !important;
  }

  .fab-menu {
    right: 1rem !important;
    bottom: max(6rem, calc(env(safe-area-inset-bottom, 0px) + 5.8rem)) !important;
  }
}

@media (max-width: 900px) {
  .header-settings-button {
    top: 0.72rem;
    left: 0.72rem;
    width: 2.78rem !important;
    height: 2.78rem !important;
    min-width: 2.78rem;
    min-height: 2.78rem;
  }
}

@media (max-width: 620px) {
  .header-settings-button {
    top: 0.5rem;
    left: 0.5rem;
    width: 2.42rem !important;
    height: 2.42rem !important;
    min-width: 2.42rem;
    min-height: 2.42rem;
    border-radius: 0.88rem !important;
  }

  .header-settings-button .toolbar-icon-img {
    width: 1.08rem;
    height: 1.08rem;
  }

  .fab {
    right: max(0.85rem, env(safe-area-inset-right, 0px)) !important;
    bottom: max(1rem, calc(env(safe-area-inset-bottom, 0px) + 0.9rem)) !important;
  }

  .fab-menu {
    right: max(0.85rem, env(safe-area-inset-right, 0px)) !important;
    bottom: max(5.8rem, calc(env(safe-area-inset-bottom, 0px) + 5.5rem)) !important;
  }
}


/* --- Final correction pass — proportional footer + centered mobile greeting --- */
.app-footer {
  /* Preserve the supplied 3:1 footer artwork exactly; scale only proportionally. */
  aspect-ratio: 2172 / 724 !important;
  min-height: 0 !important;
  height: auto !important;
  background-image: url("../brand-footer.jpeg") !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-size: 100% 100% !important;
}

@media (max-width: 620px) {
  .app-footer {
    aspect-ratio: 2172 / 724 !important;
    min-height: 0 !important;
    height: auto !important;
    background-size: 100% 100% !important;
  }

  .personal-greeting.surface {
    width: 100% !important;
    justify-items: center !important;
    align-content: center !important;
    text-align: center !important;
  }

  .personal-greeting h1,
  .personal-greeting p {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
  }
}


/* --- Persistent FAB viewport fix — prevent transformed app shell from becoming a fixed-position containing block --- */
.app-shell {
  animation: debitbaseRevealOpacity 480ms ease both !important;
  transform: none !important;
}

@keyframes debitbaseRevealOpacity {
  from { opacity: 0; }
  to { opacity: 1; }
}


/* --- Mobile footer text fit after proportional artwork correction --- */
@media (max-width: 620px) {
  .app-footer-inner {
    padding: 0.32rem !important;
  }

  .app-footer-copy {
    transform: none !important;
  }
}

/* --- Menu order, header labels, compact footer, calendar week CTA, timed greeting polish --- */
.header-action-button {
  width: 4.85rem !important;
  min-width: 4.85rem !important;
  height: 3.34rem !important;
  min-height: 3.34rem !important;
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.12rem !important;
  padding: 0.28rem 0.34rem !important;
  line-height: 1 !important;
}

.header-action-button .toolbar-icon-img {
  width: 1.18rem !important;
  height: 1.18rem !important;
  flex: 0 0 auto;
}

.header-action-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #0a2b63;
  font-size: 0.59rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.05;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-help-link {
  right: max(9.55rem, calc((100vw - 1450px) / 2 + 9.55rem));
}

.current-week-jump {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  column-gap: 0.72rem !important;
}

.current-week-jump .week-jump-icon {
  grid-row: 1 / span 2;
  width: 2.55rem;
  height: 2.55rem;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(20, 124, 255, 0.28);
  border-radius: 0.94rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(220, 237, 255, 0.92));
  box-shadow: 0 12px 24px rgba(11, 63, 153, 0.12);
}

.current-week-jump .week-jump-icon svg {
  width: 1.3rem;
  height: 1.3rem;
  fill: #0b63db;
}

.current-week-jump strong,
.current-week-jump span {
  grid-column: 2;
}

.period-drawer-body.debitbase-right-menu-refined {
  display: grid !important;
  grid-template-columns: 1fr !important;
  align-content: start !important;
  gap: 0.78rem !important;
}

.debitbase-right-menu-refined .drawer-date-copy { order: 1; }
.debitbase-right-menu-refined .drawer-order-date { order: 2; }
.debitbase-right-menu-refined .drawer-order-confirm { order: 3; }
.debitbase-right-menu-refined .drawer-nav-copy { order: 4; }
.debitbase-right-menu-refined .drawer-order-navigation { order: 5; }
.debitbase-right-menu-refined .drawer-weeks-copy { order: 6; }
.debitbase-right-menu-refined .drawer-order-weeks { order: 7; }
.debitbase-right-menu-refined .drawer-order-ranges { order: 8; }

.drawer-editorial-block {
  display: grid;
  gap: 0.18rem;
  padding: 0.72rem 0.82rem;
  border: 1px solid rgba(116, 161, 216, 0.28);
  border-radius: 1.1rem;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(233, 245, 255, 0.86));
  box-shadow: 0 14px 28px rgba(17, 72, 149, 0.08);
}

.drawer-editorial-title {
  margin: 0;
  color: #0a2b63;
  font-size: 0.96rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.drawer-editorial-copy {
  margin: 0;
  color: #567093;
  font-size: 0.78rem;
  font-weight: 680;
  line-height: 1.36;
}

.drawer-summary-hidden {
  display: none !important;
}

.debitbase-right-menu-refined .drawer-toggle-group {
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
}

.ordered-drawer-navigation {
  display: grid !important;
  gap: 0.46rem !important;
  padding-top: 0 !important;
}

.ordered-drawer-navigation .ordered-menu-item {
  order: var(--menu-order, 99);
}

.ordered-drawer-navigation .drawer-menu-item-removed {
  display: none !important;
}

.ordered-drawer-navigation .drawer-menu-item {
  border-radius: 1.18rem !important;
}

.ordered-drawer-navigation .menu-label > span:not(.drawer-menu-item-main) {
  font-size: 0.76rem !important;
  line-height: 1.28 !important;
}

.debitbase-right-menu-refined .period-controls {
  grid-template-columns: 1fr !important;
  gap: 0.62rem !important;
}

.debitbase-right-menu-refined .period-controls label {
  gap: 0.34rem !important;
}

.debitbase-right-menu-refined .period-confirm-button {
  min-height: 3rem !important;
  border-radius: 1.08rem !important;
  font-weight: 900 !important;
}

.debitbase-right-menu-refined .week-selector-grid {
  margin-top: 0 !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 0.62rem !important;
}

.debitbase-right-menu-refined .week-choice {
  min-width: 0;
  gap: 0.22rem !important;
  padding: 0.78rem !important;
}

.debitbase-right-menu-refined .week-choice strong {
  font-size: 0.92rem !important;
  line-height: 1.12 !important;
}

.debitbase-right-menu-refined .week-choice span {
  font-size: 0.72rem !important;
  line-height: 1.28 !important;
}

.debitbase-right-menu-refined .week-choice em {
  font-size: 0.72rem !important;
  line-height: 1.2 !important;
}

@media (max-width: 900px) {
  .header-action-button {
    width: 4.45rem !important;
    min-width: 4.45rem !important;
    height: 3.08rem !important;
    min-height: 3.08rem !important;
  }

  .header-help-link {
    right: 9.2rem !important;
  }
}

@media (max-width: 620px) {
  .header-action-button {
    width: 4.1rem !important;
    min-width: 4.1rem !important;
    height: 2.92rem !important;
    min-height: 2.92rem !important;
    gap: 0.08rem !important;
    padding: 0.22rem 0.24rem !important;
  }

  .header-action-button .toolbar-icon-img {
    width: 1.02rem !important;
    height: 1.02rem !important;
  }

  .header-action-label {
    font-size: 0.54rem;
  }

  .header-help-link {
    right: 8.62rem !important;
    min-height: 2.14rem !important;
    padding: 0.45rem 0.72rem !important;
    font-size: 0.78rem !important;
  }

  .topbar-actions {
    gap: 0.42rem !important;
  }

  .topbar .sync-chip {
    width: 2.42rem !important;
    height: 2.42rem !important;
    min-width: 2.42rem !important;
    min-height: 2.42rem !important;
  }

  .current-week-jump {
    column-gap: 0.58rem !important;
  }

  .current-week-jump .week-jump-icon {
    width: 2.28rem;
    height: 2.28rem;
    border-radius: 0.82rem;
  }

  .current-week-jump .week-jump-icon svg {
    width: 1.12rem;
    height: 1.12rem;
  }

  /* Approved improvement: footer copy is more compact, while the artwork itself stays proportional. */
  .app-footer-inner {
    padding: 0.22rem 0.26rem !important;
  }

  .app-footer-copy {
    width: min(64%, 14.6rem) !important;
    max-width: min(64%, 14.6rem) !important;
    gap: 0.08rem !important;
    margin-left: auto !important;
    transform: translateY(-0.03rem) !important;
  }

  .app-footer-copy span,
  .app-footer-copy small {
    font-size: 0.58rem !important;
    line-height: 1.12 !important;
    letter-spacing: -0.01em !important;
  }

  .app-footer-copy span:first-child {
    font-size: 0.61rem !important;
    line-height: 1.08 !important;
  }

  .drawer-editorial-block {
    padding: 0.64rem 0.72rem;
    border-radius: 1rem;
  }

  .drawer-editorial-title {
    font-size: 0.92rem;
  }

  .drawer-editorial-copy {
    font-size: 0.74rem;
  }

  .debitbase-right-menu-refined .week-choice {
    padding: 0.68rem !important;
  }
}
