/* ============================================================================
   BLACK INNOVATORS CODEX -- DASHBOARD DESIGN SYSTEM
   ============================================================================
   Shared styles for all dashboard pages. Extends the existing site's design
   tokens (colors, fonts, spacing) so the dashboard feels native.

   ES5-era CSS: no nesting, no @layer, no :has(). Maximum compatibility.
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=DM+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121c;
  --bg-card: #1a1a28;
  --bg-card-hover: #222236;
  --gold: #c9a84c;
  --gold-light: #e8d48b;
  --gold-dark: #8a6d2b;
  --green-accent: #4caf7c;
  --blue-accent: #3b82f6;
  --blue-light: #60a5fa;
  --red-accent: #ef4444;
  --red-light: #f87171;
  --orange-accent: #f59e0b;
  --purple-accent: #8b5cf6;
  --text-primary: #f0ece2;
  --text-secondary: #9e9bb2;
  --text-muted: #6b6880;
  --border: #2a2a3e;
  --border-gold: rgba(201,168,76,0.3);
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --sidebar-width: 260px;
  --topbar-height: 60px;
  --transition: all 0.25s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- LIGHT MODE ---- */
body.light-mode {
  --bg-primary: #f5f3ef;
  --bg-secondary: #ece8e1;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f6f2;
  --text-primary: #1a1a2e;
  --text-secondary: #3d3d5c;
  --text-muted: #6b6b8a;
  --gold: #9a7b2f;
  --gold-light: #b8942f;
  --green-accent: #1a7a4a;
  --border: rgba(0,0,0,0.12);
  --border-gold: rgba(154,123,47,0.3);
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
}

/* ============================================================================
   LAYOUT: Sidebar + Main Content
   ============================================================================ */

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

.dash-sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

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

.dash-sidebar-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  text-decoration: none;
  display: block;
  line-height: 1.3;
}

.dash-sidebar-brand small {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

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

.dash-nav-section {
  padding: 0 12px;
  margin-bottom: 8px;
}

.dash-nav-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  padding: 8px 12px 6px;
  font-weight: 600;
}

.dash-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}

.dash-nav-item:hover {
  background: rgba(201,168,76,0.08);
  color: var(--text-primary);
}

.dash-nav-item.active {
  background: rgba(201,168,76,0.12);
  color: var(--gold);
  font-weight: 600;
}

.dash-nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.dash-nav-item.active svg {
  opacity: 1;
}

.dash-nav-badge {
  margin-left: auto;
  background: var(--red-accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}

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

.dash-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.dash-user-card:hover {
  background: rgba(201,168,76,0.08);
}

.dash-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--bg-primary);
  flex-shrink: 0;
  overflow: hidden;
}

.dash-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.dash-user-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-user-role {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: capitalize;
}

/* ---- MAIN CONTENT ---- */

.dash-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

.dash-topbar {
  height: var(--topbar-height);
  background: rgba(10,10,15,0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  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;
}

body.light-mode .dash-topbar {
  background: rgba(236,232,225,0.92);
}

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

.dash-topbar-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

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

.dash-menu-btn {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.dash-menu-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.dash-content {
  padding: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ============================================================================
   CARDS & PANELS
   ============================================================================ */

.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
}

.dash-card:hover {
  border-color: var(--border-gold);
}

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

.dash-card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
}

.dash-card-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.dash-card-body {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ---- STAT CARDS ---- */

.dash-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.dash-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: var(--transition);
}

.dash-stat-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-1px);
}

.dash-stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.dash-stat-value {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1.1;
}

.dash-stat-change {
  font-size: 0.75rem;
  margin-top: 4px;
  font-weight: 600;
}

.dash-stat-change.positive { color: var(--green-accent); }
.dash-stat-change.negative { color: var(--red-accent); }

/* ---- GRID LAYOUTS ---- */

.dash-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.dash-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */

