/* ============================================================
   RADIX SOFTWARE — Design System CSS
   Versión 1.0 | Inter | Dark Enterprise
   ============================================================ */

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

/* ============================================================
   1. CSS VARIABLES — Design Tokens
   ============================================================ */
:root {
  /* Brand Colors */
  --radix-primary: #2563FF;
  --radix-primary-hover: #1E54E6;
  --radix-primary-light: rgba(37, 99, 255, 0.12);
  --radix-electric: #00B8FF;
  --radix-cyan: #29D8FF;
  --radix-navy: #04153B;
  --radix-dark: #020B1F;

  /* Backgrounds */
  --bg-primary: #030D25;
  --bg-secondary: #071937;
  --bg-card: #0C1F47;
  --bg-card-hover: #0F2550;
  --bg-light: #F8FAFC;
  --bg-white: #FFFFFF;
  --bg-surface: #0A1A3E;

  /* Text */
  --text-primary: #FFFFFF;
  --text-secondary: #CBD5E1;
  --text-muted: #94A3B8;
  --text-dark: #0F172A;
  --text-dark-secondary: #475569;

  /* Borders */
  --border-dark: rgba(255, 255, 255, 0.08);
  --border-dark-hover: rgba(255, 255, 255, 0.16);
  --border-light: #E2E8F0;
  --border-focus: #2563FF;

  /* State Colors */
  --success: #10B981;
  --success-light: rgba(16, 185, 129, 0.12);
  --warning: #F59E0B;
  --warning-light: rgba(245, 158, 11, 0.12);
  --danger: #EF4444;
  --danger-light: rgba(239, 68, 68, 0.12);
  --info: #00B8FF;
  --info-light: rgba(0, 184, 255, 0.12);

  /* Layout */
  --sidebar-width: 220px;
  --sidebar-collapsed: 60px;
  --header-height: 48px;
  --border-radius: 4px;
  --border-radius-lg: 8px;
  --border-radius-xl: 12px;

  /* Control Heights */
  --control-height: 32px;
  --control-padding: 0 12px;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-base: 13px;
  --font-size-sm: 12px;
  --font-size-xs: 11px;
  --font-size-lg: 14px;
  --font-size-xl: 16px;
  --font-size-2xl: 18px;
  --font-size-3xl: 24px;
  --font-size-hero: 56px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 24px rgba(37, 99, 255, 0.3);
  --shadow-glow-electric: 0 0 32px rgba(0, 184, 255, 0.25);

  /* Transitions */
  --transition: 0.15s ease;
  --transition-md: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* Z-index */
  --z-sidebar: 100;
  --z-header: 90;
  --z-modal: 200;
  --z-overlay: 190;
  --z-tooltip: 300;
  --z-toast: 400;
}

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

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.5;
  color: var(--text-dark);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: var(--font-family);
  cursor: pointer;
}

input, select, textarea {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
}

/* ============================================================
   3. UTILITY CLASSES
   ============================================================ */
.d-flex { display: flex; }
.d-grid { display: grid; }
.d-none { display: none; }
.d-block { display: block; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }
.flex-1 { flex: 1; }
.flex-wrap { flex-wrap: wrap; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--radix-primary); }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.w-100 { width: 100%; }

/* ============================================================
   4. BUTTONS — 32px height, consistent across all
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--control-height);
  padding: var(--control-padding);
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  font-weight: 500;
  font-family: var(--font-family);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
  line-height: 1;
}

.btn:disabled, .btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-sm {
  height: 26px;
  padding: 0 10px;
  font-size: var(--font-size-sm);
}

.btn-lg {
  height: 40px;
  padding: 0 20px;
  font-size: var(--font-size-lg);
}

/* Primary */
.btn-primary {
  background: var(--radix-primary);
  color: #fff;
  border-color: var(--radix-primary);
}
.btn-primary:hover {
  background: var(--radix-primary-hover);
  border-color: var(--radix-primary-hover);
  box-shadow: 0 0 0 3px rgba(37, 99, 255, 0.2);
}

/* Secondary */
.btn-secondary {
  background: transparent;
  color: var(--text-dark-secondary);
  border-color: var(--border-light);
}
.btn-secondary:hover {
  background: var(--bg-light);
  color: var(--text-dark);
}

/* Success */
.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}
.btn-success:hover { filter: brightness(1.1); }

