/* ============================================================
   TIENDA SAAS — Design System
   Bootstrap 5 Enterprise Theme
   ============================================================ */

:root {
  --primary: #4f46e5;
  --primary-light: #818cf8;
  --primary-dark: #3730a3;
  --secondary: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;

  --sidebar-width: 260px;
  --topbar-height: 64px;

  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --sidebar-bg: #0f172a;
  --sidebar-text: #94a3b8;
  --sidebar-active-bg: #1e293b;
  --sidebar-active-text: #ffffff;
  --sidebar-hover-bg: #1e293b;
  --sidebar-section-label: #475569;

  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

[data-bs-theme="dark"] {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface-2: #0f172a;
  --border: #334155;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-light: #64748b;

  --sidebar-bg: #020617;
  --sidebar-active-bg: #1e293b;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; }

html { font-size: 14px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  overflow-x: hidden;
}

/* ============================================================
   APP LAYOUT
   ============================================================ */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.sidebar-header {
  padding: 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-name {
  font-size: 16px;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: -0.3px;
}

.brand-sub {
  font-size: 10px;
  color: var(--primary-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.company-badge {
  margin: 12px 12px 4px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
}

.company-avatar {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  flex-shrink: 0;
}

.company-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.company-name {
  font-size: 13px;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.company-plan {
  font-size: 9px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 1px 6px;
  border-radius: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  align-self: flex-start;
}

.sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.sidebar-body::-webkit-scrollbar { width: 4px; }
.sidebar-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* kept for legacy compatibility */
.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--sidebar-section-label);
  padding: 16px 16px 4px;
}

/* ---- Sidebar Mini Search ---- */
.sidebar-search-wrap {
  position: relative;
  padding: 6px 10px 2px;
}
.sidebar-search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(148,163,184,0.55);
  font-size: 12px;
  pointer-events: none;
}
.sidebar-search {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 8px;
  padding: 6px 10px 6px 30px;
  color: #e2e8f0;
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.sidebar-search::placeholder { color: rgba(148,163,184,0.5); }
.sidebar-search:focus {
  border-color: var(--primary);
  background: rgba(79,70,229,0.08);
}

/* ---- Nav Groups ---- */
.nav-group { margin-bottom: 1px; }

.nav-group-header {
  width: calc(100% - 16px);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  margin: 0 8px;
  background: none;
  border: none;
  color: var(--sidebar-section-label);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.1px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  margin-top: 6px;
}
.nav-group-header:hover {
  background: rgba(255,255,255,0.05);
  color: #94a3b8;
}
.nav-group-icon { font-size: 12px; flex-shrink: 0; opacity: 0.7; }
.nav-group-title { flex: 1; text-align: left; }
.nav-group-arrow {
  font-size: 10px;
  transition: transform 0.22s ease;
  opacity: 0.5;
}
.nav-group.open .nav-group-arrow { transform: rotate(180deg); opacity: 0.8; }
.nav-group.open .nav-group-header { color: #94a3b8; }

/* Collapsible body — CSS grid trick (animates to auto height) */
.nav-group-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.24s ease;
}
.nav-group-body > .nav-group-inner { overflow: hidden; min-height: 0; }

.nav-group-header:focus,
.nav-group-header:focus-visible {
  outline: none;
  box-shadow: none;
}
.nav-group.open .nav-group-body { grid-template-rows: 1fr; }

/* Highlight search match */
.sidebar-nav .nav-link mark {
  background: rgba(99,102,241,0.35);
  color: #c7d2fe;
  border-radius: 2px;
  padding: 0 1px;
}

/* Dashboard standalone link (no group) */
.sidebar-standalone {
  padding: 0 8px;
  margin-top: 4px;
}

.sidebar-nav {
  list-style: none;
  padding: 0 8px;
  margin: 0;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  color: var(--sidebar-text);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  margin-bottom: 1px;
}

.sidebar-nav .nav-link i {
  font-size: 16px;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-nav .nav-link:hover {
  background: var(--sidebar-hover-bg);
  color: #e2e8f0;
}

.sidebar-nav .nav-link.active {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.sidebar-nav .nav-link.active i { color: white; }

.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 12px;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  flex-shrink: 0;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: var(--sidebar-section-label);
}

.user-actions {
  display: flex;
  gap: 4px;
}

/* ---- Main content ---- */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Topbar ---- */
.topbar {
  height: var(--topbar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.topbar-left, .topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb-item a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
}

.breadcrumb-item.active { font-size: 13px; font-weight: 500; color: var(--text); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-light); }

/* ---- Page content ---- */
.page-content {
  padding: 24px;
  flex: 1;
}

/* ============================================================
   COMPONENTS
   ============================================================ */

/* ---- Buttons ---- */
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  font-size: 16px;
}

.btn-icon:hover {
  background: var(--surface-2);
  color: var(--text);
}

.notification-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  top: 4px;
  right: 4px;
  border: 2px solid var(--surface);
}

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.card-body { padding: 20px; }

/* ---- Stat Cards ---- */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  color: inherit;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.stat-icon.primary { background: #eef2ff; color: var(--primary); }
.stat-icon.success { background: #d1fae5; color: var(--success); }
.stat-icon.warning { background: #fef3c7; color: var(--warning); }
.stat-icon.info { background: #dbeafe; color: var(--info); }
.stat-icon.secondary { background: #cffafe; color: var(--secondary); }

[data-bs-theme="dark"] .stat-icon.primary { background: rgba(79,70,229,0.15); }
[data-bs-theme="dark"] .stat-icon.success { background: rgba(16,185,129,0.15); }
[data-bs-theme="dark"] .stat-icon.warning { background: rgba(245,158,11,0.15); }
[data-bs-theme="dark"] .stat-icon.info { background: rgba(59,130,246,0.15); }

.stat-content { flex: 1; min-width: 0; }
.stat-value { font-size: 24px; font-weight: 700; line-height: 1; color: var(--text); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }
.stat-change { font-size: 12px; font-weight: 600; margin-top: 8px; }
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ---- Tables ---- */
.table-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table-card .table {
  margin: 0;
  font-size: 13.5px;
}

.table-card .table thead th {
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border: none;
  padding: 12px 16px;
  white-space: nowrap;
}

.table-card .table tbody td {
  padding: 14px 16px;
  border-color: var(--border);
  color: var(--text);
  vertical-align: middle;
}

.table-card .table tbody tr {
  transition: var(--transition);
}

.table-card .table tbody tr:hover {
  background: var(--surface-2);
}

/* ---- Status Badges ---- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-badge.pending { background: #fef3c7; color: #d97706; }
.status-badge.active, .status-badge.delivered, .status-badge.paid { background: #d1fae5; color: #059669; }
.status-badge.processing, .status-badge.confirmed { background: #dbeafe; color: #2563eb; }
.status-badge.shipped { background: #e0e7ff; color: #4f46e5; }
.status-badge.cancelled, .status-badge.failed { background: #fee2e2; color: #dc2626; }
.status-badge.draft { background: var(--surface-2); color: var(--text-muted); }

[data-bs-theme="dark"] .status-badge.pending { background: rgba(217,119,6,0.15); }
[data-bs-theme="dark"] .status-badge.active { background: rgba(5,150,105,0.15); }
[data-bs-theme="dark"] .status-badge.processing { background: rgba(37,99,235,0.15); }

/* ---- Forms ---- */
.form-control, .form-select {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  padding: 9px 12px;
  background: var(--surface);
  color: var(--text);
  transition: var(--transition);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
  background: var(--surface);
  color: var(--text);
}

.form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ---- Page Header ---- */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-header-info .page-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.5px;
}

.page-header-info .page-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── Global Search (Command Palette) ───────────────────────────────────────── */
.search-modal {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,.18);
}

.search-input-wrapper {
  position: relative;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.search-icon {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 16px;
}

.search-spinner {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: none;
}
.search-spinner.active { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

.search-global {
  flex: 1;
  font-size: 15px;
  border: none;
  background: transparent;
  box-shadow: none !important;
  color: var(--text);
  outline: none;
  padding: 0;
}
.search-global::placeholder { color: var(--text-muted); }

.search-kbd-hint {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.search-kbd {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-alt, var(--surface));
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: monospace;
  line-height: 1.6;
}

.search-results {
  max-height: 420px;
  overflow-y: auto;
  padding: 6px;
}

/* Group header */
.search-group-header {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 10px 4px;
}

/* Result item */
.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .1s;
  text-decoration: none;
  color: inherit;
}
.search-result-item:hover,
.search-result-item.active {
  background: var(--surface-alt, rgba(99,102,241,.08));
  color: inherit;
}
.search-result-item.active .search-result-label {
  color: var(--primary);
}

.search-result-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.search-result-body {
  flex: 1;
  min-width: 0;
}

.search-result-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-label mark {
  background: none;
  color: var(--primary);
  font-weight: 700;
  padding: 0;
}

.search-result-sublabel {
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-arrow {
  color: var(--text-light);
  font-size: 12px;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .1s;
}
.search-result-item:hover .search-result-arrow,
.search-result-item.active .search-result-arrow {
  opacity: 1;
}

/* Footer bar */
.search-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 14px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
}
.search-footer-key {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Empty / hint states */
.search-hint {
  text-align: center;
  padding: 36px 20px;
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.search-hint i { font-size: 28px; color: var(--text-light); }

.search-no-results {
  text-align: center;
  padding: 32px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

/* Topbar Ctrl+K badge */
.search-trigger-badge {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color .15s, color .15s;
}
.search-trigger-badge:hover { border-color: var(--primary); color: var(--primary); }
@media (min-width: 768px) { .search-trigger-badge { display: flex; } }

/* ---- Toast ---- */
.toast-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  max-width: 360px;
}

.toast-item.success { border-left: 4px solid var(--success); }
.toast-item.error { border-left: 4px solid var(--danger); }
.toast-item.warning { border-left: 4px solid var(--warning); }
.toast-item.info { border-left: 4px solid var(--info); }

/* ---- Auth pages ---- */
:root {
  --auth-bg:      #070b14;
  --auth-accent:  #22d3ee;
  --auth-accent2: #0891b2;
  --auth-surface: #0d1526;
  --auth-border:  rgba(34,211,238,0.15);
}

.auth-page {
  min-height: 100vh;
  background: var(--auth-bg);
  display: flex;
  position: relative;
  overflow: hidden;
}

/* Dot grid */
.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(34,211,238,0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* Glow top-left */
.auth-page::after {
  content: '';
  position: absolute;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(34,211,238,0.08) 0%, transparent 65%);
  top: -200px;
  left: -100px;
  pointer-events: none;
  z-index: 0;
}

/* Left branding panel */
.auth-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 64px 72px;
  position: relative;
  z-index: 1;
}

.auth-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--auth-border);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 600;
  color: var(--auth-accent);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 32px;
  width: fit-content;
}

.auth-headline {
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  color: #f8fafc;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.auth-headline span {
  color: var(--auth-accent);
}

.auth-desc {
  font-size: 15px;
  color: #64748b;
  line-height: 1.7;
  max-width: 460px;
  margin-bottom: 40px;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: #94a3b8;
}

.auth-feature-item i {
  width: 28px;
  height: 28px;
  background: rgba(34,211,238,0.1);
  border: 1px solid var(--auth-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--auth-accent);
  font-size: 13px;
  flex-shrink: 0;
}

.auth-divider {
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(34,211,238,0.2), transparent);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

/* Right form panel */
.auth-right {
  width: 480px;
  min-height: 100vh;
  background: rgba(13, 21, 38, 0.9);
  backdrop-filter: blur(24px);
  border-left: 1px solid var(--auth-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 44px;
  position: relative;
  z-index: 1;
}

/* Glow bottom-right */
.auth-right::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(34,211,238,0.06) 0%, transparent 70%);
  bottom: -100px;
  right: -100px;
  pointer-events: none;
}

.auth-card {
  width: 100%;
  max-width: 360px;
}

.auth-logo {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--auth-accent2), var(--auth-accent));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #070b14;
  margin: 0 auto 24px;
  box-shadow: 0 0 32px rgba(34,211,238,0.25);
}

.auth-title {
  font-size: 24px;
  font-weight: 800;
  color: #f8fafc;
  text-align: center;
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.auth-subtitle {
  font-size: 13px;
  color: #475569;
  text-align: center;
  margin-bottom: 32px;
}

.auth-form .form-label {
  color: #64748b;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.auth-form .form-control,
.auth-form .input-group-text {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
  color: #f1f5f9;
  padding: 11px 14px;
  font-size: 14px;
  border-radius: 10px;
  transition: var(--transition);
}

.auth-form .input-group .form-control { border-radius: 10px 0 0 10px; }
.auth-form .input-group .input-group-text:first-child { border-radius: 10px 0 0 10px; }
.auth-form .input-group .input-group-text:last-child { border-radius: 0 10px 10px 0; }
.auth-form .input-group .form-control:not(:first-child):not(:last-child) { border-radius: 0; }

.auth-form .form-control:focus {
  background: rgba(34,211,238,0.05);
  border-color: rgba(34,211,238,0.4);
  color: #f1f5f9;
  box-shadow: 0 0 0 3px rgba(34,211,238,0.08);
}

.auth-form .form-control::placeholder { color: #334155; }

.auth-form .input-group-text {
  color: #334155;
  border-left: none;
  cursor: pointer;
}

.auth-forgot {
  font-size: 12px;
  color: var(--auth-accent);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}
.auth-forgot:hover { color: #67e8f9; text-decoration: underline; }

.btn-primary-auth {
  background: linear-gradient(135deg, var(--auth-accent2), var(--auth-accent));
  border: none;
  border-radius: 10px;
  padding: 13px;
  font-size: 14px;
  font-weight: 700;
  color: #070b14;
  width: 100%;
  transition: var(--transition);
  cursor: pointer;
  letter-spacing: 0.3px;
}

.btn-primary-auth:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(34,211,238,0.3);
  color: #070b14;
}

.auth-footer {
  font-size: 11px;
  color: #1e293b;
  text-align: center;
  margin-top: auto;
  padding-top: 32px;
}

.auth-contact-box {
  background: rgba(34,211,238,0.04);
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  padding: 14px 18px;
  text-align: center;
  margin-top: 24px;
}

/* Mobile */
@media (max-width: 900px) {
  .auth-left, .auth-divider { display: none; }
  .auth-right {
    width: 100%;
    border-left: none;
    padding: 40px 24px;
  }
}

/* ============================================================
   PLATFORM ADMIN — Dasa Soft & Tech Brand
   ============================================================ */
.platform-sidebar {
  --sidebar-bg: #070b14;
  --sidebar-active-bg: rgba(34,211,238,0.08);
  --sidebar-active-text: #22d3ee;
  --sidebar-hover-bg: rgba(34,211,238,0.05);
  --sidebar-section-label: #1e3a4a;
  background-image: radial-gradient(rgba(34,211,238,0.04) 1px, transparent 1px);
  background-size: 24px 24px;
}

.platform-sidebar .nav-link.active {
  border-left: 2px solid #22d3ee;
}

.platform-sidebar .nav-link:hover {
  color: #22d3ee !important;
}

.platform-icon {
  background: linear-gradient(135deg, #0891b2, #22d3ee) !important;
  box-shadow: 0 0 20px rgba(34,211,238,0.2);
  color: #070b14 !important;
}

.platform-badge {
  margin: 12px 12px 8px;
  padding: 8px 12px;
  background: rgba(34,211,238,0.06);
  border: 1px solid rgba(34,211,238,0.2);
  border-radius: var(--radius);
  font-size: 11.5px;
  font-weight: 600;
  color: #22d3ee;
  display: flex;
  align-items: center;
  letter-spacing: 0.3px;
}

.platform-topbar {
  border-bottom-color: rgba(34,211,238,0.12);
  background: rgba(7,11,20,0.95);
}

.platform-badge-topbar {
  background: rgba(34,211,238,0.08);
  border: 1px solid rgba(34,211,238,0.2);
  color: #22d3ee;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}

.company-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.company-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--primary);
  color: inherit;
}

.company-card.suspended {
  opacity: 0.65;
  border-color: var(--danger);
}

.plan-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 20px;
}

.plan-badge.free { background: #f1f5f9; color: #64748b; }
.plan-badge.basic { background: #dbeafe; color: #1d4ed8; }
.plan-badge.pro { background: #d1fae5; color: #065f46; }
.plan-badge.enterprise { background: #fef3c7; color: #92400e; }

[data-bs-theme="dark"] .plan-badge.free { background: rgba(100,116,139,0.2); }
[data-bs-theme="dark"] .plan-badge.basic { background: rgba(29,78,216,0.2); }
[data-bs-theme="dark"] .plan-badge.pro { background: rgba(6,95,70,0.2); }
[data-bs-theme="dark"] .plan-badge.enterprise { background: rgba(146,64,14,0.2); }

.metric-mini {
  text-align: center;
  padding: 10px 0;
}

.metric-mini .value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.metric-mini .label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 0 100vw rgba(0,0,0,0.5);
  }

  .main-content {
    margin-left: 0;
  }
}

/* ---- Utilities ---- */
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.text-xs { font-size: 11px; }
.text-sm { font-size: 12.5px; }
.gap-2 { gap: 8px; }

.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

/* Scrollbar global */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }
