/* ============================================
   ARAM EQUITY - Dashboard Styles
   Colors: Navy #050a12, Blue #3b82f6, White
   ============================================ */

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

:root {
  --bg: #050a12;
  --bg-card: #0a1222;
  --bg-elevated: #0f1a30;
  --bg-input: #111b2e;
  --border: #1c2d47;
  --border-light: #243554;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --primary-soft: rgba(59, 130, 246, 0.1);
  --text: #f0f4f8;
  --text-secondary: #7b8fa8;
  --text-muted: #4a5e78;
  --white: #ffffff;
  --success: #22c55e;
  --success-soft: rgba(34, 197, 94, 0.1);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, 0.1);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.1);
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.4);
  --transition: 0.2s ease;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Space Grotesk', 'SF Mono', monospace;
}

/* Light Theme */
[data-theme="light"] {
  --bg: #f4f6f9;
  --bg-card: #ffffff;
  --bg-elevated: #f0f2f5;
  --bg-input: #f7f8fa;
  --border: #e2e5ea;
  --border-light: #d0d4db;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: rgba(37, 99, 235, 0.08);
  --text: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --white: #ffffff;
  --success: #16a34a;
  --success-soft: rgba(22, 163, 74, 0.08);
  --warning: #d97706;
  --warning-soft: rgba(217, 119, 6, 0.08);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.08);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='1200' height='600' viewBox='0 0 1200 600' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='grad1' x1='0%25' y1='100%25' x2='0%25' y2='0%25'%3E%3Cstop offset='0%25' style='stop-color:%233b82f6;stop-opacity:0.4'/%3E%3Cstop offset='100%25' style='stop-color:%233b82f6;stop-opacity:0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M 0 450 L 150 420 L 300 380 L 450 340 L 600 280 L 750 220 L 900 160 L 1050 120 L 1200 80 L 1200 600 L 0 600 Z' fill='url(%23grad1)'/%3E%3Cpath d='M 0 450 L 150 420 L 300 380 L 450 340 L 600 280 L 750 220 L 900 160 L 1050 120 L 1200 80' stroke='%233b82f6' stroke-width='3' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='0' cy='450' r='5' fill='%233b82f6'/%3E%3Ccircle cx='1200' cy='80' r='5' fill='%233b82f6'/%3E%3C/svg%3E") no-repeat bottom left;
  background-size: 100% 40%;
  background-attachment: fixed;
  opacity: 0.25;
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-hover);
}

/* ============================================
   Auth Pages (Login / Register)
   ============================================ */

.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.auth-wrapper::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  right: -20%;
  bottom: -50%;
  background: url("data:image/svg+xml,%3Csvg width='1200' height='600' viewBox='0 0 1200 600' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='authGrad' x1='0%25' y1='100%25' x2='0%25' y2='0%25'%3E%3Cstop offset='0%25' style='stop-color:%233b82f6;stop-opacity:0.45'/%3E%3Cstop offset='100%25' style='stop-color:%233b82f6;stop-opacity:0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M 0 450 L 200 400 L 400 350 L 600 280 L 800 200 L 1000 130 L 1200 80 L 1200 600 L 0 600 Z' fill='url(%23authGrad)'/%3E%3Cpath d='M 0 450 L 200 400 L 400 350 L 600 280 L 800 200 L 1000 130 L 1200 80' stroke='%233b82f6' stroke-width='4' fill='none' stroke-linecap='round' stroke-linejoin='round' opacity='0.9'/%3E%3Ccircle cx='0' cy='450' r='6' fill='%233b82f6'/%3E%3Ccircle cx='1200' cy='80' r='6' fill='%233b82f6'/%3E%3C/svg%3E") center;
  background-size: cover;
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
  animation: slideChart 20s linear infinite;
}

@keyframes slideChart {
  0% { transform: translateX(0) translateY(0); }
  50% { transform: translateX(-30px) translateY(-20px); }
  100% { transform: translateX(0) translateY(0); }
}

@keyframes trendPulse {
  0% { opacity: 0.08; }
  50% { opacity: 0.12; }
  100% { opacity: 0.08; }
}

@keyframes chartFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

/* Apply animations to dashboard backgrounds */
.main::before {
  animation: trendPulse 8s ease-in-out infinite;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

.auth-logo {
  text-align: center;
  margin-bottom: 40px;
}

.auth-logo h1 {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.auth-logo h1 span {
  color: var(--primary);
}

.auth-logo p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.auth-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.auth-box h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.auth-box .auth-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.auth-footer a {
  font-weight: 500;
}

/* ============================================
   Form Elements
   ============================================ */

.form-group {
  margin-bottom: 20px;
}

.form-row {
  display: flex;
  gap: 16px;
}

.form-row .form-group {
  flex: 1;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

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

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%237b8fa8' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 6l3.5 4 3.5-4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-select option {
  background: var(--bg-card);
  color: var(--text);
}

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

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

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

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: var(--white);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}

.btn-danger:hover {
  background: #dc2626;
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 12px;
}

.btn-ghost:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 12px 28px;
  font-size: 1rem;
}

