/* ═══════════════════════════════════════════════
   Customer Portal — Emerald/Teal Design System
   ═══════════════════════════════════════════════ */

:root {
  --c-primary:     #059669;
  --c-primary-d:   #047857;
  --c-primary-l:   #d1fae5;
  --c-secondary:   #0891b2;
  --c-accent:      #f59e0b;
  --c-danger:      #ef4444;
  --c-warning:     #f59e0b;
  --c-success:     #10b981;
  --c-info:        #3b82f6;

  --c-bg:          #f0fdf4;
  --c-surface:     #ffffff;
  --c-border:      #d1fae5;
  --c-border-md:   #a7f3d0;
  --c-text:        #111827;
  --c-text-muted:  #6b7280;
  --c-text-light:  #9ca3af;

  --shadow-sm:   0 1px 3px rgba(0,0,0,.08);
  --shadow-md:   0 4px 12px rgba(5,150,105,.12);
  --shadow-lg:   0 8px 24px rgba(5,150,105,.16);
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   24px;

  --sidebar-w:   250px;
  --topbar-h:    64px;
  --transition:  .2s ease;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-d); }
img { max-width: 100%; display: block; }
input, select, textarea, button { font: inherit; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: var(--c-border-md); border-radius: 99px; }

/* ═══════════════════════════════════════
   AUTH PAGES (login / signup)
   ═══════════════════════════════════════ */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 40%, #a7f3d0 100%);
}
.auth-card {
  background: var(--c-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 460px;
  padding: 40px 36px;
  border: 1px solid var(--c-border);
}
.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo img { width: 56px; margin: 0 auto 10px; }
.auth-logo h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--c-primary-d);
}
.auth-logo p { font-size: .85rem; color: var(--c-text-muted); margin-top: 4px; }

.auth-tabs {
  display: flex;
  background: var(--c-bg);
  border-radius: var(--radius-md);
  padding: 4px;
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  padding: 9px;
  text-align: center;
  font-size: .875rem;
  font-weight: 500;
  color: var(--c-text-muted);
  border-radius: 7px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: none;
}
.auth-tab.active {
  background: var(--c-surface);
  color: var(--c-primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: .82rem; font-weight: 600; color: #374151; }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--c-border-md);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: var(--c-text);
  background: var(--c-surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(5,150,105,.12);
}
.form-group .input-row {
  display: flex;
  gap: 8px;
}
.form-group .input-row input { flex: 1; }

.form-hint { font-size: .78rem; color: var(--c-text-muted); margin-top: 2px; }
.form-error { font-size: .78rem; color: var(--c-danger); margin-top: 2px; display: none; }
.form-error.show { display: block; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--c-text-muted);
  font-size: .8rem;
  margin: 4px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--c-border-md);
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: .85rem;
  color: var(--c-text-muted);
}

/* ── Signup Steps ── */
.signup-step { display: none; }
.signup-step.active { display: flex; flex-direction: column; gap: 16px; }
.step-indicator {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 4px;
}
.step-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-border-md);
  transition: var(--transition);
}
.step-dot.active { background: var(--c-primary); width: 20px; border-radius: 4px; }

/* ═══════════════════════════════════════
   APP LAYOUT (dashboard + pages)
   ═══════════════════════════════════════ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.c-sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #064e3b 0%, #065f46 100%);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-brand h1 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}
.sidebar-brand span { color: #6ee7b7; font-size: .75rem; font-weight: 400; display: block; }
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-avatar {
  width: 36px; height: 36px;
  background: var(--c-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
  color: #fff;
  flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-size: .82rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-id { font-size: .72rem; color: #6ee7b7; }

.sidebar-nav { flex: 1; padding: 10px 0; }
.nav-section-label {
  font-size: .68rem;
  font-weight: 600;
  color: rgba(255,255,255,.35);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 12px 20px 4px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  color: rgba(255,255,255,.7);
  font-size: .875rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border-left: 3px solid transparent;
  text-decoration: none;
}
.nav-item:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
}
.nav-item.active {
  background: rgba(110,231,183,.12);
  color: #6ee7b7;
  border-left-color: #6ee7b7;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--c-danger);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-footer .nav-item {
  border-radius: var(--radius-sm);
  border-left: none;
  color: rgba(255,255,255,.5);
}
.sidebar-footer .nav-item:hover { color: #fca5a5; background: rgba(239,68,68,.08); }

/* ── Topbar ── */
.c-topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  z-index: 99;
  box-shadow: var(--shadow-sm);
}
.topbar-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--c-text-muted);
  padding: 6px;
}
.topbar-title { flex: 1; font-size: 1rem; font-weight: 600; color: var(--c-text); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  background: none;
  border: 1.5px solid var(--c-border-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-muted);
  position: relative;
  transition: var(--transition);
}
.topbar-icon-btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.topbar-icon-btn svg { width: 18px; height: 18px; }
.notif-dot {
  position: absolute;
  top: 4px; right: 4px;
  width: 8px; height: 8px;
  background: var(--c-danger);
  border-radius: 50%;
  border: 2px solid var(--c-surface);
}

