/* ─────────────────────────────────────────────────────────────────
   ElectroPagos · Global Stylesheet
   ─────────────────────────────────────────────────────────────────*/

/* ── Reset & Variables ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sidebar-w:   240px;
  --sidebar-bg:  #1a1040;
  --sidebar-bg2: #2d1f6e;
  --accent:      #7c3aed;
  --accent-h:    #6d28d9;
  --accent-lt:   #ede9fe;
  --blue:        #3b82f6;
  --blue-lt:     #dbeafe;
  --green:       #10b981;
  --green-lt:    #d1fae5;
  --red:         #ef4444;
  --red-lt:      #fee2e2;
  --orange:      #f97316;
  --orange-lt:   #ffedd5;
  --yellow:      #f59e0b;

  --bg:          #f1f5f9;
  --card:        #ffffff;
  --border:      #e2e8f0;
  --text:        #0f172a;
  --text-muted:  #64748b;
  --text-light:  #94a3b8;

  --radius:      10px;
  --radius-sm:   6px;
  --shadow:      0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-md:   0 4px 12px rgba(0,0,0,.12), 0 8px 32px rgba(0,0,0,.08);
  --transition:  .2s ease;
}

html { height: 100%; scroll-behavior: smooth; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
       background: var(--bg); color: var(--text); font-size: 14px;
       line-height: 1.5; height: 100%; }
a    { color: var(--accent); text-decoration: none; }
img  { max-width: 100%; }

/* ── Scrollbar ──────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ── App Layout ─────────────────────────────────────────────────── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: linear-gradient(175deg, var(--sidebar-bg) 0%, var(--sidebar-bg2) 100%);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: transform var(--transition);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 20px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-logo .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), #c026d3);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(124,58,237,.4);
}
.sidebar-logo .logo-text {
  font-weight: 700; font-size: 16px;
  color: #fff;
  letter-spacing: -.3px;
}
.sidebar-logo .logo-sub {
  font-size: 10px;
  color: rgba(255,255,255,.45);
  font-weight: 400;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  padding: 18px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.65);
  font-weight: 500;
  font-size: 13.5px;
  transition: all var(--transition);
  cursor: pointer;
  margin-bottom: 2px;
}
.nav-item:hover   { color: #fff; background: rgba(255,255,255,.08); }
.nav-item.active  { color: #fff; background: rgba(124,58,237,.5);
                    box-shadow: 0 2px 8px rgba(124,58,237,.3); }
.nav-item svg     { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar-footer {
  padding: 12px 10px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.nav-item.nav-logout { color: rgba(239,68,68,.75); }
.nav-item.nav-logout:hover { color: var(--red); background: rgba(239,68,68,.12); }

/* ── Sidebar overlay (mobile) ───────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 199;
}

/* ── Main Content ───────────────────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Top Bar ─────────────────────────────────────────────────────── */
.top-bar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky; top: 0;
  z-index: 100;
}
.top-bar-title {
  font-size: 18px;
  font-weight: 700;
  flex: 1;
  color: var(--text);
}
.menu-btn {
  display: none;
  background: none; border: none;
  cursor: pointer; padding: 4px;
  color: var(--text-muted);
}
.top-bar-user {
  display: flex; align-items: center; gap: 8px;
}
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #c026d3);
  color: #fff; font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.user-name { font-size: 13px; font-weight: 600; color: var(--text); }

/* ── Content Wrapper ────────────────────────────────────────────── */
.content-wrapper {
  flex: 1;
  padding: 24px;
}

