/* ============================================================
   EAS AI Dashboard — Component Styles
   Extracted from index.html in Phase 3
   Depends on: variables.css (design tokens & base reset)
   ============================================================ */

/* Accessibility: skip-to-content link */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 9999;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 16px;
}

/* Accessibility: screen-reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Dashboard layout (sidebar + main) */
body { display: flex; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  height: 100vh;
  height: 100dvh;
  position: fixed;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s ease;
}
.sidebar-header {
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-header h1 {
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.3px;
}
.sidebar-header p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 8px;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.nav-section {
  padding: 16px 12px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin: 2px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}
.nav-item:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.nav-item.active { background: var(--accent); color: white; font-weight: 500; }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item .badge {
  margin-left: auto;
  background: var(--bg-translucent-hover);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}
.nav-item.active .badge { background: rgba(255,255,255,0.25); }
.sidebar-footer {
  flex-shrink: 0;
  padding: 16px;
  border-top: 1px solid var(--border);
}
.upload-btn {
  width: 100%;
  padding: 10px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s;
}
.upload-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(59,130,246,0.05); }

/* Main Content */
.main {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  min-height: 100dvh;
}
.page-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
}
.page-header h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.3px; }
.page-header .subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.page-content { padding: 24px 32px; }

/* KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.2s;
}
.kpi-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi-label { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 8px; }
.kpi-value { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; }
.kpi-sub { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.kpi-value.blue { color: var(--accent); }
.kpi-value.green { color: var(--success); }
.kpi-value.yellow { color: var(--warning); }
.kpi-value.purple { color: var(--purple); }
.kpi-value.pink { color: var(--pink); }
.kpi-value.cyan { color: var(--info); }

/* Charts */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.chart-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 16px; color: var(--text-primary); }
.chart-container { position: relative; height: 280px; }

/* Tables */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}
.table-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.table-header h3 { font-size: 15px; font-weight: 600; }
.table-actions { display: flex; gap: 8px; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
thead { background: var(--bg-translucent); }
th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}
tr:hover td { background: var(--bg-translucent); }
/* .status-badge + variants: defined in variables.css (shared) */

/* Practice Cards */
.practice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.practice-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s;
}
.practice-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.practice-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.practice-card-header h3 { font-size: 16px; font-weight: 600; }
.practice-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.practice-stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }
.practice-stat-value { font-size: 18px; font-weight: 700; margin-top: 2px; }
.progress-bar { height: 6px; background: var(--bg-translucent-hover); border-radius: 3px; margin-top: 14px; overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }

/* .btn base + .btn-primary/secondary: defined in variables.css (shared) */
.btn-success { background: var(--success); color: white; }

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 90%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
}
.modal h3 { font-size: 18px; font-weight: 600; margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; font-weight: 500; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.3px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.2); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; }

/* Filters */
.filters-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
}
.search-input {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 13px;
  min-width: 220px;
}
.search-input:focus, .filter-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.2); }

/* Accomplishment cards */
.acc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  transition: all 0.2s;
}
.acc-card:hover { border-color: var(--accent); }
.acc-card-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 12px; }
.acc-card-title { font-size: 16px; font-weight: 600; }
.acc-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.acc-meta-item { font-size: 12px; color: var(--text-muted); }
.acc-meta-item span { color: var(--text-secondary); font-weight: 500; }
.acc-impact { background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.2); border-radius: 8px; padding: 12px; margin-top: 12px; }
.acc-impact-title { font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--success); margin-bottom: 6px; }

/* .toast + scrollbar: defined in variables.css (shared) */

/* Mobile */
.mobile-toggle { display: none; position: fixed; top: 16px; left: 16px; z-index: 200; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px; padding: 8px; cursor: pointer; color: var(--text-primary); }
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .mobile-toggle { display: block; top: calc(16px + env(safe-area-inset-top, 0px)); left: calc(16px + env(safe-area-inset-left, 0px)); }
  .page-header { padding: 24px 16px; padding-left: 56px; padding-right: calc(16px + env(safe-area-inset-right, 0px)); }
  .page-content { padding: 16px; padding-left: calc(16px + env(safe-area-inset-left, 0px)); padding-right: calc(16px + env(safe-area-inset-right, 0px)); padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .chart-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
}

/* iPhone landscape — sidebar stays hidden, compact layout */
@media (max-height: 500px) and (orientation: landscape) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .mobile-toggle {
    display: block;
    top: calc(8px + env(safe-area-inset-top, 0px));
    left: calc(8px + env(safe-area-inset-left, 0px));
  }
  .page-header {
    padding: 12px 16px 12px 56px;
    padding-left: calc(56px + env(safe-area-inset-left, 0px));
    padding-right: calc(16px + env(safe-area-inset-right, 0px));
  }
  .page-content {
    padding: 12px 16px;
    padding-left: calc(16px + env(safe-area-inset-left, 0px));
    padding-right: calc(16px + env(safe-area-inset-right, 0px));
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }
  .kpi-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .form-row { grid-template-columns: 1fr; }
}

/* Empty state */
.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: 16px; color: var(--text-secondary); margin-bottom: 8px; }

/* Tab bar */
.tab-bar { display: flex; gap: 4px; margin-bottom: 20px; background: var(--bg-secondary); border-radius: 8px; padding: 4px; border: 1px solid var(--border); width: fit-content; }
.tab { padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--text-muted); transition: all 0.15s; }
.tab.active { background: var(--accent); color: white; }
.tab:hover:not(.active) { color: var(--text-primary); }
/* .hidden: defined in variables.css (shared) */

