/* ═══════════════════════════════════════════════════════
   main.css — Global design system for Tallabak
   ═══════════════════════════════════════════════════════ */

/* ── Google Font ── */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

/* ── Design Tokens — Dark (default) ── */
:root {
  --primary:          #25D366;
  --primary-dark:     #1da851;
  --primary-glow:     rgba(37, 211, 102, 0.25);
  --accent:           #00b4d8;
  --bg-main:          #0a0f1a;
  --bg-card:          #111827;
  --bg-card-hover:    #1a2332;
  --bg-surface:       #0f1520;
  --text-primary:     #f0f4f8;
  --text-secondary:   #94a3b8;
  --text-muted:       #64748b;
  --border-color:     #1e293b;
  --radius:           12px;
  --radius-lg:        16px;
  --shadow:           0 4px 24px rgba(0,0,0,0.35);
  --shadow-glow:      0 0 20px var(--primary-glow);
  --gradient:         linear-gradient(135deg, var(--primary), var(--accent));
  --navbar-height:    64px;
  --transition:       0.25s ease;
}

/* ── Light Theme ── */
[data-theme="light"] {
  --bg-main:          #f8fafc;
  --bg-card:          #ffffff;
  --bg-card-hover:    #f1f5f9;
  --bg-surface:       #f1f5f9;
  --text-primary:     #0f172a;
  --text-secondary:   #475569;
  --text-muted:       #94a3b8;
  --border-color:     #e2e8f0;
  --shadow:           0 4px 24px rgba(0,0,0,0.08);
}

/* ── Dark Mode Toggle Button ── */
.dark-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all var(--transition);
  flex-shrink: 0;
}
.dark-toggle:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  transform: rotate(20deg) scale(1.1);
}


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

html { scroll-behavior: smooth; }

body {
  font-family: 'IBM Plex Sans Arabic', system-ui, sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  padding-top: var(--navbar-height);
  direction: rtl;
  text-align: right;
}

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


/* ════════════════════════════════════════
   NAVBAR
════════════════════════════════════════ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--navbar-height);
  background: rgba(10, 15, 26, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  z-index: 1000;
  transition: box-shadow var(--transition);
}

.navbar.scrolled {
  box-shadow: 0 4px 32px rgba(0,0,0,0.5);
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* Logo */
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}
.navbar-logo .logo-icon { font-size: 1.4rem; }
.navbar-logo:hover { opacity: 0.85; }

/* Desktop Nav Links */
.navbar-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1;
}

.nav-link {
  display: block;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: rgba(255,255,255,0.07);
}

.nav-link.active {
  color: var(--primary);
}

/* Auth Buttons */
.navbar-auth {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
}

.nav-user-badge {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-nav-outline {
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  background: transparent;
}
.btn-nav-outline:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
  background: rgba(255,255,255,0.05);
}

.btn-nav-primary {
  background: var(--primary);
  color: #fff;
  border: 1px solid var(--primary);
  box-shadow: 0 0 12px rgba(37,211,102,0.3);
}
.btn-nav-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
}

/* Mobile Hamburger */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.5rem;
  margin-right: auto;
  margin-left: 0;
  flex-shrink: 0;
}
.navbar-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all 0.3s;
}
.navbar-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-toggle.open span:nth-child(2) { opacity: 0; }
.navbar-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Responsive Navbar */
@media (max-width: 768px) {
  .navbar-toggle { display: flex; }
  .navbar-links,
  .navbar-auth {
    display: none;
    position: fixed;
    top: var(--navbar-height);
    left: 0; right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    z-index: 999;
  }
  .navbar-links.mobile-open,
  .navbar-auth.mobile-open { display: flex; }
  .nav-link { padding: 0.75rem 1rem; }
  .btn-nav { justify-content: center; padding: 0.75rem 1rem; }
  .nav-user-badge { max-width: 100%; }
}


/* ════════════════════════════════════════
   TOASTS
════════════════════════════════════════ */
.toast-container {
  position: fixed;
  top: calc(var(--navbar-height) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  animation: toastIn 0.4s ease, toastOut 0.4s ease 3.6s forwards;
  backdrop-filter: blur(10px);
  pointer-events: auto;
}
.toast.success { background: rgba(16,185,129,0.92); }
.toast.error   { background: rgba(239,68,68,0.92); }
.toast.info,
.toast.warning { background: rgba(14,165,233,0.92); }

@keyframes toastIn  { from { opacity:0; transform: translateY(-16px); } to { opacity:1; transform: translateY(0); } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; transform: translateY(-16px); } }