/* ── Page Header ─────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

/* ── Stats Grid ─────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  margin-bottom: 4px;
}
.stat-icon.purple { background: var(--accent-lt); }
.stat-icon.blue   { background: var(--blue-lt); }
.stat-icon.green  { background: var(--green-lt); }
.stat-icon.orange { background: var(--orange-lt); }
.stat-value { font-size: 28px; font-weight: 800; line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }

/* ── Card ────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.card-header-title { font-weight: 700; font-size: 15px; flex: 1; }
.card-body  { padding: 20px; }
.card-footer { padding: 14px 20px; border-top: 1px solid var(--border); background: #fafafa; }

/* ── Table ───────────────────────────────────────────────────────── */
.table-responsive { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.table th {
  background: #f8fafc;
  padding: 11px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #f8fafc; }

/* ── Badges ─────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-green  { background: var(--green-lt);  color: #065f46; }
.badge-red    { background: var(--red-lt);    color: #991b1b; }
.badge-blue   { background: var(--blue-lt);   color: #1e40af; }
.badge-purple { background: var(--accent-lt); color: #5b21b6; }
.badge-orange { background: var(--orange-lt); color: #9a3412; }
.badge-gray   { background: #f1f5f9;          color: var(--text-muted); }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #6d28d9 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(124,58,237,.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(124,58,237,.45); }

.btn-blue {
  background: linear-gradient(135deg, var(--blue) 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59,130,246,.3);
}
.btn-blue:hover { transform: translateY(-1px); }

.btn-green {
  background: linear-gradient(135deg, var(--green) 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 2px 8px rgba(16,185,129,.3);
}
.btn-green:hover { transform: translateY(-1px); }

.btn-danger {
  background: linear-gradient(135deg, var(--red) 0%, #dc2626 100%);
  color: #fff;
}
.btn-danger:hover { transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-lt); }

.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }
.btn-icon:hover { background: var(--bg); }

/* Loading spinner on button */
.btn.loading { pointer-events: none; opacity: .72; }
.btn.loading::after {
  content: '';
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .65s linear infinite;
}

/* ── Forms ──────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.form-label span.req { color: var(--red); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  font-family: inherit;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,58,237,.12);
}
.form-input.error, .form-select.error { border-color: var(--red); }
.form-hint  { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 11.5px; color: var(--red); margin-top: 4px; }
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

.input-group {
  display: flex;
  align-items: stretch;
}
.input-group .form-input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); flex: 1; }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ── Modal ───────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(3px);
  z-index: 400;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity .25s ease;
}
.modal-overlay.visible { display: flex; opacity: 1; }

.modal {
  background: var(--card);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0,0,0,.25);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(.96);
  transition: transform .25s ease;
  animation: modalIn .25s ease forwards;
}
.modal.modal-lg { max-width: 720px; }
.modal.modal-sm { max-width: 380px; }

@keyframes modalIn {
  from { opacity: 0; transform: scale(.93) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 16px;
  min-height: 64px;
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  padding-right: 44px;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 22px; line-height: 1;
  width: 32px; height: 32px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-body   { padding: 20px 22px; }
.modal-body .modal-footer {
  margin-top: 10px;
}
.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end;
}

/* ── Toast ───────────────────────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 9000;
}
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
  color: #fff;
  box-shadow: var(--shadow-md);
  animation: toastIn .3s ease;
  min-width: 250px;
  max-width: 380px;
}
.toast.removing { animation: toastOut .3s ease forwards; }
.toast-success { background: linear-gradient(135deg, #10b981, #059669); }
.toast-error   { background: linear-gradient(135deg, #ef4444, #dc2626); }
.toast-info    { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.toast-warning { background: linear-gradient(135deg, #f59e0b, #d97706); }
.toast-icon { font-size: 18px; }

@keyframes toastIn  { from { opacity:0; transform:translateX(100%); } to { opacity:1; transform:translateX(0); } }
@keyframes toastOut { from { opacity:1; transform:translateX(0); } to { opacity:0; transform:translateX(100%); } }

/* ── Skeleton ─────────────────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -800px 0; }
  100% { background-position:  800px 0; }
}
.skel {
  background: linear-gradient(90deg, #f0f0f0 25%, #e4e4e4 50%, #f0f0f0 75%);
  background-size: 800px 100%;
  animation: shimmer 1.6s infinite linear;
  border-radius: 4px;
  display: inline-block;
}
.skel-text  { height: 14px; width: 100%; margin-bottom: 6px; }
.skel-title { height: 20px; width: 60%; }
.skel-value { height: 32px; width: 80px; }
.skel-cell  { height: 14px; width: 80%; border-radius: 4px; }
.skel-badge { height: 22px; width: 64px; border-radius: 99px; }
.skel-btn   { height: 34px; width: 90px; border-radius: 6px; }

/* Skeleton table rows */
.skel-row td { padding: 14px 16px; }

/* ── Search / Filter Bar ─────────────────────────────────────────── */
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
}
.filter-bar .form-input  { max-width: 260px; }
.filter-bar .form-select { max-width: 180px; }

/* ── Pagination ──────────────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; gap: 4px;
}
.page-btn {
  min-width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--card); color: var(--text-muted);
  font-size: 13px; font-weight: 500;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── Empty state ─────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; color: var(--text); margin-bottom: 6px; }
.empty-state p  { font-size: 13.5px; }

/* ── Receipt Card (screen preview) ──────────────────────────────── */
.receipt-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.receipt-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.receipt-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.receipt-card-header {
  background: linear-gradient(135deg, var(--sidebar-bg), var(--sidebar-bg2));
  color: #fff; padding: 12px 16px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em;
}
.receipt-card-body { padding: 14px 16px; }
.receipt-card-total {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px;
  background: #f8fafc;
  border-top: 1px solid var(--border);
  font-weight: 700;
}
.receipt-card-total .amount { color: var(--accent); font-size: 18px; }

/* ── Confirm dialog ──────────────────────────────────────────────── */
.confirm-icon { font-size: 40px; text-align: center; margin-bottom: 12px; }
.confirm-msg  { text-align: center; font-size: 14.5px; color: var(--text); margin-bottom: 20px; }

/* ── Animations ──────────────────────────────────────────────────── */
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes fadeIn  { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.animate-in { animation: fadeIn .3s ease; }

/* ── Login page ──────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--sidebar-bg) 0%, #312e81 50%, var(--sidebar-bg2) 100%);
  padding: 20px;
}
.login-card {
  background: var(--card);
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%; max-width: 400px;
  box-shadow: 0 32px 64px rgba(0,0,0,.35);
  animation: fadeIn .4s ease;
}
.login-logo {
  text-align: center;
  margin-bottom: 28px;
}
.login-logo .bolt {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--accent), #c026d3);
  border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 28px;
  box-shadow: 0 8px 20px rgba(124,58,237,.4);
  margin-bottom: 12px;
}
.login-logo h1 { font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -.4px; }
.login-logo p  { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; }
.login-card .btn-primary { width: 100%; justify-content: center; padding: 11px; font-size: 14px; margin-top: 4px; }

/* ── Utility ─────────────────────────────────────────────────────── */
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.gap-2        { gap: 8px; }
.gap-3        { gap: 12px; }
.text-muted   { color: var(--text-muted); }
.text-sm      { font-size: 12.5px; }
.text-right   { text-align: right; }
.text-center  { text-align: center; }
.fw-bold      { font-weight: 700; }
.mb-0         { margin-bottom: 0; }
.mt-3         { margin-top: 12px; }
.mt-4         { margin-top: 16px; }
.w-full       { width: 100%; }

/* ── Period/Reading badges ───────────────────────────────────────── */
.period-label {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent), #c026d3);
  color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 99px;
  text-transform: capitalize;
}

/* ══════════════════════════════════════════════════════════════════
   PRINT STYLES – Multiple receipts per A4 page
   ══════════════════════════════════════════════════════════════════ */
@media print {
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { background: #fff; font-size: 8pt; }

  .no-print { display: none !important; }

  .print-receipts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4mm;
    padding: 6mm;
  }

  .print-receipt {
    border: .5pt solid #000;
    font-size: 7.5pt;
    line-height: 1.3;
    break-inside: avoid;
    page-break-inside: avoid;
    padding: 3mm;
  }

  .pr-company {
    text-align: center;
    font-weight: 700;
    font-size: 8pt;
    text-transform: uppercase;
    border-bottom: .5pt solid #000;
    padding-bottom: 2mm;
    margin-bottom: 2mm;
  }
  .pr-info-grid { display: grid; grid-template-columns: auto 1fr; gap: 1mm 3mm; margin-bottom: 2mm; }
  .pr-info-key  { font-weight: 700; font-size: 7pt; white-space: nowrap; }
  .pr-info-val  { font-size: 7pt; }

  .pr-table { width: 100%; border-collapse: collapse; margin-bottom: 2mm; }
  .pr-table th {
    border-top: .5pt solid #000; border-bottom: .5pt solid #000;
    text-align: left; font-size: 7pt; font-weight: 700; padding: 1mm 0;
  }
  .pr-table th:last-child, .pr-table td:last-child { text-align: right; }
  .pr-table td { font-size: 7pt; padding: .6mm 0; }
  .pr-table .sep td { border-top: .5pt dashed #999; }

  .pr-dates { margin-bottom: 2mm; }
  .pr-dates-row { display: flex; justify-content: space-between; font-size: 7pt; }
  .pr-cutoff-box {
    background: #dc2626 !important; color: #fff !important;
    font-weight: 700; text-align: center;
    padding: 1mm 2mm; font-size: 7.5pt;
    border-radius: 2pt;
  }

  .pr-total {
    display: flex; justify-content: space-between;
    border-top: .5pt solid #000; padding-top: 1.5mm;
    font-weight: 700; font-size: 9pt;
  }
  .pr-status-printed {
    text-align: center; font-size: 6.5pt; color: #666;
    margin-top: 1mm;
  }
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.visible { display: block; }
  .main-content { margin-left: 0; }
  .menu-btn     { display: flex; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .content-wrapper { padding: 16px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .receipt-list { grid-template-columns: 1fr; }
  .filter-bar .form-input, .filter-bar .form-select { max-width: 100%; }
}