/* Quarter Selector */
.quarter-selector-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}
.quarter-selector-wrapper label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.quarter-selector {
  padding: 6px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-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 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  transition: border-color 0.15s;
}
.quarter-selector:hover { border-color: var(--accent); }
.quarter-selector:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.15); }

/* User Profile in Sidebar */
.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  margin-bottom: 8px;
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}
.user-info {
  flex: 1;
  min-width: 0;
}
.user-info .user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-info .user-role {
  font-size: 11px;
  color: var(--text-muted);
}
.btn-logout {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  transition: color 0.15s;
}
.btn-logout:hover { color: var(--danger); }

/* Quarter delta badges */
.kpi-delta {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  margin-left: 6px;
}
.kpi-delta.up { color: var(--success); }
.kpi-delta.down { color: var(--danger); }

/* Loading overlay */
#auth-loading {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
  gap: 16px;
}
#auth-loading .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#auth-loading p {
  font-size: 14px;
  color: var(--text-muted);
}

/* Pagination */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
}
.pagination-bar:empty { display: none; }
.pagination-bar button {
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}
.pagination-bar button:hover { border-color: var(--accent); color: var(--text-primary); }
.pagination-bar button.active { background: var(--accent); color: white; border-color: var(--accent); }
.pagination-bar button:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination-bar .page-info { font-size: 12px; color: var(--text-muted); margin: 0 8px; }

/* ---- Action Buttons (Phase 4) ---- */
.row-actions {
  display: flex;
  gap: 6px;
  justify-content: center;
  white-space: nowrap;
}
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
}
.btn-icon:hover { border-color: var(--accent); color: var(--accent); background: rgba(59,130,246,0.08); }
.btn-icon.btn-edit:hover { border-color: var(--warning); color: var(--warning); background: rgba(245,158,11,0.08); }
.btn-icon.btn-delete:hover { border-color: var(--danger); color: var(--danger); background: rgba(239,68,68,0.08); }

/* Danger button (confirmation dialog) */
.btn-danger {
  padding: 10px 24px;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  background: var(--danger);
  color: white;
  transition: all 0.2s;
}
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); }

/* ======== PHASE 5: LEADERBOARD & GAMIFICATION ======== */

/* Leaderboard practice ranking cards */
.leaderboard-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.leaderboard-card:hover {
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.leaderboard-rank {
  font-size: 24px;
  min-width: 48px;
  text-align: center;
  font-weight: 700;
  color: var(--text-muted);
}
.leaderboard-info { flex: 1; }
.leaderboard-name {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.leaderboard-stats {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
}
.leaderboard-stats span::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  margin-right: 6px;
  vertical-align: middle;
  opacity: 0.5;
}
.leaderboard-score {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  min-width: 60px;
  text-align: right;
}

/* Badge system */
.badge-icon {
  cursor: default;
  font-size: 18px;
  display: inline-block;
  margin-right: 2px;
}
.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.badge-card {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
  border: 1px solid transparent;
}
.badge-earned {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}
.badge-locked {
  opacity: 0.35;
  filter: grayscale(0.6);
}
.badge-icon-lg {
  font-size: 36px;
  margin-bottom: 8px;
}
.badge-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.badge-desc {
  font-size: 11px;
  color: var(--text-muted);
}
.badge-earned .badge-title { color: var(--accent); }

/* Inactive member alert rows */
#mypractice-inactive-tbody tr td:nth-child(4) {
  color: var(--warning);
  font-weight: 600;
}

/* Use Case Library search bar */
#uc-search {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  width: 280px;
  transition: border-color 0.2s;
}
#uc-search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
}
#uc-search::placeholder { color: var(--text-muted); }

/* Responsive tweaks for leaderboard */
@media (max-width: 768px) {
  .leaderboard-stats { flex-wrap: wrap; gap: 8px; }
  .leaderboard-score { font-size: 22px; }
  .badge-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}

/* ======== PHASE 6: ACCESSIBILITY — Focus-visible styles ======== */

/* Universal focus-visible ring for interactive elements */
.btn:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-danger:focus-visible,
.upload-btn:focus-visible,
.btn-icon:focus-visible,
.btn-logout:focus-visible,
.mobile-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-item:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  background: var(--bg-card-hover);
}

/* Make nav items tabbable */
.nav-item { cursor: pointer; }
.nav-item[tabindex] { outline: none; }

/* Pagination buttons */
.pagination-bar button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Quarter selector */
.quarter-selector:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Modal close on ESC — modal focus trap styles */
.modal:focus-visible { outline: none; }
.modal-overlay:focus-visible { outline: none; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ======== PHASE 6: THEME TOGGLE ======== */
.theme-toggle .icon-moon { display: none; }
.theme-toggle .icon-sun { display: inline; }
[data-theme="light"] .theme-toggle .icon-moon { display: inline; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .theme-label::after { content: 'Dark Mode'; }
.theme-toggle .theme-label { font-size: 13px; }

/* ======== PHASE 7: EXPORT CENTER ======== */
.export-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}
.export-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}
.export-tab:hover { color: var(--text-primary); }
.export-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.export-tab svg { flex-shrink: 0; }

