/* =============================================
   LISTIFY — Modern Dark UI
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #0c0c0c;
  --surface:    #151515;
  --surface-2:  #1e1e1e;
  --surface-3:  #252525;
  --border:     #2b2b2b;
  --border-2:   #383838;
  --accent:     #a8ff78;
  --accent-fg:  #0c0c0c;
  --accent-dim: rgba(168,255,120,0.1);
  --red:        #ff6b6b;
  --red-dim:    rgba(255,107,107,0.1);
  --yellow:     #ffd166;
  --text:       #efefef;
  --text-2:     #888;
  --text-3:     #555;
  --font-head:  'Syne', sans-serif;
  --font-body:  'DM Sans', sans-serif;
  --r:          10px;
  --r-sm:       7px;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  overscroll-behavior-y: contain;
}

/* =============================================
   LAYOUT
   ============================================= */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding-bottom: 24px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 20px 18px;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text);
  flex-shrink: 0;
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
  flex-shrink: 0;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 20px;
}

.sidebar-groups {
  flex: 1;
}

.section-label {
  font-family: var(--font-head);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-3);
  margin-bottom: 2px;
}

/* =============================================
   USER CARD
   ============================================= */
.user-card-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-fg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}

.user-details {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-email {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-inline-link {
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 11px;
  font-family: var(--font-body);
  cursor: pointer;
  padding: 0;
  text-align: left;
  transition: color 0.15s;
}
.btn-inline-link:hover { color: var(--red); }

/* =============================================
   INPUTS
   ============================================= */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
.select-styled {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  padding: 9px 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
}

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

input:focus,
.select-styled:focus {
  border-color: rgba(168,255,120,0.45);
  box-shadow: 0 0 0 3px rgba(168,255,120,0.07);
}

input:disabled,
.select-styled:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.input-narrow {
  width: 80px !important;
  flex-shrink: 0;
}

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

/* =============================================
   BUTTONS
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 16px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
  flex: 1;
}
.btn-primary:hover:not(:disabled) { background: #d0d0d0; }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border-2);
  flex: 1;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface-2);
  color: var(--text);
}

.btn-accent {
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 600;
}
.btn-accent:hover:not(:disabled) { background: #bfff99; }

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border-color: rgba(255,107,107,0.25);
  width: 100%;
}
.btn-danger:hover:not(:disabled) { background: rgba(255,107,107,0.18); }

.btn:disabled { opacity: 0.35; cursor: not-allowed; }

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

/* =============================================
   TOGGLE SWITCH
   ============================================= */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.toggle-checkbox { display: none; }

.toggle-switch {
  width: 34px;
  height: 19px;
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  border-radius: 20px;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  background: var(--text-3);
  border-radius: 50%;
  transition: left 0.2s, background 0.2s;
}

.toggle-checkbox:checked + .toggle-switch {
  background: var(--accent-dim);
  border-color: var(--accent);
}
.toggle-checkbox:checked + .toggle-switch::after {
  left: 17px;
  background: var(--accent);
}

.toggle-text {
  font-size: 13px;
  color: var(--text-2);
}

/* =============================================
   GROUP TABS
   ============================================= */
.group-tabs {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.group-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  padding: 9px 12px;
  color: var(--text-2);
  font-family: var(--font-body);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.group-tab:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}
.group-tab.active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: rgba(168,255,120,0.25);
  font-weight: 500;
}

/* Delete list button inside tab */
.tab-delete-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 0 2px;
  border-radius: 4px;
  display: none;
  transition: color 0.15s;
}
.group-tab:hover .tab-delete-btn,
.group-tab.active .tab-delete-btn {
  display: flex;
}
.tab-delete-btn:hover { color: var(--red); }

.group-tabs-empty {
  font-size: 12px;
  color: var(--text-3);
  padding: 8px 4px;
}

/* =============================================
   MAIN
   ============================================= */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px 16px;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.page-title {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}

.page-subtitle {
  font-size: 12px;
  color: var(--text-3);
}

.topbar .select-styled {
  width: 220px;
}

/* Add Item Bar */
.add-item-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.add-item-bar .select-styled {
  width: auto;
}

/* =============================================
   ITEMS LIST
   ============================================= */
.items-list {
  list-style: none;
  padding: 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
}

.items-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 14px 16px;
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.15s, background 0.15s;
  animation: slideIn 0.2s ease;
}
.items-list li:hover {
  border-color: var(--border-2);
  background: var(--surface-2);
}

.item-name {
  font-weight: 500;
  flex: 1;
  min-width: 0;
}

