/* ═══════════════════════════════════════════════
   ranGOu — Design System v2
   Modo Claro + Modo Escuro
═══════════════════════════════════════════════ */

/* ─── GOOGLE FONTS ──────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ─── LIGHT THEME (default) ─────────────────── */
:root {
  /* Brand */
  --primary:        #EA1D2C;
  --primary-dark:   #C8102E;
  --primary-light:  #ff4757;
  --primary-bg:     rgba(234,29,44,0.07);
  --primary-glow:   rgba(234,29,44,0.20);

  /* Backgrounds */
  --bg:             #f0f2f8;
  --surface:        #ffffff;
  --surface-2:      #f7f8fc;
  --surface-3:      #eef0f6;

  /* Text */
  --text:           #0f172a;
  --text-2:         #334155;
  --text-gray:      #64748b;
  --text-muted:     #94a3b8;

  /* Borders */
  --border:         #e2e8f0;
  --border-2:       #cbd5e1;

  /* Sidebar (always dark) */
  --sidebar-bg:     #0f172a;
  --sidebar-text:   rgba(255,255,255,0.65);
  --sidebar-active: rgba(234,29,44,0.18);
  --sidebar-hover:  rgba(255,255,255,0.06);
  --sidebar-border: rgba(255,255,255,0.07);

  /* Status */
  --success:        #16a34a;
  --success-bg:     #f0fdf4;
  --success-border: #bbf7d0;
  --warning:        #d97706;
  --warning-bg:     #fffbeb;
  --warning-border: #fde68a;
  --info:           #2563eb;
  --info-bg:        #eff6ff;
  --info-border:    #bfdbfe;
  --danger:         #EA1D2C;
  --danger-bg:      #fef2f2;
  --danger-border:  #fecaca;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:    0 4px 16px rgba(0,0,0,0.07), 0 1px 4px rgba(0,0,0,0.05);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.11), 0 4px 16px rgba(0,0,0,0.07);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.14), 0 8px 24px rgba(0,0,0,0.08);

  /* Layout */
  --sidebar-w: 260px;
  --topbar-h:  64px;
  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ─── DARK THEME ────────────────────────────── */
[data-theme="dark"] {
  --primary-bg:    rgba(234,29,44,0.13);
  --primary-glow:  rgba(234,29,44,0.30);

  --bg:            #0d1117;
  --surface:       #161b22;
  --surface-2:     #1c2128;
  --surface-3:     #22272e;

  --text:          #e6edf3;
  --text-2:        #adbac7;
  --text-gray:     #768390;
  --text-muted:    #545d68;

  --border:        rgba(255,255,255,0.08);
  --border-2:      rgba(255,255,255,0.14);

  --sidebar-bg:    #090d14;
  --sidebar-text:  rgba(255,255,255,0.55);
  --sidebar-active:rgba(234,29,44,0.20);
  --sidebar-hover: rgba(255,255,255,0.04);
  --sidebar-border:rgba(255,255,255,0.05);

  --success-bg:    rgba(22,163,74,0.13);
  --success-border:rgba(22,163,74,0.25);
  --warning-bg:    rgba(217,119,6,0.13);
  --warning-border:rgba(217,119,6,0.25);
  --info-bg:       rgba(37,99,235,0.13);
  --info-border:   rgba(37,99,235,0.25);
  --danger-bg:     rgba(234,29,44,0.13);
  --danger-border: rgba(234,29,44,0.25);

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.35), 0 1px 2px rgba(0,0,0,0.25);
  --shadow:    0 4px 16px rgba(0,0,0,0.35), 0 1px 4px rgba(0,0,0,0.25);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.45), 0 4px 16px rgba(0,0,0,0.35);
  --shadow-xl: 0 24px 64px rgba(0,0,0,0.55), 0 8px 24px rgba(0,0,0,0.40);
}

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

html { font-size: 14px; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
}

/* ─── LOGO ──────────────────────────────────── */
.logo-ran, .logo-u { color: inherit; font-weight: 900; }
.logo-go            { color: var(--primary); font-weight: 900; }

/* ─── THEME TOGGLE BUTTON ───────────────────── */
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 50%; border: 1.5px solid var(--border-2);
  background: var(--surface-2); color: var(--text-gray);
  cursor: pointer; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg);
}