.export-panel {
  padding: 16px 0;
  min-height: 120px;
}
.export-option-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.export-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.export-check-label:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover, var(--bg-secondary));
}
.export-check-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.export-radio-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  flex: 1;
  transition: border-color 0.2s;
}
.export-radio-label:hover { border-color: var(--accent); }
.export-radio-label:has(input:checked) {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.08);
}
.export-radio-label input[type="radio"] {
  accent-color: var(--accent);
}
.export-radio-desc {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .export-option-group { grid-template-columns: 1fr; }
  .export-tabs { overflow-x: auto; }
}

/* ============================================================
   Guide Me Page
   ============================================================ */

/* Hero banner */
.guide-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px;
  background: linear-gradient(135deg, rgba(59,130,246,0.12), rgba(139,92,246,0.08));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

/* Tab navigation */
.guide-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 24px;
  overflow-x: auto;
}
.guide-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.guide-tab:hover {
  background: var(--bg-translucent-hover);
  color: var(--text-primary);
}
.guide-tab.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}
.guide-tab svg { flex-shrink: 0; }

/* Section containers */
.guide-section { animation: guideFadeIn 0.3s ease; }
@keyframes guideFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Card grid */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 20px;
}

/* Cards */
.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all 0.2s ease;
}
.guide-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.guide-card-highlight {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  background: linear-gradient(135deg, var(--bg-card), rgba(59,130,246,0.06));
}
.guide-card-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}
.guide-card h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.guide-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}
.guide-card:not(.guide-card-highlight) .guide-card-icon {
  margin-bottom: 16px;
}

/* Links */
.guide-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}
.guide-link:hover { color: var(--accent-hover); text-decoration: underline; }

/* Access types */
.guide-access-types { display: flex; flex-direction: column; gap: 12px; }
.guide-access-card {
  padding: 16px;
  background: var(--bg-translucent);
  border-radius: 8px;
  border-left: 3px solid var(--accent);
}
.guide-access-card strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
  color: var(--text-primary);
}
.guide-access-card p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 0;
}
.guide-access-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 8px;
}
.guide-access-badge.dev { background: rgba(59,130,246,0.15); color: var(--accent); }
.guide-access-badge.nondev { background: rgba(139,92,246,0.15); color: var(--purple); }

/* Steps list */
.guide-steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
}
.guide-steps li {
  counter-increment: step;
  position: relative;
  padding: 10px 0 10px 36px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  border-bottom: 1px solid var(--border);
}
.guide-steps li:last-child { border-bottom: none; }
.guide-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 10px;
  width: 24px;
  height: 24px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

/* Reminders list */
.guide-reminders {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.guide-reminders li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.guide-reminders li svg { flex-shrink: 0; margin-top: 2px; }
.guide-reminders li a { color: var(--accent); text-decoration: none; }
.guide-reminders li a:hover { text-decoration: underline; }

/* News items */
.guide-news-item { display: flex; flex-direction: column; gap: 8px; }
.guide-news-date {
  display: inline-block;
  padding: 2px 10px;
  background: rgba(6,182,212,0.12);
  color: var(--info);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  width: fit-content;
}

/* ===== SKILLS LIBRARY MARKETPLACE ===== */

/* Hero */
.skills-hero {
  background: linear-gradient(135deg, var(--bg-card), rgba(139,92,246,0.06));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 24px;
}
.skills-hero-content { display: flex; align-items: flex-start; gap: 20px; flex: 1; }
.skills-hero-icon {
  flex-shrink: 0;
  width: 56px; height: 56px;
  background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(59,130,246,0.2));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: var(--purple);
}
.skills-hero-quickstart {
  flex-shrink: 0;
  display: flex; flex-direction: column; gap: 8px;
}
.skills-cmd-block {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 340px;
}
.skills-cmd-block:hover { border-color: var(--accent); background: rgba(59,130,246,0.04); }
.skills-cmd-block code {
  flex: 1;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 12.5px;
  color: var(--text-primary);
  white-space: nowrap;
}
.skills-copy-btn {
  flex-shrink: 0;
  background: none; border: none;
  color: var(--text-muted); cursor: pointer;
  padding: 4px; border-radius: 4px;
  transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
}
.skills-copy-btn:hover { color: var(--accent); background: rgba(59,130,246,0.1); }
.skills-cmd-block.copied { border-color: var(--success); }
.skills-cmd-block.copied .skills-copy-btn { color: var(--success); }

/* Search bar */
.skills-search-bar {
  display: flex; flex-direction: column; gap: 14px;
  margin-bottom: 16px;
}
.skills-search-input-wrap {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  transition: border-color 0.2s;
}
.skills-search-input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }
.skills-search-input-wrap svg { flex-shrink: 0; color: var(--text-muted); }
.skills-search-input-wrap input {
  flex: 1; background: none; border: none; outline: none;
  font-size: 13.5px; color: var(--text-primary);
  font-family: inherit;
}
.skills-search-input-wrap input::placeholder { color: var(--text-muted); }
.skills-search-clear {
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 4px; border-radius: 4px;
  transition: all 0.15s;
}
.skills-search-clear:hover { color: var(--danger); background: rgba(239,68,68,0.1); }

/* Filter pills */
.skills-filter-pills {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.skills-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 12px; font-weight: 500;
  font-family: inherit; cursor: pointer;
  transition: all 0.2s; white-space: nowrap;
}
.skills-pill:hover { border-color: var(--accent); color: var(--text-primary); }
.skills-pill.active {
  background: var(--accent); color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(59,130,246,0.25);
}

/* Results bar */
.skills-results-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
  font-size: 12px; color: var(--text-muted);
}

