/* ================================
   VENAD SWEETS — SHARED STYLES
   ================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@600;700&display=swap");

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

:root {
  /* Primary: Maroon */
  --green: #8B1A1A;
  --green-dark: #5C1010;
  --green-light: #C0392B;
  --green-bg: #fdf0f0;
  --green-pale: #fff5f5;

  /* Accent: Gold */
  --gold: #C8951A;
  --gold-light: #F5C842;
  --gold-bg: #FDF8E1;

  --bg: #f7f3f0;
  --surface: #ffffff;
  --sidebar-bg: #ffffff;
  --card: #ffffff;
  --border: #e8ddd8;
  --border-light: #f3ede9;

  --text: #1e1616;
  --text-sub: #4a3030;
  --muted: #7a5c5c;
  --muted-light: #b08080;

  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --info: #3b82f6;
  --info-bg: #eff6ff;
  --success: #22c55e;
  --success-bg: #f0fdf4;

  --radius: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(139,26,26,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 16px rgba(139,26,26,0.09);
  --shadow-lg: 0 10px 32px rgba(139,26,26,0.14);
  --transition: 0.2s ease;
  --sidebar-w: 234px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: inherit;
}

input,
select,
textarea {
  font-family: inherit;
}

img {
  display: block;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: var(--border-light);
}

::-webkit-scrollbar-thumb {
  background: #C0392B;
  border-radius: 3px;
}

/* ---- LAYOUT ---- */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ---- SIDEBAR ---- */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px;
  border-bottom: 1px solid var(--border);
}

.brand-logo-wrap {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--green-light), var(--green-dark));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(139,26,26,0.35);
}

.brand-logo-wrap svg {
  width: 22px;
  height: 22px;
  color: white;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-name {
  font-family: "Poppins", sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--green-dark);
}

.brand-sub {
  font-size: 0.6rem;
  color: var(--muted-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.nav-section {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted-light);
  padding: 10px 8px 4px;
  font-weight: 600;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.845rem;
  font-weight: 500;
  transition: all var(--transition);
  position: relative;
}

.nav-link svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.nav-link:hover {
  background: var(--green-bg);
  color: var(--green-dark);
}

.nav-link.active {
  background: var(--green-bg);
  color: var(--green-dark);
  font-weight: 600;
}

.nav-link.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  background: var(--gold);
  border-radius: 0 3px 3px 0;
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--border);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--green-pale);
  border: 1px solid var(--border);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-light), var(--green-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  color: white;
  flex-shrink: 0;
}

.user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.user-role {
  font-size: 0.67rem;
  color: var(--muted);
}

.logout-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--muted-light);
  padding: 4px;
  border-radius: 5px;
  display: flex;
  transition: color var(--transition);
}

.logout-btn:hover {
  color: var(--danger);
}

.logout-btn svg {
  width: 15px;
  height: 15px;
}

/* ---- MAIN ---- */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  /* Fix flexbox overflow */
}

/* ---- TOPBAR ---- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

.page-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 1px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.clock {
  font-size: 0.82rem;
  color: var(--muted);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all var(--transition);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.icon-btn:hover {
  border-color: var(--green);
  color: var(--green-dark);
  background: var(--green-bg);
}

/* ---- PAGE CONTENT ---- */
.content {
  padding: 24px 28px;
  flex: 1;
}

/* ---- CARDS ---- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.card-title svg {
  width: 17px;
  height: 17px;
  color: var(--green);
}

/* ---- STATS ---- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition:
    transform var(--transition),
    box-shadow var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-icon-bg {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.stat-icon-bg.green {
  background: var(--green-bg);
}

.stat-icon-bg.blue {
  background: var(--info-bg);
}

.stat-icon-bg.red {
  background: var(--danger-bg);
}

.stat-icon-bg.amber {
  background: var(--warning-bg);
}

.stat-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 4px 0 2px;
  color: var(--text);
}

.stat-change {
  font-size: 0.7rem;
  color: var(--muted);
}

.stat-change.up {
  color: var(--success);
}

.stat-change.down {
  color: var(--danger);
}

/* ---- FORM ELEMENTS ---- */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

