:root {
  --bg: #f5f5f5;
  --bg-accent: #eaeaea;
  --panel: rgba(255, 255, 255, 0.98);
  --text: #414140;
  --text-secondary: #585c5c;
  --muted: #a9a9a9;
  --line: rgba(65, 64, 64, 0.12);
  --line-strong: rgba(65, 64, 64, 0.25);
  --primary: #585c5c;
  --primary-light: #7a7e7e;
  --primary-dark: #414140;
  --primary-gradient: linear-gradient(135deg, #585c5c 0%, #7a7e7e 50%, #414140 100%);
  --secondary: #eaeaea;
  --success: #22c55e;
  --success-light: #dcfce7;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --info: #585c5c;
  --info-light: #eaeaea;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.12);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 0% 0%, rgba(88, 92, 92, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 100% 0%, rgba(88, 92, 92, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(88, 92, 92, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* ==================== LAYOUT ==================== */

.app-shell {
  width: min(1600px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-accent) 100%) !important;
}

.login-shell {
  width: min(1200px, calc(100% - 48px));
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: center;
}

/* ==================== TOPBAR ==================== */

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 20px 32px;
  margin: 0 -32px 24px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(65, 64, 64, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar h1 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
}

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

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(65, 64, 64, 0.15);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  color: var(--text-secondary);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.05),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  transition: all var(--transition-fast);
}

.user-pill:hover {
  border-color: rgba(65, 64, 64, 0.3);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

/* ==================== CARDS ==================== */

.hero-card,
.panel-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: 
    var(--shadow-lg),
    0 0 0 1px rgba(255, 255, 255, 0.5) inset;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
  animation: slideUpFade 0.5s ease-out;
}

.hero-card:hover,
.panel-card:hover {
  transform: translateY(-4px) scale(1.005);
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.12),
    0 0 60px rgba(0, 0, 0, 0.04),
    0 0 0 1px rgba(255, 255, 255, 0.6) inset;
  border-color: rgba(65, 64, 64, 0.25);
}

.hero-card::before,
.panel-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(65, 64, 64, 0.03) 0%,
    transparent 50%,
    rgba(88, 92, 92, 0.02) 100%);
  pointer-events: none;
}

.hero-card::after,
.panel-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #414140 0%, #585c5c 50%, #414140 100%);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* ==================== TYPOGRAPHY ==================== */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  font-weight: 700;
  color: #585c5c;
  margin-bottom: 8px;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  background: #414140;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(65, 64, 64, 0.4);
}

h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--text);
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

h3 {
  font-size: 1.125rem;
  margin-bottom: 6px;
}

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ==================== COMMAND CENTER ==================== */

.command-center {
  display: grid;
  gap: 24px;
  margin-bottom: 32px;
}

.command-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 40px;
  background: linear-gradient(135deg, 
    #414140 0%, 
    #585c5c 50%,
    #2d2f2f 100%);
  color: white;
  box-shadow: 
    var(--shadow-xl),
    0 0 60px rgba(88, 92, 92, 0.25);
  border-left: 4px solid var(--warning);
}

.command-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0, 0, 0, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.command-hero::after {
  display: none;
}

.command-hero .eyebrow {
  color: rgba(255, 255, 255, 0.9);
}

.app-shell--narrow {
  width: min(1080px, calc(100% - 48px));
}

.hero-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.ghost-btn--light {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.ghost-btn--light:hover {
  background: rgba(255, 255, 255, 0.18);
}

.arca-lab-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.form-help {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: -8px;
}

.arca-status-card p {
  margin-top: 10px;
}

.info-stack {
  display: grid;
  gap: 12px;
}

.info-banner {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(59, 130, 246, 0.18);
  background: rgba(59, 130, 246, 0.08);
  color: var(--text);
}

.info-banner--soft {
  border-color: var(--line);
  background: rgba(88, 92, 92, 0.08);
}

.empty-state {
  display: grid;
  gap: 10px;
  padding: 22px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.03);
  border: 1px dashed rgba(15, 23, 42, 0.12);
}

.lookup-result {
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}