/* ============================================
   Dashboard Layout
   ============================================ */

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

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}

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

.sidebar-header h1 {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.sidebar-header h1 span {
  color: var(--primary);
}

.sidebar-header p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

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

.sidebar-section {
  margin-bottom: 8px;
}

.sidebar-section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 6px 8px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all var(--transition);
  user-select: none;
}

.sidebar-section-label:hover {
  background: var(--primary-soft);
  color: var(--text-secondary);
}

.sidebar-section-label .chevron {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.sidebar-section.collapsed .sidebar-section-label .chevron {
  transform: rotate(-90deg);
}

.sidebar-section-links {
  overflow: hidden;
  max-height: 500px;
  transition: max-height 0.3s ease, opacity 0.2s ease;
  opacity: 1;
}

.sidebar-section.collapsed .sidebar-section-links {
  max-height: 0;
  opacity: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: all var(--transition);
  margin-bottom: 2px;
}

.sidebar-link:hover {
  background: var(--primary-soft);
  color: var(--text);
}

.sidebar-link.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 500;
}

.sidebar-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

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

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius);
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8125rem;
  flex-shrink: 0;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

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

.sidebar-user-email {
  font-size: 0.6875rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar Collapse Toggle */
.sidebar-collapse-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-collapse-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.sidebar-collapse-btn svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

/* Collapsed Sidebar */
.sidebar.collapsed {
  width: 68px;
}

.sidebar.collapsed .sidebar-header h1,
.sidebar.collapsed .sidebar-header p,
.sidebar.collapsed .sidebar-section-label,
.sidebar.collapsed .sidebar-link span,
.sidebar.collapsed .sidebar-user-info {
  display: none;
}

.sidebar.collapsed .sidebar-header {
  padding: 20px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar.collapsed .sidebar-collapse-btn svg {
  transform: rotate(180deg);
}

.sidebar.collapsed .sidebar-nav {
  padding: 16px 8px;
}

.sidebar.collapsed .sidebar-link {
  justify-content: center;
  padding: 10px;
}

.sidebar.collapsed .sidebar-link svg {
  width: 20px;
  height: 20px;
}

.sidebar.collapsed .sidebar-footer {
  padding: 12px 8px;
}

.sidebar.collapsed .sidebar-user {
  justify-content: center;
}

.sidebar.collapsed + .main {
  margin-left: 68px;
}

/* Theme Toggle */
.theme-toggle {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 7px 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
}

.theme-toggle:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: var(--primary);
}

.theme-toggle svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.theme-toggle .theme-label {
  display: inline;
}

/* Sidebar theme toggle (bottom) */
.sidebar-theme-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-sans);
  transition: all var(--transition);
}

.sidebar-theme-toggle:hover {
  background: var(--primary-soft);
  color: var(--text);
}

.sidebar-theme-toggle svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar.collapsed .sidebar-theme-toggle span {
  display: none;
}

.sidebar.collapsed .sidebar-theme-toggle {
  justify-content: center;
  padding: 10px;
}

/* Main Content */
.main {
  flex: 1;
  margin-left: 260px;
  min-width: 0;
  transition: margin-left 0.3s ease;
  position: relative;
  overflow-x: hidden;
}

