/* ── Variables ─────────────────────────────────────────────── */
:root {
  --navy:        #1e293b;
  --navy-light:  #334155;
  --green:       #16a34a;
  --green-h:     #15803d;
  --green-bg:    #dcfce7;
  --red:         #dc2626;
  --red-h:       #b91c1c;
  --red-bg:      #fee2e2;
  --blue:        #2563eb;
  --blue-h:      #1d4ed8;
  --blue-bg:     #dbeafe;
  --bg:          #f1f5f9;
  --card:        #ffffff;
  --border:      #e2e8f0;
  --text:        #0f172a;
  --muted:       #64748b;
  --carry-bg:    #f8f9fa;
  --carry-text:  #94a3b8;
  --shadow:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:   0 4px 12px rgba(0,0,0,.1);
  --radius:      10px;
  --radius-sm:   6px;
}

/* ── Reset & base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
input, button, select { font-family: inherit; font-size: inherit; }

/* ── Splash / loading ──────────────────────────────────────── */
.splash {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ─────────────────────────────────────────────────── */
#toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--navy); color: #fff;
  padding: 12px 20px; border-radius: var(--radius-sm);
  font-size: .85rem; font-weight: 500;
  box-shadow: var(--shadow-md);
  transform: translateY(80px); opacity: 0;
  transition: transform .25s, opacity .25s;
  pointer-events: none;
}
#toast.show { transform: translateY(0); opacity: 1; }
#toast.err  { background: var(--red); }
#toast.ok   { background: var(--green); }

