/* CSS Custom Properties - Design Tokens
 * Based on PXP Jekyll site audit styling
 * Supports light and dark modes via prefers-color-scheme
 */

:root {
  /* === BACKGROUNDS === */
  --bg: #ffffff;              /* Main background */
  --bg-sunken: #f6f7f9;      /* Lowered/recessed areas */
  --bg-raised: #ffffff;      /* Elevated/card areas */

  /* === BORDERS === */
  --border: #dfe3e8;         /* Standard borders */
  --border-strong: #c2c9d1;  /* Emphasized borders */

  /* === TEXT === */
  --text: #16191d;           /* Primary text */
  --text-muted: #5a6470;     /* Secondary/muted text */

  /* === ACCENT & BRAND === */
  --accent: #1a4fa0;         /* Primary action color (blue) */
  --accent-soft: #eaf0fb;    /* Accent background */
  --brand: #00888f;          /* PXP brand color (teal) */

  /* === STATUS COLORS === */
  --good: #0b6c39;           /* Green - success/passing */
  --good-bg: #e5f4ec;        /* Green background */
  --average: #8a4b00;        /* Orange - needs improvement */
  --average-bg: #fdf0e0;     /* Orange background */
  --poor: #a3161a;           /* Red - failing/error */
  --poor-bg: #fdeaea;        /* Red background */

  /* === SEVERITY LEVELS === */
  --critical: #8b1116;       /* Critical/highest severity */
  --serious: #a3401a;        /* Serious severity */
  --moderate: #6b5300;       /* Moderate severity */
  --minor: #4a5563;          /* Minor severity */

  /* === LAYOUT === */
  --radius: 8px;             /* Border radius */
  --maxw: 1120px;            /* Max container width */

  /* === TYPOGRAPHY === */
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* === SPACING SCALE === */
  --space-xs: 0.25rem;       /* 4px */
  --space-sm: 0.5rem;        /* 8px */
  --space-md: 1rem;          /* 16px */
  --space-lg: 1.5rem;        /* 24px */
  --space-xl: 2rem;          /* 32px */
  --space-2xl: 2.5rem;       /* 40px */
  --space-3xl: 4rem;         /* 64px */
}

/* === DARK MODE === */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171b;              /* Dark background */
    --bg-sunken: #1b1f24;       /* Darker recessed */
    --bg-raised: #1f242a;       /* Slightly lighter elevated */
    --border: #333a42;          /* Lighter borders for contrast */
    --border-strong: #4a535d;
    --text: #e8ebee;            /* Light text */
    --text-muted: #a3adb8;      /* Muted light text */
    --accent: #7aa7f0;          /* Lighter blue for dark mode */
    --accent-soft: #1d2a3f;     /* Dark blue background */
    --brand: #62c7c9;           /* Lighter teal */
    --good: #5cc98d;            /* Lighter green */
    --good-bg: #14302180;       /* Semi-transparent */
    --average: #e0a458;         /* Lighter orange */
    --average-bg: #3a2a1080;
    --poor: #f08a8a;            /* Lighter red */
    --poor-bg: #3a191980;
    --critical: #f08a8a;
    --serious: #e8a06a;
    --moderate: #d9c26a;
    --minor: #9aa5b1;
  }
}

/* === PRINT MODE === */
@media print {
  :root {
    --bg: #ffffff;
    --bg-sunken: #ffffff;
    --bg-raised: #ffffff;
    --border: #000000;
    --border-strong: #000000;
    --text: #000000;
    --text-muted: #666666;
  }
}
/* Component Styles
 * Buttons, cards, badges, tables, forms, and more
 */

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 550;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.btn-primary:hover {
  background: var(--brand);
  border-color: var(--brand);
  text-decoration: none;
}

.btn-secondary {
  background: var(--bg-sunken);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg-raised);
  border-color: var(--border-strong);
  text-decoration: none;
}

.btn-link {
  background: none;
  color: var(--accent);
  border: none;
  padding: 0.25rem 0.5rem;
}

.btn-link:hover {
  text-decoration: underline;
}

.btn-sm {
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
}

/* === CARDS === */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-sunken);
}

.card-header h5 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.card-body {
  padding: 1.25rem;
}

.card-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--bg-sunken);
}

/* === BADGES === */
.badge {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  gap: 0.3rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-primary {
  background: var(--accent-soft);
  color: var(--accent);
}

.badge-success {
  background: var(--good-bg);
  color: var(--good);
}

.badge-warning {
  background: var(--average-bg);
  color: var(--average);
}

.badge-danger {
  background: var(--poor-bg);
  color: var(--poor);
}

.badge-secondary {
  background: var(--bg-sunken);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* === TABLES === */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.925rem;
}

th, td {
  text-align: left;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-strong);
  background: var(--bg-sunken);
}

tbody tr:hover {
  background: var(--bg-sunken);
}

.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* === FORMS === */
.form-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  font-weight: 550;
  color: var(--text);
}

.form-control,
.form-select {
  width: 100%;
  padding: 0.55rem 0.85rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease;
}