.main::before {
  content: '';
  position: fixed;
  top: 0;
  left: 260px;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='1600' height='1000' viewBox='0 0 1600 1000' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3ClinearGradient id='dashTrend' x1='0%25' y1='100%25' x2='0%25' y2='0%25'%3E%3Cstop offset='0%25' style='stop-color:%233b82f6;stop-opacity:0.35'/%3E%3Cstop offset='60%25' style='stop-color:%233b82f6;stop-opacity:0.1'/%3E%3Cstop offset='100%25' style='stop-color:%233b82f6;stop-opacity:0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M 0 750 L 200 680 L 400 610 L 600 520 L 800 420 L 1000 320 L 1200 220 L 1400 140 L 1600 80 L 1600 1000 L 0 1000 Z' fill='url(%23dashTrend)'/%3E%3Cpath d='M 0 750 L 200 680 L 400 610 L 600 520 L 800 420 L 1000 320 L 1200 220 L 1400 140 L 1600 80' stroke='%233b82f6' stroke-width='4' fill='none' stroke-linecap='round' stroke-linejoin='round' opacity='0.8'/%3E%3Ccircle cx='0' cy='750' r='6' fill='%233b82f6' opacity='0.8'/%3E%3Ccircle cx='1600' cy='80' r='6' fill='%233b82f6' opacity='0.8'/%3E%3C/svg%3E") no-repeat bottom;
  background-size: 100% 50%;
  background-attachment: fixed;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-title h2 {
  font-size: 1.125rem;
  font-weight: 600;
}

.topbar-title p {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
}

.mobile-toggle svg {
  width: 24px;
  height: 24px;
}

.content {
  padding: 32px;
}

/* ============================================
   Stats Cards
   ============================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stat-card-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.stat-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-card-icon svg {
  width: 18px;
  height: 18px;
}

.stat-card-icon.blue {
  background: var(--primary-soft);
  color: var(--primary);
}

.stat-card-icon.green {
  background: var(--success-soft);
  color: var(--success);
}

.stat-card-icon.yellow {
  background: var(--warning-soft);
  color: var(--warning);
}

.stat-card-icon.red {
  background: var(--danger-soft);
  color: var(--danger);
}

.stat-card-value {
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-card-change {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.stat-card-change .up {
  color: var(--success);
}

.stat-card-change .down {
  color: var(--danger);
}

/* ============================================
   Tables
   ============================================ */

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

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

.table-card-title {
  font-size: 1rem;
  font-weight: 600;
}

.table-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-wrapper {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th {
  text-align: left;
  padding: 12px 24px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 14px 24px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

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

.table tbody tr:hover {
  background: var(--primary-soft);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-success {
  background: var(--success-soft);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge-info {
  background: var(--primary-soft);
  color: var(--primary);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ============================================
   Cards Grid
   ============================================ */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

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

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
}

/* ============================================
   Search & Filters
   ============================================ */

.search-box {
  position: relative;
}

.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.search-box input {
  padding-left: 36px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

/* ============================================
   Alerts / Notices
   ============================================ */

.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 20px;
  border: 1px solid;
}

.alert-success {
  background: var(--success-soft);
  border-color: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.alert-danger {
  background: var(--danger-soft);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.alert-warning {
  background: var(--warning-soft);
  border-color: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

/* ============================================
   Stepper (Application Form)
   ============================================ */

.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 32px;
}

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

.step-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 2px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition);
}

.step.active .step-number {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.step.completed .step-number {
  background: var(--success);
  border-color: var(--success);
  color: var(--white);
}

.step-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

.step.active .step-label {
  color: var(--text);
}

.step.completed .step-label {
  color: var(--success);
}

.step-line {
  width: 48px;
  height: 2px;
  background: var(--border);
  margin: 0 12px;
}

.step-line.completed {
  background: var(--success);
}

/* ============================================
   Application Summary
   ============================================ */

.summary-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.875rem;
}

.summary-row .label {
  color: var(--text-secondary);
}

.summary-row .value {
  font-weight: 500;
  color: var(--text);
}

.summary-total {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 12px;
  font-weight: 600;
}

.summary-total .value {
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 1.125rem;
}

/* ============================================
   Quantity Selector
   ============================================ */

.qty-selector {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.qty-selector button {
  width: 36px;
  height: 36px;
  background: var(--bg-elevated);
  border: none;
  color: var(--text);
  font-size: 1.125rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.qty-selector button:hover {
  background: var(--border);
}

.qty-selector .qty-value {
  width: 48px;
  text-align: center;
  font-weight: 600;
  font-size: 0.875rem;
  background: var(--bg-input);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  height: 36px;
  line-height: 36px;
}

/* ============================================
   Account Selection Cards
   ============================================ */

.account-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.account-option {
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
}

.account-option:hover {
  border-color: var(--border-light);
}

.account-option.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.account-option-size {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.account-option-price {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* ============================================
   Empty States
   ============================================ */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1rem;
  margin-bottom: 4px;
  color: var(--text-secondary);
}

.empty-state p {
  font-size: 0.875rem;
}

/* ============================================
   Sidebar Overlay (mobile)
   ============================================ */

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 90;
}

.sidebar-overlay.active {
  display: block;
}

/* ============================================
   Page Header
   ============================================ */

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
}

.page-header p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 260px !important;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar.open .sidebar-header h1,
  .sidebar.open .sidebar-header p,
  .sidebar.open .sidebar-section-label,
  .sidebar.open .sidebar-link span,
  .sidebar.open .sidebar-user-info {
    display: block !important;
  }

  .sidebar.open .sidebar-link {
    justify-content: flex-start !important;
  }

  .sidebar-overlay.active {
    display: block;
  }

  .sidebar-collapse-btn {
    display: none;
  }

  .main {
    margin-left: 0 !important;
  }

  .mobile-toggle {
    display: block;
  }

  .topbar {
    padding: 14px 20px;
  }

  .content {
    padding: 20px;
  }

  .stats-grid {
    grid-template-columns: 1fr !important;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .stepper {
    flex-direction: column;
    gap: 8px;
  }

  .step-line {
    width: 2px;
    height: 20px;
    margin: 0;
  }

  .account-options {
    grid-template-columns: 1fr 1fr;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .auth-box {
    padding: 24px 20px;
  }

  .account-options {
    grid-template-columns: 1fr;
  }
}