.lookup-result--ok {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.18);
}

.lookup-result--warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.2);
}

.lookup-result__badge {
  display: inline-flex;
  width: fit-content;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 700;
}

.definition-list {
  display: grid;
  gap: 12px;
}

.definition-list div {
  display: grid;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.definition-list dt {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.definition-list dd {
  margin: 0;
  color: var(--text);
}

.traffic-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid transparent;
  width: fit-content;
}

.traffic-pill--green {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.2);
  color: #15803d;
}

.traffic-pill--yellow {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.2);
  color: #b45309;
}

.traffic-pill--red {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.2);
  color: #b91c1c;
}

.source-list {
  display: grid;
  gap: 12px;
}

.source-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.68);
}

.source-card--ok {
  border-color: rgba(34, 197, 94, 0.18);
}

.source-card--warn {
  border-color: rgba(245, 158, 11, 0.2);
}

.source-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.source-card__status {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.source-card p {
  margin: 0;
}

.source-card a {
  color: var(--primary-dark);
  text-decoration: none;
  word-break: break-word;
}

.source-card a:hover {
  text-decoration: underline;
}

.inline-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.lookup-panel,
.override-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: rgba(248, 250, 252, 0.72);
}

.lookup-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.source-list--compact .source-card {
  padding: 14px;
  gap: 6px;
}

@media (max-width: 900px) {
  .arca-lab-grid {
    grid-template-columns: 1fr;
  }

  .inline-field-row {
    grid-template-columns: 1fr;
  }
}

.command-hero .eyebrow::before {
  background: white;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.command-hero h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: white;
  margin: 12px 0 16px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.command-hero p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0;
}

/* ==================== METRICS - NUEVO DISEÑO ==================== */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.metrics-grid--wide {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.metric-card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  animation: slideUpFade 0.5s ease-out;
}

.metric-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow:
    0 20px 40px -10px rgba(0, 0, 0, 0.12),
    0 0 30px rgba(0, 0, 0, 0.04);
  border-color: rgba(65, 64, 64, 0.2);
}

.metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #414140 0%, #585c5c 50%, #414140 100%);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.metric-card::after {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: rgba(227, 82, 5, 0.08);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.metric-card--good::before {
  background: linear-gradient(90deg, var(--success), #4ade80);
}

.metric-card--good::after {
  background: var(--success-light);
}

.metric-card--warn::before {
  background: linear-gradient(90deg, var(--warning), #fbbf24);
}

.metric-card--warn::after {
  background: var(--warning-light);
}

.metric-card--danger::before {
  background: linear-gradient(90deg, var(--danger), #f87171);
}

.metric-card--danger::after {
  background: var(--danger-light);
}

.metric-card--info::before {
  background: linear-gradient(90deg, var(--info), #b5b8bb);
}

.metric-card--info::after {
  background: var(--info-light);
}

.metric-card .metric-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 24px;
  opacity: 0.6;
}

.metric-card .metric-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.metric-card .metric-value {
  display: block;
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 8px;
}

.metric-card .metric-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--secondary);
  color: var(--text-secondary);
}

/* ==================== TABS - FUNCIONALES ==================== */

.tabs-shell {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tabs-bar {
  display: flex;
  gap: 8px;
  padding: 6px;
  background: var(--secondary);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  width: fit-content;
  box-shadow: var(--shadow-inner);
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.tab-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.5);
}

.tab-btn.is-active {
  background: rgba(255, 255, 255, 0.95);
  color: #414140;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(65, 64, 64, 0.1) inset;
  transform: translateY(-1px);
}

.tab-btn.is-active::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  background: linear-gradient(90deg, #414140 0%, #585c5c 50%, #414140 100%);
  border-radius: 3px 3px 0 0;
  box-shadow: 0 0 8px rgba(65, 64, 64, 0.3);
}

/* Panels - SOLO UNO VISIBLE */
.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.tab-panel.is-active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.panel-card--stretch {
  height: 100%;
}

/* ==================== DASHBOARD LAYOUTS ==================== */

.dashboard-split {
  display: grid;
  gap: 24px;
  margin-bottom: 24px;
}