.item-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  background: var(--surface-3);
  color: var(--text-2);
  border: 1px solid var(--border-2);
  white-space: nowrap;
}

.item-meta {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
}

.item-delete-btn {
  background: none;
  border: none;
  color: var(--text-3);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 4px;
  border-radius: 5px;
  flex-shrink: 0;
  opacity: 0;
  transition: color 0.15s, opacity 0.15s;
}
.items-list li:hover .item-delete-btn { opacity: 1; }
.item-delete-btn:hover { color: var(--red); }

/* =============================================
   EMPTY STATES
   ============================================= */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 32px;
  text-align: center;
  animation: fadeIn 0.3s ease;
}

.empty-icon { opacity: 0.8; }

.empty-title {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-2);
}

.empty-sub {
  font-size: 13px;
  color: var(--text-3);
  max-width: 260px;
}

/* =============================================
   USER INFO (hidden text, still in DOM)
   ============================================= */
.user-info-text {
  font-size: 12px;
  color: var(--text-2);
  min-height: 0;
  display: none; /* We show the user card instead */
}

/* =============================================
   TOAST NOTIFICATIONS
   ============================================= */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: var(--r);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  pointer-events: all;
  animation: toastIn 0.25s ease;
  max-width: 320px;
}

.toast.toast-success { border-color: rgba(168,255,120,0.35); }
.toast.toast-error   { border-color: rgba(255,107,107,0.35); }
.toast.toast-info    { border-color: rgba(100,180,255,0.35); }

.toast-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.toast-success .toast-dot { background: var(--accent); }
.toast-error   .toast-dot { background: var(--red); }
.toast-info    .toast-dot { background: #64b4ff; }

.toast-out {
  animation: toastOut 0.25s ease forwards;
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes slideIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes toastIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(16px); }
}

/* =============================================
   SIDEBAR PULL TAB — hidden on desktop
   ============================================= */
.sidebar-pull-tab {
  display: none;
}

/* =============================================
   MOBILE ADD BAR — hidden on desktop
   ============================================= */
.mobile-add-bar {
  display: none;
}

/* =============================================
   SCROLLBAR
   ============================================= */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 4px; }

/* =============================================
   HAMBURGER & MOBILE SIDEBAR
   ============================================= */

/* Hamburger button — hidden on desktop */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
}
.hamburger-btn:hover {
  background: var(--surface-2);
  border-color: var(--border-2);
}
.hamburger-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* Sidebar close button — hidden on desktop */
.sidebar-close-btn {
  display: none;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-2);
  padding: 6px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.sidebar-close-btn:hover {
  color: var(--text);
  border-color: var(--border-2);
}

/* Backdrop */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.sidebar-backdrop.backdrop-visible {
  opacity: 1;
}

/* =============================================
   MOBILE OVERRIDES  (≤ 700px)
   ============================================= */
