/* CapGrowth — SaaS design system (frontend only) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary: #0d9488;
  --primary-dark: #0f766e;
  --accent: #1e3a5f;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --info: #0ea5e9;
  --bg-page: #f1f5f9;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --sidebar-bg: #0f172a;
  --sidebar-text: #cbd5e1;
  --sidebar-active: #0d9488;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08), 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 8px 24px rgba(13, 148, 136, 0.15);
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; }

body.app-body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-page);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  font-size: 0.9375rem;
  line-height: 1.5;
}

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

.app-sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  z-index: 1040;
  transition: transform var(--transition);
  overflow-y: auto;
}

.app-sidebar-brand {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.app-sidebar-brand .brand-icon {
  color: var(--primary);
  font-size: 1.35rem;
  flex-shrink: 0;
}

.app-sidebar-brand .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.app-sidebar-brand .brand-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
}

.app-sidebar-brand .brand-os-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
}

.app-nav-section {
  padding: 0.75rem 0.75rem 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

.app-company-switcher {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0.25rem;
}

.company-switch-select {
  font-size: 0.75rem;
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}


.app-nav-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(100% - 1rem);
  margin: 0.35rem 0.5rem 0.1rem;
  padding: 0.5rem 0.75rem;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #94a3b8;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.app-nav-group-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
}

.app-nav-chevron {
  font-size: 0.6rem;
  transition: transform var(--transition);
}

.app-nav-group.is-collapsed .app-nav-chevron {
  transform: rotate(-90deg);
}

.app-nav-group.is-collapsed .app-nav-group-links {
  display: none;
}

.app-nav-group-links .app-nav-link {
  padding-left: 1.35rem;
}

.report-brand-line {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal-600, #0d9488);
}

.report-header {
  margin-bottom: 1.5rem;
}

.report-header .lead {
  color: #64748b;
  font-size: 0.95rem;
}

@media print {
  .report-actions { display: none !important; }
  .page-header { break-after: avoid; }
}

.app-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  margin: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  text-decoration: none;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}

.app-nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.app-nav-link.active {
  background: var(--sidebar-active);
  color: #fff;
}

.app-nav-link .badge { margin-left: auto; }

.app-sidebar-footer {
  margin-top: auto;
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.app-main {
  flex: 1;
  margin-left: 260px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.app-content {
  padding: 1.5rem;
  flex: 1;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 1035;
}

/* —— Auth layout —— */
.auth-shell {
  min-height: 100vh;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #0f172a 0%, var(--accent) 45%, #0d9488 100%);
}

.auth-layout {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  min-height: calc(100vh - 5rem);
}

.auth-marketing {
  flex: 1;
  max-width: 560px;
  color: #fff;
}

.auth-marketing-inner { padding: 1rem 0; }