.dashboard-stack {
  display: grid;
  gap: 24px;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.dashboard-split--supervisor-top {
  grid-template-columns: minmax(360px, 0.8fr) minmax(0, 2fr);
}

.dashboard-split--superadmin-config {
  grid-template-columns: minmax(380px, 1fr) minmax(0, 1.5fr);
}

.dashboard-split--superadmin-catalogs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-split--coverage {
  grid-template-columns: minmax(0, 2fr) minmax(360px, 1fr);
}

.dashboard-split--coverage-controls {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-split--admin-alerts {
  grid-template-columns: 1.2fr 1fr;
}

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

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

.dashboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.9rem;
}

.dashboard-table thead {
  background: var(--bg-accent);
}

.dashboard-table th {
  padding: 16px;
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}

.dashboard-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

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

.dashboard-table tbody tr:hover {
  background: rgba(65, 64, 64, 0.04);
}

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

/* Traffic rows */
.traffic-row--green {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.06), transparent);
}

.traffic-row--yellow {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.06), transparent);
}

.traffic-row--red {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.06), transparent);
}

.performance-row--good {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.07), transparent);
}

.performance-row--warn {
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.08), transparent);
}

.performance-row--danger {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.09), transparent);
}


/* ==================== BADGES & LABELS ==================== */

.traffic-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

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

.traffic-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.traffic-badge--green {
  background: var(--success-light);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.3);
}

.traffic-badge--green::before {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.traffic-badge--yellow {
  background: var(--warning-light);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.3);
}

.traffic-badge--yellow::before {
  background: var(--warning);
  box-shadow: 0 0 8px var(--warning);
}

.traffic-badge--red {
  background: var(--danger-light);
  color: #991b1b;
  border-color: rgba(239, 68, 68, 0.3);
}

.traffic-badge--red::before {
  background: var(--danger);
  box-shadow: 0 0 8px var(--danger);
}

.stage-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--secondary);
  color: var(--text-secondary);
  white-space: nowrap;
  line-height: 1.2;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-accent);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.summary-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--secondary);
  color: var(--text-secondary);
}

.summary-pill--danger {
  background: var(--danger-light);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.summary-pill--soft {
  background: var(--warning-light);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.summary-pill--warning {
  background: var(--warning-light);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.summary-pill--primary {
  background: var(--info-light);
  color: var(--info);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.summary-pill--success {
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.summary-cluster {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==================== REQUEST CARDS ==================== */

.request-list {
  display: grid;
  gap: 16px;
}

.request-card,
.compact-card {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--transition);
  animation: slideUpFade 0.4s ease-out;
}

.request-card:hover,
.compact-card:hover {
  border-color: rgba(65, 64, 64, 0.25);
  box-shadow:
    0 15px 30px -5px rgba(0, 0, 0, 0.1),
    0 0 20px rgba(0, 0, 0, 0.04);
  transform: translateY(-3px) scale(1.01);
}

.compact-card {
  padding: 16px;
}

.compact-card--inline {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.request-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

.card-company {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #414140;
  margin-bottom: 4px;
}

.meta-grid {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.meta-grid.compact {
  gap: 4px;
  margin-top: 12px;
  padding-top: 12px;
}

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

.kanban-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  padding: 4px;
}

.kanban-column {
  min-height: 600px;
  border-radius: var(--radius-xl);
  background: var(--bg-accent);
  border: 1px solid var(--line);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.kanban-column header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--panel);
  border-radius: var(--radius-lg);
  border-left: 4px solid #414140;
  box-shadow: var(--shadow-sm);
}

.kanban-column header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
}

.kanban-column header .count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 10px;
  background: var(--primary-gradient);
  color: white;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
}

.kanban-dropzone {
  flex: 1;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kanban-dropzone.is-over {
  background: rgba(65, 64, 64, 0.04);
  border-radius: var(--radius);
  outline: 2px dashed #585c5c;
  outline-offset: 8px;
}

.kanban-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: grab;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.kanban-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: rgba(65, 64, 64, 0.3);
}

.kanban-card:active {
  cursor: grabbing;
}

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

.stack-form,
.inline-form {
  display: grid;
  gap: 16px;
}

.inline-form {
  grid-template-columns: 1fr auto;
  align-items: end;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 0.95rem;
  color: var(--text);
  transition: all var(--transition-fast);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--line-strong);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #585c5c;
  box-shadow:
    0 0 0 3px rgba(88, 92, 92, 0.15),
    0 0 20px rgba(88, 92, 92, 0.08);
  transform: translateY(-1px);
}

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

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.checkbox-line input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary);
}

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

