:root {
  --font: "DM Sans", "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Syne", "Outfit", sans-serif;
  --bg0: #030510;
  --bg1: #0a0f24;
  --glass: rgba(255, 255, 255, 0.07);
  --glass-strong: rgba(255, 255, 255, 0.12);
  --stroke: rgba(255, 255, 255, 0.14);
  --text: #f0f4ff;
  --muted: #8b9cc4;
  --accent: #7c9cff;
  --neon: #5eead4;
  --neon2: #a78bfa;
  --neon3: #f472b6;
  --ok: #34d399;
  --warn: #fb7185;
}
html, body {
  overscroll-behavior-y: none;
}
[data-theme="midnight"] {
  --bg0: #04050d;
  --bg1: #0c1024;
  --accent: #9a8bff;
  --ok: #35d9b2;
}
[data-theme="emerald"] {
  --bg0: #05110e;
  --bg1: #0a2019;
  --accent: #46cc9e;
  --ok: #7af5cb;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  letter-spacing: 0.01em;
  color: var(--text);
  background:
    radial-gradient(ellipse 900px 500px at 15% -5%, rgba(94, 234, 212, 0.14), transparent 55%),
    radial-gradient(ellipse 800px 480px at 95% 10%, rgba(167, 139, 250, 0.12), transparent 50%),
    radial-gradient(ellipse 600px 400px at 50% 100%, rgba(244, 114, 182, 0.08), transparent 45%),
    linear-gradient(185deg, var(--bg1) 0%, var(--bg0) 55%, #02040c 100%);
  min-height: 100vh;
}
.app-shell {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(68px + env(safe-area-inset-bottom));
}
.main-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  position: sticky; top: 0; z-index: 30;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  background: linear-gradient(180deg, rgba(16, 25, 51, 0.72), rgba(16, 25, 51, 0.4));
  border-bottom: 1px solid var(--stroke);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.topbar h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.2px;
  text-shadow: 0 1px 12px rgba(111, 167, 255, 0.25);
}
.topbar-brand {
  color: inherit;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.topbar-brand:hover {
  color: var(--neon);
}
.topbar-tutorial {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.topbar-tutorial:hover {
  color: var(--neon);
  border-color: rgba(94, 234, 212, 0.35);
  background: rgba(94, 234, 212, 0.08);
}
.content {
  padding: 14px;
  display: grid;
  gap: 12px;
}
.card {
  border: 1px solid var(--stroke);
  border-radius: 22px;
  padding: 16px 16px 18px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03));
  box-shadow:
    0 12px 40px rgba(2, 6, 22, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  animation: floatIn 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.card h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.grid-kpi { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.kpi-card p { margin: 0; font-size: 22px; font-weight: 650; }
.kpi-card h3 { margin: 0 0 6px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .6px; }
.income p { color: var(--ok); }
.expense p { color: var(--warn); }
label { display: block; margin: 10px 0 6px; color: var(--muted); font-size: 13px; }
input, select, button, a { min-height: 44px; border-radius: 13px; }
input, select {
  width: 100%;
  border: 1px solid var(--stroke);
  background: rgba(5, 13, 30, 0.5);
  color: var(--text);
  padding: 11px;
}
button {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(145deg, #8b9dff, #5a6fe0 50%, #4f5fd4);
  color: #fff;
  width: 100%;
  margin-top: 12px;
  font-weight: 700;
  font-family: var(--font);
  letter-spacing: 0.02em;
  box-shadow: 0 8px 24px rgba(79, 95, 212, 0.35);
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}
button:hover {
  filter: brightness(1.06);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(79, 95, 212, 0.42);
}
button.danger { background: linear-gradient(150deg, #ff7e7e, #de4e4e); }
.row-actions button.chip { width: auto; margin-top: 0; }
.flash-wrap { display: grid; gap: 8px; }
.flash {
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.flash.error { background: rgba(255, 122, 122, 0.15); border: 1px solid rgba(255, 122, 122, .4); }
.flash.success { background: rgba(37, 214, 151, 0.16); border: 1px solid rgba(37, 214, 151, .38); }
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(560px, 100%);
  z-index: 40;
  background: linear-gradient(180deg, rgba(16, 25, 51, 0.88), rgba(13, 21, 43, 0.94));
  border-top: 1px solid var(--stroke);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
}
.bottom-nav-desktop {
  display: none;
}
.bottom-nav-desktop a {
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  text-align: center;
  padding: 11px 12px;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.bottom-nav-desktop a.is-active {
  background: rgba(94, 234, 212, 0.1);
  border-color: rgba(94, 234, 212, 0.28);
  color: var(--neon);
}
.bottom-nav-mobile-wrap {
  width: 100%;
}
.bottom-nav-quick {
  display: flex;
  gap: 6px;
  width: 100%;
  align-items: stretch;
}
.bottom-nav-quick > a,
.bottom-nav-more-btn {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  padding: 8px 4px;
  border-radius: 14px;
  text-decoration: none;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.15;
  text-align: center;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav-quick-label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bottom-nav-more-icon {
  font-size: 16px;
  line-height: 1;
  opacity: 0.9;
}
.bottom-nav-quick > a.is-active,
.bottom-nav-more-btn.is-active {
  background: rgba(94, 234, 212, 0.12);
  border-color: rgba(94, 234, 212, 0.35);
  color: var(--neon);
}
.bottom-nav-more-btn:active {
  transform: scale(0.98);
}
.bottom-nav-quick button.bottom-nav-more-btn {
  margin-top: 0;
  width: auto;
}
.nav-mobile-backdrop {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: rgba(2, 6, 18, 0.62);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.nav-mobile-backdrop[hidden] {
  display: none !important;
}
.nav-mobile-sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(560px, 100%);
  max-height: min(78vh, 520px);
  z-index: 90;
  display: flex;
  flex-direction: column;
  border-radius: 22px 22px 0 0;
  border: 1px solid var(--stroke);
  border-bottom: none;
  background: linear-gradient(180deg, rgba(22, 30, 54, 0.98), rgba(10, 14, 32, 0.99));
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.5);
  padding-bottom: env(safe-area-inset-bottom);
}
.nav-mobile-sheet[hidden] {
  display: none !important;
}
.nav-mobile-sheet-handle {
  width: 40px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  margin: 10px auto 6px;
}
.nav-mobile-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.nav-mobile-sheet-close {
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.nav-mobile-sheet-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 8px 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-mobile-sheet-scroll a {
  display: block;
  padding: 14px 16px;
  border-radius: 14px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.nav-mobile-sheet-scroll a.is-active {
  background: rgba(94, 234, 212, 0.12);
  border-color: rgba(94, 234, 212, 0.3);
  color: var(--neon);
}
.nav-mobile-sheet-scroll a:active {
  background: rgba(255, 255, 255, 0.08);
}
body.nav-sheet-open {
  overflow: hidden;
  touch-action: none;
}
@media (min-width: 980px) {
  .nav-mobile-backdrop,
  .nav-mobile-sheet {
    display: none !important;
  }
  body.nav-sheet-open {
    overflow: auto;
    touch-action: auto;
  }
}
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.list li { border-bottom: 1px solid rgba(255,255,255,.08); padding-bottom: 8px; }
.list small { color: var(--muted); display: block; margin-top: 2px; }
.progress {
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  height: 8px;
  margin-top: 7px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
}
.progress span { display: block; height: 100%; background: linear-gradient(90deg, #7ab1ff, #25d6ff); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.row-actions { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  min-width: 74px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  padding: 0 10px;
}
.inline-form { display: inline; }
.inline-form .chip { margin-top: 0; width: auto; }
ol { padding-left: 18px; line-height: 1.5; color: var(--muted); }

@keyframes floatIn {
  from { opacity: 0; transform: translateY(7px) scale(0.99); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

/* Таблет: по-широка колона */
@media (min-width: 640px) and (max-width: 979px) {
  .app-shell {
    max-width: 720px;
  }
  .content.content--form-narrow {
    max-width: 460px;
    margin: 0 auto;
    width: 100%;
  }
}

/* Десктоп: странична навигация + основна зона */
@media (min-width: 980px) {
  .app-shell {
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
    gap: 0 32px;
    align-items: start;
    max-width: 1320px;
    margin: 0 auto;
    padding: 28px 32px 40px;
    padding-bottom: 40px;
  }
  .main-area {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }
  .bottom-nav {
    grid-column: 1;
    grid-row: 1;
    position: sticky;
    top: 24px;
    align-self: start;
    transform: none;
    left: auto;
    bottom: auto;
    width: 100%;
    max-width: none;
    padding: 20px 14px;
    border-radius: 20px;
    border: 1px solid var(--stroke);
    background: linear-gradient(165deg, rgba(22, 32, 58, 0.94), rgba(8, 12, 28, 0.9));
    box-shadow:
      0 12px 40px rgba(2, 6, 20, 0.4),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
    box-sizing: border-box;
  }
  .bottom-nav-desktop {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }
  .bottom-nav-mobile-wrap {
    display: none !important;
  }
  .bottom-nav-desktop a {
    text-align: left;
    font-size: 14px;
    white-space: normal;
    line-height: 1.25;
    padding: 12px 14px;
  }
  .topbar {
    position: static;
    border-radius: 18px;
    border: 1px solid var(--stroke);
    margin-bottom: 18px;
    background: linear-gradient(180deg, rgba(18, 28, 52, 0.88), rgba(12, 18, 38, 0.72));
  }
  .topbar h1 {
    font-size: 22px;
  }
  .content {
    padding: 0;
    gap: 16px;
  }
  /* Центрирана колона за прости форми (вход, MFA, грешка) */
  .content.content--form-narrow {
    max-width: 460px;
    margin: 0 auto;
    width: 100%;
  }
  /* Без странично меню (не си влязъл): една колона, центрирана на широк екран */
  .app-shell.app-shell--solo {
    display: block;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
    padding: 28px 20px 40px;
  }
  .app-shell.app-shell--solo .main-area {
    width: 100%;
    min-width: 0;
  }
}

@media (min-width: 640px) {
  .grid-kpi {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Dashboard: две колони графики на широк екран */
@media (min-width: 900px) {
  .dashboard-charts-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: stretch;
  }
  .dashboard-charts-split .chart-panel .chart-wrap {
    height: 260px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* —— PWA: FAB, modals, numpad, charts —— */
.fab-wrap {
  position: fixed;
  right: calc(16px + env(safe-area-inset-right));
  bottom: calc(74px + env(safe-area-inset-bottom));
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}
@media (min-width: 980px) {
  .fab-wrap {
    right: max(24px, calc((100vw - 1320px) / 2 + 24px));
    bottom: 32px;
  }
}
.fab {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 26px;
  line-height: 1;
  color: #041018;
  background: linear-gradient(145deg, var(--neon), #2dd4bf 40%, var(--neon2));
  box-shadow:
    0 0 0 1px rgba(255,255,255,.2),
    0 12px 32px rgba(94, 234, 212, 0.35),
    0 4px 16px rgba(99, 102, 241, 0.25);
}
.fab.secondary {
  width: 48px;
  height: 48px;
  font-size: 20px;
  background: linear-gradient(145deg, #6366f1, #4f46e5);
  color: #fff;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.35);
}
body.modal-open {
  overflow: hidden;
}
@media (max-width: 979px) {
  body.modal-open {
    touch-action: none;
  }
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(4, 8, 20, 0.72);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: end center;
  padding: 12px;
  padding-bottom: env(safe-area-inset-bottom);
}
.modal-backdrop[hidden] {
  display: none;
}
@media (min-width: 980px) {
  .modal-backdrop {
    place-items: center;
    padding: 24px;
    align-content: center;
  }
}
.modal {
  position: relative;
  width: min(100%, 520px);
  max-height: min(92vh, 720px);
  overflow: auto;
  border-radius: 22px 22px 0 0;
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(20, 28, 52, 0.98), rgba(8, 12, 28, 0.98));
  padding: 16px 16px 22px;
  box-shadow: 0 -8px 40px rgba(0,0,0,.45);
}
@media (min-width: 980px) {
  .modal {
    border-radius: 20px;
    width: min(100%, 440px);
    max-height: min(88vh, 680px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  }
}
.modal h2 {
  margin: 0 0 12px;
  font-size: 1.1rem;
  color: var(--neon);
  text-shadow: 0 0 18px rgba(94, 234, 212, 0.35);
}
.modal .close-x {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 40px;
  min-height: 40px;
  margin: 0;
  padding: 0;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
}

/* Модал „бележка“: лоадинг лента */
.receipt-loading {
  margin: 14px 0 16px;
}
.receipt-progress-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.35);
}
.receipt-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    #14b8a6 0%,
    #5eead4 35%,
    #818cf8 70%,
    #a78bfa 100%
  );
  background-size: 200% 100%;
  box-shadow: 0 0 20px rgba(94, 234, 212, 0.45);
  transition: width 0.25s ease-out;
}
.receipt-progress-track.receipt-progress-indeterminate .receipt-progress-bar {
  width: 40% !important;
  animation: receiptProgressShimmer 1.1s ease-in-out infinite;
}
@keyframes receiptProgressShimmer {
  0% {
    transform: translateX(-100%);
    opacity: 0.85;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(350%);
    opacity: 0.85;
  }
}
@media (prefers-reduced-motion: reduce) {
  .receipt-progress-bar {
    transition: none;
  }
  .receipt-progress-track.receipt-progress-indeterminate .receipt-progress-bar {
    animation: none;
    width: 36% !important;
    margin-left: 32%;
  }
}
.receipt-loading-label {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-align: center;
}
.receipt-error {
  margin: 10px 0 0;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.45;
  color: #fecaca;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 12px;
}
.receipt-hint {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.receipt-source-hint {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}
.receipt-source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}
.receipt-pick-btn {
  flex: 1 1 calc(50% - 6px);
  min-height: 48px;
  margin: 0;
  padding: 0 16px;
  border-radius: 12px;
  font-weight: 650;
  font-size: 15px;
  font-family: var(--font);
  cursor: pointer;
  border: 1px solid rgba(94, 234, 212, 0.35);
  background: linear-gradient(145deg, rgba(94, 234, 212, 0.2), rgba(45, 212, 191, 0.12));
  color: var(--text);
  box-shadow: 0 4px 16px rgba(2, 8, 24, 0.35);
  transition: filter 0.15s ease, transform 0.1s ease;
}
.receipt-pick-btn:hover {
  filter: brightness(1.08);
}
.receipt-pick-btn:active {
  transform: scale(0.98);
}
.receipt-pick-btn-secondary {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}
.receipt-file-hidden {
  position: absolute;
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  z-index: -1;
}

.budget-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.budget-bar-label strong {
  color: var(--text);
}
.budget-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
}
.budget-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--neon2), var(--neon));
  box-shadow: 0 0 16px rgba(129, 140, 248, 0.45);
  transition: width 0.4s ease;
}
.chart-wrap {
  position: relative;
  height: 220px;
  margin-top: 8px;
}
.smart-banner {
  border: 1px solid rgba(94, 234, 212, 0.35);
  background: rgba(94, 234, 212, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.smart-banner p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.45;
}
.smart-banner form {
  margin: 0;
}
.smart-banner button {
  margin-top: 0;
  background: linear-gradient(150deg, var(--neon), #14b8a6);
  color: #042f2e;
}
.numpad-display {
  font-family: ui-monospace, monospace;
  font-size: 22px;
  text-align: right;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.12);
  margin-bottom: 10px;
  min-height: 48px;
}
.numpad-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.numpad-grid button {
  margin: 0;
  min-height: 48px;
  font-size: 18px;
  font-weight: 650;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--text);
}
.numpad-grid button:active {
  transform: scale(0.97);
}
.quick-amt-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.quick-amt-row button {
  flex: 1;
  margin: 0;
  min-height: 44px;
  background: rgba(129, 140, 248, 0.2);
  border: 1px solid rgba(129, 140, 248, 0.35);
  color: #e0e7ff;
}
.pwa-toast {
  position: fixed;
  left: 50%;
  bottom: calc(82px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 80;
  max-width: min(92vw, 420px);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(15, 25, 48, 0.92);
  border: 1px solid rgba(94, 234, 212, 0.35);
  font-size: 13px;
  text-align: center;
  box-shadow: 0 8px 28px rgba(0,0,0,.4);
}
.pwa-toast[hidden] {
  display: none;
}
.tx-amount {
  font-variant-numeric: tabular-nums;
}

/* Кеш / карта: етикети и избор */
.pocket-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 4px 11px;
  border-radius: 999px;
  line-height: 1.2;
  vertical-align: middle;
  border: 1px solid transparent;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}
.pocket-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.pocket-badge--cash {
  color: #b8f5e8;
  background: linear-gradient(145deg, rgba(52, 211, 153, 0.2), rgba(94, 234, 212, 0.06));
  border-color: rgba(94, 234, 212, 0.38);
}
.pocket-badge--cash::before {
  background: linear-gradient(145deg, #5eead4, #34d399);
  box-shadow: 0 0 10px rgba(94, 234, 212, 0.45);
}
.pocket-badge--card {
  color: #ddd6fe;
  background: linear-gradient(145deg, rgba(167, 139, 250, 0.22), rgba(124, 156, 255, 0.06));
  border-color: rgba(167, 139, 250, 0.42);
}
.pocket-badge--card::before {
  background: linear-gradient(145deg, #a78bfa, #7c9cff);
  box-shadow: 0 0 10px rgba(167, 139, 250, 0.4);
}
.pocket-badge--sm {
  font-size: 11px;
  padding: 3px 8px;
  gap: 4px;
}
.pocket-badge--sm::before {
  width: 5px;
  height: 5px;
}

.tx-line-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 2px;
}
.tx-line-head .pocket-badge {
  flex-shrink: 0;
}
.tx-line-head strong {
  font-size: 14px;
  text-transform: capitalize;
}
.tx-line-meta {
  color: var(--text);
  font-size: 14px;
  margin: 4px 0 0;
  line-height: 1.35;
}
.tx-line-tag {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.tx-line-note {
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0 0;
  line-height: 1.35;
}
.tx-line-time {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}
.tx-lv-suffix {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.pocket-toggle {
  display: flex;
  padding: 5px;
  gap: 5px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.pocket-toggle__btn {
  flex: 1;
  position: relative;
  margin: 0;
  cursor: pointer;
  min-width: 0;
}
.pocket-toggle__btn input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.pocket-toggle__face {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
  border: 1px solid transparent;
}
.pocket-toggle__btn input:focus-visible + .pocket-toggle__face {
  outline: 2px solid rgba(124, 156, 255, 0.6);
  outline-offset: 2px;
}
.pocket-toggle__btn input:checked + .pocket-toggle__face {
  color: var(--text);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 16px rgba(2, 8, 24, 0.35);
}
.pocket-toggle__btn--cash input:checked + .pocket-toggle__face {
  background: linear-gradient(155deg, rgba(94, 234, 212, 0.18), rgba(52, 211, 153, 0.06));
  border-color: rgba(94, 234, 212, 0.35);
  color: #d1faf3;
}
.pocket-toggle__btn--card input:checked + .pocket-toggle__face {
  background: linear-gradient(155deg, rgba(167, 139, 250, 0.22), rgba(124, 156, 255, 0.08));
  border-color: rgba(167, 139, 250, 0.38);
  color: #ece9fe;
}

/* Flow Sites showreel strip */
.showreel-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  padding: 10px 14px;
  padding-top: max(10px, env(safe-area-inset-top));
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.2), rgba(167, 139, 250, 0.18));
  border-bottom: 1px solid rgba(56, 189, 248, 0.35);
  font-size: 13px;
  z-index: 50;
  position: relative;
}
.showreel-strip--cta {
  background: linear-gradient(90deg, rgba(52, 211, 153, 0.15), rgba(56, 189, 248, 0.12));
}
.showreel-strip-label {
  font-weight: 600;
  color: var(--text);
}
.showreel-strip a {
  color: #7dd3fc;
  text-decoration: none;
  font-weight: 600;
}
.showreel-strip a:hover {
  text-decoration: underline;
}
.showreel-strip-primary {
  color: #6ee7b7 !important;
}
.showreel-strip-muted {
  color: var(--muted) !important;
  font-weight: 500;
}
.flow-btn-showreel {
  box-shadow: 0 0 0 1px rgba(110, 231, 183, 0.35), 0 8px 28px rgba(52, 211, 153, 0.2);
}
.showreel-login-card code {
  font-size: 12px;
  opacity: 0.9;
}

/* Начална страница: стилове в /static/landing.css */