/* Skills grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

/* Skill card */
.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; flex-direction: column;
  transition: all 0.2s ease;
  position: relative;
}
.skill-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.skill-card-header {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 10px;
}
.skill-card-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.skill-card-meta { flex: 1; min-width: 0; }
.skill-card-name {
  font-size: 14px; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
  display: flex; align-items: center; gap: 6px;
}
.skill-card-name a {
  color: inherit; text-decoration: none;
  transition: color 0.15s;
}
.skill-card-name a:hover { color: var(--accent); }
.skill-card-repo {
  font-size: 11px; color: var(--text-muted);
  font-weight: 400;
}
.skill-card-official {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 7px; border-radius: 8px;
  font-size: 10px; font-weight: 700;
  background: rgba(59,130,246,0.12); color: var(--accent);
  letter-spacing: 0.3px;
}
.skill-card-downloads {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--text-muted); font-weight: 500;
}
.skill-card-desc {
  font-size: 13px; color: var(--text-secondary);
  line-height: 1.6; margin-bottom: 14px;
  flex: 1;
  display: -webkit-box; -webkit-line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.skill-card-tags {
  display: flex; flex-wrap: wrap; gap: 5px;
  margin-bottom: 14px;
}
.skill-card-tags span {
  padding: 2px 8px;
  background: var(--bg-translucent);
  border-radius: 10px;
  font-size: 10.5px; color: var(--text-muted);
  font-weight: 500;
}
.skill-card-actions {
  display: flex; gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.skill-install-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 12px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 8px;
  font-size: 12px; font-weight: 600;
  font-family: inherit; cursor: pointer;
  transition: all 0.2s;
}
.skill-install-btn:hover { background: var(--accent-hover); transform: translateY(-1px); }
.skill-browse-btn {
  display: flex; align-items: center; justify-content: center;
  padding: 8px 12px;
  background: var(--bg-translucent); color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 12px; font-weight: 500;
  font-family: inherit; cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.skill-browse-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Install modal inside card */
.skill-install-modal {
  display: none;
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--accent);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 16px;
  z-index: 10;
  box-shadow: 0 -8px 32px rgba(0,0,0,0.2);
  animation: skillModalIn 0.2s ease;
}
.skill-install-modal.show { display: block; }
@keyframes skillModalIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.skill-install-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.skill-install-modal-header h4 {
  font-size: 13px; font-weight: 600; color: var(--text-primary); margin: 0;
}
.skill-install-modal-close {
  background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 4px; border-radius: 4px;
  transition: all 0.15s; display: flex; align-items: center; justify-content: center;
}
.skill-install-modal-close:hover { color: var(--danger); background: rgba(239,68,68,0.1); }
.skill-install-options {
  display: flex; flex-direction: column; gap: 8px;
}
.skill-install-option {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.skill-install-option:hover { border-color: var(--accent); background: rgba(59,130,246,0.04); }
.skill-install-option code {
  flex: 1;
  font-size: 11.5px; font-family: 'SF Mono', 'Fira Code', monospace;
  color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.skill-install-option .skills-copy-btn { margin-left: auto; }
.skill-install-label {
  font-size: 11px; font-weight: 600; color: var(--text-muted);
  min-width: 60px;
}

/* No results */
.skills-no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.skills-no-results svg { margin-bottom: 12px; opacity: 0.4; }
.skills-no-results h4 { font-size: 15px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.skills-no-results p { font-size: 13px; line-height: 1.6; }
.skills-no-results a { color: var(--accent); text-decoration: none; font-weight: 500; }
.skills-no-results a:hover { text-decoration: underline; }

/* Agents section */
.skills-agents-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.skills-agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.skills-agent-badge {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 14px;
  background: var(--bg-translucent);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.15s;
}
.skills-agent-badge:hover { border-color: var(--accent); transform: translateY(-1px); }
.skills-agent-badge strong { font-size: 12px; color: var(--text-primary); }
.skills-agent-badge code {
  font-size: 10.5px; color: var(--text-muted);
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* How-to section */
.skills-howto {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.skills-howto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.skills-howto-step {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px;
  background: var(--bg-translucent);
  border-radius: 10px;
}
.skills-howto-num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  background: var(--accent); color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.skills-howto-step h4 { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.skills-howto-step p { font-size: 12px; color: var(--text-secondary); line-height: 1.5; margin: 0; }
.skills-howto-step code {
  background: rgba(59,130,246,0.1); color: var(--accent);
  padding: 1px 6px; border-radius: 4px; font-size: 11px;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* Responsive */
@media (max-width: 900px) {
  .skills-hero { flex-direction: column; }
  .skills-cmd-block { min-width: auto; }
  .skills-grid { grid-template-columns: 1fr; }
  .skills-agents-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .skills-howto-grid { grid-template-columns: 1fr; }
}

/* Session cards */
.guide-session-card { }
.guide-session-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.guide-session-meta svg { color: var(--danger); }
.guide-session-date {
  margin-left: auto;
  padding: 2px 10px;
  background: var(--bg-translucent);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
}

/* Enablement page — section headers */
.enablement-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.enablement-section-header:not(:first-child) {
  margin-top: 8px;
}
.enablement-section-header svg {
  color: var(--accent);
  flex-shrink: 0;
}
.enablement-section-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

/* Enablement hero card */
.enablement-hero {
  background: linear-gradient(135deg, var(--bg-card), rgba(59,130,246,0.10));
  border: 1px solid rgba(59,130,246,0.25);
}
.enablement-hero:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(59,130,246,0.15), var(--shadow);
}

/* Enablement alert card (Important Reminders) */
.enablement-alert-card {
  border-left: 3px solid var(--warning);
  background: linear-gradient(135deg, var(--bg-card), rgba(245,158,11,0.04));
}

/* Button-style guide link */
.guide-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-top: 4px;
}
.guide-link-btn:hover {
  background: var(--accent-hover);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

/* Session card hover accent */
.guide-session-card {
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}
.guide-session-card:hover {
  border-left-color: var(--danger);
}

/* Links list */
.guide-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.guide-links-list li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-translucent);
  border-radius: 8px;
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  transition: all 0.15s;
  font-weight: 500;
}
.guide-links-list li a:hover {
  background: var(--bg-translucent-hover);
  color: var(--accent-hover);
  transform: translateX(4px);
}
.guide-links-list li a svg { flex-shrink: 0; }

/* Responsive */
@media (max-width: 768px) {
  .guide-hero { flex-direction: column; text-align: center; padding: 24px; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-card-highlight { flex-direction: column; align-items: center; text-align: center; }
  .guide-tabs { gap: 2px; }
  .guide-tab { padding: 8px 14px; font-size: 12px; }
  .enablement-section-header h3 { font-size: 14px; }
  .enablement-hero { flex-direction: column; align-items: center; text-align: center; }
  .guide-link-btn { width: 100%; justify-content: center; }
  .prompt-role-filters { gap: 4px; }
  .prompt-role-pill { padding: 6px 10px; font-size: 11px; }
  .prompt-card { padding: 14px; }
}

/* ===== PROMPT LIBRARY ===== */

/* Role filter pills */
.prompt-role-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.prompt-role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.prompt-role-pill:hover {
  border-color: var(--accent);
  color: var(--text-primary);
  background: var(--bg-translucent-hover);
}
.prompt-role-pill.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(59,130,246,0.25);
}
.prompt-role-pill svg { flex-shrink: 0; }

/* Prompt library grid */
.prompt-library-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Role sections */
.prompt-role-section {
  animation: guideFadeIn 0.3s ease;
}
.prompt-role-section.prompt-hidden {
  display: none;
}
.prompt-role-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}
.prompt-role-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.prompt-role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.prompt-role-badge.pm { background: rgba(236,72,153,0.15); color: var(--pink); }
.prompt-role-badge.sa { background: rgba(139,92,246,0.15); color: var(--purple); }
.prompt-role-badge.ba { background: rgba(59,130,246,0.15); color: var(--accent); }
.prompt-role-badge.dev { background: rgba(16,185,129,0.15); color: var(--success); }
.prompt-role-badge.dba { background: rgba(245,158,11,0.15); color: var(--warning); }
.prompt-role-badge.admin { background: rgba(239,68,68,0.15); color: var(--danger); }
.prompt-role-badge.dm { background: rgba(6,182,212,0.15); color: var(--info); }
.prompt-count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Prompt categories */
.prompt-category {
  margin-bottom: 20px;
}
.prompt-category-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px 0;
  padding-left: 2px;
}

/* Prompt cards */
.prompt-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}
.prompt-card:hover {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--bg-card), rgba(59,130,246,0.04));
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.prompt-card:active {
  transform: translateY(0);
}
.prompt-text {
  flex: 1;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-secondary);
  font-family: inherit;
}
.prompt-text code {
  background: rgba(59,130,246,0.1);
  color: var(--accent);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-family: 'SF Mono', 'Fira Code', monospace;
}
.prompt-copy-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-translucent);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 2px;
}
.prompt-copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(59,130,246,0.1);
}
.prompt-card.prompt-copied {
  border-color: var(--success);
  background: rgba(16,185,129,0.06);
}
.prompt-card.prompt-copied .prompt-copy-btn {
  border-color: var(--success);
  color: var(--success);
  background: rgba(16,185,129,0.1);
}