button {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: var(--radius);
  padding: 14px 24px;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

button:hover {
  transform: translateY(-2px);
}

button:active {
  transform: translateY(0);
}

.primary-btn, .ghost-btn, .danger-btn {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  border-radius: var(--radius);
  padding: 14px 24px;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.primary-btn {
  background: 
    linear-gradient(
      120deg,
      #585c5c 0%,
      #7a7e7e 25%,
      #969a9a 45%,
      #7a7e7e 55%,
      #585c5c 75%,
      #414140 100%
    );
  background-size: 200% auto;
  color: white;
  box-shadow: 0 4px 14px rgba(227, 82, 5, 0.4);
  position: relative;
  overflow: hidden;
}

.primary-btn:hover {
  box-shadow: 
    0 8px 25px rgba(227, 82, 5, 0.6),
    0 0 30px rgba(227, 82, 5, 0.15);
  transform: translateY(-2px);
}

.ghost-btn {
  background: var(--secondary);
  color: var(--text);
  border: 1px solid var(--line);
}

.ghost-btn:hover {
  background: var(--line);
  border-color: var(--line-strong);
  transform: translateY(-2px);
}

.ghost-btn.is-active {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.ghost-btn.ghost-btn--light {
  background: rgba(255, 255, 255, 0.12) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #fff !important;
}

.ghost-btn.ghost-btn--light:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: #fff !important;
  transform: translateY(-2px);
}

.danger-btn {
  background: var(--danger);
  color: white;
}

.danger-btn:hover {
  background: #dc2626;
}

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* ==================== FLASH MESSAGES ==================== */

.flash {
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.flash::before {
  font-size: 1.2rem;
}

.flash-ok {
  background: var(--success-light);
  color: #166534;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.flash-ok::before {
  content: "✓";
}

.flash-error {
  background: var(--danger-light);
  color: #991b1b;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.flash-error::before {
  content: "✕";
}

/* ==================== LOGIN SPECIFIC ==================== */

.hero-card h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin: 16px 0 20px;
  background: linear-gradient(135deg, #414140 0%, #585c5c 50%, #414140 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.demo-users {
  display: grid;
  gap: 12px;
  margin-top: 32px;
}

.demo-users div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.demo-users div:hover {
  border-color: var(--line-strong);
  transform: translateX(4px);
}

.demo-users div strong {
  color: var(--primary-dark);
  font-weight: 700;
}

.login-panel {
  padding: 40px;
}

.login-panel h2 {
  margin-bottom: 24px;
  font-size: 1.75rem;
}

.login-panel__logo {
  height: 56px;
  margin-bottom: 20px;
}

/* ==================== COLLAPSIBLE LIST (COMPANY VIEW) ==================== */

.request-list details {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.request-list details:hover {
  border-color: rgba(65, 64, 64, 0.25);
  box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.1);
}

.request-list details[open] {
  box-shadow: var(--shadow-md);
}

.request-list details[open] summary svg {
  transform: rotate(180deg);
}

.request-list summary::-webkit-details-marker {
  display: none;
}

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

.notification-bell {
  position: relative;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background var(--transition-fast);
}

.notification-bell:hover {
  background: rgba(65, 64, 64, 0.08);
}

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

@media (min-width: 1440px) {
  .app-shell {
    width: min(1800px, calc(100% - 64px));
  }
  
  .metrics-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
  
  .kanban-board {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  }
}

@media (max-width: 1200px) {
  .dashboard-split--supervisor-top,
  .dashboard-split--superadmin-config,
  .dashboard-split--coverage,
  .dashboard-split--admin-alerts,
  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .three-col {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .kanban-board {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  
  .tabs-bar {
    width: 100%;
    flex-wrap: wrap;
  }
  
  .tab-btn {
    flex: 1;
    min-width: 120px;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: calc(100% - 24px);
    padding: 16px 0 32px;
  }
  
  .login-shell {
    grid-template-columns: 1fr;
    width: calc(100% - 24px);
  }
  
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  
  .three-col {
    grid-template-columns: 1fr;
  }
  
  .metrics-grid,
  .metrics-grid--wide {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .kanban-board {
    grid-template-columns: 1fr;
  }
  
  .compact-card--inline {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .inline-form {
    grid-template-columns: 1fr;
  }
  
  .tabs-bar {
    flex-direction: column;
  }
  
  .tab-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .metrics-grid,
  .metrics-grid--wide {
    grid-template-columns: 1fr;
  }
}

/* ==================== UTILITIES ==================== */

.legend-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 16px;
  background: var(--bg-accent);
  border-radius: var(--radius);
}

.notes-box {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.notes-box summary {
  cursor: pointer;
  font-weight: 700;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: var(--bg-accent);
  border-radius: var(--radius);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notes-box summary::after {
  content: "▼";
  font-size: 0.8rem;
  transition: transform var(--transition-fast);
}

.notes-box[open] summary::after {
  transform: rotate(180deg);
}

.note-list {
  display: grid;
  gap: 12px;
}

.note-item {
  padding: 16px;
  background: var(--bg-accent);
  border-radius: var(--radius);
  border-left: 3px solid #414140;
}

.note-item strong {
  font-size: 0.85rem;
  color: #414140;
}

.note-item small {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--muted);
}

.note-item p {
  margin-top: 8px;
  margin-bottom: 0;
  color: var(--text-secondary);
}

.panel-copy {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-style: italic;
}

.sales-detail-form {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

/* Animaciones adicionales */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.metric-card--warn .metric-value,
.metric-card--danger .metric-value {
  animation: pulse 2s infinite;
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-accent);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: #585c5c;
}

/* ==================== ENTERPRISE STYLES ==================== */

/* Three Column Layout */
.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 1100px) {
  .three-col {
    grid-template-columns: 1fr;
  }
}

/* Ranking Lists */
.ranking-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ranking-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-accent);
  border-radius: var(--radius);
  transition: all var(--transition-fast);
}

.ranking-item:hover {
  background: var(--panel);
  transform: translateX(4px);
}

.ranking-position {
  font-size: 1.5rem;
  font-weight: 800;
  color: #414140;
  width: 40px;
  text-align: center;
}

/* Alerts List */
.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alert-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius);
  border-left: 4px solid;
}

.alert-item--warning {
  background: var(--warning-light);
  border-left-color: var(--warning);
}

.alert-item--danger {
  background: var(--danger-light);
  border-left-color: var(--danger);
}

.alert-item--info {
  background: var(--info-light);
  border-left-color: var(--info);
}

.alert-icon {
  font-size: 1.5rem;
}

.alert-content {
  flex: 1;
}

.alert-content p {
  margin: 0 0 8px 0;
}

/* Detail Sections */
.detail-section {
  padding: 16px;
  background: var(--bg-accent);
  border-radius: var(--radius);
}

.detail-section h4 {
  margin: 0 0 12px 0;
  color: #414140;
}

/* Loading States */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--muted);
}

