/* ============================================================
   DIGITAL WEB HIVE CRM — Premium Enterprise UI
   Design system inspired by Stripe + HubSpot + Xero
   ============================================================ */

/* ─── CSS Variables ─────────────────────────────────────── */
:root {
  --primary:        #f59e0b;
  --primary-dark:   #d97706;
  --primary-light:  #fef3c7;
  --secondary:      #1f2937;
  --accent:         #fbbf24;
  --gold-gradient:  linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #f97316 100%);
  --success:        #059669;
  --success-light:  #d1fae5;
  --danger:         #dc2626;
  --danger-light:   #fee2e2;
  --warning:        #d97706;
  --warning-light:  #fef3c7;
  --info:           #2563eb;
  --info-light:     #dbeafe;
  --purple:         #7c3aed;
  --purple-light:   #ede9fe;

  --bg:             #f8fafc;
  --bg-card:        #ffffff;
  --bg-dark:        #111827;
  --sidebar-bg:     #1f2937;
  --sidebar-text:   #d1d5db;
  --sidebar-hover:  #374151;
  --sidebar-active: #f59e0b;
  --sidebar-width:  260px;

  --text:           #1f2937;
  --text-muted:     #6b7280;
  --text-light:     #9ca3af;
  --border:         #e5e7eb;
  --border-light:   #f3f4f6;

  --radius:         0.75rem;
  --radius-sm:      0.5rem;
  --radius-lg:      1rem;
  --shadow:         0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:      0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg:      0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --shadow-xl:      0 20px 25px rgba(0,0,0,.1), 0 10px 10px rgba(0,0,0,.04);

  --topbar-height:  64px;
  --transition:     0.2s ease;
}

/* Dark mode */
[data-theme="dark"] {
  --bg:           #0f172a;
  --bg-card:      #1e293b;
  --bg-dark:      #020617;
  --text:         #f1f5f9;
  --text-muted:   #94a3b8;
  --border:       #334155;
  --border-light: #1e293b;
  --sidebar-bg:   #0f172a;
}

/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; }
input, select, textarea, button { font-family: inherit; }

/* ─── Layout ─────────────────────────────────────────────── */
.app-wrapper { display: flex; min-height: 100vh; }

/* ─── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  min-height: 100vh;
  position: fixed;
  top: 0; left: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform var(--transition);
  box-shadow: 4px 0 20px rgba(0,0,0,.15);
}
.sidebar-logo {
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  gap: .75rem;
}
.sidebar-logo img { height: 36px; width: auto; }
.sidebar-logo-text {
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.sidebar-logo-text span {
  display: block;
  font-size: .7rem;
  font-weight: 400;
  color: var(--sidebar-text);
}
.sidebar-nav { flex: 1; padding: 1rem 0; overflow-y: auto; }
.nav-section-label {
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  padding: .75rem 1.25rem .25rem;
  margin-top: .5rem;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1.25rem;
  color: var(--sidebar-text);
  font-size: .875rem;
  font-weight: 500;
  border-radius: 0;
  transition: all var(--transition);
  position: relative;
  margin: .1rem .75rem;
  border-radius: var(--radius-sm);
}
.nav-item:hover {
  background: var(--sidebar-hover);
  color: #fff;
}
.nav-item.active {
  background: rgba(245,158,11,.15);
  color: var(--primary);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 70%;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
}
.nav-item svg, .nav-item .nav-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  opacity: .8;
}
.nav-item.active svg, .nav-item:hover svg { opacity: 1; }
.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  padding: .1rem .4rem;
  border-radius: 9999px;
  min-width: 18px;
  text-align: center;
}

/* Sidebar bottom user panel */
.sidebar-user {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  gap: .75rem;
}
.sidebar-user-avatar {
  width: 36px; height: 36px;
  border-radius: 9999px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.sidebar-user-info { flex: 1; overflow: hidden; }
.sidebar-user-name {
  font-size: .8rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: .7rem;
  color: var(--sidebar-text);
}

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

/* ─── Topbar ─────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-height);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}
.topbar-left { flex: 1; display: flex; align-items: center; gap: 1rem; }
.topbar-right { display: flex; align-items: center; gap: .75rem; }
.topbar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.topbar-breadcrumb {
  font-size: .8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: .35rem;
}
.topbar-breadcrumb a:hover { color: var(--primary); }

/* Search */
.topbar-search {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .35rem .75rem;
  gap: .5rem;
  min-width: 240px;
}
.topbar-search input {
  border: none;
  background: transparent;
  outline: none;
  font-size: .875rem;
  color: var(--text);
  width: 100%;
}
.topbar-search svg { color: var(--text-muted); width: 16px; height: 16px; flex-shrink: 0; }

/* Icon buttons */
.icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--bg);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  position: relative;
}
.icon-btn:hover { background: var(--primary-light); color: var(--primary); }
.icon-btn .badge-dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 9999px;
  border: 2px solid var(--bg-card);
}