label {
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.req {
  color: var(--danger);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap .icon {
  position: absolute;
  left: 11px;
  color: var(--muted-light);
  pointer-events: none;
}

.input-wrap .icon svg {
  width: 15px;
  height: 15px;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="time"],
input[type="tel"],
select,
textarea {
  width: 100%;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.875rem;
  padding: 9px 13px;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
  outline: none;
  -webkit-appearance: none;
}

.input-wrap input,
.input-wrap select {
  padding-left: 36px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(139,26,26,0.10);
  background: white;
}

select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 15px;
  padding-right: 34px;
}

select option {
  background: white;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.field-error input,
.field-error select,
.field-error textarea {
  border-color: var(--danger);
}

.err-msg {
  font-size: 0.72rem;
  color: var(--danger);
  display: none;
  margin-top: 2px;
}

.field-error .err-msg {
  display: block;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.855rem;
  font-weight: 600;
  border: none;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn svg {
  width: 15px;
  height: 15px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--green-light), var(--green-dark));
  color: white;
  box-shadow: 0 2px 10px rgba(139,26,26,0.3);
}

.btn-primary:hover {
  box-shadow: 0 4px 16px rgba(139,26,26,0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--green-light);
  color: var(--green-dark);
  background: var(--green-pale);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1.5px solid #fecaca;
}

.btn-danger:hover {
  background: #fee2e2;
}

.btn-sm {
  padding: 6px 13px;
  font-size: 0.78rem;
}

.btn-xs {
  padding: 4px 10px;
  font-size: 0.73rem;
  border-radius: 6px;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

/* ---- BADGE ---- */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge-green {
  background: var(--green-bg);
  color: var(--green-dark);
}

.badge-gold {
  background: var(--gold-bg);
  color: #7a5c00;
}

.badge-red {
  background: var(--danger-bg);
  color: var(--danger);
}

.badge-amber {
  background: var(--warning-bg);
  color: #b45309;
}

.badge-blue {
  background: var(--info-bg);
  color: #1d4ed8;
}

.badge-gray {
  background: #f1f5f9;
  color: var(--muted);
}

/* ---- DATA TABLE ---- */
.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.845rem;
}

.data-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.71rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 2px solid var(--border);
  font-weight: 600;
  background: var(--bg);
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: var(--green-pale);
}

.text-primary { color: var(--green-dark); }
.text-gold { color: var(--gold); }

.data-table tr:last-child td {
  border-bottom: none;
}

/* ---- SECTION DIVIDER ---- */
.section-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-divider::before,
.section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---- TOAST ---- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--text);
  color: white;
  border-radius: var(--radius);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 9px;
  box-shadow: var(--shadow-lg);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 9999;
  min-width: 240px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  background: var(--green-dark);
}

.toast.warning {
  background: #b45309;
}

.toast.error {
  background: var(--danger);
}

.toast svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.toast-msg {
  font-size: 0.85rem;
  font-weight: 500;
}

/* ---- MODAL ---- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(3px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.overlay.show {
  display: flex;
}

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.25s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-lg {
  max-width: 680px;
}

@keyframes modalIn {
  from {
    transform: scale(0.95) translateY(10px);
    opacity: 0;
  }

  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 1.05rem;
  font-weight: 700;
}

.modal-sub {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 3px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  padding: 4px;
  border-radius: 6px;
  transition: all var(--transition);
  display: flex;
}

.modal-close:hover {
  background: var(--bg);
  color: var(--danger);
}

.modal-close svg {
  width: 18px;
  height: 18px;
}

.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

/* ---- CONFIRM DIALOG ---- */
.confirm-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--danger-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.confirm-icon svg {
  width: 26px;
  height: 26px;
  color: var(--danger);
}

/* ---- EMPTY STATE ---- */
.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}

.empty svg {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  opacity: 0.3;
}

.empty p {
  font-size: 0.88rem;
  font-weight: 500;
}

.empty span {
  font-size: 0.78rem;
  color: var(--muted-light);
}

/* ---- SEARCH BAR ---- */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--muted-light);
  pointer-events: none;
}

.search-wrap input {
  padding-left: 34px;
  background: white;
}

/* ---- UTILS ---- */
.hidden {
  display: none !important;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: 8px;
}

.gap-3 {
  gap: 12px;
}

.mt-3 {
  margin-top: 12px;
}

.mb-3 {
  margin-bottom: 12px;
}

.text-muted {
  color: var(--muted);
  font-size: 0.8rem;
}

.text-green {
  color: var(--green-dark);
}

.text-danger {
  color: var(--danger);
}

.fw-600 {
  font-weight: 600;
}

.full-width {
  grid-column: 1 / -1;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 900px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   RESPONSIVE SYSTEM — Venad Sweets
   Mobile: <768px  |  Tablet: 768–1024px  |  Desktop: >1024px
   ============================================================ */

/* ---- Hamburger button (hidden on desktop) ---- */
.hamburger-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  flex-shrink: 0;
  cursor: pointer;
  transition: all var(--transition);
}

.hamburger-btn:hover {
  border-color: var(--green);
  color: var(--green-dark);
}

.hamburger-btn svg {
  width: 18px;
  height: 18px;
}

/* ---- Mobile sidebar overlay backdrop ---- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 99;
}

.sidebar-overlay.show {
  display: block;
}

/* ---- Sidebar transition for mobile slide ---- */
.sidebar {
  transition: transform 0.28s ease;
}

/* ============================================================
   TABLET  768px – 1024px
   ============================================================ */
@media (max-width: 1024px) and (min-width: 769px) {
  :root {
    --sidebar-w: 200px;
  }

  .content {
    padding: 18px 20px;
  }

  .topbar {
    padding: 13px 20px;
  }

  .stats-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-title {
    font-size: 1.1rem;
  }
}

