/* =============================================
   PeasyDelivery — Admin CSS  (mobile-first)
   ============================================= */

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

:root {
  --sidebar-w:     240px;
  --sidebar-bg:    #1a1a2e;
  --sidebar-hover: #16213e;
  --sidebar-text:  #adb5bd;
  --sidebar-muted: #6c7a8c;
  --accent:        #ff6b00;
  --accent-dark:   #e55e00;
  --bg:            #f0f2f5;
  --card:          #ffffff;
  --border:        #e9ecef;
  --text:          #212529;
  --muted:         #6c757d;
  --success:       #2f9e44;
  --danger:        #e03131;
  --warning:       #f08c00;
  --info:          #1971c2;
  --radius:        10px;
  --shadow:        0 1px 4px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.04);
  --bottom-nav-h:  60px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

/* =============================================
   LAYOUT
   ============================================= */
.admin-wrapper { display: flex; min-height: 100vh; }

/* =============================================
   SIDEBAR — drawer on mobile, fixed on desktop
   ============================================= */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 300;
  /* Mobile: hidden off-screen */
  transform: translateX(-100%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.sidebar.open { transform: translateX(0); }

/* Backdrop (injected by JS) */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 299;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.sidebar-backdrop.open { display: block; }

/* Hamburger toggle (injected by JS) */
.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  font-size: 22px;
  margin-right: 8px;
  line-height: 1;
  transition: background .15s;
}
.sidebar-toggle:hover { background: var(--bg); }

.sidebar-logo {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar-logo .brand { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -.3px; }
.sidebar-logo .brand span { color: var(--accent); }
.sidebar-logo .version { font-size: 10px; color: var(--sidebar-muted); margin-top: 2px; }

.sidebar-section { padding: 18px 12px 6px; }
.sidebar-section-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--sidebar-muted); padding: 0 8px; margin-bottom: 6px; }