/* ─── SIDEBAR THEME TOGGLE ──────────────────── */
.sidebar .theme-toggle {
  border-color: var(--sidebar-border);
  background: var(--sidebar-hover);
  color: var(--sidebar-text);
}
.sidebar .theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--sidebar-active);
}

/* ══════════════════════════════════════════════
   AUTH PAGE
══════════════════════════════════════════════ */
.auth-body {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  padding: 24px;
  position: relative;
}

.auth-body::before {
  content: '';
  position: fixed; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 20% 50%, var(--primary-glow), transparent 60%);
  pointer-events: none;
}

.auth-container {
  display: flex;
  width: 920px; min-height: 580px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border);
  position: relative;
}

/* Auth floating theme toggle */
.auth-theme-btn {
  position: fixed; top: 20px; right: 20px;
  z-index: 99;
}

.auth-hero {
  flex: 1;
  background: linear-gradient(145deg, #0f172a 0%, #1e1b4b 60%, #1a0a0d 100%);
  padding: 52px 44px;
  display: flex; align-items: center;
  color: white; position: relative; overflow: hidden;
}
.auth-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 70% at 30% 50%, rgba(234,29,44,0.25), transparent);
}
.auth-hero::after {
  content: '';
  position: absolute; right: -60px; bottom: -60px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(234,29,44,0.10);
}

.hero-content { position: relative; z-index: 1; }

.logo-big {
  font-size: 54px; font-weight: 900; letter-spacing: -3px;
  margin-bottom: 20px; line-height: 1;
}
.logo-big .logo-ran, .logo-big .logo-u { color: rgba(255,255,255,0.92); }
.logo-big .logo-go  { color: var(--primary); }

.auth-hero h1 {
  font-size: 28px; font-weight: 700; line-height: 1.3;
  margin-bottom: 12px; color: white;
}
.auth-hero p { opacity: 0.75; font-size: 15px; margin-bottom: 36px; }

.hero-features { display: flex; flex-direction: column; gap: 14px; }
.feature {
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; opacity: 0.85;
}
.feature-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255,255,255,0.10);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.12);
}

.auth-panel {
  width: 400px; padding: 44px 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
}

.auth-card { width: 100%; }

.auth-logo {
  font-size: 34px; font-weight: 900; text-align: center;
  margin-bottom: 6px; letter-spacing: -1px;
}

.auth-card h2 { font-size: 22px; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.auth-subtitle { color: var(--text-gray); margin-bottom: 28px; font-size: 14px; }

.auth-divider {
  text-align: center; color: var(--text-muted); font-size: 12px;
  margin: 22px 0; position: relative;
}
.auth-divider::before, .auth-divider::after {
  content: ''; position: absolute; top: 50%;
  width: 35%; height: 1px; background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

.role-buttons { display: flex; gap: 8px; }
.role-buttons .btn { flex: 1; font-size: 12px; padding: 10px 4px; }

.btn-back {
  background: none; border: none; cursor: pointer;
  color: var(--primary); font-size: 14px; font-weight: 500;
  margin-bottom: 20px; display: flex; align-items: center; gap: 6px;
  padding: 0; transition: opacity var(--transition);
}
.btn-back:hover { opacity: 0.7; }

/* ══════════════════════════════════════════════
   FORMS
══════════════════════════════════════════════ */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-weight: 600; margin-bottom: 6px;
  font-size: 13px; color: var(--text-2);
}

.input-icon { position: relative; }
.input-icon i {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%); color: var(--text-muted); font-size: 13px;
}
.input-icon input, .input-icon select {
  width: 100%; padding: 11px 12px 11px 40px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: 14px; transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--surface); color: var(--text); font-family: inherit;
}
.input-icon input:focus, .input-icon select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}

input, select, textarea {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-size: 14px; font-family: inherit; line-height: 1.5;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  background: var(--surface); color: var(--text);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}
input::placeholder, textarea::placeholder { color: var(--text-muted); }
select option { background: var(--surface); color: var(--text); }