/* ─── Page Content ───────────────────────────────────────── */
.page-content { padding: 1.5rem; flex: 1; }
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.page-header-left { display: flex; flex-direction: column; gap: .25rem; }
.page-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.page-subtitle { font-size: .875rem; color: var(--text-muted); }
.page-header-actions { display: flex; align-items: center; gap: .75rem; }

/* ─── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}
.card-body { padding: 1.5rem; }
.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* ─── Stats / KPI Widgets ────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold-gradient);
  opacity: 0;
  transition: opacity var(--transition);
}
.stat-card:hover::after { opacity: 1; }
.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon svg { width: 24px; height: 24px; }
.stat-icon.gold    { background: var(--primary-light); color: var(--primary); }
.stat-icon.green   { background: var(--success-light); color: var(--success); }
.stat-icon.red     { background: var(--danger-light);  color: var(--danger); }
.stat-icon.blue    { background: var(--info-light);    color: var(--info); }
.stat-icon.purple  { background: var(--purple-light);  color: var(--purple); }
.stat-body { flex: 1; }
.stat-label { font-size: .8rem; font-weight: 500; color: var(--text-muted); margin-bottom: .25rem; }
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--text); line-height: 1.1; }
.stat-change {
  font-size: .75rem;
  font-weight: 600;
  margin-top: .35rem;
  display: flex;
  align-items: center;
  gap: .25rem;
}
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ─── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .55rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--gold-gradient);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(245,158,11,.3);
}
.btn-primary:hover {
  box-shadow: 0 4px 16px rgba(245,158,11,.5);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--border-light); border-color: var(--text-light); }
.btn-success {
  background: var(--success);
  color: #fff;
  box-shadow: 0 2px 8px rgba(5,150,105,.25);
}
.btn-success:hover { background: #047857; transform: translateY(-1px); }
.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 2px 8px rgba(220,38,38,.25);
}
.btn-danger:hover { background: #b91c1c; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-sm { padding: .35rem .85rem; font-size: .8rem; }
.btn-lg { padding: .75rem 1.75rem; font-size: 1rem; }
.btn-icon { padding: .5rem; width: 36px; height: 36px; }

/* ─── Forms ──────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: .4rem;
  letter-spacing: .01em;
}
.form-label .required { color: var(--danger); margin-left: .2rem; }
.form-control {
  width: 100%;
  padding: .6rem .9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  color: var(--text);
  background: var(--bg-card);
  transition: all var(--transition);
  outline: none;
  appearance: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(245,158,11,.12);
}
.form-control::placeholder { color: var(--text-light); }
.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(220,38,38,.12); }
.form-hint { font-size: .75rem; color: var(--text-muted); margin-top: .3rem; }
.form-error { font-size: .75rem; color: var(--danger); margin-top: .3rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
select.form-control { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3e%3cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right .65rem center; background-size: 18px; padding-right: 2.25rem; }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ─── Tables ─────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
}
.table th {
  background: var(--bg);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  padding: .75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td {
  padding: .85rem 1rem;
  font-size: .875rem;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: rgba(245,158,11,.03); }
.table-actions { display: flex; align-items: center; gap: .5rem; }
.table .avatar-sm {
  width: 32px; height: 32px;
  border-radius: 9999px;
  object-fit: cover;
  flex-shrink: 0;
}

/* ─── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .65rem;
  border-radius: 9999px;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: .02em;
}
.badge-green   { background: var(--success-light); color: var(--success); }
.badge-red     { background: var(--danger-light);  color: var(--danger); }
.badge-yellow  { background: var(--warning-light); color: var(--warning); }
.badge-blue    { background: var(--info-light);    color: var(--info); }
.badge-purple  { background: var(--purple-light);  color: var(--purple); }
.badge-gray    { background: #f3f4f6; color: #6b7280; }
.badge-orange  { background: #fff7ed; color: #ea580c; }
.badge-indigo  { background: #eef2ff; color: #4f46e5; }

/* ─── Alerts ─────────────────────────────────────────────── */
.alert {
  padding: .85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: 1rem;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: .05rem; }
