/* ============================================================
   WinCAD License Dashboard — Dark Glassmorphism Theme
   ============================================================ */

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

/* ---- CSS Variables ---- */
:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.75);
  --bg-card-hover: rgba(255, 255, 255, 0.95);
  --bg-sidebar: #ffffff;
  --bg-input: #f1f5f9;
  --bg-glass: rgba(15, 23, 42, 0.04);

  --border-color: rgba(15, 23, 42, 0.08);
  --border-focus: rgba(6, 182, 212, 0.6);
  --border-glass: rgba(15, 23, 42, 0.08);

  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-heading: #0f172a;

  --accent-cyan: #0891b2;
  --accent-cyan-dim: rgba(8, 145, 178, 0.1);
  --accent-violet: #7c3aed;
  --accent-violet-dim: rgba(124, 58, 237, 0.1);
  --accent-emerald: #059669;
  --accent-emerald-dim: rgba(5, 150, 105, 0.1);
  --accent-rose: #e11d48;
  --accent-rose-dim: rgba(225, 29, 72, 0.1);
  --accent-amber: #d97706;
  --accent-amber-dim: rgba(217, 119, 6, 0.1);
  --accent-blue: #2563eb;
  --accent-gold: #ca8a04;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-glow-cyan: 0 0 20px rgba(6, 182, 212, 0.12);
  --shadow-glow-violet: 0 0 20px rgba(139, 92, 246, 0.12);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --sidebar-width: 260px;
  --topbar-height: 64px;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.4s ease;
}

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

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent-cyan);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover {
  color: #22d3ee;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(6, 182, 212, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 0.6s ease;
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo .logo-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 900;
  color: white;
  margin-bottom: 16px;
  box-shadow: var(--shadow-glow-cyan);
}
.login-logo h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.02em;
}
.login-logo p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.login-error {
  background: var(--accent-rose-dim);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: #fda4af;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   LAYOUT — Sidebar + Content
   ============================================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--transition-normal);
}

.sidebar-brand {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-brand .brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 16px;
  color: white;
  flex-shrink: 0;
}
.sidebar-brand .brand-text h2 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.sidebar-brand .brand-text span {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.nav-section {
  margin-bottom: 24px;
}
.nav-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 12px;
  margin-bottom: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-fast);
  position: relative;
  margin-bottom: 2px;
}
.nav-link:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
}
.nav-link.active {
  background: var(--accent-cyan-dim);
  color: var(--accent-cyan);
  font-weight: 600;
}
.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--accent-cyan);
  border-radius: 0 3px 3px 0;
}
.nav-link i {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-link .nav-badge {
  margin-left: auto;
  background: var(--accent-rose);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
}

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-user .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-violet), var(--accent-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: white;
  flex-shrink: 0;
}
.sidebar-user .user-info {
  flex: 1;
  min-width: 0;
}
.sidebar-user .user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user .user-role {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: capitalize;
}

/* ---- Main Content ---- */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  background: var(--bg-primary);
}

.topbar {
  height: var(--topbar-height);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar-left h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
}
.topbar-left .breadcrumb {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.topbar-left .breadcrumb a {
  color: var(--text-secondary);
}

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

.page-content {
  padding: 32px;
}

/* ============================================================
   CARDS
   ============================================================ */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}
.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}
.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow-md);
}

/* ---- Stat Cards ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.stat-card {
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}
.stat-card .stat-icon.cyan { background: var(--accent-cyan-dim); color: var(--accent-cyan); }
.stat-card .stat-icon.violet { background: var(--accent-violet-dim); color: var(--accent-violet); }
.stat-card .stat-icon.emerald { background: var(--accent-emerald-dim); color: var(--accent-emerald); }
.stat-card .stat-icon.rose { background: var(--accent-rose-dim); color: var(--accent-rose); }
.stat-card .stat-icon.amber { background: var(--accent-amber-dim); color: var(--accent-amber); }

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-card .stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.stat-card .stat-change {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 20px;
}
.stat-change.up { background: var(--accent-emerald-dim); color: var(--accent-emerald); }
.stat-change.down { background: var(--accent-rose-dim); color: var(--accent-rose); }

/* Decorative glow */
.stat-card::after {
  content: '';
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  top: -30px;
  right: -30px;
  opacity: 0.08;
  transition: opacity var(--transition-normal);
}
.stat-card:hover::after {
  opacity: 0.15;
}
.stat-card.glow-cyan::after { background: var(--accent-cyan); }
.stat-card.glow-violet::after { background: var(--accent-violet); }
.stat-card.glow-emerald::after { background: var(--accent-emerald); }
.stat-card.glow-rose::after { background: var(--accent-rose); }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.data-table thead th {
  background: #f1f5f9;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}
.data-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition-fast);
}
.data-table tbody tr:hover {
  background: rgba(0, 0, 0, 0.015);
}
.data-table tbody tr:last-child {
  border-bottom: none;
}
.data-table td {
  padding: 14px 16px;
  color: var(--text-primary);
  vertical-align: middle;
}
.data-table .license-key {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
  color: var(--accent-cyan);
  background: var(--accent-cyan-dim);
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.badge-success { background: var(--accent-emerald-dim); color: var(--accent-emerald); }
.badge-danger { background: var(--accent-rose-dim); color: var(--accent-rose); }
.badge-warning { background: var(--accent-amber-dim); color: var(--accent-amber); }
.badge-info { background: var(--accent-cyan-dim); color: var(--accent-cyan); }
.badge-primary { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.badge-purple { background: var(--accent-violet-dim); color: var(--accent-violet); }
.badge-gold { background: rgba(234, 179, 8, 0.15); color: var(--accent-gold); }
.badge-dark { background: rgba(100, 116, 139, 0.2); color: var(--text-muted); }
.badge-secondary { background: rgba(148, 163, 184, 0.1); color: var(--text-secondary); }

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

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
}
.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), #0891b2);
  color: white;
  border: none;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #22d3ee, var(--accent-cyan));
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.4);
  color: white;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
  color: white;
}