/* ── Utility ───────────────────────────────────────────────── */
.hidden { display: none !important; }
.text-right { text-align: right; }
.text-center { text-align: center; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border: none; border-radius: var(--radius-sm);
  font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: background .15s, transform .1s;
  text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn-green  { background: var(--green);  color: #fff; }
.btn-green:hover  { background: var(--green-h); }
.btn-red    { background: var(--red);    color: #fff; }
.btn-red:hover    { background: var(--red-h); }
.btn-blue   { background: var(--blue);   color: #fff; }
.btn-blue:hover   { background: var(--blue-h); }
.btn-ghost  {
  background: transparent; color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: 4px 10px; font-size: .8rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Header ────────────────────────────────────────────────── */
.app-header {
  background: var(--navy); color: #fff;
  padding: 0 28px;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.app-header h1 {
  font-size: 1.1rem; font-weight: 700;
  letter-spacing: .04em;
  display: flex; align-items: center; gap: 10px;
}
.app-header h1 .logo-icon { font-size: 1.3rem; }
.header-right { display: flex; align-items: center; gap: 16px; }
.header-user { font-size: .82rem; color: #94a3b8; }
.btn-logout {
  background: rgba(255,255,255,.1); color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  padding: 5px 12px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: .8rem; font-weight: 500;
  transition: background .15s;
}
.btn-logout:hover { background: rgba(255,255,255,.2); }
.btn-header-icon {
  background: rgba(255,255,255,.1); color: #fff;
  border: 1px solid rgba(255,255,255,.2);
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  cursor: pointer; font-size: 1.1rem; display: flex;
  align-items: center; justify-content: center;
  transition: background .15s;
}
.btn-header-icon:hover { background: rgba(255,255,255,.2); }

/* ── Main container ────────────────────────────────────────── */
.main { padding: 24px 28px; max-width: 1400px; margin: 0 auto; }

/* ── Login ─────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  padding: 20px;
}
.login-brand {
  color: #fff; text-align: center; margin-bottom: 40px;
}
.login-brand h1 { font-size: 2rem; font-weight: 800; letter-spacing: .05em; }
.login-brand p  { color: #94a3b8; margin-top: 6px; font-size: .9rem; }
.login-cards {
  display: flex; gap: 20px; flex-wrap: wrap; justify-content: center;
}
.login-card {
  background: rgba(255,255,255,.07);
  border: 2px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  width: 190px; padding: 24px 18px;
  cursor: pointer; text-align: center;
  transition: border-color .2s, background .2s, transform .15s;
  color: #fff;
}
.login-card:hover {
  border-color: rgba(255,255,255,.4);
  background: rgba(255,255,255,.12);
  transform: translateY(-2px);
}
.login-card.selected {
  border-color: var(--blue);
  background: rgba(37,99,235,.15);
}
.login-card-icon { font-size: 2.8rem; margin-bottom: 12px; }
.login-card-name { font-size: 1.1rem; font-weight: 600; }
.login-card-sub  { font-size: .78rem; color: #94a3b8; margin-top: 4px; }

.login-pass-box {
  margin-top: 28px; width: 100%; max-width: 300px;
  display: flex; flex-direction: column; gap: 10px;
}
.login-pass-box input {
  padding: 11px 14px; border-radius: var(--radius-sm);
  border: 2px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.08); color: #fff;
  font-size: .95rem; width: 100%;
  transition: border-color .2s;
  text-align: center; letter-spacing: .1em;
}
.login-pass-box input:focus {
  outline: none; border-color: var(--blue);
}
.login-pass-box input::placeholder { color: #64748b; letter-spacing: 0; }
.login-err { color: #f87171; font-size: .82rem; text-align: center; min-height: 18px; }
.btn-login {
  background: var(--blue); color: #fff; border: none;
  padding: 11px; border-radius: var(--radius-sm);
  font-size: .95rem; font-weight: 600; cursor: pointer;
  transition: background .15s;
}
.btn-login:hover { background: var(--blue-h); }

/* ── Sold curent card ──────────────────────────────────────── */
.sold-card {
  background: var(--navy); color: #fff;
  border-radius: var(--radius); padding: 28px 32px;
  margin-bottom: 24px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  box-shadow: var(--shadow-md);
}
.sold-card-label {
  font-size: .8rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: #94a3b8; margin-bottom: 6px;
}
.sold-card-amount {
  font-size: 2.8rem; font-weight: 800; letter-spacing: -.02em;
  line-height: 1;
}
.sold-card-amount .currency { font-size: 1.2rem; font-weight: 600; margin-left: 6px; }
.sold-card-sub { font-size: .78rem; color: #64748b; margin-top: 8px; }

/* ── Stats cards (percentages) ─────────────────────────────── */
.stats-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--card); border-radius: var(--radius);
  padding: 20px 24px; box-shadow: var(--shadow);
}
.stat-card-title {
  font-size: .75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .07em; color: var(--muted); margin-bottom: 8px;
}
.stat-card-pct {
  font-size: 2rem; font-weight: 800; margin-bottom: 4px;
}
.stat-card-pct.green { color: var(--green); }
.stat-card-pct.blue  { color: var(--blue); }
.stat-card-pct.purple{ color: #7c3aed; }
.stat-card-bar {
  height: 6px; background: var(--border); border-radius: 999px; overflow: hidden;
}
.stat-card-bar-fill {
  height: 100%; border-radius: 999px;
  transition: width .5s ease;
}
.stat-card-bar-fill.green  { background: var(--green); }
.stat-card-bar-fill.blue   { background: var(--blue); }
.stat-card-bar-fill.purple { background: #7c3aed; }
.stat-card-amount { font-size: .8rem; color: var(--muted); margin-top: 6px; }

/* ── Month selector ────────────────────────────────────────── */
.month-bar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.month-bar h2 { font-size: 1rem; font-weight: 700; }
.month-select {
  padding: 7px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--card);
  font-size: .88rem; cursor: pointer;
}
.month-select:focus { outline: none; border-color: var(--blue); }

/* ── Action bar (Denisa) ───────────────────────────────────── */
.action-bar {
  display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap;
  align-items: center;
}
.action-bar .btn { font-size: .88rem; }

/* ── Table card ────────────────────────────────────────────── */
.table-card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden;
}
.table-scroll { overflow-x: auto; }

table {
  width: 100%; border-collapse: collapse; min-width: 780px;
}
thead th {
  background: #f8fafc; color: var(--muted);
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; padding: 11px 14px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
thead th:not(:first-child) { text-align: right; }
thead th.col-actions { text-align: center; }

tbody tr { border-bottom: 1px solid var(--border); transition: background .1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #f8fafc; }

tbody td {
  padding: 11px 14px; vertical-align: middle;
  font-size: .88rem;
}
tbody td:not(:first-child):not(.col-plati):not(.col-actions) {
  text-align: right; font-variant-numeric: tabular-nums;
}
tbody td.col-plati   { }
tbody td.col-actions { text-align: center; white-space: nowrap; }

/* Row states */
tr.row-carry { background: var(--carry-bg) !important; }
tr.row-carry td { color: var(--carry-text); font-style: italic; }
tr.row-carry td strong { color: var(--carry-text); }
tr.row-closed td.col-data::after {
  content: ' 🔒'; font-size: .7rem;
}

/* Sold sertar column */
td.sold-val { font-weight: 700; }
td.sold-val.positive { color: var(--green); }
td.sold-val.negative { color: var(--red); }

/* Plăți list inside cell */
.plati-list { display: flex; flex-direction: column; gap: 3px; }
.plata-item {
  display: flex; align-items: baseline; gap: 6px;
  font-size: .8rem;
}
.plata-amount { color: var(--red); font-weight: 600; white-space: nowrap; }
.plata-desc   { color: var(--muted); }
.plata-del {
  background: none; border: none; color: var(--red); cursor: pointer;
  font-size: 1rem; font-weight: 700; padding: 2px 6px; line-height: 1;
  transition: color .15s, transform .1s;
  -webkit-appearance: none;
}
.plata-del:hover  { color: var(--red-h); transform: scale(1.2); }
.plata-del:active { transform: scale(.95); }
.plati-total { font-size: .8rem; color: var(--red); font-weight: 600; margin-top: 2px; }

/* Empty row */
.empty-row td { text-align: center; color: var(--muted); padding: 40px; }

/* ── Editable row (admin) ──────────────────────────────────── */
.edit-input {
  width: 90px; padding: 4px 6px;
  border: 1px solid var(--blue); border-radius: 4px;
  text-align: right; font-size: .85rem;
}
.edit-input:focus { outline: none; box-shadow: 0 0 0 2px var(--blue-bg); }

/* ── Admin month stats list ────────────────────────────────── */
.months-list {
  display: flex; flex-direction: column; gap: 10px;
  margin-bottom: 24px;
}
.month-stat-row {
  background: var(--card); border-radius: var(--radius-sm);
  padding: 14px 20px; box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 110px 1fr 1fr 1fr 120px;
  gap: 12px; align-items: center;
}
.ms-label { font-weight: 600; font-size: .88rem; }
.ms-item  { }
.ms-item-title {
  font-size: .7rem; color: var(--muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px;
}
.ms-pct { font-size: 1rem; font-weight: 700; }
.ms-pct.green  { color: var(--green); }
.ms-pct.blue   { color: var(--blue); }
.ms-pct.purple { color: #7c3aed; }
.ms-bar {
  height: 5px; background: var(--border); border-radius: 999px; overflow: hidden; margin-top: 4px;
}
.ms-bar-fill { height: 100%; border-radius: 999px; }
.ms-bar-fill.green  { background: var(--green); }
.ms-bar-fill.blue   { background: var(--blue); }
.ms-bar-fill.purple { background: #7c3aed; }
.ms-sub { font-size: .72rem; color: var(--muted); margin-top: 2px; }
.ms-total { text-align: right; font-weight: 700; font-size: .9rem; }
.ms-total small { display: block; color: var(--muted); font-weight: 400; font-size: .72rem; }
.month-stat-row.current-month { border-left: 3px solid var(--blue); }

/* ── Modal ─────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: fadeIn .15s;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  background: var(--card); border-radius: var(--radius);
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: slideUp .2s;
}
.modal-sm   { max-width: 340px; }
.modal-wide { max-width: 580px; }
@keyframes slideUp { from { transform: translateY(16px); opacity: 0; } }
.modal-header {
  padding: 18px 24px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 1rem; font-weight: 700; }
.modal-close {
  background: none; border: none; font-size: 1.4rem; color: var(--muted);
  cursor: pointer; line-height: 1; padding: 0 4px;
}
.modal-close:hover { color: var(--text); }
.modal-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.modal-body label {
  display: flex; flex-direction: column; gap: 5px;
  font-size: .82rem; font-weight: 600; color: var(--muted);
}
.modal-body input[type="number"],
.modal-body input[type="text"] {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: .95rem; color: var(--text);
  transition: border-color .2s;
}
.modal-body input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg); }
.modal-err { color: var(--red); font-size: .8rem; font-weight: 500; }
.cz-total-row {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: .88rem;
}
.modal-footer {
  padding: 0 24px 20px;
  display: flex; justify-content: flex-end; gap: 10px;
}

/* ── Secondary button (Z report) ──────────────────────────── */
.btn-secondary { background: var(--navy-light); color: #fff; }
.btn-secondary:hover { background: var(--navy); }
.btn-lg { padding: 12px 32px; font-size: 1.1rem; }

/* ── Z modal - horizontal inputs ──────────────────────────── */
.z-inputs-row {
  display: flex; gap: 10px;
}
.z-input-group {
  flex: 1; border-radius: 10px; padding: 12px 10px;
  display: flex; flex-direction: column; align-items: center;
}
.z-input-label {
  display: block; font-size: .8rem; font-weight: 700;
  margin-bottom: 8px; text-align: center;
}
.z-input-group input {
  width: 100%; font-size: 1.2rem; text-align: center;
  border: 2px solid transparent; border-radius: 8px;
  padding: 12px 6px; background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.z-input-group input:focus {
  outline: none; box-shadow: 0 0 0 3px rgba(0,0,0,.08);
}
.z-group-cash  { background: #f0fdf4; }
.z-group-cash  input { border-color: #22c55e; color: #15803d; }
.z-group-cash  .z-input-label { color: #15803d; }
.z-group-card  { background: #fff7ed; }
.z-group-card  input { border-color: #f59e0b; color: #b45309; }
.z-group-card  .z-input-label { color: #b45309; }
.z-group-online { background: #eff6ff; }
.z-group-online input { border-color: #3b82f6; color: #1d4ed8; }
.z-group-online .z-input-label { color: #1d4ed8; }

/* ── Celebration popup ────────────────────────────────────── */
.celebration-modal {
  max-width: 380px; text-align: center; overflow: hidden;
}
.celebration-content {
  padding: 28px 24px 16px;
}
.celebration-content img {
  max-width: 220px; max-height: 220px; border-radius: 12px;
  margin-bottom: 16px;
}
.celebration-content h2 {
  font-size: 1.4rem; font-weight: 800; color: var(--navy);
}
.celebration-footer {
  padding: 0 24px 24px; text-align: center;
}

/* ── Location badge (admin table) ─────────────────────────── */
.loc-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px; border-radius: 99px;
  font-size: .72rem; font-weight: 600;
  background: #f0f9ff; color: #0369a1;
  margin-left: 8px;
}

/* ── Transaction type badges ───────────────────────────────── */
.tip-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 99px;
  font-size: .72rem; font-weight: 700; white-space: nowrap;
  letter-spacing: .02em;
}
.tip-z     { background: #e0f2fe; color: #0369a1; }
.tip-cash  { background: var(--green-bg); color: var(--green); }
.tip-plata { background: var(--red-bg);   color: var(--red); }

/* ── Transaction amount cells ──────────────────────────────── */
.num-pos { color: var(--green); font-weight: 600; }
.num-neg { color: var(--red);   font-weight: 600; }
.num-muted { color: var(--muted); }

/* ── Day header row (admin) ────────────────────────────────── */
tr.day-header-row > td {
  background: #f1f5f9 !important;
  padding: 7px 14px;
  font-size: .78rem; font-weight: 700;
  color: var(--navy);
  border-top: 2px solid var(--border);
}
tr.day-header-row:first-child > td { border-top: none; }

/* ── Inline edit row ───────────────────────────────────────── */
tr.row-editing > td { background: #fffbeb !important; }
tr.row-editing .edit-input {
  padding: 4px 7px; border: 1.5px solid var(--blue);
  border-radius: 4px; font-size: .85rem; text-align: right;
  background: #fff;
}
tr.row-editing .edit-input:focus {
  outline: none; box-shadow: 0 0 0 3px var(--blue-bg);
}

/* ── Admin summary cards (3 on 1 line) ────────────────────── */
.summary-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-bottom: 24px;
}
.summary-card {
  background: var(--card); border-radius: var(--radius);
  padding: 28px 24px; box-shadow: var(--shadow);
  display: flex; align-items: flex-start; gap: 14px;
  min-height: 140px;
}
.summary-card-total {
  background: linear-gradient(135deg, #166534 0%, #15803d 100%);
  color: #fff;
}
.summary-card-blue {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  color: #fff;
}
.summary-card-red {
  background: linear-gradient(135deg, #991b1b 0%, #dc2626 100%);
  color: #fff;
}
.summary-card-total .summary-card-label,
.summary-card-blue  .summary-card-label,
.summary-card-red   .summary-card-label { color: rgba(255,255,255,.75); }
.summary-card-total .summary-card-sub,
.summary-card-blue  .summary-card-sub,
.summary-card-red   .summary-card-sub   { color: rgba(255,255,255,.6); }
.summary-card-total .currency-sm,
.summary-card-blue  .currency-sm,
.summary-card-red   .currency-sm        { color: rgba(255,255,255,.7); }
.summary-row-2 { grid-template-columns: repeat(2, 1fr); }
.summary-card-icon { font-size: 2rem; line-height: 1; flex-shrink: 0; }
.summary-card-body { min-width: 0; }
.summary-card-label {
  font-size: .85rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin-bottom: 6px;
}
.summary-card-amount {
  font-size: 2.2rem; font-weight: 800; line-height: 1.2;
  white-space: nowrap;
}
.currency-sm { font-size: 1rem; font-weight: 600; color: var(--muted); }
.summary-card-sub {
  font-size: .8rem; color: var(--muted); margin-top: 4px;
}
.summary-card-breakdown {
  display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px;
  font-size: .82rem; color: var(--muted);
}
.sc-num, .sc-card, .sc-onl { white-space: nowrap; }

/* ── Location tabs ────────────────────────────────────────── */
.loc-tabs {
  display: flex; gap: 0; margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
}
.loc-tab {
  padding: 10px 20px; border: none; background: none;
  font-size: .88rem; font-weight: 600; color: var(--muted);
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.loc-tab:hover { color: var(--text); }
.loc-tab.active {
  color: var(--blue); border-bottom-color: var(--blue);
}

/* ── Settings modal - location rows ──────────────────────── */
.settings-loc-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.settings-loc-row:last-of-type { border-bottom: none; }
.settings-loc-icon { font-size: 1.4rem; }
.settings-loc-name { font-weight: 600; flex: 1; }
.settings-loc-actions { display: flex; gap: 6px; }
.settings-section-title {
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted); margin-bottom: 10px;
}
.settings-label {
  display: flex; flex-direction: column; gap: 5px;
  font-size: .82rem; font-weight: 600; color: var(--muted);
  margin-bottom: 10px;
}
.settings-textarea {
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: .88rem; color: var(--text); font-family: inherit; resize: vertical;
}
.settings-textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-bg); }
.settings-check {
  display: flex; align-items: center; gap: 8px;
  font-size: .88rem; cursor: pointer; font-weight: 500;
}
.settings-check input { width: 16px; height: 16px; cursor: pointer; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .summary-row { grid-template-columns: 1fr; }
  .month-stat-row { grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto; }
  .ms-label { grid-column: 1 / -1; }
  .ms-total { grid-column: 1 / -1; text-align: left; }
}
@media (max-width: 600px) {
  .main { padding: 16px; }
  .app-header { padding: 0 16px; }
  .stats-row { grid-template-columns: 1fr; }
  .sold-card-amount { font-size: 2rem; }
  .login-cards { flex-direction: column; align-items: center; }
  .loc-tabs { overflow-x: auto; }
}