/* ============================================================
   MOBILE  ≤ 768px
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --sidebar-w: 240px;
  }

  /* Sidebar slides in over content */
  .sidebar {
    transform: translateX(-100%);
    z-index: 200;
    box-shadow: var(--shadow-lg);
  }

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

  /* Main takes full width */
  .main {
    margin-left: 0 !important;
  }

  /* Show hamburger */
  .hamburger-btn {
    display: flex;
  }

  /* Topbar compact */
  .topbar {
    padding: 11px 14px;
    gap: 8px;
  }

  .page-title {
    font-size: 0.98rem;
  }

  .page-sub {
    display: none;
  }

  .clock {
    display: none;
  }

  /* Content padding */
  .content {
    padding: 14px 14px;
  }

  /* Stats — 2 columns */
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 14px;
  }

  .stat-value {
    font-size: 1.4rem;
  }

  .stat-icon-bg {
    width: 36px;
    height: 36px;
    right: 10px;
  }

  /* Two-col always stacks */
  .two-col {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Card padding */
  .card {
    padding: 14px 14px;
  }

  /* Form layout — single column on mobile */
  .form-row {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  /* Table horizontal scroll */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .data-table {
    min-width: 540px;
  }

  .data-table th,
  .data-table td {
    padding: 9px 10px;
    font-size: 0.78rem;
  }

  /* Modal — full width on mobile */
  .overlay {
    align-items: flex-end;
  }

  .modal {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 92vh;
  }

  /* Toast bottom centre */
  .toast {
    left: 12px;
    right: 12px;
    bottom: 14px;
    min-width: unset;
  }

  /* Quick grid — 2 col */
  .quick-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  /* Mini table grid — fewer cols */
  .mini-tbl-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }

  /* Waiter / Counter split — stack vertically */
  .waiter-body,
  .counter-body {
    flex-direction: column !important;
    height: auto !important;
    overflow: visible !important;
  }

  .menu-side {
    border-right: none !important;
    border-bottom: 1px solid var(--border);
    max-height: 55vh;
    overflow-y: auto;
  }

  .order-side {
    width: 100% !important;
    max-height: 45vh;
    overflow-y: auto;
  }

  /* KDS — stack columns */
  .kds-body {
    flex-direction: column !important;
    height: auto !important;
    overflow: visible !important;
  }

  .kds-col {
    border-right: none !important;
    border-bottom: 1px solid var(--border);
    max-height: 50vh;
    overflow-y: auto;
  }

  .kds-status-bar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
  }

  /* Topbar right — fewer items */
  .topbar-right {
    gap: 6px;
  }

  .topbar-right .btn-sm {
    padding: 6px 10px;
    font-size: 0.74rem;
  }

  /* Buttons */
  .btn {
    padding: 8px 13px;
    font-size: 0.8rem;
  }

  .btn-sm {
    padding: 5px 10px;
    font-size: 0.74rem;
  }

  /* Login page — single column */
  .login-left {
    display: none !important;
  }

  .login-right {
    padding: 28px 22px !important;
  }

  .login-wrapper {
    max-width: 100%;
    border-radius: var(--radius-lg);
  }

  /* Sidebar footer */
  .user-name,
  .user-role {
    font-size: 0.75rem;
  }

  /* Cat tabs scroll */
  .cat-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .cat-tab {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .tbl-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .tbl-btn {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Mode toggle full width */
  .mode-toggle {
    width: 100%;
  }

  .mode-btn {
    flex: 1;
    text-align: center;
  }

  /* KDS status bar */
  .kds-stat:last-child {
    display: none;
  }
}

/* ============================================================
   VERY SMALL  ≤ 480px
   ============================================================ */
@media (max-width: 480px) {
  .stats-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .quick-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .mini-tbl-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }

  .pay-type-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .topbar-right .btn {
    display: none;
  }

  .topbar-right .btn:first-of-type {
    display: inline-flex;
  }
}

/* =========================
   VENAD SWEETS SIDEBAR
========================= */

:root {
  --sidebar-w: 260px;
  --brand-maroon: #7b1e1e;
  --brand-gold: #d4a017;
  --sidebar-bg: #ffffff;
  --sidebar-border: #e5e7eb;
}

.layout {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  z-index: 1000;
  overflow-y: auto;
  padding: 24px 18px;
  box-sizing: border-box;
}

.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  background: #f9fafb;
}

/* Brand */
.sidebar-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-maroon), #a52a2a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 10px 25px rgba(123, 30, 30, 0.25);
}

.brand-title {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: #6b7280;
}

/* Navigation */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: #4b5563;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.nav-item:hover {
  background: #f3f4f6;
  color: #111827;
}

.nav-item.active {
  background: linear-gradient(90deg, #fdf2e8, #fff7ed);
  color: var(--brand-maroon);
  border-left: 4px solid var(--brand-gold);
  padding-left: 10px;
  font-weight: 700;
}

.nav-label {
  flex: 1;
}

/* Responsive */
@media (max-width: 992px) {
  .sidebar {
    width: 220px;
  }

  .main {
    margin-left: 220px;
  }
}

@media print {
  body {
    background: white !important;
    color: black !important;
  }
  .sidebar, .sidebar-overlay, .topbar, .hamburger-btn, .no-print, button, .btn {
    display: none !important;
  }
  .main {
    margin-left: 0 !important;
    margin-top: 0 !important;
    padding: 0 !important;
  }
  .content {
    padding: 0 !important;
  }
  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
}
