/* ============================================================
   AINY OLSHOP — Invoice Management System
   Premium Green Theme  |  Vanilla CSS
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Greens */
  --green-50:  #f0fdf4;
  --green-100: #dcfce7;
  --green-200: #bbf7d0;
  --green-300: #86efac;
  --green-400: #4ade80;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-800: #166534;
  --green-900: #14532d;
  --green-950: #0a3a1a;

  /* Neutrals */
  --gray-50:  #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --gray-950: #020617;

  /* Semantic */
  --primary:       #166534;
  --primary-light:  #22c55e;
  --primary-dark:   #14532d;
  --accent:         #f59e0b;
  --accent-light:   #fbbf24;
  --danger:         #ef4444;
  --danger-light:   #fca5a5;
  --success:        #10b981;
  --info:           #3b82f6;

  /* Surface */
  --bg-body:     #f0f4f3;
  --bg-card:     #ffffff;
  --bg-sidebar:  linear-gradient(180deg, #14532d 0%, #166534 50%, #15803d 100%);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted:    #94a3b8;

  /* Misc */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.04);
  --transition: all .25s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }
img { max-width: 100%; display: block; }

/* ── Loading Overlay ───────────────────────────────────────── */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.loading-overlay.active { opacity: 1; pointer-events: all; }