/* Danger */
.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger:hover { filter: brightness(1.1); }

/* Warning */
.btn-warning {
  background: var(--warning);
  color: #fff;
  border-color: var(--warning);
}

/* Outline */
.btn-outline {
  background: transparent;
  color: var(--radix-primary);
  border-color: var(--radix-primary);
}
.btn-outline:hover {
  background: var(--radix-primary-light);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-dark-secondary);
  border-color: transparent;
}
.btn-ghost:hover {
  background: rgba(0,0,0,0.05);
  color: var(--text-dark);
}

/* Ghost Dark (admin panel) */
.btn-ghost-dark {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost-dark:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
}

/* Icon button */
.btn-icon {
  width: var(--control-height);
  height: var(--control-height);
  padding: 0;
  border-radius: var(--border-radius);
}

/* ============================================================
   5. FORM CONTROLS — 32px height
   ============================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-dark-secondary);
}

.form-label-dark {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-secondary);
}

.form-control {
  height: var(--control-height);
  padding: var(--control-padding);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-light);
  background: var(--bg-white);
  color: var(--text-dark);
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

.form-control:focus {
  border-color: var(--radix-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 255, 0.12);
}

.form-control-dark {
  height: var(--control-height);
  padding: var(--control-padding);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-dark);
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

.form-control-dark:focus {
  border-color: var(--radix-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 255, 0.2);
  background: rgba(255,255,255,0.07);
}

.form-control-dark::placeholder {
  color: var(--text-muted);
}

.form-control::placeholder {
  color: #94A3B8;
}

textarea.form-control,
textarea.form-control-dark {
  height: auto;
  min-height: 80px;
  padding: 8px 12px;
  resize: vertical;
}

select.form-control,
select.form-control-dark {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 32px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--radix-primary);
  cursor: pointer;
}

/* ============================================================
   6. BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: var(--font-size-xs);
  font-weight: 500;
  line-height: 1.6;
}

.badge-primary { background: var(--radix-primary-light); color: var(--radix-primary); }
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-muted { background: rgba(148,163,184,0.15); color: var(--text-muted); }
.badge-electric { background: rgba(0,184,255,0.12); color: var(--radix-electric); }

/* ============================================================
   7. CARDS
   ============================================================ */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}

.card-dark {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: all var(--transition-md);
}

.card-dark:hover {
  border-color: var(--border-dark-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

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

/* ============================================================
   8. TABLES — Sticky header, 32px rows
   ============================================================ */
.table-wrapper {
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  background: var(--bg-white);
}

.table-wrapper-dark {
  border: 1px solid var(--border-dark);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  background: var(--bg-card);
}

.table-scroll {
  overflow-x: auto;
  max-height: calc(100vh - 280px);
}

.radix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-base);
}

.radix-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}

.radix-table thead th {
  height: var(--control-height);
  padding: 0 12px;
  text-align: left;
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--bg-light);
  color: var(--text-dark-secondary);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}