.btn-danger {
  background: linear-gradient(135deg, var(--accent-rose), #e11d48);
  color: white;
  border: none;
}
.btn-danger:hover {
  box-shadow: 0 4px 16px rgba(244, 63, 94, 0.3);
  color: white;
}

.btn-success {
  background: linear-gradient(135deg, var(--accent-emerald), #059669);
  color: white;
  border: none;
}
.btn-success:hover {
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  padding: 8px 12px;
}
.btn-ghost:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
}

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

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.form-required {
  color: var(--accent-rose);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  outline: none;
}
.form-control:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--accent-cyan-dim);
  background: #ffffff;
}
.form-control::placeholder {
  color: var(--text-muted);
}

select.form-control {
  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%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

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

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

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================================
   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: 800;
  color: var(--text-heading);
  letter-spacing: -0.02em;
}
.page-header .page-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================================
   SEARCH & FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.search-input {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.search-input input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: all var(--transition-fast);
}
.search-input input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px var(--accent-cyan-dim);
}
.search-input i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.filter-select {
  padding: 10px 36px 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  outline: none;
  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%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}

/* ============================================================
   ACTIVITY LIST
   ============================================================ */
.activity-list {
  list-style: none;
}
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
}
.activity-item:last-child {
  border-bottom: none;
}
.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.activity-icon.green { background: var(--accent-emerald-dim); color: var(--accent-emerald); }
.activity-icon.red { background: var(--accent-rose-dim); color: var(--accent-rose); }
.activity-icon.blue { background: var(--accent-cyan-dim); color: var(--accent-cyan); }
.activity-icon.purple { background: var(--accent-violet-dim); color: var(--accent-violet); }
.activity-icon.amber { background: var(--accent-amber-dim); color: var(--accent-amber); }

.activity-content {
  flex: 1;
}
.activity-content .activity-text {
  font-size: 0.85rem;
  color: var(--text-primary);
}
.activity-content .activity-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================================
   GRID LAYOUTS
   ============================================================ */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}

/* ============================================================
   ALERTS / MESSAGES
   ============================================================ */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid;
}
.alert-success {
  background: var(--accent-emerald-dim);
  border-color: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}
.alert-danger {
  background: var(--accent-rose-dim);
  border-color: rgba(244, 63, 94, 0.3);
  color: #fda4af;
}
.alert-warning {
  background: var(--accent-amber-dim);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fcd34d;
}
.alert-info {
  background: var(--accent-cyan-dim);
  border-color: rgba(6, 182, 212, 0.3);
  color: #67e8f9;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 24px;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  text-decoration: none;
}
.pagination a:hover {
  background: var(--bg-glass);
  color: var(--text-primary);
}
.pagination .active {
  background: var(--accent-cyan);
  color: white;
  font-weight: 700;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;
}
.empty-state h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.empty-state p {
  font-size: 0.85rem;
  max-width: 320px;
  margin: 0 auto;
}

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

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

.animate-delay-1 { animation-delay: 0.1s; animation-fill-mode: both; }
.animate-delay-2 { animation-delay: 0.2s; animation-fill-mode: both; }
.animate-delay-3 { animation-delay: 0.3s; animation-fill-mode: both; }
.animate-delay-4 { animation-delay: 0.4s; animation-fill-mode: both; }

/* ============================================================
   CARD SECTION HEADER
   ============================================================ */
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.card-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-heading);
}
.card-header a {
  font-size: 0.8rem;
  font-weight: 500;
}

/* ============================================================
   ACTION BUTTONS IN TABLES
   ============================================================ */
.action-btns {
  display: flex;
  gap: 6px;
}
.action-btns .btn {
  padding: 5px 10px;
  font-size: 0.75rem;
}

/* ============================================================
   SETTINGS PAGE
   ============================================================ */
.settings-section {
  margin-bottom: 32px;
}
.settings-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
  .page-content {
    padding: 20px 16px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .topbar {
    padding: 0 16px;
  }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-cyan { color: var(--accent-cyan); }
.text-violet { color: var(--accent-violet); }
.text-emerald { color: var(--accent-emerald); }
.text-rose { color: var(--accent-rose); }
.text-amber { color: var(--accent-amber); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-mono { font-family: 'JetBrains Mono', 'Fira Code', monospace; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.w-full { width: 100%; }