.auth-marketing-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.auth-marketing-brand i { color: #5eead4; }

.auth-marketing-title {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.35;
}

.auth-marketing-desc {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.auth-marketing-pills {
  font-size: 0.85rem;
  font-weight: 600;
  color: #5eead4;
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.auth-marketing-footnote {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 1.5rem;
  font-style: italic;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.feature-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
}

.feature-card i { color: #5eead4; width: 1.1rem; text-align: center; }

.auth-subtitle-small {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.8rem;
  margin: 0.35rem 0 0;
  font-weight: 500;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.auth-card .card-header {
  background: var(--sidebar-bg);
  color: #fff;
  text-align: center;
  padding: 2rem 1.5rem 1.5rem;
  border: none;
}

.auth-logo-wrap {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 1rem 1.5rem;
  margin: 0 auto 1rem;
  display: inline-flex;
}

.auth-logo { max-height: 80px; max-width: 220px; object-fit: contain; }

.auth-subtitle { color: rgba(255, 255, 255, 0.75); font-size: 0.9rem; margin: 0; }

.navbar.auth-nav {
  background: var(--sidebar-bg) !important;
}

.navbar.auth-nav .navbar-brand { color: #fff !important; }

/* —— KPI cards —— */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.kpi-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px 0 0 4px;
}

.kpi-card.kpi-primary::before { background: var(--primary); }
.kpi-card.kpi-success::before { background: var(--success); }
.kpi-card.kpi-danger::before { background: var(--danger); }
.kpi-card.kpi-warning::before { background: var(--warning); }
.kpi-card.kpi-info::before { background: var(--info); }

.kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}

.kpi-primary .kpi-icon { background: rgba(13, 148, 136, 0.12); color: var(--primary); }
.kpi-success .kpi-icon { background: rgba(22, 163, 74, 0.12); color: var(--success); }
.kpi-danger .kpi-icon { background: rgba(220, 38, 38, 0.12); color: var(--danger); }
.kpi-warning .kpi-icon { background: rgba(245, 158, 11, 0.15); color: var(--warning); }
.kpi-info .kpi-icon { background: rgba(14, 165, 233, 0.12); color: var(--info); }

.kpi-label { font-size: 0.8rem; color: var(--text-muted); font-weight: 500; margin-bottom: 0.2rem; }
.kpi-value { font-size: 1.5rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.kpi-hint { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.35rem; }

/* —— Page header —— */
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-header h1 { font-size: 1.5rem; font-weight: 700; margin: 0 0 0.25rem; }
.page-header .lead { color: var(--text-muted); margin: 0; font-size: 0.9rem; }

/* —— Cards —— */
.card-app {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-app .card-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  color: var(--text);
  padding: 1rem 1.25rem;
}

.card-app .card-header-dark {
  background: var(--sidebar-bg);
  color: #fff;
  border: none;
}

/* —— Tables —— */
.table-app {
  margin: 0;
  font-size: 0.875rem;
}

.table-app thead th {
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 2px solid var(--border);
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 1;
  white-space: nowrap;
}

.table-app tbody td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  border-color: var(--border);
}

.table-app tbody tr {
  transition: background var(--transition);
}

.table-app tbody tr:hover { background: #f8fafc; }

.table-app tr.row-manual { border-left: 3px solid var(--primary); }
.table-app tr.row-rollover { border-left: 3px solid var(--warning); background: rgba(245, 158, 11, 0.04); }
.table-app tr.row-paid { border-left: 3px solid var(--success); }
.table-app tr.row-overdue { border-left: 3px solid var(--danger); background: rgba(220, 38, 38, 0.04); }

.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
}

.table-search {
  max-width: 280px;
  flex: 1;
  min-width: 160px;
}

/* —— Badges —— */
.badge-status {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.35em 0.65em;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-paid { background: #dcfce7; color: #166534; }
.badge-partial { background: #fef9c3; color: #854d0e; }
.badge-unpaid { background: #fee2e2; color: #991b1b; }
.badge-rollover { background: #ffedd5; color: #9a3412; }
.badge-manual { background: #dbeafe; color: #1e40af; }

/* —— Charts —— */
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  height: 100%;
}

.chart-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.chart-skeleton {
  height: 200px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* —— Buttons —— */
.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
}

.btn-primary:hover, .btn-primary:focus {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

/* —— Alerts —— */
.alert { border: none; border-radius: var(--radius-sm); font-weight: 500; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-danger { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info { background: #e0f2fe; color: #075985; }

/* —— Client registration link share card —— */
.registration-link-card .registration-slug-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.12);
  color: var(--primary-dark);
  font-size: 0.75rem;
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.registration-link-input {
  background: #f8fafc !important;
  color: var(--text) !important;
  border-color: var(--border);
  font-size: 0.875rem;
}

.registration-link-input:focus {
  background: #fff !important;
  color: var(--text) !important;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}

.registration-link-group .registration-copy-btn.is-copied {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.registration-inline-path {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
  color: var(--accent);
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.flash-registration-link {
  display: block;
  margin-top: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.85rem;
  word-break: break-all;
}

/* —— Forms —— */
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border-color: var(--border);
  padding: 0.6rem 0.85rem;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}

/* —— Footer —— */
.app-footer {
  padding: 0.85rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  margin-top: auto;
}

.app-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.app-footer-inner strong { color: var(--primary-dark); }

.app-main { display: flex; flex-direction: column; min-height: 100vh; }

.auth-shell .app-footer {
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.auth-shell .app-footer-inner { color: rgba(255, 255, 255, 0.7); }
.auth-shell .app-footer-inner strong { color: #5eead4; }

.form-floating > .form-control,
.form-floating > .form-select { height: calc(3.25rem + 2px); }

/* —— Client timeline —— */
.timeline { list-style: none; padding: 0; margin: 0; }

.timeline-item {
  position: relative;
  padding-left: 2rem;
  padding-bottom: 1.25rem;
  border-left: 2px solid var(--border);
  margin-left: 0.5rem;
}

.timeline-item:last-child { border-left-color: transparent; padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-card);
}

.timeline-item.status-approved::before { background: var(--success); }
.timeline-item.status-denied::before { background: var(--danger); }
.timeline-item.status-pending::before { background: var(--warning); }

/* —— Empty state —— */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
}

.empty-state i { font-size: 2.5rem; opacity: 0.35; margin-bottom: 1rem; display: block; }

/* —— Loading —— */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--border);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.page-loader.active { opacity: 1; }

.page-loader-bar {
  height: 100%;
  width: 30%;
  background: var(--primary);
  animation: loader-slide 1s ease-in-out infinite;
}

@keyframes loader-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}

/* —— Progress month summary —— */
.progress-summary .progress { height: 8px; border-radius: 4px; }

/* —— Money flow widget —— */
.money-flow-chain {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
}

.money-flow-step {
  background: var(--bg-muted, #f1f5f9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.money-flow-arrow {
  text-align: center;
  color: var(--primary);
  font-size: 1.1rem;
  line-height: 1;
}

/* —— Enterprise / CEO dashboard —— */
.section-heading {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted, #64748b);
  margin-bottom: 1rem;
}

.kpi-grid-ceo { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

.kpi-animated {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.kpi-animated:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.executive-banner {
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(13, 148, 136, 0.06) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.executive-banner-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.executive-score {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}
.executive-score.health-green { color: #10b981; }
.executive-score.health-amber { color: #f59e0b; }
.executive-score.health-red { color: #ef4444; }
.executive-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.executive-links { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.health-score-badge {
  text-align: center;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid;
}
.health-score-badge.health-green { border-color: #10b981; background: rgba(16,185,129,0.08); }
.health-score-badge.health-amber { border-color: #f59e0b; background: rgba(245,158,11,0.08); }
.health-score-badge.health-red { border-color: #ef4444; background: rgba(239,68,68,0.08); }
.health-score-value { font-size: 2rem; font-weight: 700; display: block; }
.health-score-label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }

.indicator-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}
.indicator-green { background: #10b981; }
.indicator-amber { background: #f59e0b; }
.indicator-red { background: #ef4444; }

.badge-credit {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.8rem;
  background: #e2e8f0;
}
.badge-credit-lg { font-size: 1.25rem; padding: 0.5rem 1rem; }
.badge-credit-a-plus, .badge-credit-a { background: #d1fae5; color: #065f46; }
.badge-credit-b-plus, .badge-credit-b { background: #dbeafe; color: #1e40af; }
.badge-credit-c { background: #fef3c7; color: #92400e; }
.badge-credit-high-risk { background: #fee2e2; color: #991b1b; }

.gauge-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.timeline-list { max-height: 280px; overflow-y: auto; }
.timeline-item {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.timeline-date { color: var(--text-muted); font-size: 0.8rem; margin-right: 0.5rem; }

/* —— Onboarding —— */
.onboarding-card {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.06), var(--bg-card));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.onboarding-checklist { list-style: none; padding: 0; margin: 0; }
.onboarding-checklist li {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.5rem 0; border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
.onboarding-checklist li.done a { color: var(--text-muted); text-decoration: line-through; }
.onboarding-checklist li:last-child { border-bottom: none; }
.check-icon { width: 1.25rem; color: var(--primary); }

/* —— CEO quick actions —— */
.quick-actions { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.quick-action-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 1rem; background: var(--bg-card);
  border: 1px solid var(--border); border-radius: var(--radius);
  color: inherit; text-decoration: none; font-size: 0.9rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.quick-action-btn:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); color: var(--primary); }

.strategic-alert {
  padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 0.5rem; font-size: 0.9rem;
}
.strategic-alert.alert-red { background: #fef2f2; border-left: 4px solid #ef4444; }
.strategic-alert.alert-amber { background: #fffbeb; border-left: 4px solid #f59e0b; }
.strategic-alert.alert-green { background: #ecfdf5; border-left: 4px solid #10b981; }

.kpi-executive .kpi-icon { font-size: 1.1rem; color: var(--primary); margin-bottom: 0.35rem; opacity: 0.85; }
.executive-metrics { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.executive-metrics div { display: flex; flex-direction: column; gap: 0.15rem; }

.auth-marketing-hero { font-size: 1.05rem; color: #e2e8f0; margin: 0.75rem 0; font-weight: 500; }

.ceo-header h1 { font-size: 1.75rem; }

/* —— Mobile polish —— */
@media (max-width: 767.98px) {
  .kpi-grid-ceo { grid-template-columns: repeat(2, 1fr); }
  .kpi-value { font-size: 1.15rem; }
  .executive-banner-inner { flex-direction: column; align-items: flex-start; }
  .quick-actions { flex-direction: column; }
  .quick-action-btn { width: 100%; justify-content: center; }
  .table-responsive { -webkit-overflow-scrolling: touch; }
}

/* —— Responsive —— */
@media (max-width: 991.98px) {
  .app-sidebar { transform: translateX(-100%); }
  .app-sidebar.is-open { transform: translateX(0); }
  .sidebar-overlay.is-visible { display: block; }
  .app-main { margin-left: 0; }
  .app-content { padding: 1rem; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575.98px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; }
}

/* Focus accessibility */
a:focus-visible, button:focus-visible, .form-control:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