/* ===== PROMPT VOTING & COMMUNITY ===== */

/* Vote bar row within each prompt card */
.prompt-vote-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* Vote buttons (like / dislike pills) */
.prompt-vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  line-height: 1;
}
.prompt-vote-btn:hover {
  background: var(--bg-translucent-hover);
  color: var(--text-secondary);
}
.prompt-vote-btn svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.prompt-vote-btn.active-like {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(59,130,246,0.1);
}
.prompt-vote-btn.active-like:hover {
  background: rgba(59,130,246,0.18);
}
.prompt-vote-btn.active-dislike {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(239,68,68,0.1);
}
.prompt-vote-btn.active-dislike:hover {
  background: rgba(239,68,68,0.18);
}
.prompt-vote-count {
  font-variant-numeric: tabular-nums;
  min-width: 8px;
  text-align: center;
}

/* Popular prompt highlight (≥10 likes) */
.prompt-card.prompt-popular {
  border-left: 3px solid var(--warning);
  box-shadow: 0 0 16px rgba(245,158,11,0.12);
}
.prompt-card.prompt-popular:hover {
  box-shadow: 0 4px 20px rgba(245,158,11,0.18);
}
.prompt-popular-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  color: var(--warning);
  background: rgba(245,158,11,0.1);
  border-radius: 8px;
  padding: 2px 8px;
  line-height: 1.4;
  white-space: nowrap;
}

/* Author attribution */
.prompt-author {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  font-style: italic;
}

/* Prompt card layout: change to column to accommodate vote bar */
.prompt-card {
  flex-direction: column;
}
.prompt-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}
.prompt-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