.spinner {
  width: 48px; height: 48px;
  border: 4px solid var(--green-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast ─────────────────────────────────────────────────── */
.toast-container {
  position: fixed; top: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 10000;
}
.toast {
  padding: 14px 22px;
  border-radius: var(--radius-md);
  color: #fff;
  font-weight: 500;
  font-size: .9rem;
  box-shadow: var(--shadow-lg);
  animation: toastIn .4s ease;
  display: flex; align-items: center; gap: 10px;
  max-width: 380px;
}
.toast.success { background: linear-gradient(135deg, #059669, #10b981); }
.toast.error   { background: linear-gradient(135deg, #dc2626, #ef4444); }
.toast.info    { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.toast.warning { background: linear-gradient(135deg, #d97706, #f59e0b); }
.toast-icon { font-size: 1.2rem; }

@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

/* ================================================================
   LOGIN PAGE
   ================================================================ */
.login-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #0a3a1a 0%, #14532d 30%, #166534 60%, #15803d 100%);
  position: relative; overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(34,197,94,.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(245,158,11,.08) 0%, transparent 50%);
  pointer-events: none;
}

.login-card {
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  width: 100%; max-width: 420px;
  position: relative; z-index: 2;
  box-shadow: 0 25px 50px rgba(0,0,0,.3);
  animation: fadeUp .6s ease;
}
@keyframes fadeUp {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.login-logo {
  text-align: center; margin-bottom: 32px;
}
.login-logo .logo-icon {
  width: 88px; height: 88px;
  background: rgba(255,255,255,.96);
  border-radius: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  padding: 10px;
  box-shadow: 0 10px 28px rgba(15,23,42,.22);
}
.login-logo .logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.login-logo h1 {
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 1px;
}
.login-logo p {
  color: rgba(255,255,255,.55);
  font-size: .85rem;
  margin-top: 4px;
}

.login-form { display: flex; flex-direction: column; gap: 18px; }

.form-group { position: relative; }
.form-group label {
  display: block;
  color: rgba(255,255,255,.7);
  font-size: .8rem; font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: .5px;
}
.form-group input {
  width: 100%; padding: 13px 16px 13px 44px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-md);
  color: #fff; font-size: .95rem;
  transition: var(--transition);
  outline: none;
}
.form-group input::placeholder { color: rgba(255,255,255,.3); }
.form-group input:focus {
  border-color: var(--green-400);
  background: rgba(255,255,255,.12);
  box-shadow: 0 0 0 3px rgba(34,197,94,.15);
}
.form-group .input-icon {
  position: absolute; bottom: 13px; left: 14px;
  color: rgba(255,255,255,.35); font-size: 1.1rem;
  pointer-events: none;
}

.btn-login {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--green-500), var(--green-600));
  color: #fff; font-weight: 700; font-size: 1rem;
  border: none; border-radius: var(--radius-md);
  transition: var(--transition);
  text-transform: uppercase; letter-spacing: .5px;
  margin-top: 6px;
}
.btn-login:hover {
  background: linear-gradient(135deg, var(--green-400), var(--green-500));
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(34,197,94,.3);
}
.btn-login:active { transform: translateY(0); }

.login-footer {
  text-align: center;
  margin-top: 28px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  color: rgba(255,255,255,.4);
  font-size: .78rem;
}

/* ================================================================
   MAIN LAYOUT (Sidebar + Content)
   ================================================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  color: #fff;
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0;
  height: 100vh; z-index: 100;
  transition: transform .3s ease;
}

.sidebar-header {
  padding: 28px 22px 20px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-header .brand {
  display: flex; align-items: center; gap: 12px;
}
.sidebar-header .brand-icon {
  width: 50px; height: 50px;
  background: rgba(255,255,255,.95);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  padding: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.sidebar-header .brand-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.sidebar-header .brand-text h2 {
  font-size: 1.05rem; font-weight: 800;
  letter-spacing: .5px;
}
.sidebar-header .brand-text span {
  font-size: .7rem; opacity: .6;
  text-transform: uppercase; letter-spacing: 1px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}
.nav-section-title {
  font-size: .65rem; text-transform: uppercase;
  letter-spacing: 1.5px; color: rgba(255,255,255,.35);
  padding: 12px 12px 6px; font-weight: 700;
}

.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: rgba(255,255,255,.7);
  font-size: .88rem; font-weight: 500;
  transition: var(--transition);
  margin-bottom: 2px;
  border: none; background: none; width: 100%;
  text-align: left;
}
.nav-item:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.nav-item.active {
  background: rgba(255,255,255,.15);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.nav-item .nav-icon {
  width: 20px; text-align: center; font-size: 1rem;
}
.nav-item .nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #000;
  padding: 1px 8px;
  border-radius: 99px;
  font-size: .7rem; font-weight: 700;
}

.nav-submenu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 4px 0 10px 18px;
  padding-left: 14px;
  border-left: 1px solid rgba(255,255,255,.14);
}

.nav-subitem {
  border: none;
  background: none;
  color: rgba(255,255,255,.58);
  font-size: .8rem;
  text-align: left;
  padding: 7px 12px;
  border-radius: 10px;
  transition: var(--transition);
}

.nav-subitem:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
}

.nav-subitem.active {
  color: #fff;
  background: rgba(255,255,255,.14);
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}

.sidebar-footer {
  padding: 16px 16px 20px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  background: rgba(255,255,255,.06);
  border-radius: var(--radius-md);
}
.sidebar-user .avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--green-400), var(--accent));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
}
.sidebar-user .user-info { flex: 1; }
.sidebar-user .user-info .name { font-size: .82rem; font-weight: 600; }
.sidebar-user .user-info .role { font-size: .68rem; opacity: .5; }
.btn-logout {
  background: none; border: none;
  color: rgba(255,255,255,.4);
  font-size: 1rem;
  padding: 4px;
  transition: var(--transition);
}
.btn-logout:hover { color: var(--danger); }

/* ── Main Content ────────────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 0;
  min-height: 100vh;
  min-width: 0;
}

.content-header {
  background: #fff;
  padding: 20px 32px;
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow-sm);
}
.content-header h2 {
  font-size: 1.3rem; font-weight: 700;
  color: var(--text-primary);
}
.content-header .header-actions {
  display: flex; align-items: center; gap: 12px;
}

.header-settings-btn,
.header-logout-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  transition: var(--transition);
}

.header-settings-btn {
  background: #fff;
  color: var(--text-secondary);
  border: 1px solid var(--gray-200);
  box-shadow: 0 10px 20px rgba(15, 23, 42, .08);
}

.header-settings-btn:hover {
  border-color: var(--green-300);
  color: var(--green-800);
}

.header-logout-btn {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
  box-shadow: 0 10px 20px rgba(220, 38, 38, .18);
}

.header-logout-btn:hover {
  transform: translateY(-1px);
}

.content-body {
  padding: 28px 32px;
  min-width: 0;
}

/* ── Page section ────────────────────────────────────────── */
.page-section {
  display: none;
}
.page-section.active {
  display: block;
  animation: pageFadeIn .35s ease;
}
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   CARDS & PANELS
   ================================================================ */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
}
.card-header h3 {
  font-size: 1rem; font-weight: 700;
  color: var(--text-primary);
  min-width: 0;
}
.card-header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}
.card-body { padding: 24px; }

/* Stat cards (dashboard) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 22px;
  border: 1px solid var(--gray-200);
  display: flex; align-items: flex-start; gap: 16px;
  transition: var(--transition);
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.stat-icon.green  { background: var(--green-100); color: var(--green-700); }
.stat-icon.amber  { background: #fef3c7; color: #d97706; }
.stat-icon.blue   { background: #dbeafe; color: #2563eb; }
.stat-icon.red    { background: #fee2e2; color: #dc2626; }

.stat-info h4 {
  font-size: .78rem; color: var(--text-secondary);
  font-weight: 500; text-transform: uppercase;
  letter-spacing: .5px; margin-bottom: 4px;
}
.stat-info .stat-value {
  font-size: 1.5rem; font-weight: 800;
  color: var(--text-primary);
}

/* ================================================================
   FORMS
   ================================================================ */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.field {
  display: flex; flex-direction: column; gap: 5px;
}
.field label {
  font-size: .8rem; font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: .3px;
}
.field input,
.field select,
.field textarea {
  padding: 11px 14px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--text-primary);
  transition: var(--transition);
  outline: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22,101,52,.1);
}
.field input.error { border-color: var(--danger); }
.field .help-text { font-size: .72rem; color: var(--text-muted); }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600; font-size: .88rem;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--green-600), var(--green-700));
  color: #fff;
  box-shadow: 0 2px 8px rgba(22,101,52,.2);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--green-500), var(--green-600));
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(22,101,52,.25);
}