.loading::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--line);
  border-top-color: #414140;
  border-radius: 50%;
  margin-left: 8px;
  animation: spin 1s linear infinite;
}

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

/* ==================== ANIMACIONES PREMIUM ==================== */

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes subtlePulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(65, 64, 64, 0.25);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(65, 64, 64, 0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}


/* Empty States */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.empty-state h3 {
  margin: 0 0 8px 0;
  color: var(--text);
}

/* Workload Legend */
.workload-legend {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

/* Button Sizes */
.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* Priority Badges */
.priority-high { color: var(--danger); font-weight: 700; }
.priority-normal { color: var(--warning); }
.priority-low { color: var(--success); }

/* Panel Variants */
.panel-card--alert {
  border-left: 4px solid var(--danger);
}

.panel-card--compact {
  padding: 20px;
}

.panel-card--kanban {
  padding: 0;
  overflow: hidden;
}

.panel-card--filters {
  padding: 24px;
}

.panel-card--wide {
  grid-column: 1 / -1;
}

.panel-card--stretch {
  height: 100%;
}

/* ==================== KPI CARDS ==================== */

.kpi-hero {
  margin-bottom: 32px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.kpi-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--panel);
  border-radius: var(--radius-lg);
  border-left: 4px solid #414140;
  box-shadow: var(--shadow);
}

