/* ============================================================
   SMSFácil — Design System
   Dark theme, purple/blue gradient accent
   ============================================================ */

/* ── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-deep:    #070710;
  --bg-base:    #0a0a14;
  --bg-card:    #10101e;
  --bg-card2:   #14142a;
  --border:     #1e1e3a;
  --border2:    #2a2a4a;

  --primary:    #7c3aed;
  --primary-l:  #9d5cf5;
  --blue:       #2563eb;
  --blue-l:     #3b82f6;
  --green:      #10b981;
  --green-l:    #34d399;
  --red:        #ef4444;
  --red-l:      #f87171;
  --yellow:     #f59e0b;
  --yellow-l:   #fbbf24;

  --text:       #e2e8f0;
  --text-soft:  #94a3b8;
  --text-muted: #475569;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 20px;

  --shadow:    0 4px 24px rgba(0,0,0,.4);
  --shadow-lg: 0 8px 48px rgba(0,0,0,.6);

  --transition: .2s ease;
  --font: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary-l); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--blue-l); }

img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.15rem; }

.gradient-text {
  background: linear-gradient(135deg, var(--primary-l) 0%, var(--blue-l) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--blue) 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(124,58,237,.3);
}
.btn-primary:hover { opacity: .9; transform: translateY(-1px); box-shadow: 0 6px 24px rgba(124,58,237,.4); color:#fff; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text-soft);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary-l); background: rgba(124,58,237,.06); }
.btn-ghost { background: rgba(255,255,255,.06); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: var(--text); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { opacity:.85; color:#fff; }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { opacity:.85; color:#fff; }
.btn-sm { padding: 7px 14px; font-size: .82rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius); }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

/* ── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
}
.badge-success  { background: rgba(16,185,129,.12); color: var(--green-l); border: 1px solid rgba(16,185,129,.2); }
.badge-warning  { background: rgba(245,158,11,.12); color: var(--yellow-l); border: 1px solid rgba(245,158,11,.2); }
.badge-danger   { background: rgba(239,68,68,.12);  color: var(--red-l);    border: 1px solid rgba(239,68,68,.2); }
.badge-secondary{ background: rgba(100,116,139,.12);color: var(--text-soft);border: 1px solid rgba(100,116,139,.2); }
.badge-dark     { background: rgba(255,255,255,.06); color: var(--text-muted); border: 1px solid var(--border); }
.badge-primary  { background: rgba(124,58,237,.12); color: var(--primary-l); border: 1px solid rgba(124,58,237,.2); }

/* ── Forms ───────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: .85rem; color: var(--text-soft); margin-bottom: 7px; font-weight: 500; }
.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .95rem;
  font-family: var(--font);
  outline: none;
  transition: var(--transition);
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,.1); }
.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; }
.form-hint { font-size: .78rem; color: var(--text-muted); margin-top: 5px; }
.form-error { color: var(--red-l); font-size: .8rem; margin-top: 5px; }

/* ── Alert ───────────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-success { background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.25); color: var(--green-l); }
.alert-error   { background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.25);  color: var(--red-l); }
.alert-warning { background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.25); color: var(--yellow-l); }
.alert-info    { background: rgba(37,99,235,.1);  border: 1px solid rgba(37,99,235,.25);  color: var(--blue-l); }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.card-sm { padding: 20px; border-radius: var(--radius); }

/* ── Tables ──────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
thead th { padding: 12px 16px; text-align: left; color: var(--text-muted); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--border); }
tbody td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,.02); }

/* ── Spinner ─────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,.1);
  border-top-color: var(--primary-l);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   LANDING PAGE
   ============================================================ */
body.landing { background: var(--bg-deep); }