/* ══════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 20px; border-radius: var(--radius); border: none;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all var(--transition); text-decoration: none;
  font-family: inherit; letter-spacing: -0.01em;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary); color: white;
  box-shadow: 0 2px 8px rgba(234,29,44,0.30);
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 16px rgba(234,29,44,0.40);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent; color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary-bg); }

.btn-success { background: var(--success); color: white; }
.btn-success:hover { filter: brightness(1.1); }
.btn-danger  { background: var(--danger); color: white; }
.btn-danger:hover { background: var(--primary-dark); }
.btn-gray    { background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border); }
.btn-gray:hover { background: var(--surface-2); }

.btn-sm      { padding: 6px 14px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-full    { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

/* ══════════════════════════════════════════════
   ALERTS
══════════════════════════════════════════════ */
.alert {
  padding: 11px 15px; border-radius: var(--radius);
  font-size: 13px; margin-bottom: 14px;
  border: 1px solid transparent; display: flex; align-items: center; gap: 8px;
}
.alert-danger  { background: var(--danger-bg);  color: var(--danger);  border-color: var(--danger-border); }
.alert-success { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.alert-info    { background: var(--info-bg);    color: var(--info);    border-color: var(--info-border); }

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

/* ── SIDEBAR ─────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: white;
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; height: 100vh;
  z-index: 100; transition: transform var(--transition);
  border-right: 1px solid var(--sidebar-border);
}

.sidebar-header {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-logo {
  font-size: 28px; font-weight: 900; letter-spacing: -1.5px;
  margin-bottom: 4px;
}
.sidebar-logo .logo-go  { color: var(--primary); }
.sidebar-logo .logo-ran,
.sidebar-logo .logo-u   { color: rgba(255,255,255,0.92); }

.sidebar-role {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--sidebar-text); margin-top: 2px;
}

.sidebar-nav { flex: 1; padding: 12px 12px; overflow-y: auto; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; color: var(--sidebar-text);
  cursor: pointer; transition: all var(--transition);
  border-radius: var(--radius-sm); font-size: 14px; font-weight: 500;
  margin-bottom: 2px; user-select: none;
}
.nav-item:hover { color: rgba(255,255,255,0.9); background: var(--sidebar-hover); }
.nav-item.active {
  color: white; background: var(--sidebar-active);
  box-shadow: inset 0 0 0 1px rgba(234,29,44,0.25);
}
.nav-item .nav-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
  background: rgba(255,255,255,0.06);
  transition: background var(--transition);
}
.nav-item i { width: 16px; text-align: center; font-size: 13px; }
.nav-item.active .nav-icon { background: rgba(234,29,44,0.25); }

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

.user-info { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.user-avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: white;
  flex-shrink: 0; box-shadow: 0 2px 8px rgba(234,29,44,0.35);
}
.user-name  { font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.9); }
.user-email { font-size: 11px; color: var(--sidebar-text); }

.sidebar-footer-actions {
  display: flex; gap: 8px; align-items: center;
}
.sidebar-footer-actions .btn {
  flex: 1; font-size: 12px; border-color: var(--sidebar-border);
  color: var(--sidebar-text); background: var(--sidebar-hover);
}
.sidebar-footer-actions .btn:hover { color: white; border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); }

/* ── MAIN CONTENT ───────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1; display: flex; flex-direction: column;
  min-height: 100vh;
}

.topbar {
  background: var(--surface);
  padding: 0 28px;
  height: var(--topbar-h);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow-xs);
  transition: background var(--transition), border-color var(--transition);
}

.topbar-title { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.topbar-badge {
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  padding: 4px 10px; background: var(--surface-2); border-radius: 20px;
  border: 1px solid var(--border);
}

.page-content { padding: 28px; flex: 1; }

.page-section { display: none; }
.page-section.active { display: block; animation: fadeIn .2s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ══════════════════════════════════════════════
   CARDS
══════════════════════════════════════════════ */
.card {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 22px;
  border: 1px solid var(--border);
  transition: background var(--transition), border-color var(--transition);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.card-title { font-size: 15px; font-weight: 700; letter-spacing: -0.2px; }

/* ── STAT CARDS ─────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px; margin-bottom: 24px;
}

.stat-card {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 20px 22px;
  display: flex; align-items: center; gap: 16px;
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.stat-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.stat-icon.red    { background: var(--danger-bg);  color: var(--danger); }
.stat-icon.green  { background: var(--success-bg); color: var(--success); }
.stat-icon.orange { background: var(--warning-bg); color: var(--warning); }
.stat-icon.blue   { background: var(--info-bg);    color: var(--info); }

.stat-value { font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; line-height: 1.2; }
.stat-label { font-size: 13px; color: var(--text-gray); margin-top: 2px; }
.stat-sub   { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* ══════════════════════════════════════════════
   TABLES
══════════════════════════════════════════════ */
.table-wrap {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); overflow: hidden;
  border: 1px solid var(--border); 
}

.table-header {
  padding: 16px 20px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}

table { width: 100%; border-collapse: collapse; }
thead th {
  background: var(--surface-2); padding: 11px 16px;
  text-align: left; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.7px;
  color: var(--text-muted); font-weight: 700;
  border-bottom: 1px solid var(--border);
}
tbody tr { border-bottom: 1px solid var(--border); transition: background var(--transition); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
tbody td { padding: 12px 16px; font-size: 14px; color: var(--text-2); }

.actions-cell { display: flex; gap: 6px; align-items: center; }

/* ══════════════════════════════════════════════
   BADGES
══════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.2px;
  text-transform: uppercase;
}
.badge-pending    { background: var(--warning-bg);  color: var(--warning);  border: 1px solid var(--warning-border); }
.badge-confirmed  { background: var(--info-bg);     color: var(--info);     border: 1px solid var(--info-border); }
.badge-preparing  { background: #fefce8;            color: #b45309;         border: 1px solid #fde68a; }
.badge-ready      { background: #fdf4ff;            color: #7c3aed;         border: 1px solid #ddd6fe; }
.badge-pickedup   { background: #ecfeff;            color: #0e7490;         border: 1px solid #a5f3fc; }
.badge-delivered  { background: var(--success-bg);  color: var(--success);  border: 1px solid var(--success-border); }
.badge-cancelled  { background: var(--danger-bg);   color: var(--danger);   border: 1px solid var(--danger-border); }
.badge-approved   { background: var(--success-bg);  color: var(--success);  border: 1px solid var(--success-border); }
.badge-pending-approval { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.badge-open       { background: var(--success-bg);  color: var(--success);  border: 1px solid var(--success-border); }
.badge-closed     { background: var(--danger-bg);   color: var(--danger);   border: 1px solid var(--danger-border); }

[data-theme="dark"] .badge-preparing { background: rgba(180,83,9,0.15); border-color: rgba(180,83,9,0.30); }
[data-theme="dark"] .badge-ready     { background: rgba(124,58,237,0.15); border-color: rgba(124,58,237,0.30); }
[data-theme="dark"] .badge-pickedup  { background: rgba(14,116,144,0.15); border-color: rgba(14,116,144,0.30); }

/* ══════════════════════════════════════════════
   MODAL
══════════════════════════════════════════════ */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
  z-index: 1000; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }

.modal {
  background: var(--surface); border-radius: var(--radius-xl);
  padding: 28px; width: 500px; max-width: 95vw; max-height: 90vh;
  overflow-y: auto; animation: slideUp .22s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: var(--shadow-xl); border: 1px solid var(--border);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.modal-title { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }
.modal-close {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 18px; cursor: pointer; color: var(--text-gray);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition); line-height: 1;
}
.modal-close:hover { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ══════════════════════════════════════════════
   TOAST
══════════════════════════════════════════════ */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  padding: 14px 20px; border-radius: var(--radius-lg);
  font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 9999; transform: translateY(80px) scale(0.95);
  opacity: 0; transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  max-width: 340px; display: flex; align-items: center; gap: 10px;
}
.toast.show { transform: translateY(0) scale(1); opacity: 1; }
.toast.success { background: var(--success); color: white; }
.toast.error   { background: var(--danger);  color: white; }
.toast.info    { background: var(--info);    color: white; }

/* ══════════════════════════════════════════════
   MENU ITEM CARD (Restaurant dashboard)
══════════════════════════════════════════════ */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.menu-card {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); border: 1px solid var(--border);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.menu-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.menu-card-img {
  width: 100%; height: 148px; overflow: hidden; background: var(--surface-2);
  position: relative;
}
.menu-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.menu-card-img-empty {
  display: flex; align-items: center; justify-content: center;
  color: var(--border-2); font-size: 36px; height: 100%;
}

.menu-card-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.menu-card-name  { font-weight: 700; font-size: 15px; color: var(--text); }
.menu-card-desc  { font-size: 13px; color: var(--text-gray); line-height: 1.4; }
.menu-card-price { font-size: 18px; font-weight: 800; color: var(--primary); }
.menu-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto;
}
.menu-card-cat {
  font-size: 11px; background: var(--surface-3);
  padding: 3px 10px; border-radius: 20px; color: var(--text-gray);
  font-weight: 600;
}
.menu-card-actions { display: flex; gap: 6px; margin-top: 10px; }

