/* ==========================================================
   Budget App v11 — macOS+iOS Apple Silver Hybrid
   - все узгоджено з app.js v11
   - мобільний вигляд + вікно по центру на десктопі
   - темна тема
   - збережено всі попередні класи
========================================================== */

/* --- Root variables --- */
:root {
  --bg: radial-gradient(circle at 20% 20%, #eef1f5 0%, #dbe1e7 40%, #f5f6f8 100%);
  --card-bg: rgba(255,255,255,0.85);
  --card-border: rgba(255,255,255,0.6);
  --primary: #007aff;
  --text: #0f172a;
  --muted: #8e8e93;
  --danger: #ff3b30;
  --radius: 18px;
  --shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
  --transition: all 0.25s ease;
  --success: #34c759;
  --surface: rgba(255,255,255,0.55);
}

[data-theme="dark"] {
  --bg: radial-gradient(circle at 0% 0%, #1f2933 0%, #16181f 60%, #0f1015 100%);
  --card-bg: rgba(33,33,35,0.85);
  --card-border: rgba(255,255,255,0.02);
  --text: #f5f5f6;
  --muted: #a1a1a5;
  --shadow: 0 12px 30px rgba(0,0,0,0.25);
  --surface: rgba(30,30,33,0.35);
}

/* --- Base setup --- */
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  background-attachment: fixed;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  height: 100%;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

.bg { background: transparent; }

/* --- App shell --- */
.app-shell {
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  background: transparent;
  animation: fadeIn 0.3s ease;
}

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

/* --- Page animation (for pageRoot) --- */
.page {
  opacity: 1;
  transform: translateY(0);
}
.page-enter {
  opacity: 0;
  transform: translateY(6px);
}
.page-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity .25s ease, transform .25s ease;
}

/* --- HEADER --- */
.topbar {
  position: sticky;
  top: 0;
  background: rgba(247,248,250,0.5);
  backdrop-filter: blur(18px);
  padding: 14px 18px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 500;
  transition: var(--transition);
  z-index: 10;
  border-bottom: 1px solid rgba(255,255,255,0.4);
}
[data-theme="dark"] .topbar {
  background: rgba(27,27,28,0.45);
  border-bottom-color: rgba(255,255,255,0.03);
}
.topbar.scrolled {
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.budget-picker-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 999px;
  padding: 5px 12px 5px 10px;
  backdrop-filter: blur(6px);
}
[data-theme="dark"] .budget-picker-trigger {
  background: rgba(0,0,0,0.2);
  border-color: rgba(255,255,255,0.06);
}
.budget-name { font-weight: 600; }
.chevron { opacity: .5; font-size: 12px; }

.user-pill {
  background: linear-gradient(180deg,#007aff 0%,#0062c4 100%);
  color: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 6px 12px rgba(0,122,255,0.25);
}

.plan-pill {
  display: inline-block;
  background: rgba(0,122,255,0.08);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  margin-top: 6px;
}
[data-theme="dark"] .plan-pill {
  background: rgba(10,132,255,0.12);
  color: #0a84ff;
}

/* --- CONTENT --- */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.08) transparent;
  -webkit-overflow-scrolling: touch;
padding-bottom: 100px;
}
.content::-webkit-scrollbar { width: 5px; }
.content::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.08);
  border-radius: 999px;
}

.section-title {
  font-weight: 600;
  margin-bottom: 6px;
}
.section-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-top: -2px;
  margin-bottom: 10px;
  line-height: 1.4;
}