/* ── Navbar ─────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 16px 0;
  background: rgba(7,7,16,.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,.05);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.logo-link { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-icon { font-size: 1.5rem; }
.logo-text { font-size: 1.25rem; font-weight: 500; color: var(--text); }
.logo-text strong { color: var(--primary-l); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--text-soft); font-size: .9rem; font-weight: 500; }
.nav-links a:hover { color: var(--text); }
.mobile-menu-btn { display: none; background: none; border: none; color: var(--text); font-size: 1.2rem; cursor: pointer; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 160px 0 100px;
  text-align: center;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: .15;
}
.hero-glow-1 { width: 600px; height: 600px; background: var(--primary); top: -200px; left: 50%; transform: translateX(-60%); }
.hero-glow-2 { width: 400px; height: 400px; background: var(--blue);    bottom: -100px; right: 10%; }
.hero-content { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(124,58,237,.12);
  border: 1px solid rgba(124,58,237,.25);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: .82rem;
  color: var(--primary-l);
  font-weight: 500;
  margin-bottom: 28px;
}
.badge-dot { width: 7px; height: 7px; background: var(--green); border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.hero-title { margin-bottom: 24px; color: var(--text); }
.hero-sub { font-size: 1.1rem; color: var(--text-soft); max-width: 560px; margin: 0 auto 36px; }
.hero-cta { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 60px; }
.hero-stats { display: flex; justify-content: center; align-items: center; gap: 40px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-num { display: block; font-size: 1.6rem; font-weight: 800; background: linear-gradient(135deg, var(--primary-l), var(--blue-l)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-label { font-size: .8rem; color: var(--text-muted); }
.stat-div { width: 1px; height: 40px; background: var(--border); }

/* ── Sections ────────────────────────────────────────────── */
.section { padding: 90px 0; }
.section-dark { background: var(--bg-card); }
.section-header { text-align: center; margin-bottom: 56px; }
.section-tag {
  display: inline-block;
  background: rgba(124,58,237,.12);
  color: var(--primary-l);
  border: 1px solid rgba(124,58,237,.2);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 14px;
}
.section-header h2 { margin-bottom: 12px; }
.section-header p { color: var(--text-soft); }

/* ── Services Grid ───────────────────────────────────────── */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.service-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: var(--transition);
}
.service-card:hover { border-color: var(--border2); transform: translateY(-2px); box-shadow: var(--shadow); }
.service-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.service-info { flex: 1; }
.service-info h3 { font-size: 1rem; margin-bottom: 3px; }
.service-price { font-size: .8rem; color: var(--text-muted); }
.service-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px;
  background: rgba(124,58,237,.1);
  border: 1px solid rgba(124,58,237,.2);
  border-radius: var(--radius-sm);
  font-size: .8rem;
  font-weight: 600;
  color: var(--primary-l);
  white-space: nowrap;
}
.service-btn:hover { background: rgba(124,58,237,.2); color: var(--primary-l); }

/* ── Steps ───────────────────────────────────────────────── */
.steps-grid { display: flex; align-items: center; gap: 20px; justify-content: center; flex-wrap: wrap; }
.step-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  text-align: center;
  flex: 1;
  min-width: 220px;
  max-width: 300px;
  position: relative;
}
.step-num {
  font-size: 3rem;
  font-weight: 900;
  color: rgba(124,58,237,.12);
  position: absolute;
  top: 12px; right: 20px;
  line-height: 1;
}
.step-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, rgba(124,58,237,.15), rgba(37,99,235,.15));
  border: 1px solid rgba(124,58,237,.2);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  color: var(--primary-l);
  margin: 0 auto 20px;
}
.step-card h3 { margin-bottom: 10px; }
.step-card p { font-size: .9rem; color: var(--text-soft); }
.step-arrow { font-size: 1.2rem; color: var(--text-muted); flex-shrink: 0; }