.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

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

.form-text {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
}

.form-check-input {
  width: 1.1rem;
  height: 1.1rem;
  cursor: pointer;
}

.form-check-label {
  cursor: pointer;
  font-size: 0.95rem;
}

/* === ALERTS === */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.alert-success {
  background: var(--good-bg);
  color: var(--good);
  border-color: var(--good);
}

.alert-warning {
  background: var(--average-bg);
  color: var(--average);
  border-color: var(--average);
}

.alert-danger {
  background: var(--poor-bg);
  color: var(--poor);
  border-color: var(--poor);
}

.alert-info {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
}

/* === NAVIGATION === */
.nav {
  display: flex;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.5rem 0;
  transition: color 0.15s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  text-decoration: underline;
}

/* === HEADER === */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: flex-end;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* Hide menu toggle on desktop */
#menu-toggle {
  display: none;
}

@media (max-width: 768px) {
  #menu-toggle {
    display: inline-flex;
  }

  .site-header .wrap {
    justify-content: space-between;
  }
}

/* === FOOTER === */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.25rem 0 3rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* === SCORE TILES === */
.score-tile {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 0.9rem 1.1rem;
  background: var(--bg-raised);
  text-align: center;
}

.score-tile .value {
  font-size: 2.1rem;
  font-weight: 650;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.score-tile .label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* === PAGINATION === */
.pagination {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}

.pagination a,
.pagination span {
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  background: var(--bg-raised);
}

.pagination a:hover {
  background: var(--bg-sunken);
  text-decoration: none;
}

.pagination .active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* === BREADCRUMB === */
.breadcrumb {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  font-size: 0.875rem;
}

.breadcrumb li::after {
  content: "/";
  margin-left: 0.5rem;
  color: var(--text-muted);
}

.breadcrumb li:last-child::after {
  content: "";
}

/* === DROPDOWN === */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0;
  margin-top: 0.25rem;
  z-index: 1000;
  display: none;
}

.dropdown.open .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text);
  text-decoration: none;
  transition: background 0.15s ease;
}

.dropdown-item:hover {
  background: var(--bg-sunken);
  text-decoration: none;
}

/* === BASE STYLES === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-sunken);
}

main {
  min-height: calc(100vh - 60px);
  padding: var(--space-lg);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

h1 { font-size: 2rem; margin-bottom: var(--space-md); }
h2 { font-size: 1.5rem; margin-bottom: var(--space-md); }
h3 { font-size: 1.25rem; margin-bottom: var(--space-sm); }
h4 { font-size: 1.1rem; margin-bottom: var(--space-sm); }

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  padding: 0.2em 0.4em;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: 3px;
}

/* === NAVIGATION === */
.main-nav {
  background: var(--bg-raised);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-brand a {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-links a,
.nav-links form button {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links form button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.nav-links a:hover,
.nav-links form button:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-account {
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
}

.account-switcher select {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  cursor: pointer;
}

/* === FLASH MESSAGES === */
.flash {
  max-width: var(--maxw);
  margin: var(--space-lg) auto;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius);
  font-size: 0.95rem;
}

.flash.notice {
  background: var(--good-bg);
  color: var(--good);
  border: 1px solid var(--good);
}

.flash.alert {
  background: var(--poor-bg);
  color: var(--poor);
  border: 1px solid var(--poor);
}

/* === AUTH PAGES === */
.auth-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: var(--space-lg);
  background: var(--bg-sunken);
}

.auth-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-2xl);
  max-width: 450px;
  width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.auth-card h1 {
  margin-bottom: var(--space-md);
  text-align: center;
}

.auth-footer {
  margin-top: var(--space-xl);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-footer a {
  color: var(--accent);
  font-weight: 500;
}

/* === DASHBOARD === */
.dashboard {
  max-width: var(--maxw);
  margin: 0 auto;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
}

.quick-actions {
  display: flex;
  gap: var(--space-sm);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.stat-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-lg);
  transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stat-card-highlight {
  border: 2px solid var(--accent);
  background: var(--accent-soft);
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.stat-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.stat-link {
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 500;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: var(--space-lg);
}

/* === WIDGETS === */
.dashboard-widget {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
  background: var(--bg-sunken);
}

.widget-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.widget-link {
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 500;
}

.widget-content {
  padding: var(--space-lg);
}

.widget-empty {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--text-muted);
}

/* === LISTS === */
.task-list, .deal-list, .company-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.task-item, .deal-item, .company-item {
  padding: var(--space-md);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: background 0.15s ease;
}

.task-item:hover, .deal-item:hover, .company-item:hover {
  background: var(--bg-sunken);
}

.task-item.task-overdue {
  border-color: var(--poor);
  background: var(--poor-bg);
}

.task-title, .deal-title, .company-name {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.task-meta, .deal-meta, .company-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* === PIPELINE === */
.pipeline-container {
  padding: var(--space-lg);
  background: var(--bg-sunken);
  min-height: 100vh;
}

.pipeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  background: var(--bg-raised);
  padding: var(--space-lg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.pipeline-board {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  padding-bottom: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.pipeline-stage {
  flex: 0 0 300px;
  background: var(--bg-raised);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 300px);
}

.stage-header {
  padding: var(--space-md);
  background: var(--bg-sunken);
  border-radius: var(--radius) var(--radius) 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--accent);
}

.stage-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.stage-count {
  background: var(--bg-raised);
  color: var(--text-muted);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
}

.stage-deals {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.deal-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  transition: all 0.2s;
}

.deal-card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.deal-card-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.deal-card-company {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: var(--space-sm);
}

.deal-card-value {
  color: var(--good);
  font-weight: 600;
}

.empty-stage {
  padding: var(--space-xl);
  text-align: center;
  color: var(--text-muted);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .dashboard {
    padding: var(--space-md);
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

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

  .nav-container {
    flex-wrap: wrap;
  }

  .quick-actions {
    width: 100%;
  }
}

/* === PAGE LAYOUT === */
.page-container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--space-lg);
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
}

.page-header h1 {
  margin: 0;
}

/* === FORMS === */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: var(--space-md);
  align-items: end;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: var(--space-xs);
}