.dash-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.dash-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.dash-btn-primary {
  background: var(--gold);
  color: var(--bg-primary);
  border-color: var(--gold);
}

.dash-btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
}

.dash-btn-secondary {
  background: transparent;
  color: var(--gold);
  border-color: var(--gold);
}

.dash-btn-secondary:hover {
  background: rgba(201,168,76,0.1);
}

.dash-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}

.dash-btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.dash-btn-danger {
  background: transparent;
  color: var(--red-accent);
  border-color: var(--red-accent);
}

.dash-btn-danger:hover {
  background: rgba(239,68,68,0.1);
}

.dash-btn-success {
  background: var(--green-accent);
  color: #fff;
  border-color: var(--green-accent);
}

.dash-btn-success:hover {
  opacity: 0.9;
}

.dash-btn-blue {
  background: var(--blue-accent);
  color: #fff;
  border-color: var(--blue-accent);
}

.dash-btn-blue:hover {
  opacity: 0.9;
}

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

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

.dash-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============================================================================
   FORMS
   ============================================================================ */

.dash-form-group {
  margin-bottom: 16px;
}

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

.dash-form-required::after {
  content: ' *';
  color: var(--red-accent);
}

.dash-form-input,
.dash-form-textarea,
.dash-form-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.dash-form-input:focus,
.dash-form-textarea:focus,
.dash-form-select:focus {
  border-color: var(--gold);
}

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

.dash-form-select {
  -webkit-appearance: 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='%239e9bb2' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

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

.dash-form-error {
  font-size: 0.75rem;
  color: var(--red-accent);
  margin-top: 4px;
}

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

/* ============================================================================
   TABLES
   ============================================================================ */

.dash-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.dash-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.dash-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}

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

.dash-table tr:hover td {
  background: rgba(201,168,76,0.04);
}

/* ============================================================================
   BADGES & TAGS
   ============================================================================ */

.dash-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.dash-badge-gold {
  background: rgba(201,168,76,0.15);
  color: var(--gold);
}

.dash-badge-green {
  background: rgba(76,175,124,0.15);
  color: var(--green-accent);
}

.dash-badge-blue {
  background: rgba(59,130,246,0.15);
  color: var(--blue-accent);
}

.dash-badge-red {
  background: rgba(239,68,68,0.15);
  color: var(--red-accent);
}

.dash-badge-orange {
  background: rgba(245,158,11,0.15);
  color: var(--orange-accent);
}

.dash-badge-purple {
  background: rgba(139,92,246,0.15);
  color: var(--purple-accent);
}

.dash-badge-muted {
  background: rgba(107,104,128,0.15);
  color: var(--text-muted);
}

.dash-field-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  background: rgba(76,175,124,0.12);
  color: var(--green-accent);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ============================================================================
   PIPELINE TRACKER (visual stages)
   ============================================================================ */

.dash-pipeline-track {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 16px 0;
  overflow-x: auto;
  padding-bottom: 4px;
}

.dash-pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 100px;
  position: relative;
}

.dash-pipeline-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid var(--border);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: var(--transition);
}

.dash-pipeline-step.completed .dash-pipeline-dot {
  border-color: var(--green-accent);
  background: var(--green-accent);
  color: #fff;
}

.dash-pipeline-step.active .dash-pipeline-dot {
  border-color: var(--gold);
  background: rgba(201,168,76,0.15);
  color: var(--gold);
  box-shadow: 0 0 0 4px rgba(201,168,76,0.15);
}

.dash-pipeline-step.blocked .dash-pipeline-dot {
  border-color: var(--red-accent);
  background: rgba(239,68,68,0.15);
  color: var(--red-accent);
}

.dash-pipeline-line {
  position: absolute;
  top: 15px;
  left: 50%;
  right: -50%;
  height: 3px;
  background: var(--border);
  z-index: 1;
}

.dash-pipeline-step:last-child .dash-pipeline-line {
  display: none;
}