/* ══════════════════════════════════════════════
   ORDER CARD
══════════════════════════════════════════════ */
.order-card {
  background: var(--surface); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: 16px 20px; margin-bottom: 12px;
  border: 1px solid var(--border);
  transition: transform var(--transition);
}
.order-card:hover { transform: translateY(-1px); }
.order-card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.order-id { font-weight: 700; font-size: 15px; color: var(--text); }
.order-items { font-size: 13px; color: var(--text-gray); margin: 8px 0; }
.order-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px; border-top: 1px solid var(--border);
}
.order-total { font-weight: 800; color: var(--success); font-size: 16px; }

/* ══════════════════════════════════════════════
   PAYMENT INFO
══════════════════════════════════════════════ */
.payment-info-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 2px 8px; border-radius: 20px;
}
.order-payment-row {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
  margin: 8px 0; padding: 8px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ══════════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════════ */
.empty-state {
  text-align: center; padding: 64px 20px; color: var(--text-muted);
}
.empty-state i {
  font-size: 48px; margin-bottom: 16px;
  opacity: 0.3; display: block;
}
.empty-state p { font-size: 15px; color: var(--text-gray); }

/* ══════════════════════════════════════════════
   LOADING / SPINNER
══════════════════════════════════════════════ */
.spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white; border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════
   FILTER BAR
══════════════════════════════════════════════ */
.filter-bar {
  display: flex; gap: 10px; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap;
}
.filter-bar select, .filter-bar input {
  width: auto; padding: 8px 12px; font-size: 13px;
}

/* ══════════════════════════════════════════════
   TOGGLE SWITCH
══════════════════════════════════════════════ */
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle { position: relative; display: inline-block; width: 46px; height: 25px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; cursor: pointer; inset: 0;
  background: var(--border-2); border-radius: 25px; transition: .3s;
}
.toggle-slider::before {
  content: ''; position: absolute;
  height: 17px; width: 17px; left: 4px; bottom: 4px;
  background: white; border-radius: 50%; transition: .3s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(21px); }

/* ══════════════════════════════════════════════
   IMAGE UPLOAD
══════════════════════════════════════════════ */
.image-upload-area {
  width: 100%; height: 160px;
  border: 2px dashed var(--border-2); border-radius: var(--radius);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition);
  overflow: hidden; position: relative; background: var(--surface-2);
}
.image-upload-area:hover {
  border-color: var(--primary);
  background: var(--primary-bg);
}
.image-upload-area.has-image { border-style: solid; border-color: var(--border); }
#imageUploadPlaceholder { display: flex; flex-direction: column; align-items: center; gap: 6px; }

