/* ============================================================
   MOTOCUPONS — DESIGN SYSTEM
   Dark mode SaaS dashboard — Inter font
   ============================================================ */

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #1A1A2E;
  --surface:     #16213E;
  --surface-2:   #0F3460;
  --primary:     #E94560;
  --primary-d:   #c73352;
  --primary-glow:rgba(233, 69, 96, 0.25);
  --success:     #10B981;
  --success-bg:  rgba(16, 185, 129, 0.15);
  --danger:      #EF4444;
  --danger-bg:   rgba(239, 68, 68, 0.15);
  --warning:     #F59E0B;
  --text:        #F0F0F0;
  --text-muted:  #8892A4;
  --border:      rgba(255,255,255,0.08);
  --border-h:    rgba(255,255,255,0.14);
  --glass:       rgba(22, 33, 62, 0.8);
  --radius:      14px;
  --radius-sm:   8px;
  --radius-lg:   20px;
  --shadow:      0 4px 24px rgba(0,0,0,0.35);
  --shadow-glow: 0 0 30px var(--primary-glow);
  --transition:  0.22s ease;
  --font:        'Inter', system-ui, sans-serif;
  --sidebar-w:   240px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* --- LOADING SCREEN --- */
.loading-screen {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 24px;
  background: var(--bg);
  z-index: 9999;
}
.loading-logo {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.8rem; font-weight: 800;
}
.logo-icon { font-size: 2.2rem; }
.logo-text { background: linear-gradient(135deg, #E94560, #FF6B8A); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* --- TYPOGRAPHY --- */
h1 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 800; }
h2 { font-size: clamp(1.1rem, 2.5vw, 1.5rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }
p  { color: var(--text-muted); }

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-h); border-radius: 99px; }

/* --- LAYOUT SHELL --- */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* --- SIDEBAR --- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: fixed; left: 0; top: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
}
.sidebar-header {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.sidebar-logo-icon { font-size: 1.5rem; }
.sidebar-logo-text { font-size: 1rem; font-weight: 800; color: var(--primary); }

.sidebar-tenant {
  margin-top: 10px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex; flex-direction: column; gap: 4px;
  overflow-y: auto;
}
.nav-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 8px 8px 4px;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none; background: none; width: 100%; text-align: left;
  transition: all var(--transition);
}
.nav-link:hover { background: var(--border); color: var(--text); }
.nav-link.active { background: var(--primary-glow); color: var(--primary); }
.nav-link .nav-icon { font-size: 1.1rem; min-width: 20px; text-align: center; }

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}
.user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
}
.user-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--primary-glow);
  border: 2px solid var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700; color: var(--primary);
  flex-shrink: 0;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 0.82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.7rem; color: var(--text-muted); }
.btn-logout {
  background: none; border: none; cursor: pointer; padding: 6px;
  color: var(--text-muted); border-radius: var(--radius-sm);
  transition: all var(--transition); font-size: 1rem;
}
.btn-logout:hover { color: var(--danger); background: var(--danger-bg); }

/* --- MAIN CONTENT --- */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex; flex-direction: column;
  min-height: 100vh;
}
.page-header {
  padding: 28px 32px 0;
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
}
.page-title { }
.page-subtitle { color: var(--text-muted); font-size: 0.875rem; margin-top: 2px; }
.page-body { padding: 24px 32px 40px; }

/* --- CARDS --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  transition: border-color var(--transition);
}
.card:hover { border-color: var(--border-h); }

.card-glass {
  background: var(--glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* --- KPI CARDS --- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}
.kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
}
.kpi-card.primary::before { background: var(--primary); }
.kpi-card.success::before { background: var(--success); }
.kpi-card.warning::before { background: var(--warning); }
.kpi-card.info::before    { background: #6366F1; }
.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.kpi-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
  display: block;
}
.kpi-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}
.kpi-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px;
  border: none; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 0.875rem; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 15px var(--primary-glow);
}
.btn-primary:hover {
  background: var(--primary-d);
  box-shadow: 0 4px 25px rgba(233,69,96,0.4);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--border);
  color: var(--text);
}
.btn-secondary:hover { background: var(--border-h); }
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--border-h); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; }
.btn-lg { padding: 16px 32px; font-size: 1.1rem; border-radius: var(--radius-sm); }
.btn-xl { padding: 20px 40px; font-size: 1.25rem; border-radius: var(--radius); font-weight: 700; }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* --- BADGES --- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(16,185,129,0.3); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger);  border: 1px solid rgba(239,68,68,0.3);  }
.badge-warning { background: rgba(245,158,11,0.15); color: var(--warning); border: 1px solid rgba(245,158,11,0.3); }
.badge-info    { background: rgba(99,102,241,0.15); color: #818CF8; border: 1px solid rgba(99,102,241,0.3); }

/* Badge grande para tela de atendente */
.badge-status-lg {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 32px;
  border-radius: var(--radius);
  font-size: 1.3rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.08em;
  animation: fadeIn 0.3s ease;
}
.badge-status-lg.disponivel {
  background: var(--success-bg);
  color: var(--success);
  border: 2px solid rgba(16,185,129,0.4);
  box-shadow: 0 0 30px rgba(16,185,129,0.15);
}
.badge-status-lg.utilizado {
  background: var(--danger-bg);
  color: var(--danger);
  border: 2px solid rgba(239,68,68,0.4);
  box-shadow: 0 0 30px rgba(239,68,68,0.15);
}