/* --- CARD --- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
  transition: var(--transition);
  backdrop-filter: blur(14px);
}
.card:hover { transform: translateY(-1px); }

/* --- STORIES (categories) --- */
.stories {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 6px 0 4px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.stories::-webkit-scrollbar { display: none; }

.story {
  min-width: 72px;
  flex-shrink: 0;
  border: none;
  background: none;
  scroll-snap-align: start;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.story-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: rgba(242,243,245,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  margin: 0 auto 5px;
  transition: var(--transition);
  box-shadow: 0 4px 8px rgba(0,0,0,0.03);
  border: 1px solid rgba(255,255,255,0.3);
}
[data-theme="dark"] .story-icon {
  background: rgba(51,51,54,0.8);
  border-color: rgba(255,255,255,0.03);
}
.story.active .story-icon {
  background: linear-gradient(180deg,var(--primary) 0%,#005ddd 100%);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(0,122,255,0.25);
}
.story-title {
  font-size: 12px;
  color: var(--text);
  max-width: 70px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- AMOUNT --- */
.amount-input {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 34px;
  font-weight: 600;
  margin: 14px 0 10px;
  letter-spacing: -0.2px;
}
.amount-input span {
  color: var(--primary);
  margin-right: 6px;
}
.amount-input input {
  font-size: 34px;
  border: none;
  outline: none;
  background: none;
  width: 160px;
  text-align: left;
  font-weight: 600;
  -webkit-text-size-adjust: 100%;
  color: var(--text);
  transition: .25s ease;
}
.amount-input input:focus { transform: scale(1.02); }

/* --- NUMPAD --- */
.numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.numpad button {
  padding: 14px 0;
  font-size: 18px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.6);
  background: rgba(242,243,245,0.55);
  transition: var(--transition);
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.numpad button.primary {
  background: linear-gradient(180deg,#007aff 0%,#0060d1 100%);
  border-color: rgba(0,122,255,0.1);
  color: #fff;
  box-shadow: 0 10px 16px rgba(0,122,255,0.2);
}
.numpad button.secondary {
  background: rgba(255,239,239,0.7);
  border-color: rgba(255,0,0,0.03);
}
.numpad button:active { transform: scale(.985); }
[data-theme="dark"] .numpad button {
  background: rgba(58,58,61,0.55);
  border-color: rgba(255,255,255,0.01);
  color:#fff;
}

/* --- DATE QUICK --- */
.date-quick {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.date-btn {
  flex: 1;
  background: rgba(244,245,247,0.8);
  border: 1px solid rgba(255,255,255,0.7);
  border-radius: 999px;
  padding: 7px 0;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  font-size: 13px;
}
.date-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: rgba(0,0,0,0);
}
[data-theme="dark"] .date-btn {
  background: rgba(58,58,60,0.7);
  color:#fff;
  border-color: rgba(255,255,255,0.02);
}

/* --- NOTE --- */
.note {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(13, 18, 22, 0.04);
  padding: 8px 12px;
  font-family: inherit;
  resize: none;
  margin-top: 8px;
  background: rgba(248,249,251,0.3);
  transition: var(--transition);
}
[data-theme="dark"] .note {
  background: rgba(44,44,46,0.6);
  border-color: rgba(255,255,255,0.018);
  color:#fff;
}

/* --- BUTTONS --- */
.btn {
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 15px;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.btn.primary { background: var(--primary); color: #fff; }
.btn.ghost {
  background: rgba(242,243,245,0.1);
  border: 1px solid rgba(15,23,42,0.04);
  color: inherit;
}
.btn.small { font-size: 13px; padding: 6px 10px; }
.btn.danger { background: var(--danger); color: #fff; }
[data-theme="dark"] .btn.ghost {
  border-color: rgba(255,255,255,0.02);
  background: rgba(43,43,43,0.25);
  color:#fff;
}

/* --- TRANSACTIONS --- */
.tx-list { list-style: none; margin: 0; padding: 0; }
.tx-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(15,23,42,0.018);
  cursor: pointer;
}
.tx-left { display: flex; gap: 10px; align-items: center; }
.tx-icon.bubble {
  width: 38px; height: 38px;
  background: rgba(242,243,245,0.9);
  border-radius: 14px;
  display:flex;align-items:center;justify-content:center;
  font-size: 20px;
  border: 1px solid rgba(255,255,255,0.5);
}
[data-theme="dark"] .tx-icon.bubble {
  background: rgba(58,58,60,0.6);
  border-color: rgba(255,255,255,0.012);
}
.tx-meta small { display:block; font-size:11px; color:var(--muted); }
.plus { color: #34c759; font-weight: 600; }
.minus { color: var(--danger); font-weight: 600; }
.tx-item .archive-tx {
  background: none;
  border: none;
  cursor: pointer;
  opacity: .45;
  font-size: 16px;
  transition: .2s;
}
.tx-item:hover .archive-tx { opacity:1; transform: scale(1.05); }

/* --- SIMPLE LIST --- */
.simple-list { list-style:none;margin:0;padding:0; }
.simple-item {
  display:flex;justify-content:space-between;align-items:center;
  gap: 10px;
  padding:10px 0;
  border-bottom:1px solid rgba(0,0,0,0.04);
  cursor:pointer;
}
.simple-item.active { color:var(--primary); }
.icon-btn {
  background:none;
  border:none;
  font-size:16px;
  margin-left:6px;
  cursor:pointer;
  opacity: .6;
  transition: .2s;
}
.icon-btn:hover { opacity: 1; }

/* --- FORM ELEMENTS --- */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  background: rgba(248,249,251,0.45);
  border: 1px solid rgba(0,0,0,0.035);
  border-radius: 12px;
  padding: 10px 14px;
  transition: all 0.2s ease;
  color: var(--text);
  outline: none;
  box-sizing: border-box;
  appearance: none;
  backdrop-filter: blur(8px);
}
input:hover, select:hover, textarea:hover {
  background: rgba(255,255,255,0.85);
  border-color: rgba(0,0,0,0.15);
}
input:focus, select:focus, textarea:focus {
  background: rgba(255,255,255,1);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,122,255,0.12);
}
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: rgba(44,44,46,0.6);
  border-color: rgba(255,255,255,0.017);
  color:#fff;
}

/* --- MODALS (sheet) --- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: none;
  justify-content: center;
  align-items: flex-end;
  z-index: 100;
  transition: var(--transition);
}
.modal.show { display: flex; }
.modal-content.sheet {
  background: var(--card-bg);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
  padding: 20px;
  width: 100%;
  max-width: 420px;
  animation: slideUp .25s ease;
  border: 1px solid var(--card-border);
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.modal-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* --- TOAST --- */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15,23,42,0.9);
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 13px;
  z-index: 1000;
  backdrop-filter: blur(8px);
}
.toast.show { opacity: 1; }

/* --- Settings tabs --- */
.settings-tabs,
#tabs {
  display:flex;
  gap:8px;
  margin-bottom:12px;
}
.settings-tabs button,
#tabs button {
  flex:1;
  padding:7px 0;
  border:none;
  border-radius:10px;
  background: rgba(242,243,245,0.1);
  color:#555;
  font-weight:500;
  transition:all .25s ease;
}
[data-theme="dark"] .settings-tabs button,
[data-theme="dark"] #tabs button {
  background: rgba(53,53,56,0.4);
  color:#fff;
}
.settings-tabs button.active,
#tabs button.active {
  background: var(--primary);
  color:white;
  box-shadow:0 2px 6px rgba(0,122,255,0.4);
}