.kpi-card--info { border-left-color: var(--info); }
.kpi-card--warning { border-left-color: var(--warning); }
.kpi-card--success { border-left-color: var(--success); }
.kpi-card--primary { border-left-color: var(--primary); }

.kpi-icon { font-size: 2rem; }
.kpi-value { font-size: 1.75rem; font-weight: 800; }
.kpi-label { font-size: 0.85rem; color: var(--muted); }

/* ==================== KPI TOOLTIPS ==================== */
/* Global fixed tooltip — escapes all stacking contexts */
#kpi-tooltip {
  position: fixed;
  z-index: 99999;
  width: max-content;
  max-width: 280px;
  padding: 14px 18px;
  background: var(--panel);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.55;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  transform: translateX(-50%) translateY(4px);
  text-align: center;
  font-family: 'Inter', sans-serif;
}

#kpi-tooltip.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#kpi-tooltip::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 7px;
  border-style: solid;
  border-color: transparent transparent var(--line) transparent;
}

/* ==================== SALES DASHBOARD ==================== */

.dashboard-split--sales {
  grid-template-columns: 380px 1fr;
}

@media (max-width: 1100px) {
  .dashboard-split--sales {
    grid-template-columns: 1fr;
  }
}

.sales-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.kanban-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.search-box input {
  width: 250px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.priority-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.priority-item {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: var(--bg-accent);
  border-radius: var(--radius);
  border-left: 3px solid #414140;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.priority-item:hover {
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.priority-rank {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  width: 36px;
}

.priority-info { flex: 1; }

.priority-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--success);
}

/* Goal Tracker */
.goal-tracker { padding: 8px 0; }

.goal-bar {
  height: 12px;
  background: var(--line);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 12px;
}

.goal-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

.goal-text {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  margin-bottom: 8px;
}

.goal-hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

/* ==================== SUPERVISOR DASHBOARD ==================== */

.sales-ranking {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sales-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-accent);
  border-radius: var(--radius);
  border-left: 3px solid transparent;
  transition: all var(--transition-fast);
}

.sales-item:hover {
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.sales-item--alert {
  border-left-color: var(--danger);
  background: var(--danger-light);
}

.sales-rank {
  font-size: 1.5rem;
  font-weight: 800;
  color: #585c5c;
  width: 40px;
}

.sales-info { flex: 1; }

.sales-metrics {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.sales-actions {
  display: flex;
  gap: 8px;
}

.chip--success { background: var(--success-light); color: var(--success); }
.chip--warning { background: var(--warning-light); color: var(--warning); }
.chip--danger { background: var(--danger-light); color: var(--danger); }

/* Unassigned List */
.unassigned-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.unassigned-item {
  display: grid;
  grid-template-columns: 100px 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.unassigned-item--urgent {
  border-color: var(--danger);
  background: var(--danger-light);
}

.unassigned-info { flex: 1; }
.unassigned-info strong { display: block; margin-bottom: 4px; }
.unassigned-info p { margin: 0; font-size: 0.9rem; }
.unassigned-info small { color: var(--muted); }

.unassigned-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.unassigned-priority {
  font-weight: 700;
  text-align: center;
}

.assign-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.assign-select {
  min-width: 200px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.assign-select:focus {
  outline: none;
  border-color: #585c5c;
  box-shadow: 0 0 0 3px rgba(88, 92, 92, 0.12);
}

/* ==================== MODAL STYLES ==================== */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active { display: flex; }

.modal-content {
  background: var(--panel);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 700px;
  max-height: 85vh;
  overflow: auto;
}

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

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--bg-accent);
  color: var(--text);
}

.modal-body { padding: 24px; }

.modal-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
}

.modal-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: var(--bg-accent);
  border-radius: var(--radius);
  text-align: center;
}

