/* ============================================================
   POS System — Master Stylesheet
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --clr-primary:      #2563eb;
  --clr-primary-dk:   #1d4ed8;
  --clr-primary-lt:   #eff6ff;
  --clr-success:      #27ae60;
  --clr-success-dk:   #1e9e53;
  --clr-warning:      #f59e0b;
  --clr-danger:       #F53D5D;
  --clr-danger-dk:    #d42d4e;
  --clr-orange:       #f97316;
  --clr-purple:       #8b5cf6;

  --sidebar-bg:       #1e293b;
  --sidebar-text:     #94a3b8;
  --sidebar-active:   #2563eb;
  --sidebar-hover-bg: rgba(255,255,255,.07);
  --sidebar-width:    240px;

  --bg:               #f1f5f9;
  --card-bg:          #ffffff;
  --border:           #e2e8f0;
  --border-focus:     #2563eb;

  --text-primary:     #0f172a;
  --text-secondary:   #475569;
  --text-muted:       #94a3b8;

  --radius-sm:        8px;
  --radius:           12px;
  --radius-lg:        16px;

  --shadow-sm:        0 1px 4px rgba(0,0,0,.07);
  --shadow:           0 4px 16px rgba(0,0,0,.1);
  --shadow-lg:        0 12px 36px rgba(0,0,0,.14);

  --font:             'Inter', system-ui, -apple-system, sans-serif;
  --transition:       .18s ease;
}

/* ── Alpine.js cloak ────────────────────────────────────────── */
[x-cloak] { display: none !important; }