/* Submit prompt button in header */
.prompt-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.prompt-submit-btn:hover {
  background: var(--accent-hover, #2563eb);
  box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}
.prompt-submit-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Add prompt modal form */
#modal-add-prompt .form-group {
  margin-bottom: 14px;
}
#modal-add-prompt label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}
#modal-add-prompt select,
#modal-add-prompt input[type="text"],
#modal-add-prompt textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.2s;
}
#modal-add-prompt select:focus,
#modal-add-prompt input:focus,
#modal-add-prompt textarea:focus {
  border-color: var(--accent);
  outline: none;
}

/* ======== Executive Summary ======== */
.chart-card h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

#page-exec-summary .exec-charts-row {
  gap: 20px;
}

@media (max-width: 768px) {
  #page-exec-summary .exec-charts-row {
    grid-template-columns: 1fr !important;
  }
}

/* ======== IDE Usage Stats (page-ide-usage) ======== */
.ide-period-banner {
  background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(139,92,246,0.1));
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius);
  padding: 14px 20px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.ide-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.ide-sortable:hover { color: var(--accent); }
.ide-sort-arrow { font-size: 10px; margin-left: 4px; opacity: 0.4; }
.ide-sortable.sorted .ide-sort-arrow { opacity: 1; color: var(--accent); }
.ide-metric-th { text-align: right; }

/* ============================================================
   Featured Banner Spotlight Carousel
   ============================================================ */

.spotlight-banner {
  position: relative;
  width: 100%;
  min-height: 180px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 20px;
  background: var(--bg-card);
}

.spotlight-banner[aria-roledescription="carousel"] { outline: none; }
.spotlight-banner:focus-visible { box-shadow: 0 0 0 3px var(--accent); }

/* Track holds all slides side-by-side */
.spotlight-track {
  display: flex;
  transition: transform 0.3s ease-out;
  will-change: transform;
}

/* Each slide */
.spotlight-slide {
  min-width: 100%;
  padding: 24px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

/* Content-type gradient backgrounds */
.spotlight-slide[data-type="task"] {
  background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(59,130,246,0.02));
}
.spotlight-slide[data-type="accomplishment"] {
  background: linear-gradient(135deg, rgba(16,185,129,0.08), rgba(16,185,129,0.02));
}
.spotlight-slide[data-type="prompt"] {
  background: linear-gradient(135deg, rgba(139,92,246,0.08), rgba(139,92,246,0.02));
}
.spotlight-slide[data-type="use_case"] {
  background: linear-gradient(135deg, rgba(6,182,212,0.08), rgba(6,182,212,0.02));
}

/* Badge row */
.spotlight-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.spotlight-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.spotlight-badge--metric { background: rgba(59,130,246,0.15); color: var(--accent); }
.spotlight-badge--liked  { background: rgba(236,72,153,0.15); color: var(--pink); }
.spotlight-badge--pinned { background: rgba(245,158,11,0.15); color: var(--warning); }

.spotlight-date {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
}

/* Title */
.spotlight-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Metric chips */
.spotlight-metrics {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.spotlight-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-translucent);
  color: var(--text-secondary);
}
.spotlight-chip svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Contributor row */
.spotlight-contributor {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}
.spotlight-contributor svg { width: 14px; height: 14px; opacity: 0.6; flex-shrink: 0; }
.spotlight-separator { opacity: 0.4; }

/* Like row */
.spotlight-like-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Navigation arrows */
.spotlight-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  color: var(--text-primary);
  transition: background 0.15s, border-color 0.15s;
  padding: 0;
}
.spotlight-arrow:hover { border-color: var(--accent); background: var(--bg-card-hover); }
.spotlight-arrow:focus-visible { box-shadow: 0 0 0 3px var(--accent); outline: none; }
.spotlight-arrow svg { width: 18px; height: 18px; }
.spotlight-arrow--prev { left: 8px; }
.spotlight-arrow--next { right: 8px; }

/* Dot indicators */
.spotlight-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 10px 0;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.spotlight-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.35;
  cursor: pointer;
  border: none;
  padding: 0;
  transition: opacity 0.2s, transform 0.2s;
}
.spotlight-dot:hover { opacity: 0.6; }
.spotlight-dot.active { opacity: 1; background: var(--accent); transform: scale(1.25); }

/* Like button (shared across banner + all sections) */
.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s;
  font-family: inherit;
  touch-action: manipulation;
  min-width: 44px;
  min-height: 32px;
}
.like-btn:hover { border-color: var(--pink); color: var(--pink); }
.like-btn:focus-visible { box-shadow: 0 0 0 3px rgba(236,72,153,0.3); outline: none; }
.like-btn.liked { color: var(--danger); border-color: rgba(239,68,68,0.3); }
.like-btn.liked .like-icon { fill: var(--danger); }
.like-btn .like-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: fill 0.2s, transform 0.2s;
}
.like-btn.liked .like-icon { stroke: var(--danger); }

/* Like bounce animation */
@keyframes likeBounce {
  0% { transform: scale(1); }
  40% { transform: scale(1.25); }
  100% { transform: scale(1); }
}
.like-btn.bounce .like-icon { animation: likeBounce 0.2s ease-out; }

/* Skeleton loader for banner */
.spotlight-skeleton {
  min-height: 180px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 20px;
  overflow: hidden;
  position: relative;
}
.spotlight-skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, var(--bg-translucent-hover) 50%, transparent 100%);
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Empty state */
.spotlight-empty {
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  margin-bottom: 20px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .spotlight-track { transition: none; }
  .spotlight-dot { transition: none; }
  .like-btn .like-icon { animation: none; }
  .spotlight-skeleton::after { animation: none; }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .spotlight-slide { padding: 20px 48px 30px; }
  .spotlight-banner { min-height: 220px; }
  .spotlight-arrow { width: 36px; height: 36px; }
  .spotlight-arrow svg { width: 14px; height: 14px; }
  .spotlight-arrow--prev { left: 4px; }
  .spotlight-arrow--next { right: 4px; }
}

/* ======== AI NEWS FEED ======== */

.ainews-filters {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.ainews-topic-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.ainews-pill {
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ainews-pill:hover { border-color: var(--accent); color: var(--text-secondary); }
.ainews-pill.active {
  background: rgba(59,130,246,0.15);
  color: var(--accent);
  border-color: rgba(59,130,246,0.3);
  font-weight: 600;
}

.ainews-source-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.ainews-source-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 4px;
}

.ainews-source-badge {
  border-radius: 12px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid;
}
.ainews-source-badge:hover { filter: brightness(1.2); }
.ainews-source-badge.dimmed { opacity: 0.35; }

.ainews-results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.ainews-feed { display: flex; flex-direction: column; gap: 12px; }

.ainews-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  transition: all 0.2s ease;
}
.ainews-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.ainews-card-featured {
  background: linear-gradient(135deg, var(--bg-card), rgba(59,130,246,0.06));
  border-color: rgba(59,130,246,0.2);
  padding: 20px;
}
.ainews-card-featured .ainews-card-title { font-size: 16px; }

.ainews-card-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.ainews-badge {
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ainews-card-time {
  color: var(--text-muted);
  font-size: 11px;
  margin-left: auto;
}

.ainews-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.4;
}

.ainews-card-summary {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}

.ainews-card-link {
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}
.ainews-card-link:hover { text-decoration: underline; }

.ainews-load-more {
  text-align: center;
  padding: 16px;
}