/* --- FORMS --- */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 0.8rem; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.form-control {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font); font-size: 0.9rem;
  padding: 11px 14px;
  transition: all var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.form-control::placeholder { color: var(--text-muted); }
.form-control-lg { padding: 15px 18px; font-size: 1.05rem; border-radius: var(--radius-sm); }
.form-control-search {
  padding-left: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238892A4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 14px center;
}
.search-wrapper {
  position: relative;
}
.search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); pointer-events: none; font-size: 1.1rem;
}
select.form-control option { background: var(--surface); }

/* --- TABLE --- */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); }
table {
  width: 100%; border-collapse: collapse;
  font-size: 0.875rem;
}
thead tr { border-bottom: 1px solid var(--border); }
th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: rgba(255,255,255,0.03); }
tbody tr:last-child td { border-bottom: none; }
.td-muted { color: var(--text-muted); font-size: 0.82rem; }

/* --- MODAL --- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 999;
  animation: fadeIn 0.2s ease;
  padding: 20px;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border-h);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 480px; width: 100%;
  box-shadow: var(--shadow);
  animation: slideUp 0.3s ease;
}
.modal-title { margin-bottom: 8px; }
.modal-body { margin: 16px 0 24px; color: var(--text-muted); }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }

/* --- LOGIN PAGE --- */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}
.login-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.orb-1 {
  width: 400px; height: 400px;
  background: rgba(233,69,96,0.15);
  top: -100px; right: -100px;
}
.orb-2 {
  width: 300px; height: 300px;
  background: rgba(99,102,241,0.1);
  bottom: -80px; left: -80px;
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
  animation: slideUp 0.4s ease;
}
.login-logo {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 8px;
}
.login-logo-icon {
  width: 48px; height: 48px;
  background: var(--primary);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 20px var(--primary-glow);
}
.login-logo-text { font-size: 1.4rem; font-weight: 800; color: var(--text); }
.login-subtitle { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 28px; }
.login-form { margin-top: 4px; }
.login-divider {
  text-align: center; color: var(--text-muted); font-size: 0.75rem;
  margin: 20px 0; position: relative;
}
.login-divider::before, .login-divider::after {
  content: '';
  position: absolute; top: 50%; width: 40%; height: 1px;
  background: var(--border);
}
.login-divider::before { left: 0; }
.login-divider::after  { right: 0; }
.login-role-hint {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.error-msg {
  background: var(--danger-bg);
  border: 1px solid rgba(239,68,68,0.3);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}

/* --- COUPON PAGE (ATENDENTE) --- */
.atendente-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex; flex-direction: column;
}
.atendente-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.atendente-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.1rem;
}
.atendente-body {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center;
  padding: 32px 20px;
  max-width: 640px; width: 100%; margin: 0 auto;
}
.atendente-title {
  text-align: center; margin-bottom: 8px;
}
.atendente-subtitle {
  text-align: center; color: var(--text-muted); margin-bottom: 28px;
}
.search-bar-lg {
  width: 100%; position: relative; margin-bottom: 24px;
}
.search-bar-lg input {
  width: 100%;
  background: var(--surface);
  border: 2px solid var(--border-h);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.15rem;
  padding: 18px 60px 18px 20px;
  outline: none;
  transition: all var(--transition);
}
.search-bar-lg input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-glow); }
.search-bar-lg .search-btn {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: var(--primary); border: none; border-radius: var(--radius-sm);
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #fff; font-size: 1.2rem;
  transition: all var(--transition);
}
.search-bar-lg .search-btn:hover { background: var(--primary-d); }

.coupon-result-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-h);
  border-radius: var(--radius-lg);
  padding: 28px;
  animation: slideUp 0.35s ease;
}
.coupon-result-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
}
.coupon-code {
  font-size: 1.8rem; font-weight: 900;
  color: var(--primary);
  letter-spacing: 0.04em;
}
.coupon-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
.coupon-info-item { }
.coupon-info-label {
  font-size: 0.7rem; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 3px;
}
.coupon-info-value { font-size: 0.95rem; font-weight: 600; }
.coupon-action { margin-top: 20px; }

.no-result {
  text-align: center; padding: 32px 0;
  animation: fadeIn 0.3s ease;
}
.no-result-icon { font-size: 3rem; margin-bottom: 12px; }

/* --- DASHBOARD CHARTS --- */
.chart-container {
  position: relative;
  height: 240px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }

/* --- SUPER ADMIN --- */
.sa-header {
  background: linear-gradient(135deg, var(--surface) 0%, rgba(233,69,96,0.1) 100%);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.sa-badge {
  background: linear-gradient(135deg, var(--primary), #FF6B8A);
  color: #fff;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.tenant-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; align-items: center; gap: 16px;
  transition: all var(--transition);
  cursor: pointer;
}
.tenant-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.tenant-dot {
  width: 12px; height: 12px; border-radius: 50%;
  flex-shrink: 0;
}
.tenant-dot.active { background: var(--success); box-shadow: 0 0 8px var(--success); }
.tenant-dot.inactive { background: var(--text-muted); }

/* --- TABS --- */
.tabs {
  display: flex; gap: 4px;
  background: var(--surface);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  width: fit-content;
}
.tab-btn {
  padding: 8px 18px;
  border: none; background: none;
  color: var(--text-muted); font-family: var(--font);
  font-size: 0.85rem; font-weight: 600;
  border-radius: 6px;
  cursor: pointer;transition: all var(--transition);
}
.tab-btn.active { background: var(--primary); color: #fff; }
.tab-btn:not(.active):hover { color: var(--text); }

/* --- ANIMATIONS --- */
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse   { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }

.animate-fade  { animation: fadeIn 0.3s ease; }
.animate-slide { animation: slideUp 0.35s ease; }
.animate-pulse { animation: pulse 2s infinite; }

/* --- RESPONSIVE ADJUSTMENTS --- */
.hamburger {
  display: none;
  background: none; border: none; color: var(--text);
  font-size: 1.4rem; cursor: pointer; padding: 8px;
}

@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }

  .sidebar {
    transform: translateX(-240px);
    width: 240px;
  }
  .sidebar.open { transform: translateX(0); }

  .main-content { margin-left: 0; }
  .hamburger { display: flex; align-items: center; }

  .page-header { padding: 20px 20px 0; }
  .page-body { padding: 16px 20px 32px; }

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

  .sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); z-index: 99;
  }
  .sidebar-overlay.visible { display: block; }

  .modal { padding: 24px 20px; }
  .coupon-info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .login-card { padding: 32px 24px; }
  .atendente-body { padding: 20px 16px; }
  table { font-size: 0.78rem; }
  th, td { padding: 10px 10px; }
}

/* --- UTILITY --- */
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-col     { display: flex; flex-direction: column; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-primary{ color: var(--primary); }
.text-success{ color: var(--success); }
.text-danger { color: var(--danger); }
.font-bold   { font-weight: 700; }
.font-mono   { font-family: 'Courier New', monospace; letter-spacing: 0.06em; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Empty state */
.empty-state {
  text-align: center; padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 2.8rem; margin-bottom: 12px; }
.empty-state h3 { color: var(--text); margin-bottom: 6px; }

/* Toast notification */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border-h);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.875rem; font-weight: 500;
  box-shadow: var(--shadow);
  animation: slideUp 0.3s ease;
  display: flex; align-items: center; gap: 10px;
  max-width: 320px;
}
.toast-success { border-left: 3px solid var(--success); }
.toast-error   { border-left: 3px solid var(--danger); }
.toast-info    { border-left: 3px solid #6366F1; }

/* ─── Loyalty System ─────────────────────────────────────── */
.loyalty-card {
    background: var(--surface-2);
    border: 1px solid var(--surface-3);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: var(--surface-3);
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #FF8E9E);
    border-radius: 5px;
    transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981 !important;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-primary {
    background: rgba(233, 69, 96, 0.1);
    color: var(--primary) !important;
    border: 1px solid rgba(233, 69, 96, 0.2);
}

.divider {
    height: 1px;
    background: var(--surface-3);
    margin: 24px 0;
}

/* ─── Mobile Responsiveness ──────────────────────────────── */
@media (max-width: 768px) {
  /* Move sidebar to bottom nav */
  .sidebar {
    width: 100vw;
    height: 70px;
    top: auto;
    bottom: 0;
    flex-direction: row;
    border-right: none;
    border-top: 1px solid var(--border);
    padding: 0;
    z-index: 1000;
  }
  
  .sidebar-header, .sidebar-footer {
    display: none; /* Hide logo and user profile card on mobile bottom nav */
  }
  
  .sidebar-nav {
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    padding: 0;
    overflow-y: visible;
    overflow-x: auto;
  }
  
  .nav-section-title {
    display: none;
  }
  
  .nav-link {
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    font-size: 0.65rem;
    text-align: center;
    border-radius: 8px;
    width: auto;
    min-width: 65px;
  }
  
  .nav-link .nav-icon {
    font-size: 1.4rem;
    margin: 0;
  }
  
  /* Adjust main content to avoid overlapping with bottom nav */
  .main-content {
    margin-left: 0;
    padding-bottom: 80px; 
  }
  
  /* Reduce excessive padding on small screens */
  .page-header {
    padding: 16px 16px 0;
  }
  
  .page-body {
    padding: 16px;
  }
  
  .card {
    padding: 16px;
  }
  
  /* Fix typography for small devices */
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
}