/* show only first tab at start (budgets) */
.settings-tab-panel {
  display: none;
}
.settings-tab-panel[data-panel="budgets"] {
  display: block;
}

/* --- Sortable --- */
.sortable .simple-item {
  cursor:grab;
  user-select:none;
  transition:transform .2s ease, background .2s;
}
.sortable .simple-item.dragging {
  opacity:.6;
  transform:scale(1.02);
  background: rgba(247,247,248,0.6);
}
[data-theme="dark"] .sortable .simple-item.dragging {
  background: rgba(51,51,54,0.3);
}

/* --- BOTTOM NAV --- */
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;

  width: calc(100% - 32px);
  max-width: 380px;

  display: flex;
  justify-content: space-around;
  align-items: center;

  padding: 10px 6px;

  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(18px) saturate(160%);

  border-radius: 22px;
  box-shadow:
    0 8px 25px rgba(0,0,0,0.12),
    inset 0 1px 0 rgba(255,255,255,0.6);

  border: 1px solid rgba(255,255,255,0.5);

  z-index: 50;
}
[data-theme="dark"] .bottom-nav {
  background: rgba(44,44,46,0.55);
  border-top-color: rgba(255,255,255,0.02);
}
.bottom-nav a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--muted);
  transition: var(--transition);
}
.bottom-nav a {
  position: relative;
  padding: 6px 12px;
  border-radius: 14px;
  transition: .25s;
}

.bottom-nav a.active {
  color: #fff;
  background: linear-gradient(135deg,#007AFF,#34C759);
  box-shadow: 0 6px 14px rgba(0,122,255,0.35);
}
.bottom-nav span { font-size: 22px; display: block; }
.bottom-nav small { font-size: 12px; }

/* --- FILTER GRID (transactions) --- */
.filter-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}
@media (min-width: 700px) {
  .filter-grid {
    grid-template-columns: repeat(5, 1fr);
    align-items: end;
  }
}
.filter-grid input[type="text"],
.filter-grid select,
.filter-grid input[type="date"] {
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.035);
  padding: 6px 10px;
  font-size: 15px;
  transition: all .2s ease;
  background: rgba(255,255,255,0.6);
}
.filter-grid input:focus,
.filter-grid select:focus {
  border-color: #007aff;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0,122,255,0.1);
}
.tx-list .tx-item {
  gap: 6px;
  padding-right: 6px;
}