.ainews-load-more-btn {
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 28px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ainews-load-more-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.ainews-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.ainews-empty svg { margin-bottom: 16px; opacity: 0.4; }
.ainews-empty h4 { font-size: 16px; color: var(--text-secondary); margin-bottom: 8px; }

.ainews-refresh-btn {
  background: rgba(59,130,246,0.12);
  color: var(--accent);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.ainews-refresh-btn:hover { background: rgba(59,130,246,0.2); }
.ainews-refresh-btn:disabled { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 768px) {
  .ainews-source-row { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .ainews-card-meta { gap: 4px; }
  .ainews-card-time { margin-left: 0; width: 100%; margin-top: 4px; }
}

/* ============================================================
   My Department View — Enhanced UI
   ============================================================ */

/* Department Header */
.dept-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}
.dept-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.dept-header-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dept-header-icon svg {
  width: 24px;
  height: 24px;
  color: white;
  stroke: white;
  fill: none;
}
.dept-header-info h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.4px;
  margin-bottom: 4px;
}
.dept-header-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.dept-header-meta .meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.5;
}
.dept-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Department KPI Cards — Enhanced */
.dept-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 24px 32px;
}
.dept-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.dept-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.dept-kpi-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.3);
}
.dept-kpi-card:hover::before {
  opacity: 1;
}
.dept-kpi-card--tasks::before { background: var(--success); }
.dept-kpi-card--hours::before { background: var(--warning); }
.dept-kpi-card--efficiency::before { background: var(--purple); }
.dept-kpi-card--users::before { background: var(--accent); }
.dept-kpi-card--adoption::before { background: var(--info, #3b82f6); }
.dept-kpi-card--hrsperres::before { background: var(--teal, #14b8a6); }
.dept-kpi-card--overall-eff::before { background: var(--orange, #f97316); }

.dept-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.dept-kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dept-kpi-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}
.dept-kpi-icon--tasks { background: rgba(16, 185, 129, 0.12); color: var(--success); }
.dept-kpi-icon--hours { background: rgba(245, 158, 11, 0.12); color: var(--warning); }
.dept-kpi-icon--efficiency { background: rgba(139, 92, 246, 0.12); color: var(--purple); }
.dept-kpi-icon--users { background: rgba(59, 130, 246, 0.12); color: var(--accent); }
.dept-kpi-icon--adoption { background: rgba(59, 130, 246, 0.12); color: var(--info, #3b82f6); }
.dept-kpi-icon--hrsperres { background: rgba(20, 184, 166, 0.12); color: var(--teal, #14b8a6); }
.dept-kpi-icon--overall-eff { background: rgba(249, 115, 22, 0.12); color: var(--orange, #f97316); }

.dept-kpi-trend {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.dept-kpi-trend--up { background: rgba(16, 185, 129, 0.12); color: var(--success); }
.dept-kpi-trend--neutral { background: var(--bg-translucent-hover); color: var(--text-muted); }

.dept-kpi-value {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.8px;
  line-height: 1.1;
  margin-bottom: 4px;
}
.dept-kpi-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.dept-kpi-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  opacity: 0.8;
}
.dept-kpi-target-bar {
  height: 4px;
  background: var(--bg-translucent);
  border-radius: 2px;
  margin-top: 8px;
  overflow: hidden;
}
.dept-kpi-target-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.6s ease;
}

/* Department Practices Section */
.dept-practices-section {
  padding: 0 32px 32px;
}
.dept-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-top: 8px;
}
.dept-section-header h3 {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dept-section-header h3 svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}
.dept-section-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--bg-translucent-hover);
  color: var(--text-secondary);
}

/* Practice Cards Grid */
.dept-practice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.dept-practice-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.dept-practice-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px -5px rgba(0, 0, 0, 0.3);
}
.dept-practice-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.dept-practice-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.dept-practice-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.dept-practice-card-name .practice-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dept-practice-card-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-translucent);
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: auto;
  margin-right: 8px;
}
.dept-practice-card-arrow {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--bg-translucent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.dept-practice-card:hover .dept-practice-card-arrow {
  background: var(--accent);
  color: white;
}
.dept-practice-card-arrow svg {
  width: 14px;
  height: 14px;
}

/* Practice card stats grid */
.dept-practice-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.dept-practice-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dept-practice-stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.dept-practice-stat-value {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

/* Practice card progress bar */
.dept-practice-progress {
  height: 6px;
  background: var(--bg-translucent-hover);
  border-radius: 3px;
  overflow: hidden;
}
.dept-practice-progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(90deg, var(--accent), var(--purple));
}

/* Drill-down back bar */
.dept-drilldown-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  background: var(--bg-translucent);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.dept-drilldown-bar .btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  padding: 6px 14px;
}

/* Animations */
@keyframes deptFadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.dept-animate-in {
  animation: deptFadeInUp 0.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
}
.dept-animate-in:nth-child(1) { animation-delay: 0.05s; }
.dept-animate-in:nth-child(2) { animation-delay: 0.1s; }
.dept-animate-in:nth-child(3) { animation-delay: 0.15s; }
.dept-animate-in:nth-child(4) { animation-delay: 0.2s; }
.dept-animate-in:nth-child(5) { animation-delay: 0.25s; }
.dept-animate-in:nth-child(6) { animation-delay: 0.3s; }

/* Empty state */
.dept-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
}
.dept-empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}
.dept-empty-state p {
  font-size: 14px;
  max-width: 300px;
}

/* Responsive */
@media (max-width: 1024px) {
  .dept-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .dept-header { flex-direction: column; gap: 16px; padding: 20px 16px; }
  .dept-kpi-grid { grid-template-columns: 1fr; padding: 16px; }
  .dept-practices-section { padding: 0 16px 24px; }
  .dept-practice-grid { grid-template-columns: 1fr; }
}

/* ======== EXECUTIVE SUMMARY ENHANCEMENTS ======== */

/* 6-column KPI grid */
.exec-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 4px;
}
@media (max-width: 1200px) {
  .exec-kpi-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .exec-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

/* KPI color additions */
.kpi-value.cyan { color: #06b6d4; }
.kpi-value.pink { color: #ec4899; }

/* Section headers */
.exec-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.exec-section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}
.exec-section-chevron {
  color: var(--text-secondary);
  font-size: 14px;
  transition: transform 0.2s ease;
}
.exec-section-toggle:hover .exec-section-label {
  color: var(--text-secondary);
}

/* Department drill-down */
.exec-dept-drilldown {
  background: var(--card-bg);
  border: 1px solid var(--border-primary);
  border-radius: 12px;
  overflow: hidden;
}
.exec-dept-row {
  border-bottom: 1px solid var(--border-primary);
  cursor: pointer;
  transition: background 0.15s ease;
}
.exec-dept-row:last-child { border-bottom: none; }
.exec-dept-row:hover { background: var(--hover-bg, rgba(59,130,246,0.04)); }
.exec-dept-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
}
.exec-dept-name {
  display: flex;
  align-items: center;
  gap: 10px;
}
.exec-dept-name strong {
  font-size: 14px;
  color: var(--text-primary);
}
.exec-dept-badge {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--badge-bg, var(--border-primary));
  padding: 2px 8px;
  border-radius: 10px;
}
.exec-dept-stats {
  display: flex;
  gap: 24px;
  font-size: 12px;
  color: var(--text-secondary);
}
.exec-dept-stats strong { font-weight: 600; }
.exec-dept-chevron {
  color: var(--text-muted);
  font-size: 14px;
  transition: transform 0.2s ease;
  margin-right: 4px;
}
.exec-dept-chevron.open {
  transform: rotate(90deg);
}
.exec-dept-practices {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.exec-dept-practices.open {
  max-height: 500px;
}
.exec-practice-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 18px 10px 44px;
  font-size: 12px;
  border-top: 1px solid var(--border-secondary, rgba(51,65,85,0.3));
  background: var(--nested-bg, rgba(0,0,0,0.02));
}
[data-theme="dark"] .exec-practice-row {
  background: rgba(15,23,42,0.5);
}
.exec-practice-row span:first-child {
  color: var(--text-primary);
}
.exec-practice-stats {
  display: flex;
  gap: 24px;
  color: var(--text-secondary);
}

/* Secondary Metrics */
.exec-detailed-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease;
  max-height: 200px;
  opacity: 1;
}
.exec-detailed-grid.collapsed {
  max-height: 0;
  opacity: 0;
}
@media (max-width: 900px) {
  .exec-detailed-grid { grid-template-columns: repeat(2, 1fr); }
}
.exec-detail-card {
  background: var(--card-bg);
  border: 1px solid var(--border-primary);
  border-radius: 10px;
  padding: 14px;
}
.exec-detail-label {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.exec-detail-value {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
}
.exec-detail-value.green { color: #10b981; }
.exec-detail-value.purple { color: #8b5cf6; }
.exec-detail-value.blue { color: #3b82f6; }
.exec-detail-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