/* ══════════════════════════════════════════════
   FINANCE SECTION
══════════════════════════════════════════════ */
.fin-tabs {
  display: flex; gap: 6px; margin-bottom: 24px;
  background: var(--surface); border-radius: var(--radius-lg);
  padding: 6px; border: 1px solid var(--border); box-shadow: var(--shadow-xs);
  flex-wrap: wrap;
}
.fin-tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px; border-radius: var(--radius);
  border: none; cursor: pointer; font-size: 13px; font-weight: 600;
  background: transparent; color: var(--text-gray);
  transition: all var(--transition); position: relative;
}
.fin-tab:hover { background: var(--surface-2); color: var(--text); }
.fin-tab.active {
  background: var(--primary); color: #fff;
  box-shadow: 0 2px 8px var(--primary-glow);
}
.fin-tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: #fff; color: var(--primary);
  border-radius: 20px; font-size: 10px; font-weight: 800;
}
.fin-tab:not(.active) .fin-tab-badge {
  background: var(--danger); color: #fff;
}
.fin-panel { display: none; }
.fin-panel.active { display: block; }

/* Method cards */
.fin-methods-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; margin-bottom: 24px;
}
.fin-method-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  padding: 22px 20px; text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}
.fin-method-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.fin-method-icon  { font-size: 32px; margin-bottom: 8px; line-height: 1; }
.fin-method-label { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.7px; margin-bottom: 10px; }
.fin-method-value { font-size: 22px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; margin-bottom: 4px; }
.fin-method-sub   { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.fin-method-extra { min-height: 18px; }

/* Period cards */
.fin-period-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 8px;
}
.fin-period-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-xs);
  padding: 16px 18px;
}
.fin-period-label {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.fin-period-label i { color: var(--primary); }
.fin-period-value { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: -0.5px; margin-bottom: 4px; }
.fin-period-sub   { font-size: 12px; color: var(--text-muted); }

/* Chart containers */
.fin-charts-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px; margin-top: 24px;
}
.fin-chart-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  overflow: hidden;
}
.fin-chart-title {
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 700; color: var(--text-2);
  display: flex; align-items: center; gap: 8px;
}
.fin-chart-title i { color: var(--primary); }
.fin-chart-body {
  padding: 20px; position: relative;
}