.dash-pipeline-step.completed .dash-pipeline-line {
  background: var(--green-accent);
}

.dash-pipeline-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
  font-weight: 500;
}

.dash-pipeline-step.active .dash-pipeline-label {
  color: var(--gold);
  font-weight: 600;
}

.dash-pipeline-step.completed .dash-pipeline-label {
  color: var(--green-accent);
}

/* ============================================================================
   KANBAN BOARD
   ============================================================================ */

.dash-kanban {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
  min-height: 400px;
}

.dash-kanban-col {
  min-width: 260px;
  max-width: 300px;
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
}

.dash-kanban-col-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-kanban-col-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.dash-kanban-col-count {
  font-size: 0.68rem;
  background: rgba(201,168,76,0.12);
  color: var(--gold);
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.dash-kanban-col-body {
  flex: 1;
  padding: 8px;
  overflow-y: auto;
  min-height: 100px;
}

.dash-kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.dash-kanban-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.dash-kanban-card-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.dash-kanban-card-project {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dash-kanban-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ============================================================================
   ACTIVITY FEED
   ============================================================================ */

.dash-activity-list {
  list-style: none;
}

.dash-activity-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.dash-activity-item:last-child {
  border-bottom: none;
}

.dash-activity-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.dash-activity-icon.gold { background: rgba(201,168,76,0.15); color: var(--gold); }
.dash-activity-icon.green { background: rgba(76,175,124,0.15); color: var(--green-accent); }
.dash-activity-icon.blue { background: rgba(59,130,246,0.15); color: var(--blue-accent); }
.dash-activity-icon.red { background: rgba(239,68,68,0.15); color: var(--red-accent); }

.dash-activity-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.dash-activity-text strong {
  color: var(--text-primary);
  font-weight: 600;
}

.dash-activity-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================================================
   DOCUMENT LIST
   ============================================================================ */

.dash-doc-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  transition: var(--transition);
}

.dash-doc-item:hover {
  border-color: var(--border-gold);
}

.dash-doc-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  background: rgba(201,168,76,0.1);
  color: var(--gold);
}

.dash-doc-info {
  flex: 1;
  min-width: 0;
}

.dash-doc-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-doc-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.dash-doc-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

/* ============================================================================
   MODALS
   ============================================================================ */

.dash-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  overflow-y: auto;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
}

.dash-modal-overlay.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.dash-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  margin: 40px auto;
  position: relative;
  overflow: hidden;
}

.dash-modal-lg {
  max-width: 800px;
}

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

.dash-modal-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
}

.dash-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.dash-modal-close:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.dash-modal-body {
  padding: 24px;
}

.dash-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

/* ============================================================================
   NOTIFICATIONS / TOAST
   ============================================================================ */

.dash-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  min-width: 300px;
  max-width: 420px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: dashToastIn 0.3s ease;
}

.dash-toast.removing {
  animation: dashToastOut 0.3s ease forwards;
}

.dash-toast-success { border-left: 3px solid var(--green-accent); }
.dash-toast-error { border-left: 3px solid var(--red-accent); }
.dash-toast-info { border-left: 3px solid var(--blue-accent); }
.dash-toast-warning { border-left: 3px solid var(--orange-accent); }

.dash-toast-msg {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.dash-toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  margin-left: auto;
  flex-shrink: 0;
}

@keyframes dashToastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes dashToastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

/* ============================================================================
   EMPTY STATES
   ============================================================================ */

.dash-empty {
  text-align: center;
  padding: 48px 20px;
}

.dash-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  opacity: 0.4;
}

.dash-empty-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.dash-empty-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto 20px;
  line-height: 1.5;
}

/* ============================================================================
   LOADING SPINNER
   ============================================================================ */

.dash-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: dashSpin 0.6s linear infinite;
}

.dash-spinner-lg {
  width: 40px;
  height: 40px;
  border-width: 3px;
}

@keyframes dashSpin {
  to { transform: rotate(360deg); }
}