/* ── Main Content ── */
.c-main {
  margin-left: var(--sidebar-w);
  margin-top: var(--topbar-h);
  padding: 24px;
  flex: 1;
  min-width: 0;
}

/* ── Page Header ── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.page-header-left h1 { font-size: 1.35rem; font-weight: 700; color: var(--c-text); }
.page-header-left p  { font-size: .85rem; color: var(--c-text-muted); margin-top: 2px; }
.page-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ═══════════════════════════════════════
   CARDS & STAT TILES
   ═══════════════════════════════════════ */
.card {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-sm);
}
.card-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card-header h3 { font-size: .95rem; font-weight: 600; color: var(--c-text); }
.card-body { padding: 20px; }
.card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: .82rem;
  color: var(--c-text-muted);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--c-border);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.green  { background: #d1fae5; color: #059669; }
.stat-icon.teal   { background: #cffafe; color: #0891b2; }
.stat-icon.amber  { background: #fef3c7; color: #d97706; }
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.stat-icon.red    { background: #fee2e2; color: #dc2626; }

.stat-content { flex: 1; min-width: 0; }
.stat-value {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--c-text);
  line-height: 1.2;
}
.stat-label { font-size: .78rem; color: var(--c-text-muted); margin-top: 2px; }
.stat-sub   { font-size: .75rem; color: var(--c-primary); font-weight: 600; margin-top: 4px; }

/* ═══════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-primary   { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-d); color: #fff; }
.btn-secondary { background: var(--c-surface); color: var(--c-text); border: 1.5px solid var(--c-border-md); }
.btn-secondary:hover { border-color: var(--c-primary); color: var(--c-primary); }
.btn-danger    { background: var(--c-danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-ghost     { background: transparent; color: var(--c-text-muted); padding: 8px 12px; }
.btn-ghost:hover { background: var(--c-bg); color: var(--c-text); }
.btn-sm        { padding: 6px 12px; font-size: .8rem; }
.btn-lg        { padding: 13px 28px; font-size: .95rem; }
.btn-block     { width: 100%; justify-content: center; }
.btn:disabled  { opacity: .55; cursor: not-allowed; }
.btn-loader    { display: none; }
.btn.loading .btn-loader { display: inline-block; }
.btn.loading .btn-text { opacity: 0; }

/* ═══════════════════════════════════════
   BADGES & STATUSES
   ═══════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-info    { background: #dbeafe; color: #1e40af; }
.badge-gray    { background: #f3f4f6; color: #374151; }
.badge-purple  { background: #ede9fe; color: #5b21b6; }

/* ═══════════════════════════════════════
   TABLES
   ═══════════════════════════════════════ */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead th {
  background: var(--c-bg);
  padding: 11px 14px;
  text-align: left;
  font-size: .75rem;
  font-weight: 700;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--c-border-md);
  white-space: nowrap;
}
tbody tr {
  border-bottom: 1px solid var(--c-border);
  transition: background var(--transition);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--c-bg); }
tbody td { padding: 12px 14px; color: var(--c-text); vertical-align: middle; }
.td-muted { color: var(--c-text-muted); font-size: .82rem; }

/* ═══════════════════════════════════════
   EMPTY & LOADING STATES
   ═══════════════════════════════════════ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  gap: 10px;
}
.empty-state svg  { width: 48px; height: 48px; color: var(--c-border-md); }
.empty-state h4   { font-size: .95rem; font-weight: 600; color: var(--c-text); }
.empty-state p    { font-size: .85rem; color: var(--c-text-muted); max-width: 260px; }

.skeleton {
  background: linear-gradient(90deg, #f0fdf4 25%, #d1fae5 50%, #f0fdf4 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--c-border-md);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════
   COUPON CARDS
   ═══════════════════════════════════════ */
.coupon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.coupon-card {
  background: var(--c-surface);
  border: 2px dashed var(--c-border-md);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.coupon-card:hover { border-color: var(--c-primary); box-shadow: var(--shadow-md); }
.coupon-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: linear-gradient(180deg, var(--c-primary), var(--c-secondary));
}
.coupon-code {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--c-primary-d);
  letter-spacing: .06em;
  font-family: 'Courier New', monospace;
}
.coupon-title { font-size: .9rem; font-weight: 600; color: var(--c-text); margin: 6px 0 4px; }
.coupon-desc  { font-size: .8rem; color: var(--c-text-muted); }
.coupon-meta  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.coupon-tag   { font-size: .72rem; background: var(--c-primary-l); color: var(--c-primary-d); padding: 2px 8px; border-radius: 99px; font-weight: 600; }
.coupon-expiry { font-size: .73rem; color: var(--c-text-muted); margin-left: auto; }
.coupon-apply-btn {
  margin-top: 10px;
  width: 100%;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--c-primary-l);
  color: var(--c-primary-d);
  font-size: .82rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: .03em;
}
.coupon-apply-btn:hover { background: var(--c-primary); color: #fff; }
.coupon-used-badge {
  position: absolute;
  top: 12px; right: 14px;
  font-size: .65rem;
  background: #f3f4f6;
  color: var(--c-text-muted);
  padding: 2px 7px;
  border-radius: 99px;
  font-weight: 600;
}

/* ═══════════════════════════════════════
   ORDER CARDS
   ═══════════════════════════════════════ */
.order-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--c-border);
}
.order-item:last-child { border-bottom: none; }
.order-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-md);
  background: var(--c-primary-l);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-primary);
  flex-shrink: 0;
  font-size: 1.1rem;
}
.order-info { flex: 1; min-width: 0; }
.order-name { font-size: .875rem; font-weight: 600; color: var(--c-text); }
.order-id   { font-size: .75rem; color: var(--c-text-muted); }
.order-amount { text-align: right; }
.order-amount-value { font-size: .9rem; font-weight: 700; color: var(--c-text); }
.order-amount-discount { font-size: .72rem; color: var(--c-success); font-weight: 600; }