/* ════════════════════════════════════════
   UTILITY CLASSES
════════════════════════════════════════ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  transition: all var(--transition);
}
.btn-primary { background: var(--gradient); color: #fff; }
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: var(--shadow-glow); }
.btn-secondary { background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-secondary:hover { background: var(--bg-card-hover); }
.btn-danger { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.btn-danger:hover { background: rgba(239,68,68,0.25); }

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-success { background: rgba(16,185,129,0.15); color: #10b981; }
.badge-warning { background: rgba(245,158,11,0.15); color: #f59e0b; }
.badge-danger  { background: rgba(239,68,68,0.15);  color: #ef4444; }
.badge-info    { background: rgba(14,165,233,0.15);  color: #0ea5e9; }
.badge-muted   { background: rgba(100,116,139,0.15); color: #64748b; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.text-primary   { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted     { color: var(--text-muted) !important; }
.text-green     { color: var(--primary) !important; }
.text-center    { text-align: center; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }


/* ════════════════════════════════════════
   COLOR TOKENS
════════════════════════════════════════ */
:root {
  --success: #10b981;
  --warning: #f59e0b;
  --danger:  #ef4444;
  --info:    #0ea5e9;
}


/* ════════════════════════════════════════
   DASHBOARD LAYOUT
════════════════════════════════════════ */
.dashboard-page { padding-top: 0; }

.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
  width: 260px;
  background: var(--bg-card);
  border-left: 1px solid var(--border-color);
  padding-top: 2.5rem;
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-logo {
  padding: 1.25rem 1.5rem 1rem;
}
.sidebar-logo h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}
.sidebar-logo small {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.sidebar-nav {
  list-style: none;
  padding: 0 0.75rem;
}
.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 2px;
}
.sidebar-nav li a:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
}
.sidebar-nav li a.active {
  background: var(--primary-glow);
  color: var(--primary);
  font-weight: 600;
}

.nav-icon { font-size: 1.1rem; min-width: 1.3rem; text-align: center; }

.sidebar-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.75rem 1.5rem;
}

.sidebar-toggle {
  display: none;
  position: fixed;
  top: 40px; right: 12px;
  z-index: 1002;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 40px; height: 40px;
  border-radius: 10px;
  font-size: 1.2rem;
  align-items: center;
  justify-content: center;
}

/* ── Main Content ── */
.main-content {
  flex: 1;
  margin-right: 260px;
  padding: 3rem 2rem 2rem;
  min-height: 100vh;
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(100%);
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: -4px 0 24px rgba(0,0,0,0.4);
  }
  .sidebar-toggle { display: flex; }
  .main-content {
    margin-right: 0;
    padding: 3.5rem 1rem 2rem;
  }
}

/* ── Page Header ── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
}


/* ════════════════════════════════════════
   STATS GRID
════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all var(--transition);
}
.stat-card:hover {
  border-color: rgba(37,211,102,0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}


/* ════════════════════════════════════════
   DATA TABLES
════════════════════════════════════════ */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table th {
  padding: 0.85rem 1rem;
  text-align: right;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text-secondary);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: rgba(255,255,255,0.02);
}

.data-table tr:last-child td { border-bottom: none; }