.radix-table thead th:hover { background: #EEF2F7; }

.radix-table thead th .sort-icon {
  display: inline-block;
  margin-left: 4px;
  opacity: 0.4;
  font-size: 10px;
}

.radix-table thead th.sorted .sort-icon { opacity: 1; }

.radix-table tbody tr {
  height: var(--control-height);
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}

.radix-table tbody tr:hover { background: #F3F4F6; }
.radix-table tbody tr.selected { background: #EFF6FF; }
.radix-table tbody tr:last-child { border-bottom: none; }

.radix-table tbody td {
  padding: 0 12px;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

/* Dark table variant */
.radix-table-dark thead th {
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-dark);
}

.radix-table-dark thead th:hover { background: rgba(255,255,255,0.07); }

.radix-table-dark tbody tr {
  border-bottom: 1px solid var(--border-dark);
}

.radix-table-dark tbody tr:hover { background: rgba(255,255,255,0.03); }
.radix-table-dark tbody td { color: var(--text-secondary); }

/* Checkbox col */
.col-check { width: 40px; }
.col-actions { width: 120px; text-align: right; }

/* Table toolbar */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  gap: 12px;
  flex-wrap: wrap;
}

.table-toolbar-dark {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-dark);
  gap: 12px;
  flex-wrap: wrap;
}

.table-search {
  width: 280px;
  max-width: 100%;
}

/* Table footer / pagination */
.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-top: 1px solid var(--border-light);
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

/* ============================================================
   9. PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-item {
  display: inline-flex;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: var(--border-radius);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-dark-secondary);
  transition: all var(--transition);
  border: 1px solid transparent;
}

.page-link:hover {
  background: var(--bg-light);
  color: var(--radix-primary);
}

.page-item.active .page-link {
  background: var(--radix-primary);
  color: #fff;
  border-color: var(--radix-primary);
}

.page-item.disabled .page-link {
  opacity: 0.4;
  pointer-events: none;
}

/* ============================================================
   10. ALERTS / MESSAGES
   ============================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  border: 1px solid;
}

.alert-success { background: var(--success-light); border-color: var(--success); color: #065F46; }
.alert-danger { background: var(--danger-light); border-color: var(--danger); color: #991B1B; }
.alert-warning { background: var(--warning-light); border-color: var(--warning); color: #92400E; }
.alert-info { background: var(--info-light); border-color: var(--info); color: #0C4A6E; }

/* Toast notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #1E293B;
  color: #fff;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  max-width: 360px;
  animation: toastIn 0.3s ease;
  border-left: 3px solid var(--success);
}

.toast-error { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast-info { border-left-color: var(--info); }

@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ============================================================
   11. MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: var(--z-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-md);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--bg-white);
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition-md);
  overflow: hidden;
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-sm { max-width: 500px; }
.modal-md { max-width: 720px; }
.modal-lg { max-width: 960px; }

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

.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.modal-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--bg-light);
  color: var(--text-dark);
}

/* ============================================================
   12. ADMIN PANEL LAYOUT
   ============================================================ */
.admin-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg-light);
}

/* Sidebar */
.admin-sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--bg-primary);
  border-right: 1px solid var(--border-dark);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  z-index: var(--z-sidebar);
  transition: width var(--transition-md);
  overflow: hidden;
}

.admin-sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

/* Sidebar Logo */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: var(--header-height);
  border-bottom: 1px solid var(--border-dark);
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-logo-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  letter-spacing: -0.02em;
}

.sidebar-logo-text span {
  color: var(--radix-electric);
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 8px;
  scrollbar-width: none;
}

.sidebar-nav::-webkit-scrollbar { display: none; }

.nav-section-label {
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 8px 8px 4px;
  white-space: nowrap;
  overflow: hidden;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 8px;
  border-radius: var(--border-radius);
  color: var(--text-muted);
  font-size: var(--font-size-base);
  font-weight: 400;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}

.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
}

.nav-item.active {
  background: rgba(37, 99, 255, 0.18);
  color: var(--radix-electric);
  font-weight: 500;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--radix-primary);
  border-radius: 0 2px 2px 0;
}

.nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-badge {
  font-size: 10px;
  font-weight: 600;
  background: var(--danger);
  color: #fff;
  border-radius: 99px;
  padding: 1px 5px;
  flex-shrink: 0;
}

/* Sidebar footer */
.sidebar-footer {
  border-top: 1px solid var(--border-dark);
  padding: 12px 8px;
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background var(--transition);
  overflow: hidden;
}

.sidebar-user:hover { background: rgba(255,255,255,0.05); }

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--radix-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.user-info {
  overflow: hidden;
  flex: 1;
}

.user-name {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  white-space: nowrap;
}

/* Main content area */
.admin-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left var(--transition-md);
}

.admin-main.sidebar-collapsed {
  margin-left: var(--sidebar-collapsed);
}

/* Admin Header */
.admin-header {
  height: var(--header-height);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  gap: 12px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-toggle {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius);
  border: none;
  background: transparent;
  color: var(--text-dark-secondary);
  cursor: pointer;
  font-size: 16px;
  transition: all var(--transition);
}

.sidebar-toggle:hover {
  background: var(--bg-light);
  color: var(--text-dark);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.breadcrumb-item a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.breadcrumb-item a:hover { color: var(--radix-primary); }
.breadcrumb-item.active { color: var(--text-dark); font-weight: 500; }
.breadcrumb-sep { color: var(--text-muted); font-size: 10px; }

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Admin content */
.admin-content {
  flex: 1;
  padding: 20px;
}

/* Page title bar */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}