/* ═══════════════════════════════════════
   MODALS
   ═══════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(3px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal {
  background: var(--c-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(12px) scale(.98);
  transition: transform var(--transition);
}
.modal-overlay.show .modal { transform: none; }
.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 { font-size: 1rem; font-weight: 700; }
.modal-close {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  background: var(--c-bg);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-muted);
  font-size: 1.1rem;
  transition: var(--transition);
}
.modal-close:hover { background: #fee2e2; color: var(--c-danger); }
.modal-body   { padding: 20px 24px; }
.modal-footer { padding: 14px 24px; border-top: 1px solid var(--c-border); display: flex; gap: 10px; justify-content: flex-end; }

/* ═══════════════════════════════════════
   ALERTS & TOASTS
   ═══════════════════════════════════════ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: .875rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: #d1fae5; color: #064e3b; border: 1px solid #a7f3d0; }
.alert-error   { background: #fee2e2; color: #7f1d1d; border: 1px solid #fecaca; }
.alert-warning { background: #fef3c7; color: #78350f; border: 1px solid #fde68a; }
.alert-info    { background: #dbeafe; color: #1e3a8a; border: 1px solid #bfdbfe; }

.toast-container {
  position: fixed;
  top: 80px; right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 340px;
}
.toast {
  background: var(--c-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .875rem;
  font-weight: 500;
  border-left: 4px solid;
  animation: slideIn .25s ease;
}
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: none; opacity: 1; } }
.toast.success { border-color: var(--c-success); }
.toast.error   { border-color: var(--c-danger); }
.toast.info    { border-color: var(--c-info); }
.toast svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ═══════════════════════════════════════
   COUPON APPLY BOX (in order form)
   ═══════════════════════════════════════ */