.btn-secondary {
  background: var(--gray-100);
  color: var(--text-primary);
  border: 1px solid var(--gray-300);
}
.btn-secondary:hover {
  background: var(--gray-200);
}

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: #fff;
}
.btn-danger:hover {
  background: linear-gradient(135deg, #b91c1c, #dc2626);
}

.btn-accent {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #fff;
}
.btn-accent:hover {
  background: linear-gradient(135deg, #b45309, #d97706);
}

.btn-success {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
}

.btn-sm { padding: 7px 14px; font-size: .8rem; }
.btn-xs { padding: 5px 10px; font-size: .72rem; border-radius: var(--radius-sm); }
.btn-icon { padding: 8px; width: 36px; height: 36px; }

.btn-group {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-top: 14px;
}

/* ================================================================
   TABLES
   ================================================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
}
table thead th {
  background: var(--green-900);
  color: #fff;
  padding: 12px 16px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  text-align: left;
  white-space: nowrap;
}
table thead th:first-child { border-radius: var(--radius-md) 0 0 0; }
table thead th:last-child  { border-radius: 0 var(--radius-md) 0 0; }

table tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--gray-100);
  font-size: .88rem;
  color: var(--text-primary);
}
table tbody tr:nth-child(even) {
  background: var(--gray-50);
}
table tbody tr:hover {
  background: var(--green-50);
}
table tbody tr:last-child td { border-bottom: none; }

.table-actions {
  display: flex; gap: 6px;
  flex-wrap: wrap;
}

/* ================================================================
   INVOICE TABLE (for form input rows)
   ================================================================ */
.invoice-item-table input {
  width: 100%;
  padding: 8px 10px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  transition: var(--transition);
}
.invoice-item-table input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(22,101,52,.1);
}
.invoice-item-table input[type="number"] { text-align: right; }
.invoice-item-table .subtotal-cell {
  font-weight: 700; color: var(--green-800);
  text-align: right; white-space: nowrap;
}

.responsive-table td[data-label] {
  position: relative;
}

/* ================================================================
   INVOICE PRINT VIEW
   ================================================================ */
.print-invoice {
  max-width: 860px;
  margin: 0 auto;
  background:
    radial-gradient(circle at top right, rgba(34,197,94,.08), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, #fbfdfb 100%);
  border-radius: 28px;
  border: 1px solid rgba(20,83,45,.08);
  box-shadow: 0 24px 50px rgba(15, 23, 42, .12);
  overflow: hidden;
}

.print-header {
  background:
    radial-gradient(circle at top left, rgba(255,255,255,.12), transparent 24%),
    linear-gradient(135deg, #0d4b29 0%, #166534 52%, #1d7a45 100%);
  color: #fff;
  padding: 30px 34px 26px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}
.print-brand {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
}
.print-brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1);
}
.print-brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.print-brand-copy {
  min-width: 0;
}
.print-kicker {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: .72;
}
.print-brand-copy h2 {
  font-size: 2.15rem;
  font-weight: 900;
  letter-spacing: 3px;
  margin-top: 4px;
}
.print-subtitle {
  font-size: .88rem;
  color: rgba(255,255,255,.78);
  margin-top: 4px;
}
.print-title {
  flex: 0 0 250px;
  width: 250px;
  display: grid;
  gap: 14px;
}
.print-status-badge {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
}
.print-status-badge.is-paid {
  background: rgba(16,185,129,.18);
  color: #dcfce7;
  border: 1px solid rgba(167,243,208,.28);
}
.print-status-badge.is-pending {
  background: rgba(245,158,11,.18);
  color: #fef3c7;
  border: 1px solid rgba(253,230,138,.24);
}
.print-meta-stack {
  display: grid;
  gap: 10px;
}
.print-meta-item {
  display: grid;
  gap: 3px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.12);
}
.print-meta-item .meta-label {
  font-size: .72rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255,255,255,.66);
}
.print-meta-item .meta-value {
  font-size: .96rem;
  font-weight: 700;
}