.page-title {
  font-size: var(--font-size-2xl);
  font-weight: 600;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================================
   13. DASHBOARD METRICS
   ============================================================ */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all var(--transition-md);
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--metric-color, var(--radix-primary));
}

.metric-card:hover {
  border-color: var(--metric-color, var(--radix-primary));
  box-shadow: 0 0 0 1px var(--metric-color, var(--radix-primary)), var(--shadow-sm);
}

.metric-label {
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.metric-value {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.03em;
  line-height: 1;
}

.metric-icon {
  position: absolute;
  right: 16px;
  top: 16px;
  font-size: 28px;
  opacity: 0.12;
}

.metric-trend {
  font-size: var(--font-size-xs);
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 3px;
}

/* ============================================================
   14. PUBLIC WEBSITE — Navbar
   ============================================================ */
.public-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sidebar);
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 40px;
  background: rgba(3, 13, 37, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-dark);
  transition: all var(--transition-md);
}

.public-nav.scrolled {
  background: rgba(3, 13, 37, 0.97);
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-brand .brand-accent { color: var(--radix-electric); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 auto;
  list-style: none;
}

.nav-links a {
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--border-radius);
  font-size: var(--font-size-base);
  font-weight: 400;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
}

.nav-links a:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}

.nav-links a.active {
  color: var(--radix-electric);
  font-weight: 500;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ============================================================
   15. HERO SECTION
   ============================================================ */
.hero-section {
  min-height: 100vh;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 100px 40px 60px;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(37, 99, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 255, 0.06) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 40%, transparent 100%);
}

.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(37, 99, 255, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.hero-glow-secondary {
  position: absolute;
  top: 20%;
  right: -100px;
  width: 500px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(0, 184, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 99px;
  border: 1px solid rgba(37, 99, 255, 0.4);
  background: rgba(37, 99, 255, 0.1);
  color: var(--radix-electric);
  font-size: var(--font-size-sm);
  font-weight: 500;
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease;
}

.hero-title {
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
  animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-title .gradient-text {
  background: linear-gradient(135deg, var(--radix-electric) 0%, var(--radix-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.6;
  margin-bottom: 36px;
  animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease 0.3s both;
}

.btn-hero-primary {
  height: 44px;
  padding: 0 24px;
  background: var(--radix-primary);
  color: #fff;
  border: 1px solid var(--radix-primary);
  border-radius: var(--border-radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-md);
  text-decoration: none;
}

.btn-hero-primary:hover {
  background: var(--radix-primary-hover);
  box-shadow: 0 0 0 4px rgba(37,99,255,0.25), 0 8px 24px rgba(37,99,255,0.3);
  transform: translateY(-1px);
}

.btn-hero-secondary {
  height: 44px;
  padding: 0 24px;
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-dark);
  border-radius: var(--border-radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-md);
  text-decoration: none;
}

.btn-hero-secondary:hover {
  border-color: var(--border-dark-hover);
  color: var(--text-primary);
  background: rgba(255,255,255,0.04);
}

/* Stats row */
.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border-dark);
  animation: fadeInUp 0.6s ease 0.4s both;
  flex-wrap: wrap;
}

.stat-item {}

.stat-number {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================================
   16. SECTION STYLES (Public)
   ============================================================ */
.section {
  padding: 80px 40px;
}

.section-dark {
  padding: 80px 40px;
  background: var(--bg-secondary);
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-eyebrow {
  display: inline-block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--radix-electric);
  margin-bottom: 12px;
}

.section-title-dark {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-title-light {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 16px;
}

.section-desc-dark {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

.section-desc-light {
  font-size: 16px;
  color: var(--text-dark-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Products grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--border-radius-xl);
  padding: 24px;
  transition: all var(--transition-md);
  cursor: pointer;
  text-decoration: none;
  display: block;
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--product-color, var(--radix-primary));
  transform: scaleX(0);
  transition: transform var(--transition-md);
}

.product-card:hover::before { transform: scaleX(1); }

.product-card:hover {
  border-color: rgba(255,255,255,0.15);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.product-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: var(--border-radius-lg);
  background: var(--product-color-light, rgba(37,99,255,0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}

.product-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.product-desc {
  font-size: var(--font-size-base);
  color: var(--text-muted);
  line-height: 1.5;
}

.product-arrow {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 20px;
  opacity: 0;
  transition: all var(--transition);
}

.product-card:hover .product-arrow {
  opacity: 1;
  right: 16px;
}

/* Clients section */
.clients-section {
  padding: 48px 40px;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-dark);
  border-bottom: 1px solid var(--border-dark);
}

.clients-label {
  text-align: center;
  font-size: var(--font-size-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.clients-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.client-logo-item {
  opacity: 0.4;
  filter: grayscale(1);
  transition: all var(--transition-md);
  height: 32px;
  object-fit: contain;
}

.client-logo-item:hover {
  opacity: 0.8;
  filter: grayscale(0);
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--border-radius-xl);
  padding: 24px;
}

.testimonial-stars {
  color: var(--warning);
  font-size: 14px;
  margin-bottom: 12px;
  letter-spacing: 2px;
}

.testimonial-comment {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--radix-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.testimonial-name {
  font-size: var(--font-size-base);
  font-weight: 600;
  color: var(--text-primary);
}

.testimonial-company {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}

/* Contact section */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--border-radius-xl);
  padding: 32px;
}

.contact-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Footer */
.public-footer {
  background: var(--radix-dark);
  border-top: 1px solid var(--border-dark);
  padding: 60px 40px 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
  margin-bottom: 48px;
}

.footer-brand-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 12px;
}

.footer-col-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--text-secondary); }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

/* ============================================================
   17. ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-fade-in { animation: fadeIn 0.5s ease; }
.animate-fade-in-up { animation: fadeInUp 0.5s ease; }

.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Skeleton loader */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--border-radius);
}