/* ════════════════════════════════════════
   STATUS BADGES
════════════════════════════════════════ */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.status-badge.pending   { background: rgba(245,158,11,0.15); color: #f59e0b; }
.status-badge.confirmed { background: rgba(14,165,233,0.15); color: #0ea5e9; }
.status-badge.preparing { background: rgba(168,85,247,0.15); color: #a855f7; }
.status-badge.shipped,
.status-badge.delivering { background: rgba(59,130,246,0.15); color: #3b82f6; }
.status-badge.delivered  { background: rgba(16,185,129,0.15); color: #10b981; }
.status-badge.cancelled  { background: rgba(239,68,68,0.15);  color: #ef4444; }


/* ════════════════════════════════════════
   FORMS
════════════════════════════════════════ */
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-input,
.filter-select,
.search-input {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus,
.filter-select:focus,
.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-input::placeholder,
.search-input::placeholder { color: var(--text-muted); }

.form-error {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 0.3rem;
}

select.form-input,
.filter-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: left 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.2em;
  padding-left: 2.5rem;
}

textarea.form-input {
  resize: vertical;
  min-height: 80px;
}


/* ════════════════════════════════════════
   SETTINGS
════════════════════════════════════════ */
.settings-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.settings-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}


/* ════════════════════════════════════════
   PRODUCTS GRID (Dashboard)
════════════════════════════════════════ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: rgba(37,211,102,0.3);
}

.product-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.product-image-placeholder {
  width: 100%;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: var(--bg-surface);
  opacity: 0.4;
}

.product-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--danger);
  color: #fff;
  padding: 0.15rem 0.5rem;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
}

.product-info {
  padding: 1rem;
}
.product-info .product-name {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.product-price {
  color: var(--primary);
  font-weight: 700;
}
.product-old-price {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-right: 0.3rem;
}

.product-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}


/* ════════════════════════════════════════
   ORDER DETAIL
════════════════════════════════════════ */
.order-detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.order-detail-card h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.detail-row:last-child { border-bottom: none; }

.detail-label {
  color: var(--text-muted);
  font-size: 0.85rem;
}
.detail-value {
  font-weight: 600;
  font-size: 0.9rem;
}


/* ════════════════════════════════════════
   TIMELINE
════════════════════════════════════════ */
.timeline {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  position: relative;
  padding-bottom: 0.5rem;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 14px;
  right: 14px;
  left: 14px;
  height: 3px;
  background: var(--border-color);
  z-index: 0;
}

.timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
  flex: 1;
}

.timeline-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 3px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
  transition: all 0.3s;
}

.timeline-step.done .timeline-dot {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.timeline-step.active .timeline-dot {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
  background: var(--primary);
  color: #fff;
  transform: scale(1.15);
}

.timeline-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 70px;
}
.timeline-step.done .timeline-label,
.timeline-step.active .timeline-label {
  color: var(--primary);
  font-weight: 600;
}


/* ════════════════════════════════════════
   WHATSAPP ACTIONS
════════════════════════════════════════ */
.wa-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}
.wa-btn:hover { opacity: 0.85; transform: translateY(-1px); }

.wa-confirm  { background: rgba(16,185,129,0.15); color: #10b981; }
.wa-payment  { background: rgba(14,165,233,0.15); color: #0ea5e9; }
.wa-shipping { background: rgba(168,85,247,0.15); color: #a855f7; }
.wa-cancel   { background: rgba(239,68,68,0.15);  color: #ef4444; }


/* ════════════════════════════════════════
   MODALS
════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  min-width: 360px;
  max-width: 500px;
  width: 100%;
  animation: modalIn 0.3s ease;
}
.modal h2 {
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}


/* ════════════════════════════════════════
   AUTH PAGES
════════════════════════════════════════ */
.auth-page {
  padding-top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg-main);
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.25rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-card .subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.auth-footer a {
  color: var(--primary);
  font-weight: 600;
}
.auth-footer a:hover { text-decoration: underline; }

.auth-card .form-group input,
.auth-card .form-group select {
  width: 100%;
  padding: 0.65rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
}
.auth-card .form-group input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-glow);
}


/* ════════════════════════════════════════
   EMPTY STATE
════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}
.empty-state .icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  display: block;
}
.empty-state h3 {
  font-size: 1.15rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}
.empty-state p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}


/* ════════════════════════════════════════
   MESSAGES
════════════════════════════════════════ */
.messages {
  list-style: none;
  margin-bottom: 1rem;
}
.messages li {
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
}
.messages .success { background: rgba(16,185,129,0.12); color: #10b981; border: 1px solid rgba(16,185,129,0.25); }
.messages .error   { background: rgba(239,68,68,0.12); color: #ef4444; border: 1px solid rgba(239,68,68,0.25); }
.messages .warning { background: rgba(245,158,11,0.12); color: #f59e0b; border: 1px solid rgba(245,158,11,0.25); }
.messages .info    { background: rgba(14,165,233,0.12); color: #0ea5e9; border: 1px solid rgba(14,165,233,0.25); }


/* ════════════════════════════════════════
   BUTTONS — EXTENDED
════════════════════════════════════════ */
.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.btn-success { background: rgba(16,185,129,0.15); color: #10b981; border: 1px solid rgba(16,185,129,0.3); }
.btn-success:hover { background: rgba(16,185,129,0.25); }
.btn-warning { background: rgba(245,158,11,0.15); color: #f59e0b; border: 1px solid rgba(245,158,11,0.3); }
.btn-warning:hover { background: rgba(245,158,11,0.25); }
.btn-info    { background: rgba(14,165,233,0.15); color: #0ea5e9; border: 1px solid rgba(14,165,233,0.3); }
.btn-info:hover { background: rgba(14,165,233,0.25); }

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  border-radius: 8px;
}
.btn-xs {
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 6px;
}


/* ════════════════════════════════════════
   CODE BLOCK
════════════════════════════════════════ */
.code-block {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1rem;
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  color: var(--primary);
  direction: ltr;
  text-align: left;
  word-break: break-all;
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all var(--transition);
}
.copy-btn:hover { color: var(--primary); border-color: var(--primary); }


/* ════════════════════════════════════════
   PAGINATION
════════════════════════════════════════ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.3rem;
  margin-top: 2rem;
  list-style: none;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 0.5rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: all var(--transition);
}
.pagination a:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}
.pagination .current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}


/* ════════════════════════════════════════
   SEARCH & FILTERS
════════════════════════════════════════ */
.search-input {
  max-width: 320px;
}

.filter-select {
  max-width: 200px;
}

@media (max-width: 640px) {
  .search-input,
  .filter-select { max-width: 100%; }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .timeline { flex-direction: column; gap: 0.5rem; }
  .timeline::before {
    top: 14px; bottom: 14px;
    right: 14px; left: auto;
    width: 3px; height: auto;
  }
  .timeline-step { flex-direction: row; gap: 0.75rem; }
}