.print-body {
  padding: 28px 34px 34px;
}

.print-overview {
  display: flex;
  align-items: stretch;
  gap: 16px;
  margin-bottom: 22px;
}
.print-customer-panel {
  flex: 1 1 auto;
  min-width: 0;
}
.print-panel {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbf8 100%);
  border: 1px solid rgba(20,83,45,.08);
  border-radius: 22px;
  padding: 18px 20px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}
.panel-eyebrow {
  font-size: .72rem;
  font-weight: 700;
  color: var(--green-700);
  letter-spacing: 1.3px;
  text-transform: uppercase;
}
.panel-title {
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-top: 6px;
  line-height: 1.25;
}
.print-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin-top: 16px;
}
.print-detail-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(240,253,244,.75);
  border: 1px solid rgba(34,197,94,.12);
  font-size: .84rem;
  min-width: 0;
}
.print-detail-row.is-wide {
  grid-column: 1 / -1;
}
.print-detail-row .detail-label {
  color: var(--text-muted);
  font-weight: 600;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .8px;
}
.print-detail-row .detail-value {
  color: var(--text-primary);
  font-weight: 600;
  word-break: break-word;
  line-height: 1.35;
  text-align: left;
}
.print-overview-panel {
  flex: 0 0 220px;
  width: 220px;
  align-self: stretch;
}
.print-stat-grid {
  display: grid;
  gap: 12px;
  height: 100%;
}
.print-stat-card {
  padding: 16px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--green-50), #ffffff);
  border: 1px solid rgba(34,197,94,.16);
  min-height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.print-stat-card .stat-label {
  display: block;
  font-size: .74rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.print-stat-card .stat-value {
  display: block;
  margin-top: 4px;
  font-size: 1.1rem;
  color: var(--green-900);
}

.print-table {
  width: 100%;
  margin-top: 6px;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .05);
}
.print-table thead th {
  background: linear-gradient(135deg, var(--green-800), var(--green-900));
  color: #fff;
  padding: 12px 14px;
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  text-align: left;
  border: none;
}
.print-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(226,232,240,.8);
  font-size: .88rem;
  background: #fff;
}
.print-table tbody tr:nth-child(even) td { background: #f9fcfa; }
.print-table .text-right { text-align: right; }
.print-table .text-center { text-align: center; }
.print-table .highlight-row td { background: #fdf6c9; }

.print-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  margin-top: 22px;
}
.print-note-copy {
  margin-top: 10px;
  font-size: .9rem;
  line-height: 1.65;
  color: var(--text-secondary);
}
.print-info-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.print-info-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(148,163,184,.35);
  font-size: .87rem;
  color: var(--text-secondary);
}
.print-info-row .info-label {
  font-weight: 600;
}
.print-info-row .info-value {
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
}

.print-summary {
  margin: 0 0 0 auto;
  width: 100%;
  display: grid;
  gap: 10px;
  padding: 20px 20px 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f6faf7 100%);
  border: 1px solid rgba(20,83,45,.08);
  border-radius: 24px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}