@media (max-width: 700px) {

  /* ── Layout ── */
  .app-shell {
    flex-direction: row;
    height: 100dvh;
    overflow: hidden;
  }

  .main {
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    /* leave room at bottom for sticky add bar */
    padding-bottom: 0;
  }

  /* ── Sidebar drawer ── */
  .hamburger-btn       { display: flex; }
  .sidebar-close-btn   { display: flex; z-index: 101; }
  .sidebar-backdrop    { display: block; }

  /* ── Sidebar pull tab — permanent left-edge affordance ── */
  .sidebar-pull-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 101;
    width: 20px;
    height: 52px;
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-left: none;
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    color: var(--text-3);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 8px rgba(0,0,0,0.3);
  }

  .sidebar-pull-tab svg {
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
  }

  /* When sidebar is open, tab shifts right and arrow flips */
  .sidebar-pull-tab.sidebar-open {
    left: min(80vw, 300px);
    color: var(--accent);
    background: var(--surface-2);
  }

  .sidebar-pull-tab.sidebar-open svg {
    transform: rotate(180deg);
  }

  .sidebar-pull-tab:active {
    background: var(--surface-3);
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    width: 80vw;
    max-width: 300px;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid var(--border-2);
    border-bottom: none;
    max-height: unset;
  }

  .sidebar.sidebar-open {
    transform: translateX(0);
  }

  /* ── Topbar ── */
  .topbar {
    padding: 10px 12px;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
    flex-direction: row;
    flex-shrink: 0;
  }

  .topbar-left {
    flex: 1;
    min-width: 0;
  }

  .page-title {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .page-subtitle {
    font-size: 11px;
  }

  /* Hide the list-select dropdown on mobile — sidebar handles it */
  .topbar-select {
    display: none !important;
  }

  /* ── Desktop add-item bar — hidden on mobile ── */
  .add-item-bar-desktop {
    display: none !important;
  }

  /* ── Scrollable middle area ── */
  .list-summary {
    padding: 8px 12px 0;
    flex-shrink: 0;
    max-height: 30vh;
    overflow-y: auto;
  }

  /* Summary totals: compact side-by-side */
  .summary-totals {
    gap: 6px;
  }

  .summary-card {
    padding: 7px 12px;
    border-radius: var(--r-sm);
  }

  .summary-label {
    font-size: 9px;
    letter-spacing: 0.8px;
  }

  .summary-value {
    font-size: 15px;
    letter-spacing: -0.3px;
  }

  /* Category cards: horizontal compact rows */
  .summary-categories {
    flex-direction: column;
    gap: 4px;
  }

  .summary-cat-card {
    min-width: unset;
    padding: 5px 10px;
    gap: 7px;
    border-radius: var(--r-sm);
  }

  .summary-cat-emoji { font-size: 13px; }

  .summary-cat-name {
    font-size: 11px;
  }

  .summary-cat-meta {
    font-size: 10px;
  }

  .summary-cat-price {
    font-size: 11px;
  }

  /* Items list */
  .items-list {
    padding: 8px 12px;
    padding-bottom: 6px;
    overflow-y: auto;
    flex: 1;
    gap: 5px;
    -webkit-overflow-scrolling: touch;
  }

  /* ── Item row — compact ── */
  .items-list li {
    padding: 9px 10px;
    gap: 7px;
    border-radius: var(--r-sm);
    font-size: 13px;
  }

  .item-name {
    font-size: 13px;
  }

  .item-badge {
    font-size: 10px;
    padding: 2px 6px;
  }

  .item-meta {
    font-size: 11px;
  }

  .empty-state {
    flex: 1;
    padding: 30px 20px 100px;
  }

  /* Always show delete button on mobile (no hover) */
  .item-delete-btn {
    opacity: 1 !important;
    padding: 4px 6px;
    font-size: 13px;
  }

  /* ── Mobile sticky add bar ── */
  .mobile-add-bar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border-2);
    padding: 8px 12px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 50;
    flex-shrink: 0;
  }

  .mobile-add-row-main {
    display: flex;
    gap: 6px;
    align-items: center;
  }

  .mobile-add-row-main input {
    font-size: 14px;
    padding: 8px 10px;
  }

  .mobile-add-row-main .btn {
    padding: 8px 14px;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .mobile-add-row-extra {
    display: flex;
    gap: 6px;
    align-items: center;
  }

  .mobile-add-row-extra .select-styled {
    flex: 1;
    font-size: 12px;
    padding: 7px 8px;
  }

  .mobile-add-row-extra .input-narrow {
    width: 60px !important;
    font-size: 12px;
    padding: 7px 8px;
  }

  /* ── Toast ── */
  .toast-container {
    bottom: calc(110px + env(safe-area-inset-bottom));
    right: 16px;
    left: 16px;
  }
  .toast { max-width: 100%; }
}

/* =============================================
   LIST SUMMARY
   ============================================= */
.list-summary {
  padding: 16px 32px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.summary-totals {
  display: flex;
  gap: 10px;
}

.summary-card {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 12px 18px;
}

.summary-card-main {
  flex: 1;
  border-color: rgba(168,255,120,0.2);
  background: var(--accent-dim);
}

.summary-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-3);
  font-family: var(--font-head);
}

.summary-value {
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.5px;
}

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

.summary-cat-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 14px;
  flex: 1;
  min-width: 160px;
  transition: border-color 0.15s;
}
.summary-cat-card:hover { border-color: var(--border-2); }

.summary-cat-emoji {
  font-size: 16px;
  flex-shrink: 0;
}

.summary-cat-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  flex: 1;
  min-width: 0;
}

.summary-cat-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-head);
}

.summary-cat-meta {
  font-size: 11px;
  color: var(--text-3);
}

.summary-cat-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}


/* =============================================
   HAMBURGER & MOBILE SIDEBAR
   ============================================= */

/* Hamburger button — hidden on desktop */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
}
.hamburger-btn:hover {
  background: var(--surface-2);
  border-color: var(--border-2);
}
.hamburger-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* Sidebar close button — hidden on desktop */
.sidebar-close-btn {
  display: none;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  color: var(--text-2);
  padding: 6px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.sidebar-close-btn:hover {
  color: var(--text);
  border-color: var(--border-2);
}

/* Backdrop */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.sidebar-backdrop.backdrop-visible {
  opacity: 1;
}


