:root {
  --tf-brand: #1abafe;
  --tf-brand-2: #0ea5e9;
  --tf-bg: #0b1118;
  --tf-panel: #101923;
  --tf-panel-2: #162331;
  --tf-line: rgba(26, 186, 254, 0.18);
  --tf-glow: 0 0 0 1px rgba(26, 186, 254, 0.14), 0 14px 40px rgba(7, 16, 26, 0.34);
}

:root,
:root[data-theme-mode="dark"] {
  --bg: var(--tf-bg);
  --bg-accent: #0f1720;
  --bg-elevated: var(--tf-panel);
  --bg-hover: #182433;
  --bg-muted: #172231;
  --card: var(--tf-panel);
  --panel: #0d141d;
  --panel-strong: var(--tf-panel-2);
  --border: var(--tf-line);
  --border-strong: rgba(26, 186, 254, 0.28);
  --ring: var(--tf-brand);
  --accent: var(--tf-brand);
  --accent-hover: #49c8ff;
  --accent-muted: var(--tf-brand);
  --accent-subtle: rgba(26, 186, 254, 0.14);
  --accent-glow: rgba(26, 186, 254, 0.30);
  --primary: var(--tf-brand);
}

.shell,
.card,
.stat,
.list-item,
.table-row,
.ov-card,
.agent-row,
.config-section-card,
.chat-bubble,
.chat-tool-card,
.login-gate__card {
  box-shadow: var(--tf-glow);
}

.nav-item.active,
.agent-tab.active,
.settings-theme-card--active,
.config-top-tabs__tab.active {
  box-shadow: 0 0 0 1px rgba(26, 186, 254, 0.18);
}

.sidebar-header,
.chat-header,
.config-actions,
.config-top-tabs,
.config-section-card__header,
.qs-card__header {
  background: linear-gradient(180deg, rgba(26, 186, 254, 0.08), rgba(26, 186, 254, 0.03));
}

.login-gate__title::after {
  content: " · Turbofrio";
  color: var(--accent);
}

.chat-header__left::before {
  content: "Turbofrio";
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(26, 186, 254, 0.08);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .chat-header__left::before {
    order: -1;
    width: fit-content;
  }
}

.agents-main {
  gap: 18px;
}

.agent-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.agent-row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 148px;
  padding: 54px 16px 16px;
  border-radius: 20px;
  border: 1px solid rgba(26, 186, 254, 0.14);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.98));
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
  overflow: hidden;
}

.agent-row::before {
  content: "Zona";
  position: absolute;
  left: 16px;
  top: 14px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agent-row::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 40px;
  height: 1px;
  background: rgba(16, 24, 40, 0.08);
}

.agent-row.active {
  border-color: rgba(26, 186, 254, 0.30);
  box-shadow: 0 0 0 1px rgba(26, 186, 254, 0.14), 0 16px 36px rgba(26, 186, 254, 0.12);
}

.agent-row .agent-title,
.agent-row .agent-select-card__name {
  font-weight: 700;
  color: #101828;
}

.agent-row .agent-sub {
  font-size: 11px;
  color: #475467;
}

.agent-row .agent-pill {
  background: #ffffff;
  color: #344054;
  border-color: rgba(16, 24, 40, 0.10);
}

.agent-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.7);
}

.agent-row:nth-child(1) {
  grid-column: 1 / -1;
}

.agent-row:nth-child(1)::before {
  content: "Gerencia";
  color: #0ea5e9;
}

.agent-row:nth-child(2)::before {
  content: "Taller / Producción";
  color: #b45309;
}

.agent-row:nth-child(3)::before {
  content: "Logística y Compras";
  color: #4338ca;
}

.agent-row:nth-child(4)::before {
  content: "Atención y Ventas";
  color: #047857;
}

.agent-row:nth-child(5)::before {
  content: "Administración y Marketing";
  color: #be185d;
}

.agent-row:nth-child(1) {
  background: linear-gradient(180deg, rgba(240, 249, 255, 0.98), rgba(248,250,252,0.98));
}

.agent-row:nth-child(2) {
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.98), rgba(248,250,252,0.98));
}

.agent-row:nth-child(3) {
  background: linear-gradient(180deg, rgba(245, 243, 255, 0.98), rgba(248,250,252,0.98));
}

.agent-row:nth-child(4) {
  background: linear-gradient(180deg, rgba(236, 253, 243, 0.98), rgba(248,250,252,0.98));
}

.agent-row:nth-child(5) {
  background: linear-gradient(180deg, rgba(253, 242, 248, 0.98), rgba(248,250,252,0.98));
}

@media (max-width: 980px) {
  .agent-list {
    grid-template-columns: 1fr;
  }

  .agent-row:nth-child(1) {
    grid-column: auto;
  }
}