/* ── Features ────────────────────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: var(--transition);
}
.feature-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.feature-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, rgba(124,58,237,.15), rgba(37,99,235,.15));
  border: 1px solid rgba(124,58,237,.15);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  color: var(--primary-l);
  margin-bottom: 18px;
}
.feature-card h3 { margin-bottom: 10px; }
.feature-card p { font-size: .9rem; color: var(--text-soft); }

/* ── CTA ─────────────────────────────────────────────────── */
.cta-section { padding: 60px 0 100px; }
.cta-card {
  background: linear-gradient(135deg, rgba(124,58,237,.1) 0%, rgba(37,99,235,.1) 100%);
  border: 1px solid rgba(124,58,237,.2);
  border-radius: var(--radius-lg);
  padding: 72px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-glow {
  position: absolute; width: 400px; height: 400px;
  background: var(--primary); border-radius: 50%;
  filter: blur(120px); opacity: .08;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  pointer-events: none;
}
.cta-card h2 { margin-bottom: 14px; }
.cta-card p { color: var(--text-soft); margin-bottom: 32px; }

/* ── Footer ─────────────────────────────────────────────── */
.footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 60px 0 0; }
.footer-inner { display: flex; gap: 60px; flex-wrap: wrap; margin-bottom: 48px; }
.footer-brand { flex: 1; min-width: 200px; }
.footer-brand .logo-link { margin-bottom: 14px; }
.footer-brand p { font-size: .85rem; color: var(--text-muted); margin-top: 12px; }
.footer-links { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-links > div { display: flex; flex-direction: column; gap: 10px; }
.footer-links h4 { font-size: .82rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.footer-links a { font-size: .88rem; color: var(--text-soft); }
.footer-links a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding: 20px 0; text-align: center; }
.footer-bottom p { font-size: .82rem; color: var(--text-muted); }

/* ============================================================
   AUTH PAGES
   ============================================================ */
body.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-deep);
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
}
.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}
.auth-logo .logo-link { justify-content: center; }
.auth-card h1 { font-size: 1.6rem; text-align: center; margin-bottom: 8px; }
.auth-card .auth-sub { text-align: center; color: var(--text-soft); font-size: .9rem; margin-bottom: 32px; }
.auth-footer { text-align: center; margin-top: 24px; font-size: .87rem; color: var(--text-soft); }
.auth-footer a { color: var(--primary-l); font-weight: 600; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text-muted); font-size: .8rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */
body.dash-page { display: flex; min-height: 100vh; background: var(--bg-deep); }

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: 260px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 50;
  transition: transform .25s ease;
}
.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sidebar-user {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}
.user-avatar {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--blue));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.user-info { min-width: 0; }
.user-info strong { font-size: .9rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-info span { font-size: .78rem; color: var(--text-muted); }
.user-balance-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16,185,129,.1);
  border: 1px solid rgba(16,185,129,.2);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: .75rem;
  color: var(--green-l);
  font-weight: 600;
  margin-top: 8px;
}
.sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 12px; }
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: .9rem;
  font-weight: 500;
  margin-bottom: 2px;
  transition: var(--transition);
}
.sidebar-nav a i { width: 18px; text-align: center; font-size: .95rem; }
.sidebar-nav a:hover { background: rgba(255,255,255,.05); color: var(--text); }
.sidebar-nav a.active { background: rgba(124,58,237,.12); color: var(--primary-l); border: 1px solid rgba(124,58,237,.15); }
.sidebar-nav .nav-section { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; padding: 14px 14px 6px; font-weight: 600; }
.sidebar-footer { padding: 14px 12px; border-top: 1px solid var(--border); }
.sidebar-footer a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: .88rem;
}
.sidebar-footer a:hover { color: var(--red-l); background: rgba(239,68,68,.06); }

/* ── Main Content ────────────────────────────────────────── */
.dash-main {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.dash-topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}
.topbar-title { font-size: 1rem; font-weight: 600; color: var(--text-soft); }
.topbar-title span { color: var(--text); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.sidebar-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.1rem; cursor: pointer; }

.dash-content { padding: 32px; flex: 1; }
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 1.6rem; margin-bottom: 4px; }
.page-header p { color: var(--text-soft); font-size: .9rem; }