.summary-heading {
  font-size: .76rem;
  font-weight: 800;
  color: var(--green-700);
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.print-summary .summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px 150px;
  align-items: center;
  column-gap: 10px;
}
.print-summary .summary-label {
  text-align: right;
  font-weight: 500;
  color: var(--text-secondary);
}
.print-summary .summary-sep {
  text-align: center;
  color: var(--text-muted);
}
.print-summary .summary-value {
  text-align: right;
  font-weight: 700;
  white-space: nowrap;
  padding: 6px 14px;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-top: 2px solid rgba(15,23,42,.92);
  border-bottom: 2px solid rgba(15,23,42,.92);
  border-radius: 12px;
  background: #fff;
}
.print-summary .summary-row.featured .summary-label,
.print-summary .summary-row.outstanding .summary-label {
  font-weight: 600;
  color: var(--text-primary);
}
.print-summary .summary-row.featured .summary-value,
.print-summary .summary-row.outstanding .summary-value {
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  border-color: transparent;
}
.print-summary .summary-row.featured .summary-value {
  background: linear-gradient(135deg, #3c725f, #255744);
}
.print-summary .summary-row.outstanding .summary-value {
  background: linear-gradient(135deg, var(--green-700), var(--green-800));
}

.print-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(34,197,94,.2);
  text-align: center;
}
.print-footer .shop-name {
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--green-800);
  letter-spacing: .8px;
}
.print-footer .shop-detail {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.print-footer .shop-contact {
  font-size: .78rem;
  color: var(--text-secondary);
  margin-top: 6px;
}

/* ================================================================
   MODAL
   ================================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 8000;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
}
.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal {
  background: #fff;
  border-radius: var(--radius-xl);
  width: 100%; max-width: 540px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-xl);
  transform: scale(.92); transition: transform .3s;
}
.modal-overlay.active .modal { transform: scale(1); }

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 1.05rem; font-weight: 700; }
.modal-close {
  background: var(--gray-100);
  border: none;
  width: 32px; height: 32px;
  border-radius: 8px;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.modal-close:hover { background: var(--gray-200); }

.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-100);
  display: flex; justify-content: flex-end; gap: 10px;
}

/* ================================================================
   CUSTOMER SEARCH / AUTOCOMPLETE
   ================================================================ */
.customer-search-wrapper {
  position: relative;
}
.customer-search-results {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  max-height: 220px; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  z-index: 60;
  display: none;
}
.customer-search-results.show { display: block; }
.customer-search-results .search-item {
  padding: 10px 14px;
  cursor: pointer;
  display: flex; flex-direction: column;
  transition: var(--transition);
  border-bottom: 1px solid var(--gray-50);
}
.customer-search-results .search-item:hover {
  background: var(--green-50);
}
.customer-search-results .search-item .item-name {
  font-weight: 600; font-size: .88rem;
}
.customer-search-results .search-item .item-detail {
  font-size: .75rem; color: var(--text-muted);
}

/* ================================================================
   EMPTY STATE
   ================================================================ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: .4;
}
.empty-state p { font-size: .9rem; }

/* ================================================================
   SETTINGS PAGE
   ================================================================ */
.settings-card { max-width: 860px; }
.settings-divider {
  border: 0;
  border-top: 1px solid var(--gray-200);
  margin: 24px 0;
}

.wa-settings-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  margin-bottom: 18px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(34,197,94,.18), transparent 45%),
    linear-gradient(135deg, #f0fdf4, #ffffff);
  border: 1px solid var(--green-200);
}

.wa-settings-intro h4 {
  font-size: 1rem;
  color: var(--green-900);
  margin-bottom: 4px;
}

.wa-settings-intro p {
  font-size: .82rem;
  color: var(--text-secondary);
  max-width: 520px;
}

.wa-template-section {
  display: grid;
  gap: 18px;
}

.wa-template-grid {
  display: grid;
  gap: 16px;
}

.wa-template-card,
.wa-template-preview-card,
.wa-placeholder-box {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  padding: 18px;
}

.wa-template-card-head,
.wa-template-preview-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 14px;
}

.wa-template-card-head h5,
.wa-template-preview-head h5 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.wa-template-card-head p,
.wa-template-preview-head p {
  font-size: .8rem;
  color: var(--text-muted);
}

.wa-template-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex: 0 0 auto;
}

.wa-template-icon.is-header {
  background: #dcfce7;
  color: #166534;
}

.wa-template-icon.is-body {
  background: #dbeafe;
  color: #1d4ed8;
}

.wa-template-icon.is-footer {
  background: #fef3c7;
  color: #92400e;
}

.wa-template-card textarea {
  min-height: 116px;
  resize: vertical;
  font-family: inherit;
  line-height: 1.55;
}

.wa-placeholder-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .86rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.wa-placeholder-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wa-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--green-50);
  border: 1px solid var(--green-200);
  color: var(--green-800);
  font-size: .77rem;
  font-weight: 700;
}

.wa-template-preview {
  margin: 0;
  border-radius: var(--radius-md);
  padding: 16px;
  background: #0f172a;
  color: #e5f6ea;
  font-size: .82rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

.wa-submenu-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.wa-submenu-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--gray-200);
  background: #fff;
  color: var(--text-secondary);
  font-weight: 600;
  transition: var(--transition);
}