/* === IMPORT / EXPORT BANNER === */
.import-export-banner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(0,122,255,0.1), rgba(255,255,255,0.8));
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 22px;
  padding: 18px 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  margin-top: 20px;
  transition: all 0.3s ease;
}
[data-theme="dark"] .import-export-banner {
  background: linear-gradient(135deg, rgba(10,132,255,0.2), rgba(44,44,46,0.9));
  border-color: rgba(255,255,255,0.08);
}
.import-export-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0,0,0,0.08);
}
.banner-content {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.banner-icon {
  font-size: 36px;
  line-height: 1;
  background: rgba(0,122,255,0.1);
  color: var(--primary);
  border-radius: 16px;
  padding: 10px 12px;
  flex-shrink: 0;
}
[data-theme="dark"] .banner-icon {
  background: rgba(10,132,255,0.15);
  color: #0a84ff;
}
.banner-text h3 {
  margin: 0;
  font-weight: 600;
  font-size: 17px;
}
.banner-text p {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}
.banner-actions {

  gap: 10px;
  margin-top: 16px;
}
.fade-in-up {
  animation: fadeInUp 0.4s ease;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Desktop view: app window in center --- */
@media (min-width: 900px) {
  body {
    background: radial-gradient(circle at 20% 0%, #eff3f7 0%, #d8dde4 50%, #eef2f6 100%);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 28px 0 40px;
  }
  .app-shell {
    width: 420px;
    min-height: 90vh;
    border-radius: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: rgba(255,255,255,0.45);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255,255,255,0.35);
  }
  [data-theme="dark"] .app-shell {
    background: rgba(22,22,24,0.2);
    border-color: rgba(255,255,255,0.02);
  }
  .app-shell:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15);
  }
  .topbar {
    border-radius: 28px 28px 0 0;
    padding: 18px 20px 12px;
  }
  .bottom-nav {
    border-radius: 0 0 28px 28px;
    padding: 12px 0;
  }
}
/* ==========================================================
   v12.5 Silver Glass — Archive Modal & Sheet Enhancements
   compatible with settings.php v12.5 and app.js v11.5
========================================================== */

#archiveModal .modal-content.sheet {
  background: var(--surface);
  backdrop-filter: blur(22px) saturate(160%);
  border-radius: 26px 26px 0 0;
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 -10px 30px rgba(0,0,0,0.12);
  padding: 24px 22px 30px;
  animation: slideUpGlass .35s cubic-bezier(.24,.8,.4,1);
  color: var(--text);
}

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

#archiveModal h3.section-title {
  margin-bottom: 10px;
  text-align: center;
  font-weight: 600;
}

#archiveModal h4 {
  margin: 12px 0 6px;
  font-weight: 600;
  font-size: 15px;
  color: var(--primary);
}

#archiveModal .simple-list {
  background: rgba(255,255,255,0.4);
  border-radius: 18px;
  padding: 6px 12px;
  margin-bottom: 10px;
}
[data-theme="dark"] #archiveModal .simple-list {
  background: rgba(44,44,46,0.5);
}

#archiveModal .simple-item {
  padding: 10px 4px;
  border-bottom: 1px solid rgba(0,0,0,0.03);
  border-radius: 10px;
  transition: background .25s ease, transform .25s ease;
}
#archiveModal .simple-item:hover {
  background: rgba(255,255,255,0.45);
  transform: translateY(-1px);
}
[data-theme="dark"] #archiveModal .simple-item:hover {
  background: rgba(58,58,60,0.35);
}

#archiveModal .btn.small {
  background: rgba(0,122,255,0.08);
  border: 1px solid rgba(0,122,255,0.2);
  border-radius: 10px;
  color: var(--primary);
  padding: 4px 8px;
  transition: all .25s ease;
}
#archiveModal .btn.small:hover {
  background: var(--primary);
  color: #fff;
}

#archiveModal .modal-actions {
  margin-top: 18px;
  text-align: center;
}
#archiveModal .btn.ghost {
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 500;
}