/* ============================================================
   18. RADIX LOGO SVG INLINE
   ============================================================ */
.radix-logo-svg {
  display: block;
}

/* ============================================================
   19. TECH TAGS
   ============================================================ */
.tech-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--border-dark);
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.03);
  transition: all var(--transition);
}

.tech-tag:hover {
  border-color: var(--radix-primary);
  color: var(--radix-electric);
  background: rgba(37,99,255,0.08);
}

.tech-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--tech-color, var(--radix-primary));
}

/* ============================================================
   20. RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.mobile-open { transform: translateX(0); }
  .admin-main { margin-left: 0 !important; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .public-nav { padding: 0 20px; }
  .hero-section { padding: 80px 20px 40px; }
  .section, .section-dark { padding: 56px 20px; }
  .nav-links { display: none; }
  .products-grid { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .contact-form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .hero-stats { gap: 24px; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }

  /* Table → Cards on mobile */
  .table-responsive-cards table { display: none; }
  .table-responsive-cards .mobile-cards { display: block; }
  .mobile-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius-lg);
    padding: 14px;
    margin-bottom: 8px;
  }
}

@media (min-width: 769px) {
  .table-responsive-cards .mobile-cards { display: none; }
}

/* ============================================================
   21. SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(148,163,184,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(148,163,184,0.5); }

/* ============================================================
   22. LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.login-bg-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(37, 99, 255, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--border-radius-xl);
  padding: 40px;
  position: relative;
  z-index: 1;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 28px;
}

/* ============================================================
   23. STATUS INDICATORS
   ============================================================ */
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-active { background: var(--success); box-shadow: 0 0 6px rgba(16,185,129,0.5); }
.status-inactive { background: var(--text-muted); }
.status-pending { background: var(--warning); box-shadow: 0 0 6px rgba(245,158,11,0.5); }
.status-danger { background: var(--danger); }

/* Inline status pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: var(--font-size-xs);
  font-weight: 500;
}

.status-pill-success { background: var(--success-light); color: var(--success); }
.status-pill-warning { background: var(--warning-light); color: var(--warning); }
.status-pill-danger { background: var(--danger-light); color: var(--danger); }
.status-pill-muted { background: rgba(148,163,184,0.12); color: var(--text-muted); }

/* ============================================================
   24. EMPTY STATE
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-icon {
  font-size: 48px;
  opacity: 0.3;
  margin-bottom: 16px;
}

.empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.empty-desc {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin-bottom: 20px;
  max-width: 300px;
}

/* ============================================================
   25. CONFIRM DELETE PAGE
   ============================================================ */
.confirm-delete-card {
  max-width: 480px;
  margin: 60px auto;
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-xl);
  padding: 32px;
  text-align: center;
}

.confirm-delete-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.confirm-delete-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.confirm-delete-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}