.wa-submenu-tab:hover {
  border-color: var(--green-300);
  color: var(--green-800);
}

.wa-submenu-tab.active {
  background: linear-gradient(135deg, var(--green-600), var(--green-700));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(22,101,52,.16);
}

.wa-tab-panel {
  display: none;
}

.wa-tab-panel.active {
  display: block;
}

.wa-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.wa-panel-header h4 {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.wa-panel-header p {
  font-size: .8rem;
  color: var(--text-muted);
}

.wa-generate-actions {
  margin-bottom: 14px;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  color: var(--text-secondary);
  font-size: .84rem;
}

.checkbox-inline input {
  width: 16px;
  height: 16px;
}

.wa-result-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  padding: 18px;
  min-height: 180px;
}

.wa-result-empty {
  min-height: 142px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  text-align: center;
}

.wa-result-empty i {
  font-size: 1.8rem;
  color: var(--green-700);
}

.wa-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.wa-result-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.wa-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .2px;
}

.wa-status-badge.success {
  background: var(--green-100);
  color: var(--green-800);
}

.wa-status-badge.warning {
  background: #fef3c7;
  color: #92400e;
}

.wa-status-badge.error {
  background: #fee2e2;
  color: #991b1b;
}

.wa-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.wa-info-item {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: #fff;
  border: 1px solid var(--gray-200);
}

.wa-info-label {
  font-size: .72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 6px;
}

.wa-info-value {
  font-size: .86rem;
  color: var(--text-primary);
  font-weight: 600;
  word-break: break-word;
}