/* Fancy backdrop for modal open */
.modal.show {
  background: rgba(10,10,10,0.45);
  backdrop-filter: blur(10px);
}

/* Smooth card transitions and subtle glow */
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.08);
}
[data-theme="dark"] .card:hover {
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

/* Minor spacing improvement under banners */
.import-export-banner {
  margin-bottom: 16px;
}


/* ===ДАШБОАРд === */

    
  /* === NeoGlass Polished === */
  .category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 8px;
  }
  .cat-card {
    background: rgba(255,255,255,0.45);
    border-radius: 16px;
    padding: 14px 10px;
    text-align: center;
    backdrop-filter: blur(10px) saturate(150%);
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 3px 8px rgba(0,0,0,0.05);
    cursor: pointer;
    transition: all .25s ease;
  }
  .cat-card:hover { transform: scale(1.04); }
  .cat-card.active {
    transform: scale(1.05);
    background: linear-gradient(135deg, rgba(0,122,255,0.6), rgba(0,200,120,0.5));
    color: #fff;
  }
  .cat-card .icon {
    font-size: 28px;
    margin-bottom: 6px;
  }
  .cat-card .title {
    font-size: 14px;
    font-weight: 500;
  }

  .amount-input {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 600;
    border-radius: 18px;
    padding: 12px 20px;
    background: rgba(255,255,255,0.35);
    border: 1px solid rgba(0,0,0,0.05);
    backdrop-filter: blur(10px);
    margin: 16px 0;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
  }
  .amount-input input {
    background: transparent;
    border: none;
    outline: none;
    text-align: center;
    font-size: 34px;
    width: 100%;
    font-weight: 600;
  }

  .numpad {
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:8px;
    margin-top:10px;
  }
  .numpad button {
    font-size: 20px;
    font-weight: 500;
    padding: 14px;
    border-radius: 12px;
    background: rgba(255,255,255,0.4);
    transition: all .15s ease;
    border: none;
  }
  .numpad button:hover { background: rgba(255,255,255,0.6); }
  .numpad button.primary {
    background: linear-gradient(90deg, #007AFF, #34C759);
    color: #fff;
  }
  .numpad button.secondary {
    background: rgba(255,90,90,0.2);
    color: #dc2626;
  }

  .date-btn {
    flex:1;
    border:none;
    padding:8px;
    border-radius:10px;
    background:rgba(255,255,255,0.4);
    transition:.2s;
  }
  .date-btn.active {
    background:linear-gradient(90deg,#007AFF,#34C759);
    color:#fff;
  }

  textarea.note {
    margin-top:8px;
    width:100%;
    border-radius:12px;
    border:1px solid rgba(0,0,0,0.05);
    padding:10px;
    background:rgba(255,255,255,0.5);
    backdrop-filter:blur(8px);
    font-size:15px;
  }

  .tx-list .tx-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    transition: background .2s ease;
  }
  /* Прибрати бордер в останнього .tx-item списку */
.tx-list .tx-item:last-child {
    border-bottom: none !important;
}

/* Прибрати бордер у .tx-item перед наступним заголовком дати */
.tx-list .tx-item:has(+ .tx-date-divider) {
    border-bottom: none !important;
}
  .tx-item:hover { background: rgba(255,255,255,0.4); }
  .tx-left {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .tx-icon {
    background: rgba(255,255,255,0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
  }
  .plus { color: #16a34a; font-weight: 600; }
  .minus { color: #dc2626; font-weight: 600; }

  /* === Swipe Categories === */
.category-scroll {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding-bottom: 6px;
  margin: 8px -10px 0;
  padding-left: 10px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; /* для Firefox */
  -ms-overflow-style: none; /* для IE/Edge */
}
.category-scroll::-webkit-scrollbar {
  display: none; /* для Chrome/Safari */
}
.cat-card {
  flex: 0 0 auto;
  scroll-snap-align: start;
  background: rgba(255,255,255,0.45);
  border-radius: 16px;
  padding: 12px 10px;
  text-align: center;
  min-width: 90px;
  backdrop-filter: blur(10px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 3px 8px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: all .25s ease;
}
.cat-card:hover { transform: scale(1.05); }

.cat-card .icon {
  font-size: 26px;
  margin-bottom: 6px;
}
.cat-card .title {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* === Swipe Categories (оновлено) === */
.category-scroll {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 6px 10px 10px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  user-select: none;
  cursor: grab;
}
.category-scroll:active {
  cursor: grabbing;
}
.category-scroll::-webkit-scrollbar { display: none; }
.cat-card {
  flex: 0 0 auto;
  scroll-snap-align: start;
  background: rgba(255,255,255,0.45);
  border-radius: 16px;
  padding: 12px 10px;
  text-align: center;
  min-width: 90px;
  backdrop-filter: blur(10px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 3px 8px rgba(0,0,0,0.05);
  transition: all .25s ease;
}

.cat-card .icon { font-size: 26px; margin-bottom: 6px; }
.cat-card .title {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* === Header layout === */
.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

/* === iOS toggle (оновлений) === */
.type-toggle {
  position: relative;
  display: flex;
  background: rgba(255,255,255,0.5);
  border-radius: 20px;
  padding: 4px;
  width: 90px;
  height: 34px;
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  justify-content: space-between;
  align-items: center;
}
.toggle-btn {
  flex: 1;
  z-index: 2;
  background: none;
  border: none;
  color: #333;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  transition: all .3s ease;
}
.toggle-btn.active { color: #fff; }

.toggle-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 40px;
  height: 26px;
  border-radius: 16px;
  background: linear-gradient(90deg, #007AFF, #34C759);
  transition: all .3s ease;
  z-index: 1;
}

/* Swipe categories (той самий код, без змін) */
/* === Header banner === */
.operation-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.5);
  border-radius: 18px;
  padding: 12px 16px;
  margin-bottom: 12px;
  backdrop-filter: blur(12px);
  box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}
.banner-left {
  flex: 1;
}
.banner-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}
.banner-subtitle {
  margin: 0;
  font-size: 13px;
  color: rgba(0,0,0,0.55);
}

/* === Text toggle (iOS-style) === */
.type-toggle {
  position: relative;
  display: flex;
  background: rgba(255,255,255,0.6);
  border-radius: 20px;
  padding: 4px;
  width: 140px;
  height: 34px;
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
  justify-content: space-between;
  align-items: center;
}
.toggle-btn {
  flex: 1;
  z-index: 2;
  background: none;
  border: none;
  color: #444;
  font-size: 13px;
  font-weight: 600;
  border-radius: 16px;
  padding: 4px 0;
  transition: all .25s ease;
}
.toggle-btn.active { color: #fff; }
.toggle-slider {
  position: absolute;
  top: 8px;
  left: 4px;
  width: 68px;
  height: 26px;
  border-radius: 16px;
  background: linear-gradient(90deg,#007AFF,#34C759);
  transition: all .3s ease;
  z-index: 1;
}

/* === Swipe categories (без змін) === */
.category-scroll {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 6px 10px 10px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  user-select: none;
  cursor: grab;
}
.category-scroll::-webkit-scrollbar { display: none; }
.category-scroll:active { cursor: grabbing; }
.cat-card {
  flex: 0 0 auto;
  scroll-snap-align: start;
  background: rgba(255,255,255,0.45);
  border-radius: 16px;
  padding: 12px 10px;
  text-align: center;
    min-width: 70px;
    max-width: 70px;
  backdrop-filter: blur(10px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 3px 8px rgba(0,0,0,0.05);
  transition: all .25s ease;
}


  .budget-info {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
  }
  .budget-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #888;
    background: rgba(0,0,0,0.05);
    padding: 2px 6px;
    border-radius: 6px;
    margin-bottom: 2px;
    align-self: flex-start;
  }
  .budget-name {
    font-weight: 600;
    font-size: 15px;
  }
  .chevron {
    margin-left: 6px;
    font-size: 16px;
  }




  /* ТРАНЗАКЦІЇ СТОРІНКА  */
  .filter-grid {
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    align-items:center;
  }
  .filter-grid input,
  .filter-grid select {
    flex:1;
    min-width:140px;
  }
  .filter-grid button {
    white-space:nowrap;
  }
  @media(max-width:640px){
    .filter-grid { flex-direction:column; align-items:stretch; }
    .filter-grid input, .filter-grid select { width:100%; }
  }

  .tx-item {
    cursor:pointer;
    transition:background .15s ease;
  }
  .tx-item:hover { background:rgba(255,255,255,0.5); }
  .banner-filter {

  justify-content:space-between;
  align-items:center;
  padding:14px 18px;
  background:rgba(255,255,255,0.7);
  border-radius:16px;
  box-shadow:0 2px 6px rgba(0,0,0,0.05);
}
.banner-filter .banner-content {
 
  align-items:center;
  gap:10px;
}
.banner-filter .banner-icon { font-size:22px; }
.banner-filter .banner-text h3 { margin:0;font-size:16px; }
.banner-filter .banner-text p { margin:0;font-size:13px;color:#666; }
.banner-filter select,
.banner-filter input[type=date],
.banner-filter input[type=text] {
  border:1px solid rgba(0,0,0,0.1);
  border-radius:8px;
  padding:5px 8px;
  background:rgba(255,255,255,0.8);
}
.banner-filter .btn.small { font-size:14px; padding:6px 10px; }
@media(max-width:640px){
  .banner-filter { flex-direction:column; align-items:flex-start; gap:10px; }
  .banner-filter .banner-actions form { width:100%; flex-direction:column; align-items:stretch; }
  .banner-filter input, .banner-filter select, .banner-filter button { width:100%; }
}
.tx-date-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px 0 6px;
  position: relative;
}
.tx-date-divider span {
  background: rgba(255,255,255,0.7);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  color: #444;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.tx-date-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(0,0,0,0.05);
  transform: translateY(-50%);
  z-index: -1;
}


/* СТОРІНКА НАЛАШТУВАННЯ  */

    .settings-tabs {
      display: flex;
      justify-content: center;
      gap: 10px;
      margin-bottom: 16px;
    }
    .settings-tabs button {
      border: none;
      border-radius: 12px;
      padding: 10px 16px;
      background: rgba(255,255,255,0.4);
      font-weight: 500;
      cursor: pointer;
      transition: .2s;
    }
    .settings-tabs button.active {
      background: linear-gradient(90deg,#007AFF,#34C759);
      color: #fff;
    }

    .banner-archive {
      display:flex;
      justify-content:space-between;
      align-items:center;
      background:rgba(255,255,255,0.7);
      border-radius:12px;
      padding:12px 16px;
      margin-bottom:14px;
      backdrop-filter:blur(6px);
    }
    .banner-archive p {
      margin:0;
      font-size:13px;
      color:var(--muted,#555);
    }

    .profile-card {
      background: linear-gradient(135deg, #007aff, #34c759);
      border-radius: 16px;
      padding: 20px;
      color: #fff;
      text-align: center;
      box-shadow: 0 4px 16px rgba(0,0,0,0.1);
      margin-bottom: 16px;
    }
    .profile-card .avatar {
      width:70px;height:70px;border-radius:50%;
      background:rgba(255,255,255,0.25);
      display:flex;align-items:center;justify-content:center;
      font-size:28px;font-weight:700;margin:0 auto 10px;
    }

    .icon-picker {
      display:flex;
      flex-wrap:wrap;
      gap:6px;
      max-height:140px;
      overflow-y:auto;
      background:rgba(255,255,255,0.35);
      border-radius:10px;
      padding:6px;
    }
    .icon-picker button {
      border:none;
      background:rgba(255,255,255,0.5);
      border-radius:8px;
      padding:4px 6px;
      font-size:20px;
      cursor:pointer;
      transition:.15s;
    }
    .icon-picker button.active {
      outline:2px solid #007aff;
      background:#fff;
      transform:scale(1.05);
    }

    .hidden { display:none; }

    .banner-archive a.btn.ghost:hover {
  background:rgba(255,255,255,0.2);
}
/* --- LOGOUT banner --- */
.banner-logout {
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:rgba(230,240,255,0.9); /* трохи темніший, ніж 240,247,255 */
  border:1px solid rgba(0,102,255,0.25); /* більш насичений контур */
  border-radius:12px;
  padding:12px 16px;
  margin-bottom:14px;
  backdrop-filter:blur(6px);
  box-shadow:0 1px 3px rgba(0,0,0,0.04);
}

.banner-logout p {
  margin:0;
  font-size:13px;
  color:#444;
}

.logout-btn {
  border: 1px solid rgba(0,0,0,0.1);
  color: #333;
  background: rgba(255,255,255,0.6);
  transition: background .2s ease, color .2s ease;
}

.logout-btn:hover {
  background: rgba(0,0,0,0.05);
  color: #000;
}