.form-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.filter-form {
  margin-bottom: var(--space-lg);
}

/* === TABLE ENHANCEMENTS === */
.entity-name a {
  font-weight: 600;
  color: var(--text);
}

.entity-name a:hover {
  color: var(--accent);
  text-decoration: none;
}

.contact-info {
  font-size: 0.9rem;
}

.text-link {
  color: var(--accent);
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

.text-muted {
  color: var(--text-muted);
}

.small {
  font-size: 0.875rem;
}

.text-center {
  text-align: center;
}

.count-badge {
  display: inline-block;
  min-width: 2rem;
  padding: 0.25rem 0.5rem;
  background: var(--bg-sunken);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

.action-buttons {
  display: flex;
  gap: var(--space-sm);
}

/* === EMPTY STATES === */
.empty-state-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3xl);
  text-align: center;
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.empty-state-card h3 {
  margin-bottom: var(--space-sm);
  color: var(--text);
}

.empty-state-card p {
  color: var(--text-muted);
  margin-bottom: var(--space-lg);
}

/* === DETAIL PAGES === */
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-xl);
}

.detail-title {
  flex: 1;
}

.detail-title h1 {
  margin-bottom: var(--space-xs);
}

.detail-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.detail-actions {
  display: flex;
  gap: var(--space-sm);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.info-group {
  margin-bottom: var(--space-lg);
}

.info-group h3 {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  font-weight: 600;
}

.info-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border);
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.info-value {
  color: var(--text);
}

/* === RESPONSIVE FORMS === */
@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

  .detail-header {
    flex-direction: column;
    gap: var(--space-md);
  }

  .detail-actions {
    width: 100%;
  }

  .detail-actions .btn {
    flex: 1;
  }
}

/* === FORM IMPROVEMENTS === */
.form-row {
  margin-bottom: var(--space-md);
}

.form-group {
  margin-bottom: 0;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-header h5 {
  margin: 0;
}

/* === BADGE IMPROVEMENTS === */
.badge-danger {
  background: var(--poor-bg);
  color: var(--poor);
}

/* === BUTTON VARIANTS === */
.btn-danger {
  background: var(--poor);
  color: #fff;
  border-color: var(--poor);
}

.btn-danger:hover {
  background: var(--critical);
  border-color: var(--critical);
  text-decoration: none;
}

/* === AUTH LAYOUT === */
.auth-body {
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-container {
  width: 100%;
  max-width: 1000px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.auth-brand {
  background: linear-gradient(135deg, #e0e0e0 0%, #c0c0c0 100%);
  padding: 4rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #333;
}

.auth-brand-content {
  max-width: 400px;
}

.auth-logo {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: white;
}

.auth-tagline {
  font-size: 1.1rem;
  color: #555;
  margin: 0;
}

.auth-form {
  background: var(--bg-raised);
  padding: 4rem 3rem;
}

.auth-form-content {
  max-width: 400px;
  margin: 0 auto;
}

.auth-title {
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--text);
}

.auth-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 2rem 0;
}

.auth-toggle {
  text-align: center;
  margin-top: 1.5rem;
  margin-bottom: 0;
}

.auth-toggle a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
}

.auth-toggle a:hover {
  text-decoration: underline;
}

.auth-footer {
  text-align: center;
  margin-top: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.btn-block {
  width: 100%;
  display: block;
}

/* Responsive: Stack on Mobile */
@media (max-width: 768px) {
  .auth-body {
    padding: 1rem;
  }

  .auth-container {
    grid-template-columns: 1fr;
  }

  .auth-brand,
  .auth-form {
    padding: 2rem 1.5rem;
  }

  .auth-logo {
    font-size: 2rem;
  }

  .auth-tagline {
    font-size: 1rem;
  }
}

.auth-logo-img {
  height: 80px;
  width: auto;
  margin-bottom: 1rem;
}

.auth-brand-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  color: #333;
  letter-spacing: 0.05em;
}