@media (max-width: 768px) {
  .fin-methods-grid { grid-template-columns: 1fr; }
  .fin-period-grid  { grid-template-columns: 1fr 1fr; }
  .fin-charts-row   { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════
   CHECK GROUP (payment options)
══════════════════════════════════════════════ */
.check-group { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.check-option {
  display: inline-flex; align-items: center; gap: 7px;
  cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2);
  background: var(--surface-2); border: 1.5px solid var(--border);
  padding: 7px 14px; border-radius: var(--radius); transition: all var(--transition);
}
.check-option:has(input:checked) {
  border-color: var(--primary); background: var(--primary-bg); color: var(--primary);
}
.check-option input { display: none; }

/* ══════════════════════════════════════════════
   OPENING HOURS GRID
══════════════════════════════════════════════ */
.hours-grid { display: flex; flex-direction: column; gap: 10px; }
.hours-row {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 14px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.hours-day { width: 72px; font-weight: 700; font-size: 13px; color: var(--text); flex-shrink: 0; }
.hours-closed-wrap {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-muted); cursor: pointer; flex-shrink: 0;
}
.hours-times { display: flex; align-items: center; gap: 8px; }
.hours-input {
  width: 100px; padding: 6px 10px; font-size: 13px;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
}
.hours-sep { font-size: 12px; color: var(--text-muted); }

/* ══════════════════════════════════════════════
   REGISTER FORM — multi-section
══════════════════════════════════════════════ */
.reg-section-title {
  font-size: 11px; font-weight: 800; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px; margin: 18px 0 10px;
  display: flex; align-items: center; gap: 6px;
}
.reg-section-title i { color: var(--primary); }
.reg-section-title:first-child { margin-top: 4px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.req { color: var(--danger); font-size: 11px; }

/* ══════════════════════════════════════════════
   MODAL (admin — usa .modal-box dentro do .modal-overlay)
══════════════════════════════════════════════ */
.modal-box {
  background: var(--surface); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl); border: 1px solid var(--border);
  width: 100%; max-height: 90vh; overflow-y: auto;
  animation: modal-in 0.2s cubic-bezier(0.4,0,0.2,1);
}
.modal-lg { max-width: 860px; }
@keyframes modal-in { from { opacity:0; transform:scale(0.95) translateY(10px); } to { opacity:1; transform:none; } }

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.modal-title { font-size: 17px; font-weight: 800; color: var(--text); }
.modal-close {
  width: 34px; height: 34px; border-radius: 50%;
  border: none; background: var(--surface-2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); transition: all var(--transition);
}
.modal-close:hover { background: var(--danger-bg); color: var(--danger); }
.modal-body { padding: 24px; }

/* ── Detail grid inside modal ── */
.detail-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.detail-section {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 16px 18px;
}
.detail-section-title {
  font-size: 11px; font-weight: 800; letter-spacing: 0.7px;
  text-transform: uppercase; color: var(--primary);
  margin-bottom: 12px; display: flex; align-items: center; gap: 6px;
}
.detail-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.detail-row:last-child { border-bottom: none; }
.detail-row > span { color: var(--text-muted); flex-shrink: 0; }
.detail-row > strong { text-align: right; color: var(--text); word-break: break-word; }

@media (max-width: 768px) {
  .detail-grid  { grid-template-columns: 1fr; }
  .form-row-2   { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════
   SCROLLBAR (webkit)
══════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-2); border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .auth-container { flex-direction: column; width: 95vw; min-height: auto; border-radius: var(--radius-lg); }
  .auth-hero { padding: 36px 28px; min-height: 200px; }
  .logo-big { font-size: 40px; }
  .auth-panel { width: 100%; padding: 28px 24px; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .role-buttons { flex-direction: column; }
  .page-content { padding: 16px; }
}