.coupon-box {
  background: var(--c-bg);
  border: 1.5px dashed var(--c-border-md);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.coupon-box-row { display: flex; gap: 8px; }
.coupon-box input {
  flex: 1;
  padding: 9px 14px;
  border: 1.5px solid var(--c-border-md);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  outline: none;
  background: var(--c-surface);
  text-transform: uppercase;
  letter-spacing: .05em;
  transition: border-color var(--transition);
}
.coupon-box input:focus { border-color: var(--c-primary); }
.coupon-result { margin-top: 8px; font-size: .82rem; }
.coupon-result.success { color: #065f46; }
.coupon-result.error   { color: var(--c-danger); }

.discount-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .85rem;
  color: var(--c-success);
  font-weight: 600;
  padding: 4px 0;
}
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .9rem;
  font-weight: 700;
  padding: 8px 0 0;
  border-top: 1px solid var(--c-border);
  color: var(--c-text);
}

/* ═══════════════════════════════════════
   NOTIFICATIONS PANEL
   ═══════════════════════════════════════ */
.notif-panel {
  position: fixed;
  top: var(--topbar-h);
  right: 0;
  width: 340px;
  height: calc(100vh - var(--topbar-h));
  background: var(--c-surface);
  border-left: 1px solid var(--c-border);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition);
  box-shadow: -4px 0 20px rgba(0,0,0,.08);
}
.notif-panel.open { transform: none; }
.notif-panel-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
}
.notif-panel-body { flex: 1; overflow-y: auto; }
.notif-item {
  padding: 14px 18px;
  border-bottom: 1px solid var(--c-border);
  cursor: pointer;
  transition: background var(--transition);
}
.notif-item:hover { background: var(--c-bg); }
.notif-item.unread { background: #f0fdf4; }
.notif-item-title { font-size: .85rem; font-weight: 600; color: var(--c-text); }
.notif-item-msg   { font-size: .8rem; color: var(--c-text-muted); margin-top: 2px; }
.notif-item-time  { font-size: .72rem; color: var(--c-text-light); margin-top: 4px; }

/* ═══════════════════════════════════════
   FORMS (detail forms, settings)
   ═══════════════════════════════════════ */
.form-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.form-group2 { display: flex; flex-direction: column; gap: 5px; }
.form-group2 label { font-size: .82rem; font-weight: 600; color: #374151; }
.form-group2 input,
.form-group2 select,
.form-group2 textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--c-border-md);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  color: var(--c-text);
  background: var(--c-surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group2 input:focus,
.form-group2 select:focus,
.form-group2 textarea:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(5,150,105,.1);
}

/* ═══════════════════════════════════════
   PAGINATION
   ═══════════════════════════════════════ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px;
  flex-wrap: wrap;
}
.page-btn {
  min-width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--c-border-md);
  background: var(--c-surface);
  color: var(--c-text-muted);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  transition: var(--transition);
}
.page-btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.page-btn.active { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ═══════════════════════════════════════
   MOBILE OVERLAY
   ═══════════════════════════════════════ */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.4);
  z-index: 99;
}
.sidebar-overlay.show { display: block; }

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
  .c-sidebar { transform: translateX(-100%); }
  .c-sidebar.open { transform: none; }
  .c-main { margin-left: 0; padding: 16px; }
  .c-topbar { left: 0; padding: 0 14px; }
  .topbar-menu-btn { display: flex; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .auth-card { padding: 28px 20px; }
  .modal { max-width: 100%; border-radius: var(--radius-lg) var(--radius-lg) 0 0; margin-top: auto; max-height: 85vh; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .notif-panel { width: 100%; }
  .coupon-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: stretch; }
  .page-header-actions { justify-content: flex-end; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 24px 16px; }
}

/* ═══════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════ */
.d-none     { display: none !important; }
.d-flex     { display: flex !important; }
.d-grid     { display: grid !important; }
.flex-1     { flex: 1; }
.gap-8      { gap: 8px; }
.gap-12     { gap: 12px; }
.gap-16     { gap: 16px; }
.mt-8       { margin-top: 8px; }
.mt-16      { margin-top: 16px; }
.mt-24      { margin-top: 24px; }
.mb-16      { margin-bottom: 16px; }
.mb-24      { margin-bottom: 24px; }
.text-sm    { font-size: .82rem; }
.text-xs    { font-size: .75rem; }
.text-muted { color: var(--c-text-muted); }
.text-success { color: var(--c-success); }
.text-danger  { color: var(--c-danger); }
.fw-600     { font-weight: 600; }
.fw-700     { font-weight: 700; }
.text-center { text-align: center; }
.w-100      { width: 100%; }