/* ── Stat Cards ──────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 28px; }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}
.stat-card:hover { border-color: var(--border2); }
.stat-card-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.stat-card-info strong { font-size: 1.5rem; display: block; line-height: 1.2; }
.stat-card-info span { font-size: .82rem; color: var(--text-muted); }

/* ── Order Cards (buy flow) ──────────────────────────────── */
.order-active-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  transition: var(--transition);
}
.order-active-card.waiting { border-color: rgba(245,158,11,.25); }
.order-active-card.received { border-color: rgba(16,185,129,.25); }
.order-phone {
  font-size: 1.4rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: var(--primary-l);
  letter-spacing: 2px;
}
.order-code-display {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.code-value {
  font-size: 2rem;
  font-weight: 800;
  font-family: 'Courier New', monospace;
  letter-spacing: 6px;
  color: var(--green-l);
}
.code-copy-btn {
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  color: var(--text-soft);
  cursor: pointer;
  font-size: .82rem;
  display: flex; align-items: center; gap: 6px;
  transition: var(--transition);
}
.code-copy-btn:hover { background: rgba(255,255,255,.1); color: var(--text); }
.timer-bar { height: 3px; background: var(--border); border-radius: 2px; margin-top: 14px; overflow: hidden; }
.timer-bar-fill { height: 100%; background: linear-gradient(90deg, var(--primary), var(--blue)); border-radius: 2px; transition: width 1s linear; }

/* ── Modals ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px;
  transform: scale(.95);
  transition: transform .2s;
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-header h2 { font-size: 1.2rem; }
.modal-close { background: none; border: none; color: var(--text-muted); font-size: 1.1rem; cursor: pointer; padding: 4px; border-radius: 6px; }
.modal-close:hover { color: var(--text); background: rgba(255,255,255,.06); }
.confirm-modal-overlay { z-index: 500; }
.confirm-modal {
  max-width: 430px;
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.confirm-modal-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red-l);
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.22);
  font-size: 1.35rem;
}
.confirm-modal-content h2 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}
.confirm-modal-content p {
  color: var(--text-soft);
  font-size: .92rem;
  line-height: 1.6;
}
.confirm-modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

/* ── Pagination ──────────────────────────────────────────── */
.pagination { display: flex; align-items: center; gap: 6px; justify-content: center; margin-top: 24px; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  color: var(--text-soft);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: var(--transition);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary-l); }
.pagination .active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ============================================================
   ADMIN SPECIFICS
   ============================================================ */
.admin-tag { background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.2); border-radius: 20px; padding: 2px 10px; font-size: .72rem; color: var(--yellow-l); font-weight: 700; text-transform: uppercase; }
.action-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.search-input { flex: 1; min-width: 200px; }

/* ── Toggle switch ───────────────────────────────────────── */
.switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: var(--border2); border-radius: 24px; cursor: pointer; transition: .3s; }
.slider::before { content: ''; position: absolute; width: 18px; height: 18px; background: #fff; border-radius: 50%; left: 3px; top: 3px; transition: .3s; }
input:checked + .slider { background: var(--primary); }
input:checked + .slider::before { transform: translateX(20px); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .dash-main { margin-left: 0; }
  .sidebar-toggle { display: flex; }
  .step-arrow { display: none; }
  .steps-grid { flex-direction: column; align-items: center; }
}
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 20px 24px; gap: 14px; }
  .nav-links.open { display: flex; }
  .mobile-menu-btn { display: block; }
  .hero-stats { gap: 20px; }
  .stat-div { display: none; }
  .footer-inner { flex-direction: column; gap: 32px; }
  .auth-card { padding: 32px 24px; }
  .dash-content { padding: 20px; }
}
@media (max-width: 480px) {
  .hero { padding: 120px 0 60px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .order-code-display { flex-direction: column; gap: 12px; align-items: flex-start; }
  .code-value { font-size: 1.5rem; letter-spacing: 4px; }
}

/* Admin dashboard: limita colunas para os cartões descerem em mais linhas */
.stats-grid.stats-grid--dashboard {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1200px) {
  .stats-grid.stats-grid--dashboard { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .stats-grid.stats-grid--dashboard { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .stats-grid.stats-grid--dashboard { grid-template-columns: 1fr; }
}

/* ── Utilities ───────────────────────────────────────────── */
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.text-muted { color: var(--text-muted); }
.text-soft { color: var(--text-soft); }
.text-success { color: var(--green-l); }
.text-danger { color: var(--red-l); }
.text-warning { color: var(--yellow-l); }
.text-primary { color: var(--primary-l); }
.text-sm { font-size: .85rem; }
.text-xs { font-size: .75rem; }
.font-mono { font-family: 'Courier New', monospace; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.overflow-hidden { overflow: hidden; }
.text-truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-100 { width: 100%; }