.alert-success { background: var(--success-light); color: var(--success); border: 1px solid #a7f3d0; }
.alert-error   { background: var(--danger-light);  color: var(--danger);  border: 1px solid #fca5a5; }
.alert-warning { background: var(--warning-light); color: var(--warning); border: 1px solid #fcd34d; }
.alert-info    { background: var(--info-light);    color: var(--info);    border: 1px solid #93c5fd; }
.alert-close { margin-left: auto; cursor: pointer; opacity: .7; }
.alert-close:hover { opacity: 1; }

/* ─── Modals ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(.95) translateY(-10px);
  transition: all var(--transition);
}
.modal-overlay.active .modal { transform: scale(1) translateY(0); }
.modal-lg { max-width: 760px; }
.modal-xl { max-width: 960px; }
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title { font-size: 1rem; font-weight: 700; color: var(--text); }
.modal-close { background: none; border: none; color: var(--text-muted); cursor: pointer; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); transition: all var(--transition); }
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border-light); display: flex; justify-content: flex-end; gap: .75rem; }

/* ─── Kanban Board ───────────────────────────────────────── */
.kanban-board {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  min-height: calc(100vh - 200px);
  align-items: flex-start;
}
.kanban-col {
  min-width: 280px;
  max-width: 280px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}
.kanban-col-header {
  padding: .85rem 1rem;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.kanban-col-count {
  background: rgba(0,0,0,.06);
  padding: .1rem .5rem;
  border-radius: 9999px;
  font-size: .7rem;
}
.kanban-col-body {
  padding: .75rem;
  flex: 1;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.kanban-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  padding: .9rem;
  cursor: grab;
  transition: all var(--transition);
  box-shadow: var(--shadow);
}
.kanban-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.kanban-card.dragging { opacity: .5; cursor: grabbing; }
.kanban-card-name { font-size: .875rem; font-weight: 600; color: var(--text); margin-bottom: .35rem; }
.kanban-card-company { font-size: .75rem; color: var(--text-muted); }
.kanban-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: .65rem;
  padding-top: .65rem;
  border-top: 1px solid var(--border-light);
}
.kanban-card-value { font-size: .75rem; font-weight: 700; color: var(--primary); }
.kanban-card-source { font-size: .7rem; color: var(--text-light); }

/* ─── Charts ─────────────────────────────────────────────── */
.chart-container { position: relative; height: 300px; }

/* ─── Notification Dropdown ──────────────────────────────── */
.dropdown {
  position: relative;
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  min-width: 320px;
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
}
.dropdown-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dropdown-header h6 { font-size: .875rem; font-weight: 700; }
.notif-item {
  padding: .85rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  transition: background var(--transition);
  border-bottom: 1px solid var(--border-light);
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: rgba(245,158,11,.04); }
.notif-icon {
  width: 36px; height: 36px;
  border-radius: 9999px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.notif-icon svg { width: 16px; height: 16px; }
.notif-body { flex: 1; }
.notif-title { font-size: .8rem; font-weight: 600; color: var(--text); }
.notif-msg { font-size: .75rem; color: var(--text-muted); }
.notif-time { font-size: .7rem; color: var(--text-light); margin-top: .2rem; }

/* ─── Auth Pages ─────────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.auth-brand {
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.auth-brand::before {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(245,158,11,.2) 0%, transparent 70%);
  top: -100px; right: -100px;
}
.auth-brand::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(251,191,36,.15) 0%, transparent 70%);
  bottom: -50px; left: -50px;
}
.auth-brand-content { position: relative; z-index: 1; text-align: center; }
.auth-brand-logo { height: 60px; margin: 0 auto 1.5rem; }
.auth-brand-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: .75rem;
}
.auth-brand-subtitle { font-size: .95rem; color: rgba(255,255,255,.6); max-width: 340px; }
.auth-features { margin-top: 2rem; display: flex; flex-direction: column; gap: .65rem; }
.auth-feature {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: rgba(255,255,255,.8);
  font-size: .875rem;
}
.auth-feature-icon {
  width: 24px; height: 24px;
  background: rgba(245,158,11,.2);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.auth-feature-icon svg { width: 12px; height: 12px; color: var(--primary); }
.auth-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-xl);
}
.auth-logo { height: 40px; margin-bottom: 1.75rem; }
.auth-title { font-size: 1.5rem; font-weight: 800; margin-bottom: .35rem; }
.auth-subtitle { font-size: .875rem; color: var(--text-muted); margin-bottom: 2rem; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.25rem 0;
  color: var(--text-muted);
  font-size: .8rem;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: .85rem; color: var(--text-muted); }
.auth-footer a { color: var(--primary); font-weight: 600; }

/* ─── Pagination ─────────────────────────────────────────── */
.pagination { display: flex; justify-content: center; margin-top: 1.5rem; }
.pagination ul { display: flex; align-items: center; gap: .35rem; list-style: none; }
.pagination li a, .pagination li span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.pagination li a:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.pagination li.active a { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ─── Tabs ───────────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; gap: .25rem; }
.tab-btn {
  padding: .6rem 1.1rem;
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  cursor: pointer;
}
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ─── Empty State ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
}
.empty-state svg { width: 64px; height: 64px; margin: 0 auto 1.25rem; opacity: .4; }
.empty-state h3 { font-size: 1.1rem; font-weight: 700; color: var(--text); margin-bottom: .5rem; }
.empty-state p { font-size: .875rem; max-width: 360px; margin: 0 auto 1.5rem; }

/* ─── Skeleton Loader ────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg) 25%, var(--border-light) 50%, var(--bg) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── Glassmorphism ──────────────────────────────────────── */
.glass {
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.12);
}

/* ─── Gold Gradient Elements ─────────────────────────────── */
.gradient-text {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-bg { background: var(--gold-gradient); }
.gradient-border {
  border: 2px solid transparent;
  background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
              var(--gold-gradient) border-box;
}

/* ─── Progress Bar ───────────────────────────────────────── */
.progress { height: 8px; background: var(--border); border-radius: 9999px; overflow: hidden; }
.progress-bar {
  height: 100%;
  background: var(--gold-gradient);
  border-radius: 9999px;
  transition: width .4s ease;
}

/* ─── Avatar ─────────────────────────────────────────────── */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 32px; height: 32px; font-size: .75rem; }
.avatar-md { width: 40px; height: 40px; font-size: .875rem; }
.avatar-lg { width: 52px; height: 52px; font-size: 1rem; }
.avatar-xl { width: 80px; height: 80px; font-size: 1.5rem; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  .form-row-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  :root { --sidebar-width: 0px; }
  .sidebar {
    transform: translateX(-260px);
    width: 260px;
  }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .auth-wrapper { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .kanban-board { flex-direction: column; }
  .kanban-col { min-width: 100%; max-width: 100%; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .page-content { padding: 1rem; }
  .topbar { padding: 0 1rem; }
}

/* ─── Utilities ──────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: .25rem; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-primary { color: var(--primary); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.hidden { display: none; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rounded-full { border-radius: 9999px; }