/* ── Dark mode (toggled via html.dark class by Alpine.js) ───── */
html.dark {
  --bg:             #0f172a;
  --card-bg:        #1e293b;
  --border:         #334155;
  --text-primary:   #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted:     #64748b;
  --sidebar-hover-bg: rgba(255,255,255,.05);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body { font-family: var(--font); font-size: 14px; color: var(--text-primary); background: var(--bg); min-height: 100%; }
a { color: var(--clr-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Typography ─────────────────────────────────────────────── */
h1 { font-size: 1.5rem; font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 600; }
h4 { font-size: .9rem;   font-weight: 600; }
.text-muted   { color: var(--text-muted); }
.text-danger  { color: var(--clr-danger); }
.text-success { color: var(--clr-success); }
.link         { color: var(--clr-primary); font-weight: 500; }
.link:hover   { text-decoration: underline; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1rem; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500; border: 1.5px solid transparent;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn:hover { text-decoration: none; }

.btn--primary  { background: var(--clr-primary);  color: #fff; border-color: var(--clr-primary); }
.btn--primary:hover { background: var(--clr-primary-dk); border-color: var(--clr-primary-dk); }

.btn--success  { background: var(--clr-success);  color: #fff; border-color: var(--clr-success); }
.btn--success:hover { background: var(--clr-success-dk); border-color: var(--clr-success-dk); }

.btn--danger   { background: var(--clr-danger);   color: #fff; border-color: var(--clr-danger); }
.btn--danger:hover  { background: var(--clr-danger-dk); }

.btn--ghost    { background: transparent; color: var(--text-secondary); border-color: var(--border); }
.btn--ghost:hover   { background: var(--bg); }

.btn--full  { width: 100%; justify-content: center; }
.btn--lg    { padding: .75rem 1.5rem; font-size: 1rem; }
.btn--sm    { padding: .35rem .75rem; font-size: .8rem; }
.btn--xs    { padding: .25rem .6rem;  font-size: .75rem; border-radius: 4px; }
.btn--icon  { padding: .45rem; border-radius: var(--radius-sm); }

/* ── Forms ─────────────────────────────────────────────────── */
.form-group  { display: flex; flex-direction: column; gap: .35rem; }
.form-label  { font-size: .8rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .04em; }
.form-input  {
  padding: .55rem .8rem; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: .9rem; color: var(--text-primary);
  background: #fff; transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}
.form-input:focus  { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.form-input--lg    { font-size: 1.2rem; padding: .75rem 1rem; text-align: right; }
.form-input--sm    { font-size: .82rem; padding: .4rem .65rem; }
textarea.form-input { resize: vertical; }
select.form-input  { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; padding-right: 2.2rem; }

.form-row    { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-stack  { display: flex; flex-direction: column; gap: 1rem; }
.form-actions{ display: flex; justify-content: flex-end; gap: .75rem; margin-top: .5rem; }

.input-icon         { position: relative; }
.input-icon__icon   { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); pointer-events: none; }
.input-icon__input  { padding-left: 2.4rem; }
.input-icon__toggle { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-muted); padding: 0; }
.input-icon__toggle svg { width: 16px; height: 16px; }

/* ── Alerts ─────────────────────────────────────────────────── */
.alert {
  padding: .75rem 1rem; border-radius: var(--radius-sm); font-size: .875rem;
  display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem;
  position: relative;
}
.alert--success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert--error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert--info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.alert--warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-close    { background: none; border: none; font-size: 1.2rem; line-height: 1; color: inherit; opacity: .6; padding: 0; flex-shrink: 0; }
.alert-close:hover { opacity: 1; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: .2rem .55rem; border-radius: 999px;
  font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
}
.badge--green  { background: #d1fae5; color: #065f46; }
.badge--blue   { background: #dbeafe; color: #1e40af; }
.badge--orange { background: #ffedd5; color: #9a3412; }
.badge--red    { background: #fee2e2; color: #991b1b; }
.badge--gray   { background: #f1f5f9; color: #475569; }
.badge--purple { background: #ede9fe; color: #5b21b6; }

/* ── Cards ──────────────────────────────────────────────────── */
.card          { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--border); overflow: hidden; }
.card-header   { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.card-title    { font-size: .95rem; font-weight: 600; }
.card-body     { padding: 1.25rem; }
.card-body.p-0 { padding: 0; }
.card-body.p-4 { padding: 1rem; }

/* ── Tables ─────────────────────────────────────────────────── */
.table-responsive { overflow-x: auto; }
.data-table    { width: 100%; border-collapse: collapse; font-size: .875rem; }
.data-table th { padding: .65rem 1rem; text-align: left; font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); background: #f8fafc; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: .7rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #f8fafc; }
.actions-cell  { white-space: nowrap; }

/* ── Stats Grid ─────────────────────────────────────────────── */
.stats-grid    { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.stats-grid--sm{ grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stat-card     { background: var(--card-bg); border-radius: var(--radius); padding: 1.25rem; display: flex; align-items: flex-start; gap: 1rem; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.stat-card__icon { padding: .75rem; border-radius: var(--radius-sm); flex-shrink: 0; }
.stat-card__icon svg { width: 22px; height: 22px; }
.stat-card__value { font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.stat-card__label { font-size: .78rem; color: var(--text-muted); margin-top: .15rem; }

.stat-card--blue   .stat-card__icon { background: #dbeafe; color: var(--clr-primary); }
.stat-card--green  .stat-card__icon { background: #d1fae5; color: var(--clr-success); }
.stat-card--orange .stat-card__icon { background: #ffedd5; color: var(--clr-orange); }
.stat-card--purple .stat-card__icon { background: #ede9fe; color: var(--clr-purple); }

/* ── Modals ─────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.55); backdrop-filter: blur(2px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 1rem; animation: fadeIn .15s ease; }
.modal         { background: var(--card-bg); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 480px; max-height: 90vh; display: flex; flex-direction: column; overflow: hidden; animation: slideUp .2s ease; }
.modal--sm     { max-width: 380px; }
.modal--checkout{ max-width: 520px; }
.modal--invoice { max-width: 420px; overflow-y: auto; }
.modal-header  { display: flex; justify-content: space-between; align-items: center; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.modal-header h3{ font-size: 1rem; font-weight: 600; }
.modal-close   { background: none; border: none; font-size: 1.4rem; line-height: 1; color: var(--text-muted); transition: color var(--transition); }
.modal-close:hover { color: var(--text-primary); }
.modal-body    { padding: 1.25rem; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 1rem; }
.modal-footer  { display: flex; justify-content: flex-end; gap: .75rem; padding: 1rem 1.25rem; border-top: 1px solid var(--border); flex-shrink: 0; }
.hidden        { display: none !important; }
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination    { display: flex; gap: .35rem; padding: 1rem 1.25rem; flex-wrap: wrap; }
.page-btn      { padding: .4rem .75rem; border-radius: var(--radius-sm); border: 1px solid var(--border); font-size: .85rem; color: var(--text-secondary); background: var(--card-bg); transition: background var(--transition); }
.page-btn:hover{ background: var(--clr-primary-lt); border-color: var(--clr-primary); color: var(--clr-primary); text-decoration: none; }
.page-btn.active{ background: var(--clr-primary); border-color: var(--clr-primary); color: #fff; }

/* ── Filter Tabs ────────────────────────────────────────────── */
.filter-tabs   { display: flex; gap: .35rem; flex-wrap: wrap; }
.filter-tab    { padding: .4rem .9rem; border-radius: 999px; font-size: .82rem; font-weight: 500; color: var(--text-secondary); background: var(--card-bg); border: 1px solid var(--border); transition: all var(--transition); }
.filter-tab:hover { text-decoration: none; border-color: var(--clr-primary); color: var(--clr-primary); }
.filter-tab.active { background: var(--clr-primary); border-color: var(--clr-primary); color: #fff; }

/* ── Empty State ─────────────────────────────────────────────── */
.empty-state   { display: flex; flex-direction: column; align-items: center; gap: .75rem; padding: 3rem 2rem; text-align: center; color: var(--text-muted); }
.empty-state svg { opacity: .35; }
.empty-state h3  { color: var(--text-primary); }
.empty-state p   { font-size: .9rem; }

/* ── Toasts ─────────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; display: flex; flex-direction: column; gap: .5rem; }
.toast           { padding: .7rem 1rem; border-radius: var(--radius-sm); font-size: .875rem; font-weight: 500; box-shadow: var(--shadow); animation: slideUp .25s ease; min-width: 220px; max-width: 360px; }
.toast--success  { background: #065f46; color: #fff; }
.toast--error    { background: #991b1b; color: #fff; }
.toast--info     { background: #1e40af; color: #fff; }

/* ── Utility ────────────────────────────────────────────────── */
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.text-center { text-align: center; }

/* Constrained form cards */
.card--form       { max-width: 640px; }
.card--form-sm    { max-width: 480px; }
.card--centered   { margin-left: auto; margin-right: auto; }

/* Section header row inside main content */
.section-header   { display: flex; align-items: center; justify-content: space-between; margin: 1.75rem 0 1rem; }
.section-header h2 { font-size: 1.05rem; font-weight: 600; margin: 0; }

/* Error page large code */
.error-code { font-size: 5rem; line-height: 1; margin-bottom: 1rem; font-weight: 800; color: var(--text-muted); }
.error-actions { margin-top: 1.5rem; display: flex; gap: .75rem; justify-content: center; }

/* ── Page actions bar ───────────────────────────────────────── */
.page-actions  { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.plan-info     { display: flex; align-items: center; gap: .75rem; }

/* ── User cell ──────────────────────────────────────────────── */
.user-cell     { display: flex; align-items: center; gap: .6rem; }
.user-avatar   { width: 32px; height: 32px; border-radius: 50%; background: var(--clr-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; flex-shrink: 0; }
.user-avatar--sm { width: 28px; height: 28px; font-size: .72rem; }

/* ── Image preview ──────────────────────────────────────────── */
.img-preview   { display: flex; align-items: center; gap: .75rem; margin-bottom: .5rem; }

/* ════════════════════════════════════════════════════════════
   DASHBOARD LAYOUT
   ════════════════════════════════════════════════════════════ */
.dashboard-body { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-width); background: var(--sidebar-bg);
  color: var(--sidebar-text); display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; height: 100vh; z-index: 200;
  transition: transform var(--transition);
}
.sidebar-brand { display: flex; align-items: center; gap: .75rem; padding: 1.2rem 1.25rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-icon    { width: 28px; height: 28px; color: var(--clr-primary); flex-shrink: 0; }
.brand-text    { font-size: 1rem; font-weight: 700; color: #fff; white-space: nowrap; }

.sidebar-nav   { flex: 1; overflow-y: auto; padding: .75rem 0; }
.nav-section-label { font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: rgba(148,163,184,.5); padding: .75rem 1.25rem .25rem; }
.nav-item      { display: flex; align-items: center; gap: .75rem; padding: .6rem 1.25rem; color: var(--sidebar-text); font-size: .875rem; font-weight: 500; transition: background var(--transition), color var(--transition); border-radius: 0; }
.nav-item svg  { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: var(--sidebar-hover-bg); color: #fff; text-decoration: none; }
.nav-item.active{ background: rgba(37,99,235,.2); color: #fff; border-right: 3px solid var(--sidebar-active); }
.nav-item--highlight { color: #34d399; }
.nav-item--highlight:hover { color: #6ee7b7; }
.nav-item--disabled {
  opacity: .38;
  pointer-events: none;
  cursor: not-allowed;
}
.nav-item--disabled .nav-lock {
  width: 13px; height: 13px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Active shop context block in sidebar */
.active-shop-ctx {
  margin: .75rem 1rem;
  padding: .6rem .8rem;
  background: rgba(37,99,235,.12);
  border: 1px solid rgba(37,99,235,.28);
  border-radius: var(--radius-sm);
  font-size: .78rem;
}
.active-shop-ctx__label {
  color: rgba(148,163,184,.7);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .68rem;
  font-weight: 600;
}
.active-shop-ctx__name {
  color: #f1f5f9;
  font-weight: 600;
  font-size: .85rem;
  margin: .15rem 0 .35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.active-shop-ctx__change {
  color: #93c5fd;
  font-size: .75rem;
  text-decoration: none;
  font-weight: 500;
}
.active-shop-ctx__change:hover { text-decoration: underline; }

.sidebar-footer { padding: 1rem 1.25rem; border-top: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: .75rem; }
.user-info      { display: flex; align-items: center; gap: .65rem; flex: 1; overflow: hidden; }
.user-info .user-avatar { background: var(--clr-primary); }
.user-details   { overflow: hidden; }
.user-name      { display: block; font-size: .875rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role      { display: block; font-size: .72rem; color: var(--sidebar-text); }
.btn-logout     { background: none; border: none; color: var(--sidebar-text); padding: .35rem; display: flex; align-items: center; transition: color var(--transition); }
.btn-logout svg { width: 18px; height: 18px; }
.btn-logout:hover { color: var(--clr-danger); }

/* Main wrapper */
.main-wrapper  { margin-left: var(--sidebar-width); display: flex; flex-direction: column; min-height: 100vh; flex: 1; }
.topbar        { background: var(--card-bg); border-bottom: 1px solid var(--border); padding: .75rem 1.5rem; display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 100; }
.sidebar-toggle { display: none; background: none; border: none; color: var(--text-secondary); }
.sidebar-toggle svg { width: 20px; height: 20px; }
.page-title    { font-size: 1rem; font-weight: 600; flex: 1; }
.topbar-right  { display: flex; align-items: center; gap: 1rem; margin-left: auto; }
.topbar-date   { font-size: .82rem; color: var(--text-muted); }
.shop-switcher { display: flex; align-items: center; gap: .4rem; }
.shop-switcher svg { width: 16px; height: 16px; color: var(--text-muted); }
.shop-switcher select { font-size: .82rem; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .25rem .5rem; background: var(--card-bg); color: var(--text-primary); }

.main-content  { padding: 1.5rem; flex: 1; max-width: 1400px; width: 100%; }

/* Dashboard row */
.dashboard-row { display: grid; grid-template-columns: 1fr 360px; gap: 1.5rem; margin-top: 1.5rem; }
.chart-card    { overflow: hidden; }

/* ════════════════════════════════════════════════════════════
   SHOPS OVERVIEW (global dashboard)
   ════════════════════════════════════════════════════════════ */
.shops-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.shop-ov-card {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  padding: 1.1rem;
}
.shop-ov-card__header { display: flex; align-items: center; gap: .75rem; }
.shop-ov-card__title h3 { font-size: .95rem; font-weight: 600; margin: 0 0 .2rem; }
.shop-ov-card__addr    { font-size: .8rem; color: var(--text-muted); margin: 0; }
.shop-ov-stats {
  display: flex; gap: .5rem;
  background: var(--bg); border-radius: var(--radius-sm);
  padding: .6rem .75rem;
}
.shop-ov-stat         { flex: 1; display: flex; flex-direction: column; gap: .1rem; text-align: center; }
.shop-ov-stat__label  { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.shop-ov-stat__value  { font-size: .9rem; font-weight: 700; color: var(--text-primary); }
.shop-ov-card__actions { display: flex; gap: .5rem; margin-top: auto; }

/* ════════════════════════════════════════════════════════════
   SHOPS GRID
   ════════════════════════════════════════════════════════════ */
.shops-grid    { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.shop-card     { background: var(--card-bg); border-radius: var(--radius); border: 1px solid var(--border); padding: 1.25rem; display: flex; flex-direction: column; gap: .75rem; box-shadow: var(--shadow-sm); }
.shop-card__header { display: flex; align-items: center; gap: .9rem; }
.shop-card__logo   { width: 44px; height: 44px; border-radius: var(--radius-sm); object-fit: cover; }
.shop-card__logo-placeholder { width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--clr-primary-lt); color: var(--clr-primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; flex-shrink: 0; }
.shop-card__name  { font-size: .95rem; font-weight: 600; }
.shop-card__addr  { font-size: .82rem; color: var(--text-muted); }
.shop-card__phone { font-size: .82rem; color: var(--text-muted); }
.shop-card__actions { display: flex; gap: .5rem; margin-top: auto; }
.shop-card--active {
  border: 2px solid var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.shop-card__active-banner {
  background: var(--clr-primary);
  color: #fff;
  font-size: .72rem;
  font-weight: 600;
  text-align: center;
  padding: .25rem .5rem;
  margin: -.75rem -.75rem .75rem;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.shop-card__meta { display: flex; flex-direction: column; gap: .3rem; }

/* ════════════════════════════════════════════════════════════
   MENU ADMIN GRID
   ════════════════════════════════════════════════════════════ */
.menu-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.menu-admin-card { background: var(--card-bg); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; box-shadow: var(--shadow-sm); }
.menu-admin-card__img { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--bg); }
.menu-admin-card__img img { width: 100%; height: 100%; object-fit: cover; }
.menu-admin-card__placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.menu-admin-card__placeholder svg { width: 40px; height: 40px; }
.menu-status-badge { position: absolute; top: .5rem; right: .5rem; padding: .2rem .5rem; border-radius: 999px; font-size: .68rem; font-weight: 700; }
.menu-status-badge--on  { background: #d1fae5; color: #065f46; }
.menu-status-badge--off { background: #fee2e2; color: #991b1b; }
.menu-admin-card__body { padding: .75rem; }
.menu-admin-card__name { font-size: .9rem; font-weight: 600; display: block; }
.menu-admin-card__cat  { font-size: .75rem; color: var(--text-muted); display: block; margin-top: .1rem; }
.menu-admin-card__price{ font-size: 1rem; font-weight: 700; color: var(--clr-primary); display: block; margin-top: .3rem; }
.menu-admin-card__actions { display: flex; gap: .4rem; padding: .5rem .75rem .75rem; border-top: 1px solid var(--border); }

/* ════════════════════════════════════════════════════════════
   AUTH PAGES
   ════════════════════════════════════════════════════════════ */
.auth-body     { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%); padding: 1rem; }
.auth-wrapper  { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; width: 100%; }
.auth-card     { background: var(--card-bg); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 2rem; width: 100%; max-width: 420px; }
.auth-card--wide { max-width: 560px; }
.auth-brand    { text-align: center; margin-bottom: 1.75rem; }
.auth-logo     { width: 56px; height: 56px; background: var(--clr-primary); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; margin: 0 auto .75rem; }
.auth-logo svg { width: 28px; height: 28px; color: #fff; }
.auth-title    { font-size: 1.5rem; font-weight: 700; }
.auth-subtitle { color: var(--text-muted); margin-top: .25rem; font-size: .9rem; }
.auth-form     { display: flex; flex-direction: column; gap: 1.1rem; }
.auth-footer   { text-align: center; margin-top: 1.25rem; font-size: .875rem; color: var(--text-muted); }
.auth-copyright{ font-size: .75rem; color: rgba(255,255,255,.3); }

/* Shop select grid */
.shop-select-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .75rem; }
.shop-select-card input { display: none; }
.shop-select-card__inner { border: 2px solid var(--border); border-radius: var(--radius); padding: 1rem .75rem; text-align: center; cursor: pointer; transition: border-color var(--transition), background var(--transition); display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.shop-select-card input:checked + .shop-select-card__inner { border-color: var(--clr-primary); background: var(--clr-primary-lt); }
.shop-select-card__logo { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; }
.shop-select-card__placeholder { width: 48px; height: 48px; border-radius: var(--radius-sm); background: var(--clr-primary-lt); color: var(--clr-primary); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.shop-select-card__name { font-size: .875rem; font-weight: 600; }
.shop-select-card__addr { font-size: .75rem; color: var(--text-muted); }

/* ════════════════════════════════════════════════════════════
   POS TERMINAL
   ════════════════════════════════════════════════════════════ */
.pos-body      { display: flex; flex-direction: column; height: 100vh; overflow: hidden; background: var(--bg); }

/* POS Header */
.pos-header    { display: flex; align-items: center; gap: 1rem; padding: .65rem 1.25rem; background: var(--sidebar-bg); color: #fff; flex-shrink: 0; border-bottom: 2px solid rgba(255,255,255,.05); }
.pos-header__brand { display: flex; align-items: center; gap: .65rem; min-width: 160px; }
.pos-header__logo  { width: 32px; height: 32px; border-radius: var(--radius-sm); object-fit: cover; }
.pos-header__name  { font-weight: 700; font-size: .95rem; }
.pos-header__search{ flex: 1; max-width: 340px; position: relative; }
.pos-header__search svg { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: #94a3b8; pointer-events: none; }
.pos-header__search input { width: 100%; padding: .5rem .75rem .5rem 2.25rem; border: 1.5px solid rgba(255,255,255,.15); border-radius: 999px; background: rgba(255,255,255,.08); color: #fff; font-size: .875rem; }
.pos-header__search input::placeholder { color: #64748b; }
.pos-header__search input:focus { outline: none; border-color: var(--clr-primary); background: rgba(255,255,255,.12); }
.pos-header__right { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.pos-header__staff { font-size: .82rem; color: #94a3b8; }
.pos-header__time  { font-size: .82rem; color: #94a3b8; font-variant-numeric: tabular-nums; }

/* POS 2-column layout — always 60/40 flex row, never stacks */
.pos-layout    { display: flex; flex-direction: row; flex: 1; overflow: hidden; min-height: 0; }

/* Menu panel — left 60% */
.pos-menu      { display: flex; flex-direction: column; overflow: hidden; width: 60%; min-width: 0; flex-shrink: 0; }
.category-tabs { display: flex; gap: .4rem; padding: .9rem 1.25rem; overflow-x: auto; flex-shrink: 0; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.category-tabs::-webkit-scrollbar { display: none; }
.cat-tab       { padding: .4rem 1rem; border-radius: 999px; font-size: .82rem; font-weight: 500; border: 1.5px solid var(--border); color: var(--text-secondary); background: var(--card-bg); white-space: nowrap; transition: all var(--transition); cursor: pointer; }
.cat-tab:hover { border-color: var(--clr-primary); color: var(--clr-primary); }
.cat-tab.active{ background: var(--clr-primary); border-color: var(--clr-primary); color: #fff; }

/* Menu scrollable content area */
.pos-menu-content { flex: 1; overflow-y: auto; }

/* Menu grid */
.menu-grid     { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .75rem; padding: .75rem 1.25rem; align-content: start; }
.menu-card     { background: var(--card-bg); border-radius: var(--radius); border: 1.5px solid var(--border); overflow: hidden; cursor: pointer; transition: border-color var(--transition), box-shadow var(--transition), transform .1s; user-select: none; }
.menu-card:hover { border-color: var(--clr-primary); box-shadow: 0 4px 12px rgba(37,99,235,.15); transform: translateY(-2px); }
.menu-card:active{ transform: translateY(0) scale(.98); }
.menu-card__img  { aspect-ratio: 4/3; overflow: hidden; background: var(--bg); }
.menu-card__img img { width: 100%; height: 100%; object-fit: cover; }
.menu-card__placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.menu-card__placeholder svg { width: 36px; height: 36px; }
.menu-card__body  { padding: .6rem .7rem; }
.menu-card__name  { font-size: .82rem; font-weight: 600; display: block; line-height: 1.3; }
.menu-card__cat   { font-size: .7rem; color: var(--text-muted); display: block; margin-top: .1rem; }
.menu-card__price { font-size: .9rem; font-weight: 700; color: var(--clr-primary); display: block; margin-top: .3rem; }

/* Cart panel — right 40%, fixed/sticky */
.pos-cart      { background: var(--card-bg); border-left: 1px solid var(--border); display: flex; flex-direction: column; overflow: hidden; width: 40%; min-width: 0; flex-shrink: 0; }

.cart-customer { padding: .75rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.cart-customer__header { display: flex; align-items: center; gap: .5rem; }
.cart-customer__header svg { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }
.cart-customer__header input { flex: 1; padding: .45rem .65rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: .85rem; }
.cart-customer__header input:focus { outline: none; border-color: var(--border-focus); }
.customer-suggestions { position: relative; background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow); margin-top: .25rem; max-height: 180px; overflow-y: auto; z-index: 50; }
.customer-suggestion-item { padding: .5rem .75rem; cursor: pointer; display: flex; flex-direction: column; font-size: .85rem; }
.customer-suggestion-item:hover { background: var(--clr-primary-lt); }
.customer-suggestion-item span { font-weight: 500; }
.customer-suggestion-item small { color: var(--text-muted); font-size: .75rem; }
.selected-customer { display: flex; align-items: center; gap: .5rem; margin-top: .4rem; background: var(--clr-primary-lt); border-radius: var(--radius-sm); padding: .35rem .65rem; font-size: .85rem; font-weight: 500; color: var(--clr-primary); }
.selected-customer svg { width: 14px; height: 14px; flex-shrink: 0; }
.btn-remove-customer { background: none; border: none; color: var(--text-muted); padding: .2rem; display: flex; align-items: center; margin-left: auto; flex-shrink: 0; }
.btn-remove-customer svg  { width: 14px; height: 14px; }
.btn-remove-customer:hover { color: var(--clr-danger); }

.cart-title    { display: flex; align-items: center; justify-content: space-between; padding: .6rem .9rem; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); border-bottom: 1px solid var(--border); flex-shrink: 0; }
.cart-badge    { background: var(--clr-primary); color: #fff; font-size: .7rem; padding: .1rem .45rem; border-radius: 999px; font-weight: 700; }

.cart-items    { flex: 1; overflow-y: auto; }
.cart-empty    { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: .75rem; color: var(--text-muted); padding: 2rem; text-align: center; }
.cart-empty svg { width: 48px; height: 48px; opacity: .35; }
.cart-empty p   { font-size: .875rem; }
.cart-item      { display: flex; align-items: center; gap: .5rem; padding: .55rem .9rem; border-bottom: 1px solid var(--border); }
.cart-item:last-child { border-bottom: none; }
.cart-item__name { flex: 1; font-size: .82rem; font-weight: 500; line-height: 1.3; }
.cart-item__controls { display: flex; align-items: center; gap: .25rem; }
.qty-btn        { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--card-bg); font-size: .9rem; display: flex; align-items: center; justify-content: center; line-height: 1; transition: background var(--transition); padding: 0; }
.qty-btn:hover  { background: var(--clr-primary-lt); border-color: var(--clr-primary); }
.qty-display    { min-width: 20px; text-align: center; font-size: .85rem; font-weight: 600; }
.cart-item__price { min-width: 60px; text-align: right; font-size: .82rem; font-weight: 600; }
.cart-item__remove { background: none; border: none; color: var(--text-muted); font-size: 1rem; padding: 0 .15rem; line-height: 1; display: flex; align-items: center; }
.cart-item__remove svg { width: 14px; height: 14px; }
.cart-item__remove:hover { color: var(--clr-danger); }

.cart-discount  { padding: .6rem .9rem; border-top: 1px solid var(--border); flex-shrink: 0; display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--text-muted); font-weight: 500; }
.discount-inputs{ display: flex; gap: .35rem; flex: 1; }
.discount-inputs input  { flex: 1; padding: .35rem .5rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: .82rem; min-width: 0; }
.discount-inputs select { padding: .35rem .4rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: .78rem; background: var(--card-bg); color: var(--text-primary); }

.cart-totals    { padding: .65rem .9rem; border-top: 1px solid var(--border); flex-shrink: 0; }
.cart-total-row { display: flex; justify-content: space-between; align-items: center; padding: .25rem 0; font-size: .85rem; color: var(--text-secondary); }
.cart-total-row--grand { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); margin-top: .35rem; padding-top: .4rem; border-top: 1.5px solid var(--border); }

.cart-actions   { display: flex; gap: .65rem; padding: .9rem; border-top: 1px solid var(--border); flex-shrink: 0; }

/* ── Menu loading state ──────────────────────────────────── */
.pos-menu-loading  { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; padding: 3rem 2rem; color: var(--text-muted); font-size: .875rem; }
.pos-spinner       { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--clr-primary); border-radius: 50%; animation: pospin .7s linear infinite; flex-shrink: 0; }
@keyframes pospin  { to { transform: rotate(360deg); } }

/* ── Cart payment details (inline checkout) ──────────────── */
.cart-payment-details { padding: .65rem .9rem; border-top: 1px solid var(--border); flex-shrink: 0; display: flex; flex-direction: column; gap: .5rem; }
.cash-section      { display: flex; flex-direction: column; gap: .4rem; }
.cash-row          { display: flex; align-items: center; gap: .5rem; }
.cash-label        { font-size: .78rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; flex-shrink: 0; min-width: 56px; }
.cash-input        { flex: 1; padding: .5rem .75rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 1rem; font-weight: 700; color: var(--text-primary); background: var(--card-bg); text-align: right; width: 100%; }
.cash-input:focus  { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.cash-input:disabled { opacity: .45; cursor: not-allowed; }
.ref-section       { display: flex; flex-direction: column; gap: .3rem; }
.checkout-err      { font-size: .8rem; color: var(--clr-danger); padding: .35rem .5rem; background: #fef2f2; border-radius: var(--radius-sm); border: 1px solid #fecaca; }
.change-amount--ok  { color: var(--clr-success) !important; }
.change-amount--err { color: var(--clr-danger) !important; }

/* ── POS header dark toggle ──────────────────────────────── */
.pos-dark-btn  { background: none; border: none; color: rgba(255,255,255,.55); padding: .3rem; display: flex; align-items: center; transition: color var(--transition); }
.pos-dark-btn:hover { color: #fff; }
.pos-dark-btn svg { width: 18px; height: 18px; }

/* ── Customer trigger & add ──────────────────────────────── */
.pos-cust-trigger { width: 100%; display: flex; align-items: center; gap: .5rem; padding: .5rem .65rem; background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: .82rem; font-weight: 500; color: var(--text-secondary); cursor: pointer; transition: border-color var(--transition); text-align: left; }
.pos-cust-trigger:hover { border-color: var(--clr-primary); color: var(--clr-primary); }
.pos-cust-trigger svg  { width: 15px; height: 15px; flex-shrink: 0; }
.pos-cust-trigger span { flex: 1; }
.pos-cust-trigger__chevron { opacity: .45; }

.selected-customer__info  { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.selected-customer__name  { font-weight: 600; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.selected-customer__phone { font-size: .75rem; color: var(--text-muted); }

.pos-cust-add  { display: flex; align-items: center; gap: .35rem; margin-top: .4rem; padding: .3rem .5rem; font-size: .75rem; font-weight: 600; color: var(--clr-primary); background: none; border: 1px dashed var(--border); border-radius: var(--radius-sm); width: 100%; cursor: pointer; transition: border-color var(--transition), background var(--transition); }
.pos-cust-add:hover { border-color: var(--clr-primary); background: var(--clr-primary-lt); }
.pos-cust-add svg { width: 13px; height: 13px; }

/* ── Payment grid in cart ────────────────────────────────── */
.pos-payment-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; padding: .6rem .75rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.pos-payment-btn  { padding: .4rem .2rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: .72rem; font-weight: 600; background: var(--bg); color: var(--text-secondary); cursor: pointer; transition: all var(--transition); text-align: center; }
.pos-payment-btn:hover { border-color: var(--clr-primary); color: var(--clr-primary); }
.pos-payment-btn.active { background: var(--clr-primary); border-color: var(--clr-primary); color: #fff; }

/* ── Menu category label (grouped view — outside grid) ───── */
.pos-cat-label { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: var(--clr-primary); padding: .9rem 1.25rem .15rem; display: flex; align-items: center; gap: .65rem; }
.pos-cat-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── Menu card adding/added feedback ─────────────────────── */
.pos-card--adding { opacity: .55; pointer-events: none; }
.pos-card--added  { border-color: var(--clr-success) !important; }

/* ── Customer search modal ───────────────────────────────── */
.pos-search-overlay { align-items: flex-start; padding-top: 5rem; }
.pos-search-modal   { max-width: 560px; max-height: 75vh; }
.pos-search-modal__head  { display: flex; align-items: center; gap: .75rem; padding: .85rem 1.1rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.pos-search-modal__head > svg { width: 18px; height: 18px; color: var(--clr-primary); flex-shrink: 0; }
.pos-search-modal__input { flex: 1; border: none; background: none; font-size: 1rem; font-weight: 500; color: var(--text-primary); outline: none; font-family: var(--font); }
.pos-search-modal__input::placeholder { color: var(--text-muted); }
.pos-search-modal__clear { background: none; border: none; color: var(--text-muted); display: flex; padding: .25rem; cursor: pointer; }
.pos-search-modal__clear svg { width: 16px; height: 16px; }
.pos-search-modal__clear:hover { color: var(--clr-danger); }
.pos-search-modal__body  { flex: 1; overflow-y: auto; }

.pos-search-modal__prompt { display: flex; flex-direction: column; align-items: center; gap: .75rem; padding: 2.5rem 1.5rem; text-align: center; color: var(--text-muted); font-size: .875rem; }
.pos-search-modal__prompt svg { width: 40px; height: 40px; opacity: .3; }

.pos-search-result { display: flex; align-items: center; gap: .75rem; padding: .75rem 1.1rem; cursor: pointer; border-bottom: 1px solid var(--border); transition: background var(--transition); }
.pos-search-result:last-child { border-bottom: none; }
.pos-search-result:hover { background: var(--clr-primary-lt); }
.pos-search-result__info  { flex: 1; min-width: 0; }
.pos-search-result__name  { display: block; font-weight: 700; font-size: .875rem; color: var(--text-primary); }
.pos-search-result__sub   { display: block; font-size: .78rem; color: var(--text-muted); margin-top: .1rem; }
.pos-search-result__check { width: 32px; height: 32px; border-radius: 50%; background: var(--bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background var(--transition); }
.pos-search-result__check svg { width: 14px; height: 14px; color: var(--text-muted); }
.pos-search-result:hover .pos-search-result__check { background: var(--clr-primary); }
.pos-search-result:hover .pos-search-result__check svg { color: #fff; }

/* ── Summary modal section label ─────────────────────────── */
.pos-summary-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin-bottom: .4rem; border-bottom: 1px solid var(--border); padding-bottom: .4rem; }

/* ── Notification modal ──────────────────────────────────── */
.modal--notification { max-width: 320px; text-align: center; padding: 2rem; gap: .75rem; }
.modal--notification h3 { font-size: 1.1rem; font-weight: 800; }
.modal--notification p  { font-size: .875rem; }
.pos-notif-icon { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto; }
.pos-notif-icon svg { width: 30px; height: 30px; }
.pos-notif-icon--success { background: #d1fae5; color: var(--clr-success); }
.pos-notif-icon--error   { background: #fee2e2; color: var(--clr-danger); }

/* ── Checkout modal specifics ─────────────────────────────── */
.checkout-summary  { background: var(--clr-primary); border-radius: var(--radius); padding: 1.25rem; text-align: center; color: #fff; }
.checkout-total-label  { font-size: .8rem; opacity: .8; text-transform: uppercase; letter-spacing: .08em; }
.checkout-total-amount { font-size: 2.2rem; font-weight: 800; margin-top: .25rem; }

.payment-methods { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; }
.payment-method  { border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: .5rem .3rem; text-align: center; cursor: pointer; font-size: .78rem; font-weight: 500; transition: all var(--transition); }
.payment-method input { display: none; }
.payment-method:has(input:checked), .payment-method.active { border-color: var(--clr-primary); background: var(--clr-primary-lt); color: var(--clr-primary); font-weight: 600; }

.change-display { display: flex; justify-content: space-between; align-items: center; background: var(--bg); border-radius: var(--radius-sm); padding: .65rem .9rem; font-size: .875rem; }
.change-amount  { font-size: 1.2rem; font-weight: 700; color: var(--clr-success); }
.quick-amounts  { display: flex; gap: .4rem; flex-wrap: wrap; }
.quick-amount   { padding: .3rem .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: .82rem; cursor: pointer; background: var(--card-bg); color: var(--text-primary); }
.quick-amount:hover { border-color: var(--clr-primary); color: var(--clr-primary); background: var(--clr-primary-lt); }

/* ════════════════════════════════════════════════════════════
   INVOICE
   ════════════════════════════════════════════════════════════ */
.invoice-body  { background: #f1f5f9; min-height: 100vh; padding: 1.5rem; }
.invoice-actions { display: flex; gap: .75rem; justify-content: center; margin-bottom: 1.5rem; }
.invoice-wrapper { background: #fff; max-width: 420px; margin: 0 auto; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.75rem 1.5rem; position: relative; font-size: .875rem; }
.invoice-header { text-align: center; }
.invoice-logo   { max-height: 60px; margin: 0 auto .75rem; }
.invoice-shop   { font-size: 1.1rem; font-weight: 700; }
.invoice-addr   { font-size: .8rem; color: var(--text-muted); margin-top: .2rem; }
.invoice-divider{ border: none; border-top: 1px dashed var(--border); margin: 1rem 0; }
.invoice-meta   { display: flex; flex-direction: column; gap: .3rem; }
.invoice-meta__row { display: flex; justify-content: space-between; font-size: .82rem; }
.invoice-meta__row span:first-child { color: var(--text-muted); }
.invoice-table  { width: 100%; border-collapse: collapse; font-size: .82rem; }
.invoice-table th { padding: .35rem 0; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); border-bottom: 1px solid var(--border); }
.invoice-table td { padding: .4rem 0; border-bottom: 1px solid #f8fafc; }
.invoice-totals { display: flex; flex-direction: column; gap: .3rem; }
.invoice-totals__row { display: flex; justify-content: space-between; font-size: .85rem; }
.invoice-totals__row--grand { font-size: 1rem; font-weight: 700; margin-top: .35rem; padding-top: .4rem; border-top: 1px solid var(--border); }
.invoice-notes  { background: #f8fafc; border-radius: var(--radius-sm); padding: .5rem .75rem; font-size: .8rem; color: var(--text-muted); margin-top: .5rem; }
.invoice-footer { text-align: center; color: var(--text-muted); font-size: .8rem; }
.invoice-footer p { margin-bottom: .2rem; }
.invoice-footer__sub { font-size: .72rem; }
.invoice-void-stamp { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-25deg); font-size: 3.5rem; font-weight: 900; color: rgba(239,68,68,.25); border: 6px solid rgba(239,68,68,.25); border-radius: 8px; padding: .1rem .5rem; text-transform: uppercase; letter-spacing: .2em; pointer-events: none; }

/* Print styles */
@media print {
  .no-print, .invoice-actions { display: none !important; }
  body { background: #fff; }
  .invoice-body { padding: 0; background: #fff; }
  .invoice-wrapper { box-shadow: none; border-radius: 0; }
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .dashboard-row { grid-template-columns: 1fr; }
  /* pos-layout stays flex-row — no override needed */
}

@media (max-width: 768px) {
  .sidebar       { transform: translateX(-100%); }
  .sidebar.open  { transform: translateX(0); }
  .sidebar-toggle{ display: flex; }
  .main-wrapper  { margin-left: 0; }
  /* pos-layout stays 60/40 flex-row on all screen sizes */
  .form-row      { grid-template-columns: 1fr; }
  .payment-methods{ grid-template-columns: repeat(3, 1fr); }
  .menu-grid     { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .pos-header__brand { min-width: unset; }
}

@media (max-width: 480px) {
  .main-content  { padding: 1rem; }
  .stats-grid    { grid-template-columns: 1fr 1fr; }
  .pos-header__search { display: none; }
  .menu-grid     { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: .4rem; padding: .5rem .65rem; }
  /* Compact POS cart panel for narrow screens */
  .pos-payment-grid { grid-template-columns: repeat(4, 1fr); gap: .25rem; padding: .45rem .65rem; }
  .pos-payment-btn  { font-size: .68rem; padding: .35rem .1rem; }
  .cart-customer    { padding: .55rem .65rem; }
  .cart-title       { padding: .45rem .65rem; }
  .cart-item        { padding: .4rem .65rem; gap: .35rem; }
  .cart-item__name  { font-size: .78rem; }
  .cart-item__price { min-width: 50px; font-size: .78rem; }
  .cart-totals      { padding: .45rem .65rem; }
  .cart-total-row--grand { font-size: 1rem; }
  .cart-payment-details { padding: .45rem .65rem; gap: .35rem; }
  .cash-input       { font-size: .9rem; padding: .4rem .55rem; }
  .cart-actions     { padding: .6rem .65rem; gap: .4rem; }
  .pos-cat-label    { padding: .65rem .65rem .1rem; }
  .category-tabs    { padding: .65rem .65rem; }
}