.wa-result-message {
  font-size: .84rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.wa-raw-json {
  margin-top: 16px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--gray-900);
  color: #e2e8f0;
  font-size: .76rem;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.wa-qr-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.wa-qr-image-wrap {
  width: min(100%, 320px);
  padding: 18px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.wa-qr-image-wrap img {
  width: 100%;
  height: auto;
}

/* ================================================================
   MOBILE SIDEBAR TOGGLE
   ================================================================ */
.sidebar-toggle {
  display: none;
  position: fixed; top: 14px; left: 14px;
  z-index: 200;
  background: var(--primary);
  color: #fff;
  border: none;
  width: 42px; height: 42px;
  border-radius: var(--radius-md);
  font-size: 1.2rem;
  box-shadow: var(--shadow-md);
}

.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 90;
}

.mobile-bottom-shell {
  display: none;
}

.mobile-bottom-nav {
  display: none;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .sidebar,
  .sidebar-toggle,
  .sidebar-backdrop {
    display: none !important;
  }

  .app-layout {
    display: block;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
  }

  .content-header {
    padding: 16px 18px;
    gap: 12px;
    align-items: center;
    flex-wrap: nowrap;
  }

  .content-header h2 {
    font-size: 1.1rem;
    flex: 1;
  }

  .content-body {
    padding: 18px 14px calc(120px + env(safe-area-inset-bottom));
  }

  .card,
  .card-body,
  .card-header,
  .field,
  .table-wrapper,
  .table-wrapper table {
    min-width: 0;
  }

  .card-header {
    flex-wrap: wrap;
    align-items: stretch;
  }

  .header-settings-btn,
  .header-logout-btn {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .card-header .btn {
    width: 100%;
  }

  .card-header-actions {
    width: 100%;
  }

  .card-header-actions .btn {
    width: 100%;
  }

  .btn-group {
    display: grid;
    grid-template-columns: 1fr;
  }

  .btn-group .btn {
    width: 100%;
  }

  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }

  .wa-settings-intro,
  .wa-panel-header,
  .wa-template-card-head,
  .wa-template-preview-head {
    flex-direction: column;
  }

  .wa-submenu-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .wa-submenu-tab {
    justify-content: center;
  }

  .wa-placeholder-chips {
    gap: 8px;
  }

  .nav-submenu {
    margin-left: 14px;
    padding-left: 10px;
  }

  .table-wrapper {
    overflow: visible;
  }

  .table-wrapper.scroll-mobile {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .table-scroll-mobile {
    min-width: 720px;
  }

  .responsive-table:not(.table-scroll-mobile) thead {
    display: none;
  }

  .responsive-table:not(.table-scroll-mobile),
  .responsive-table:not(.table-scroll-mobile) tbody,
  .responsive-table:not(.table-scroll-mobile) tr,
  .responsive-table:not(.table-scroll-mobile) td {
    display: block;
    width: 100%;
  }

  .responsive-table:not(.table-scroll-mobile) tbody {
    display: grid;
    gap: 12px;
  }

  .responsive-table:not(.table-scroll-mobile) tbody tr {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 14px;
  }

  .responsive-table:not(.table-scroll-mobile) tbody tr:nth-child(even),
  .responsive-table:not(.table-scroll-mobile) tbody tr:hover {
    background: #fff;
  }

  .responsive-table:not(.table-scroll-mobile) tbody td {
    padding: 0;
    border: none;
  }

  .responsive-table:not(.table-scroll-mobile) tbody td + td {
    margin-top: 10px;
  }

  .responsive-table:not(.table-scroll-mobile) td[data-label] {
    display: grid;
    gap: 5px;
    word-break: break-word;
  }

  .responsive-table:not(.table-scroll-mobile) td[data-label]::before {
    content: attr(data-label);
    font-size: .72rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .06em;
  }

  .responsive-table:not(.table-scroll-mobile) .empty-state {
    padding: 28px 16px;
  }

  .responsive-table:not(.table-scroll-mobile) .empty-state::before {
    content: none;
  }

  .responsive-table:not(.table-scroll-mobile) .table-actions {
    display: flex;
    justify-content: stretch;
    gap: 8px;
  }

  .responsive-table:not(.table-scroll-mobile) .table-actions .btn {
    flex: 1 1 0;
  }

  .invoice-item-table tbody tr {
    padding: 16px;
  }

  .invoice-item-table tbody td {
    margin-top: 0;
  }

  .invoice-item-table tbody td + td {
    margin-top: 12px;
  }

  .invoice-item-table td[data-label] {
    gap: 7px;
  }

  .invoice-item-table input {
    min-height: 42px;
  }

  .invoice-item-table .subtotal-cell {
    text-align: left;
  }

  .invoice-item-table .btn-remove-item {
    width: 100%;
  }

  .mobile-bottom-shell {
    display: block;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 210;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border-radius: 26px;
    background: rgba(20, 83, 45, .92);
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: 0 18px 34px rgba(15, 23, 42, .2);
    backdrop-filter: blur(18px);
  }

  .mobile-bottom-nav .nav-item {
    margin: 0;
    min-width: 0;
    min-height: 58px;
    padding: 10px 6px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: rgba(255,255,255,.72);
    text-align: center;
    font-size: .66rem;
    font-weight: 700;
  }

  .mobile-bottom-nav .nav-item:hover {
    background: rgba(255,255,255,.1);
  }

  .mobile-bottom-nav .nav-item.active {
    background: rgba(255,255,255,.16);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  }

  .mobile-bottom-nav .nav-icon {
    width: auto;
    font-size: 1rem;
  }

  .mobile-nav-label {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .print-invoice { border-radius: 0; }
  .print-header { flex-direction: column; gap: 16px; }
  .print-header .print-title { flex: 0 0 auto; width: 100%; max-width: none; }
  .print-summary { max-width: 100%; }
  .print-summary .summary-row { grid-template-columns: minmax(110px, 1fr) 16px minmax(140px, 170px); }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .login-card { padding: 32px 24px; margin: 16px; }

  .mobile-bottom-nav {
    left: 10px;
    right: 10px;
    gap: 6px;
    padding: 8px;
  }

  .mobile-bottom-nav .nav-item {
    min-height: 54px;
    padding: 8px 4px;
    font-size: .62rem;
  }
}

@media (max-width: 560px) {
  .print-overview { display: grid; grid-template-columns: 1fr; }
  .print-bottom-grid { grid-template-columns: 1fr; }
  .print-detail-list { grid-template-columns: 1fr; }
  .print-overview-panel { width: 100%; flex: 0 0 auto; }
  .print-detail-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ================================================================
   PRINT MEDIA
   ================================================================ */
@media print {
  @page { size: A4 portrait; margin: 6mm; }
  body { background: #fff !important; }
  .sidebar, .content-header, .sidebar-toggle, .sidebar-backdrop,
  .btn-group, .no-print, .toast-container, .loading-overlay { display: none !important; }
  .main-content { margin-left: 0 !important; }
  .content-body { padding: 0 !important; }
  .print-invoice {
    box-shadow: none !important;
    border-radius: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    border: none !important;
    background: #fff !important;
  }
  .print-header {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 16px !important;
    padding: 18px 22px 14px !important;
  }
  .print-brand {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }
  .print-brand-mark {
    width: 44px !important;
    height: 44px !important;
    border-radius: 14px !important;
    font-size: .92rem !important;
  }
  .print-kicker {
    font-size: .62rem !important;
    letter-spacing: 1.6px !important;
  }
  .print-brand-copy h2 {
    font-size: 1.6rem !important;
    letter-spacing: 2px !important;
    margin-top: 2px !important;
  }
  .print-subtitle {
    font-size: .74rem !important;
    margin-top: 2px !important;
  }
  .print-header .print-title {
    flex: 0 0 210px !important;
    width: 210px !important;
    text-align: left !important;
  }
  .print-status-badge {
    padding: 5px 10px !important;
    font-size: .66rem !important;
  }
  .print-meta-stack {
    gap: 6px !important;
  }
  .print-meta-item {
    padding: 7px 10px !important;
    border-radius: 12px !important;
  }
  .print-meta-item .meta-label {
    font-size: .64rem !important;
  }
  .print-meta-item .meta-value {
    font-size: .82rem !important;
  }
  .print-body {
    padding: 16px 22px 18px !important;
  }
  .print-overview {
    display: flex !important;
    gap: 12px !important;
    margin-bottom: 12px !important;
  }
  .print-customer-panel { flex: 1 1 auto !important; min-width: 0 !important; }
  .print-overview-panel { flex: 0 0 190px !important; width: 190px !important; }
  .print-panel {
    padding: 12px 14px !important;
    border-radius: 16px !important;
    box-shadow: none !important;
  }
  .panel-eyebrow {
    font-size: .64rem !important;
  }
  .panel-title {
    font-size: 1rem !important;
    margin-top: 4px !important;
  }
  .print-detail-list {
    margin-top: 10px !important;
    gap: 8px 10px !important;
  }
  .print-detail-row {
    padding: 7px 9px !important;
    border-radius: 10px !important;
    font-size: .76rem !important;
  }
  .print-detail-row .detail-label {
    font-size: .62rem !important;
  }
  .print-detail-row .detail-value {
    font-size: .76rem !important;
    line-height: 1.25 !important;
  }
  .print-stat-grid {
    gap: 8px !important;
  }
  .print-stat-card {
    min-height: 54px !important;
    padding: 8px 11px !important;
    border-radius: 12px !important;
  }
  .print-stat-card .stat-label {
    font-size: .64rem !important;
  }
  .print-stat-card .stat-value {
    font-size: .92rem !important;
    margin-top: 2px !important;
  }
  .print-table {
    margin-top: 0 !important;
    border-radius: 14px !important;
    box-shadow: none !important;
  }
  .print-table thead th {
    padding: 7px 9px !important;
    font-size: .64rem !important;
  }
  .print-table tbody td {
    padding: 7px 9px !important;
    font-size: .72rem !important;
  }
  .print-bottom-grid {
    grid-template-columns: minmax(0, 1fr) 270px !important;
    gap: 10px !important;
    margin-top: 10px !important;
  }
  .print-note-copy {
    display: none !important;
  }
  .print-info-list {
    gap: 6px !important;
    margin-top: 0 !important;
  }
  .print-info-row {
    padding-bottom: 4px !important;
    font-size: .73rem !important;
  }
  .print-summary {
    padding: 10px 10px 8px !important;
    gap: 5px !important;
    border-radius: 16px !important;
    box-shadow: none !important;
  }
  .summary-heading {
    font-size: .64rem !important;
    margin-bottom: 0 !important;
  }
  .print-summary .summary-row {
    grid-template-columns: minmax(0, 1fr) 12px 120px !important;
    column-gap: 6px !important;
  }
  .print-summary .summary-label,
  .print-summary .summary-sep {
    font-size: .74rem !important;
  }
  .print-summary .summary-value {
    min-height: 24px !important;
    padding: 2px 9px !important;
    font-size: .78rem !important;
  }
  .print-footer {
    margin-top: 10px !important;
    padding-top: 8px !important;
  }
  .print-footer .shop-name {
    font-size: .84rem !important;
  }
  .print-footer .shop-detail,
  .print-footer .shop-contact {
    font-size: .67rem !important;
    margin-top: 3px !important;
  }
  .print-header, .print-overview, .print-table, .print-bottom-grid, .print-footer {
    break-inside: avoid !important;
    page-break-inside: avoid !important;
  }
  .card { border: none !important; box-shadow: none !important; }
}

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }
.sidebar ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); }