.sidebar-nav { list-style: none; }
.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  transition: all .15s;
  margin-bottom: 2px;
  min-height: 44px;
}
.sidebar-nav li a:hover { background: var(--sidebar-hover); color: #fff; }
.sidebar-nav li a.active { background: var(--accent); color: #fff; }
.sidebar-nav li a .nav-icon { width: 18px; text-align: center; font-size: 15px; flex-shrink: 0; }
.sidebar-nav li a .nav-badge { margin-left: auto; background: rgba(255,255,255,.15); font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 10px; }
.sidebar-nav li a.active .nav-badge { background: rgba(255,255,255,.25); }

.sidebar-footer {
  margin-top: auto;
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.sidebar-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0; }
.sidebar-user-name { font-size: 13px; font-weight: 600; color: #fff; }
.sidebar-user-role { font-size: 11px; color: var(--sidebar-muted); }
.sidebar-logout { margin-top: 10px; display: block; text-align: center; font-size: 12px; color: var(--sidebar-muted); padding: 8px; border-radius: 7px; border: 1px solid rgba(255,255,255,.08); transition: all .15s; min-height: 36px; line-height: 20px; }
.sidebar-logout:hover { background: rgba(255,255,255,.06); color: #fff; }

/* =============================================
   MAIN — full-width mobile, offset desktop
   ============================================= */
.main {
  margin-left: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  /* room for bottom nav */
  padding-bottom: var(--bottom-nav-h);
}

/* =============================================
   TOPBAR
   ============================================= */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 8px;
}
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; flex: 1; min-width: 0; }
.breadcrumb-item { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breadcrumb-item.active { color: var(--text); font-weight: 600; }
.breadcrumb-sep { color: var(--border); flex-shrink: 0; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.topbar-greeting { font-size: 13px; color: var(--muted); display: none; } /* hidden on mobile */
.topbar-greeting strong { color: var(--text); }

/* =============================================
   PAGE
   ============================================= */
.page { padding: 16px; flex: 1; }

.page-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.page-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.page-title { font-size: 18px; font-weight: 700; }
.page-subtitle { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* =============================================
   CARDS
   ============================================= */
.card { background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.card-body { padding: 16px; }
.card-header { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-title { font-size: 14px; font-weight: 700; }

/* =============================================
   STAT CARDS — 2 cols mobile → 4 desktop
   ============================================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.stat-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.stat-icon.orange { background: #fff4e6; }
.stat-icon.blue   { background: #e7f5ff; }
.stat-icon.green  { background: #ebfbee; }
.stat-icon.purple { background: #f3f0ff; }
.stat-value { font-size: 22px; font-weight: 800; line-height: 1.1; }
.stat-label { font-size: 11px; color: var(--muted); margin-top: 2px; }
.stat-change { font-size: 11px; font-weight: 600; margin-top: 4px; }
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* =============================================
   CONTENT GRIDS
   ============================================= */
/* Single column on mobile */
.content-side-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* =============================================
   TABLE
   ============================================= */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  padding: 10px 12px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--muted);
  background: #fafbfc;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td { padding: 12px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafbfc; }

/* Hide low-priority columns on mobile */
.col-m-hide { display: none; }

/* =============================================
   BADGES
   ============================================= */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 20px; white-space: nowrap; }
.badge-gray   { background: #f1f3f5; color: #495057; }
.badge-blue   { background: #e7f5ff; color: #1971c2; }
.badge-green  { background: #ebfbee; color: #2f9e44; }
.badge-orange { background: #fff4e6; color: #e67700; }
.badge-purple { background: #f3f0ff; color: #7048e8; }
.badge-teal   { background: #e6fcf5; color: #0ca678; }
.badge-red    { background: #fff5f5; color: #e03131; }
.badge-active   { background: #ebfbee; color: #2f9e44; }
.badge-inactive { background: #fff5f5; color: #e03131; }

/* =============================================
   BUTTONS — min 44px touch target
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background .15s, color .15s, box-shadow .18s, transform .15s;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  min-height: 40px;
  white-space: nowrap;
}
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 6px; min-height: 32px; }

/* Primary */
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.22) 50%, transparent 65%);
  transform: translateX(-150%); transition: transform .45s ease;
}
.btn-primary:hover { background: var(--accent-dark); color: #fff; box-shadow: 0 6px 22px rgba(255,107,0,.35); transform: translateY(-1px); }
.btn-primary:hover::after { transform: translateX(150%); }
.btn-primary:active { transform: translateY(0); box-shadow: none; }

/* Secondary */
.btn-secondary { background: #f1f3f5; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #e9ecef; transform: translateY(-1px); }
.btn-secondary:active { transform: translateY(0); }

/* Success */
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-success:active { transform: translateY(0); filter: none; }

/* Danger */
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #c92a2a; color: #fff; transform: translateY(-1px); }
.btn-danger:active { transform: translateY(0); }

/* Ghost */
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: #f1f3f5; color: var(--text); border-color: rgba(255,107,0,.4); }
.btn-ghost:active { transform: translateY(0); }

/* Full width on mobile */
.btn-block-mobile { width: 100%; }

/* Ripple */
@keyframes btn-ripple { from { transform: scale(0); opacity: .35; } to { transform: scale(200); opacity: 0; } }
.btn-ripple-dot { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.45); pointer-events: none; animation: btn-ripple .5s ease-out forwards; transform-origin: center; margin-left: -3px; margin-top: -3px; }

/* =============================================
   FORMS
   ============================================= */
.form-grid { display: grid; gap: 16px; }
.form-grid-2 { grid-template-columns: 1fr; }
.form-grid-3 { grid-template-columns: 1fr; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
label { font-size: 12px; font-weight: 700; color: var(--text); }
label .required { color: var(--danger); margin-left: 2px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], select, textarea {
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
  background: #fff;
  transition: border-color .15s;
  width: 100%;
  font-family: inherit;
  -webkit-appearance: none;
  /* min touch height */
  min-height: 44px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,107,0,.1); }
textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 11px; color: var(--muted); }
.form-error { font-size: 11px; color: var(--danger); }
.input-group { display: flex; }
.input-group .input-prefix { padding: 10px 12px; background: #f1f3f5; border: 1.5px solid var(--border); border-right: none; border-radius: 8px 0 0 8px; font-size: 13px; color: var(--muted); white-space: nowrap; align-items: center; display: flex; }
.input-group input { border-radius: 0 8px 8px 0; }

/* Search bar */
.search-bar { position: relative; }
.search-bar input { padding-left: 12px; }

/* =============================================
   TOGGLE
   ============================================= */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: #dee2e6; border-radius: 24px; transition: .2s; }
.toggle-slider::before { content: ''; position: absolute; height: 18px; width: 18px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle input:checked + .toggle-slider { background: var(--success); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* =============================================
   FLASH
   ============================================= */
.flash { padding: 12px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.flash-success { background: #ebfbee; color: #2f9e44; border: 1px solid #b2f2bb; }
.flash-error   { background: #fff5f5; color: #e03131; border: 1px solid #ffc9c9; }
.flash-info    { background: #e7f5ff; color: #1971c2; border: 1px solid #a5d8ff; }

/* =============================================
   EMPTY STATE
   ============================================= */
.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-state .empty-icon { font-size: 36px; margin-bottom: 12px; }
.empty-state h3 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* =============================================
   PAGINATION
   ============================================= */
.pagination { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: center; padding: 12px; }
.pagination a, .pagination span { padding: 8px 12px; border-radius: 7px; font-size: 13px; font-weight: 500; border: 1px solid var(--border); color: var(--text); min-width: 40px; text-align: center; }
.pagination a:hover { background: #f1f3f5; }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* =============================================
   MODAL — sheet from bottom on mobile
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 400;
  display: none;
  align-items: flex-end; /* bottom sheet on mobile */
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--card);
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 -8px 40px rgba(0,0,0,.2);
  /* animate up */
  animation: slideUp .22s ease-out;
}
@keyframes slideUp { from { transform: translateY(60px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { padding: 16px 20px 14px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; background: var(--card); z-index: 1; }
.modal-title { font-size: 15px; font-weight: 700; }
.modal-close { background: none; border: none; cursor: pointer; font-size: 22px; color: var(--muted); line-height: 1; padding: 4px; min-width: 36px; min-height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 6px; }
.modal-close:hover { background: var(--bg); }
.modal-body { padding: 16px 20px; }
.modal-footer { padding: 12px 20px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
/* Pull-bar indicator */
.modal::before {
  content: '';
  display: block;
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 10px auto 0;
}

/* =============================================
   CHARTS
   ============================================= */
.chart-container { position: relative; height: 200px; }

/* =============================================
   LOGIN PAGE
   ============================================= */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--sidebar-bg); padding: 16px; }
.login-card { background: var(--card); border-radius: 16px; padding: 28px 24px; width: 100%; max-width: 400px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.login-logo { text-align: center; margin-bottom: 24px; }
.login-logo .brand { font-size: 26px; font-weight: 800; color: var(--text); }
.login-logo .brand span { color: var(--accent); }
.login-logo .tagline { font-size: 12px; color: var(--muted); margin-top: 4px; }
.login-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.login-card .subtitle { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.login-card .form-group { margin-bottom: 16px; }
.login-btn { width: 100%; padding: 12px; font-size: 14px; margin-top: 4px; justify-content: center; }

/* =============================================
   BOTTOM NAVIGATION (mobile only, injected by JS)
   ============================================= */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-h);
  background: var(--card);
  border-top: 1px solid var(--border);
  z-index: 200;
  display: flex;
  box-shadow: 0 -2px 12px rgba(0,0,0,.08);
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  padding: 6px 4px;
  transition: color .15s;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav a.active { color: var(--accent); }
.bottom-nav a .bn-icon { font-size: 22px; line-height: 1; }

/* =============================================
   STATUS TABS — horizontal scroll, never wrap
   ============================================= */
.status-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.status-tabs::-webkit-scrollbar { display: none; }

/* =============================================
   PAGE-HEADER ACTIONS
   ============================================= */
.page-header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.page-header-actions .search-bar { flex: 1; min-width: 140px; }

/* =============================================
   TABLE COLUMN HIDING (mobile)
   .col-m-hide handles <th>; nth-child handles <td> generated by JS
   ============================================= */
@media (max-width: 767px) {
  /* Orders: hide Endereço (3) and Horário (6) */
  .table-orders td:nth-child(3),
  .table-orders td:nth-child(6) { display: none; }

  /* Shrink action buttons inside table */
  .table-orders .btn { padding: 5px 8px; font-size: 11px; min-height: 32px; }

  /* Categories: hide Descrição (2) and Ordem (4) */
  .table-categories th:nth-child(2), .table-categories td:nth-child(2),
  .table-categories th:nth-child(4), .table-categories td:nth-child(4) { display: none; }

  /* Customers: hide Contato (2) and Último pedido (5) */
  .table-customers th:nth-child(2), .table-customers td:nth-child(2),
  .table-customers th:nth-child(5), .table-customers td:nth-child(5) { display: none; }

  /* Products: hide Categoria (3) and Preparo (5) */
  .table-products th:nth-child(3), .table-products td:nth-child(3),
  .table-products th:nth-child(5), .table-products td:nth-child(5) { display: none; }
  .table-products .btn { padding: 5px 8px; font-size: 11px; min-height: 32px; }

  /* Dashboard recent orders: hide Horário (5) and Ver link (6) */
  .table-dashboard th:nth-child(5), .table-dashboard td:nth-child(5),
  .table-dashboard th:nth-child(6), .table-dashboard td:nth-child(6) { display: none; }

  /* Stack action buttons vertically when there are 3+ in a cell */
  .table-products td:last-child > div,
  .table-categories td:last-child > div { flex-direction: column; gap: 3px; }
}

/* =============================================
   SMALL PHONE  ≤ 480px
   ============================================= */
@media (max-width: 480px) {
  .page { padding: 12px; }
  .topbar { padding: 0 12px; }

  .card-body { padding: 14px; }
  .card-header { padding: 11px 14px; }

  .stat-card { padding: 12px; gap: 10px; }
  .stat-icon { width: 36px; height: 36px; font-size: 16px; }
  .stat-value { font-size: 20px; }
  .stat-change { font-size: 10px; }

  thead th { padding: 8px 8px; }
  tbody td  { padding: 10px 8px; font-size: 12px; }

  .modal-header { padding: 14px 14px 12px; }
  .modal-body   { padding: 14px; }
  .modal-footer { padding: 10px 14px 16px; }

  .page-header { gap: 10px; margin-bottom: 16px; }
  .stats-grid  { gap: 10px; margin-bottom: 16px; }

  /* Search bar in page-header fills full width */
  .page-header .search-bar,
  .page-header input[type="text"] { width: 100% !important; }
}

/* =============================================
   UTILS
   ============================================= */
.text-muted  { color: var(--muted); }
.text-small  { font-size: 12px; }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.fw-bold     { font-weight: 700; }
.mt-1 { margin-top: 6px; }  .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; } .mt-4 { margin-top: 28px; }
.mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 20px; } .mb-4 { margin-bottom: 28px; }
.d-flex { display: flex; } .align-center { align-items: center; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.ml-auto { margin-left: auto; }
.flex-wrap { flex-wrap: wrap; }

/* =============================================
   RESPONSIVE GRID UTILITIES
   ============================================= */
/* Two equal columns (mobile: 1 col) */
.two-col-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }

/* Settings tabs bar */
.settings-tabs-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.settings-tabs-bar::-webkit-scrollbar { display: none; }

/* Hours row — stacks on mobile */
.hours-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.hours-row:last-child { border-bottom: none; }
.hours-day { font-weight: 600; font-size: 13px; grid-column: 1 / -1; }
.hours-closed { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); grid-column: 1 / -1; }

/* =============================================
   TABLET & DESKTOP  ≥ 768px
   ============================================= */
@media (min-width: 768px) {

  /* Sidebar always visible */
  .sidebar { transform: translateX(0) !important; }
  .sidebar-toggle { display: none !important; }
  .sidebar-backdrop { display: none !important; }

  /* Main offset */
  .main { margin-left: var(--sidebar-w); padding-bottom: 0; }

  /* Topbar */
  .topbar { padding: 0 28px; height: 60px; }
  .topbar-greeting { display: flex; }

  /* Page */
  .page { padding: 28px; }
  .page-header { flex-direction: row; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; }
  .page-title { font-size: 20px; }

  /* Cards */
  .card-body { padding: 20px 24px; }
  .card-header { padding: 16px 24px; }
  .card-title { font-size: 15px; }

  /* Stat cards */
  .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
  .stat-value { font-size: 26px; }

  /* Content grids */
  .content-side-grid { grid-template-columns: 1fr 260px; gap: 20px; }
  .two-col-grid { grid-template-columns: 1fr 1fr; gap: 20px; }

  /* Hours row */
  .hours-row { grid-template-columns: 120px 1fr 1fr 140px; }
  .hours-day { grid-column: auto; }
  .hours-closed { grid-column: auto; }

  /* Forms */
  .form-grid-2 { grid-template-columns: 1fr 1fr; }
  .form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

  /* Table */
  thead th { padding: 10px 14px; font-size: 11px; }
  tbody td  { padding: 13px 14px; }
  .col-m-hide { display: table-cell; }

  /* Modal — centered dialog */
  .modal-overlay { align-items: center; }
  .modal { border-radius: 14px; width: 520px; max-width: 95vw; max-height: 90vh; animation: fadeIn .18s ease-out; }
  @keyframes fadeIn { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }
  .modal::before { display: none; }
  .modal-body { padding: 20px 24px; }
  .modal-footer { padding: 16px 24px; }

  /* Charts */
  .chart-container { height: 220px; }

  /* Bottom nav hidden on desktop */
  .bottom-nav { display: none; }
}

/* =============================================
   LARGE DESKTOP  ≥ 1024px
   ============================================= */
@media (min-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}