.dash-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10,10,15,0.9);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}

.dash-loading-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* ============================================================================
   TABS
   ============================================================================ */

.dash-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
}

.dash-tab {
  padding: 10px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  white-space: nowrap;
}

.dash-tab:hover {
  color: var(--text-secondary);
}

.dash-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  font-weight: 600;
}

/* ============================================================================
   SEARCH BAR (dashboard version)
   ============================================================================ */

.dash-search-wrap {
  position: relative;
  max-width: 400px;
}

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

.dash-search-input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.dash-search-input:focus {
  border-color: var(--gold);
}

/* ============================================================================
   THEME TOGGLE
   ============================================================================ */

.dash-theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 1rem;
}

.dash-theme-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ============================================================================
   NOTIFICATION BELL
   ============================================================================ */

.dash-notif-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.dash-notif-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.dash-notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red-accent);
  display: none;
}

.dash-notif-dot.visible {
  display: block;
}

/* ============================================================================
   RESOURCE LINKS
   ============================================================================ */

.dash-resource-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.dash-resource-card:hover {
  border-color: var(--border-gold);
  background: rgba(201,168,76,0.04);
}

.dash-resource-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}

.dash-resource-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.dash-resource-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ============================================================================
   PAGINATION
   ============================================================================ */

.dash-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 20px;
}

.dash-page-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-family: inherit;
}

.dash-page-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.dash-page-btn.active {
  background: var(--gold);
  color: var(--bg-primary);
  border-color: var(--gold);
}

/* ============================================================================
   MOBILE RESPONSIVE
   ============================================================================ */

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

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

  .dash-main {
    margin-left: 0;
  }

  .dash-menu-btn {
    display: flex;
  }

  .dash-content {
    padding: 16px;
  }

  .dash-stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .dash-grid-2,
  .dash-grid-3 {
    grid-template-columns: 1fr;
  }

  .dash-form-row {
    grid-template-columns: 1fr;
  }

  .dash-kanban {
    flex-direction: column;
  }

  .dash-kanban-col {
    max-width: none;
    min-width: auto;
  }

  .dash-pipeline-track {
    gap: 0;
  }

  .dash-pipeline-step {
    min-width: 70px;
  }

  .dash-pipeline-label {
    font-size: 0.6rem;
  }

  .dash-modal {
    margin: 10px auto;
  }

  .dash-modal-header {
    padding: 14px 16px;
  }

  .dash-modal-body {
    padding: 16px;
  }

  .dash-topbar-title {
    font-size: 1rem;
  }

  .dash-stat-value {
    font-size: 1.5rem;
  }

  .dash-toast {
    min-width: auto;
    max-width: calc(100vw - 40px);
  }
}

@media (max-width: 480px) {
  .dash-stats-row {
    grid-template-columns: 1fr;
  }

  .dash-topbar {
    padding: 0 12px;
  }
}

/* ============================================================================
   SIDEBAR OVERLAY (mobile)
   ============================================================================ */

.dash-sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 199;
}

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

/* ============================================================================
   PROFILE PAGE SPECIFICS
   ============================================================================ */

.dash-profile-header {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.dash-profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 900;
  font-size: 2.5rem;
  color: var(--bg-primary);
  flex-shrink: 0;
  overflow: hidden;
}

.dash-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dash-profile-name {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.dash-profile-role {
  font-size: 0.82rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 8px;
}

.dash-profile-bio {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 600px;
}

.dash-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 12px;
}

.dash-profile-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.dash-profile-meta-item svg {
  width: 14px;
  height: 14px;
  opacity: 0.6;
}

@media (max-width: 768px) {
  .dash-profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .dash-profile-avatar {
    width: 80px;
    height: 80px;
    font-size: 2rem;
  }

  .dash-profile-name {
    font-size: 1.4rem;
  }

  .dash-profile-meta {
    justify-content: center;
  }
}