.modal-metric-value {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.modal-metric-label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==================== FILTERS & SEARCH ==================== */

.filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-group input,
.filter-group select {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.9rem;
  background: var(--panel);
  transition: all var(--transition-fast);
}

.filter-group input:focus,
.filter-group select:focus {
  outline: none;
  border-color: #585c5c;
  box-shadow: 0 0 0 3px rgba(88, 92, 92, 0.12);
}

.filter-input--large {
  grid-column: 1 / -1;
}

.filter-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.active-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-accent);
  border-radius: var(--radius);
  margin-top: 16px;
  font-size: 0.85rem;
  font-weight: 600;
}

.filter-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

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

.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  gap: 16px;
  flex-wrap: wrap;
}

.pagination-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--muted);
}

.items-per-page {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  background: var(--panel);
  cursor: pointer;
}

.pagination-controls {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pagination-btn {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text);
}

.pagination-btn:hover:not(:disabled) {
  background: #414140;
  color: white;
  border-color: #414140;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-pages {
  display: flex;
  gap: 4px;
}

.page-number {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.page-number:hover {
  background: var(--bg-accent);
}

.page-number.is-active {
  background: #414140;
  color: white;
}

/* ==================== CHARTS ==================== */

.chart-container {
  height: 250px;
  position: relative;
}

.chart-container--large {
  height: 350px;
}

/* ==================== TABLE ROWS ==================== */

.request-row {
  background: transparent;
  transition: background 0.2s;
}

.request-row:hover {
  background: rgba(65, 64, 64, 0.03);
}

.row-resolved {
  background: rgba(34, 197, 94, 0.08) !important;
  border-left: 3px solid #22c55e;
}

.row-overdue {
  background: rgba(220, 38, 38, 0.08) !important;
  border-left: 3px solid #dc2626;
}

/* ==================== ALERTS SECTION ==================== */

.alerts-section {
  margin-top: 24px;
}

/* ==================== RESPONSIVE ENHANCEMENTS ==================== */

@media (max-width: 900px) {
  .unassigned-item {
    grid-template-columns: 1fr;
  }
  
  .assign-form {
    flex-direction: column;
  }
  
  .assign-select {
    width: 100%;
  }
  
  .filters-grid {
    grid-template-columns: 1fr;
  }
  
  .pagination-container {
    flex-direction: column;
    align-items: stretch;
  }
  
  .pagination-controls {
    justify-content: center;
  }
  
  .search-box input {
    width: 100%;
  }
  
  .kanban-actions {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .modal-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==================== PRINT STYLES ==================== */

@media print {
  .topbar-actions,
  .kanban-actions,
  .filter-actions,
  .pagination-controls,
  button {
    display: none !important;
  }
  
  .panel-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* ==================== MODAL DETALLE (rd-) ==================== */

.rd-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.rd-hero-copy {
  flex: 1;
  min-width: 0;
}

.rd-hero-copy h2 {
  margin: 0 0 4px;
  font-size: 1.5rem;
}

.rd-hero-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.rd-kicker {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-accent);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.rd-hero-badge {
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
}

.rd-hero-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.rd-layout {
  display: grid;
  gap: 24px;
}

.rd-main {
  display: grid;
  gap: 20px;
}

.rd-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.rd-card {
  background: var(--bg-accent);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.rd-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rd-value {
  display: block;
  font-size: 1rem;
  color: var(--text);
  font-weight: 600;
  line-height: 1.4;
}

.rd-sub {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 2px;
}

.rd-section {
  margin-top: 8px;
}

.rd-section-title {
  font-size: 1.05rem;
  margin: 0 0 12px;
  color: var(--text);
}

.rd-card--full {
  width: 100%;
}
