:root {
  --bg: #f5f7fa;
  --bg-soft: #f8fafc;
  --bg-muted: #eef2f7;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-strong: #ffffff;
  --surface-soft: #f8fafc;
  --surface-accent: #fff8ef;
  --text: #111827;
  --text-soft: #475569;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --primary-soft: rgba(37, 99, 235, 0.12);
  --accent: #d88416;
  --accent-strong: #b8650b;
  --accent-soft: rgba(216, 132, 22, 0.12);
  --line: #dbe3ee;
  --line-strong: #c4d0df;
  --success: #15803d;
  --success-soft: rgba(21, 128, 61, 0.12);
  --warning: #b45309;
  --warning-soft: rgba(217, 119, 6, 0.12);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.11);
  --neutral-soft: #eef2f7;
  --shadow-xs: 0 8px 20px rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 18px 42px rgba(15, 23, 42, 0.08);
  --shadow-md: 0 26px 70px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 38px 110px rgba(15, 23, 42, 0.14);
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
}

body.theme-oscuro {
  --bg: #0f172a;
  --bg-soft: #111827;
  --bg-muted: #162033;
  --surface: rgba(17, 24, 39, 0.94);
  --surface-strong: rgba(21, 31, 50, 0.98);
  --surface-soft: rgba(21, 31, 50, 0.9);
  --surface-accent: rgba(35, 26, 17, 0.9);
  --text: #e5edf8;
  --text-soft: #c0cede;
  --text-muted: #94a3b8;
  --primary: #60a5fa;
  --primary-strong: #3b82f6;
  --primary-soft: rgba(96, 165, 250, 0.18);
  --accent: #f1a33b;
  --accent-strong: #f59e0b;
  --accent-soft: rgba(241, 163, 59, 0.16);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(148, 163, 184, 0.28);
  --success: #4ade80;
  --success-soft: rgba(74, 222, 128, 0.16);
  --warning: #fbbf24;
  --warning-soft: rgba(251, 191, 36, 0.16);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.16);
  --neutral-soft: rgba(148, 163, 184, 0.12);
  --shadow-xs: 0 10px 24px rgba(2, 6, 23, 0.24);
  --shadow-sm: 0 20px 46px rgba(2, 6, 23, 0.3);
  --shadow-md: 0 32px 90px rgba(2, 6, 23, 0.36);
  --shadow-lg: 0 44px 130px rgba(2, 6, 23, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 15px;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(216, 132, 22, 0.14), transparent 24rem),
    radial-gradient(circle at 88% 0%, rgba(37, 99, 235, 0.1), transparent 26rem),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
}

body.theme-oscuro {
  background:
    radial-gradient(circle at top left, rgba(241, 163, 59, 0.14), transparent 22rem),
    radial-gradient(circle at 88% 0%, rgba(59, 130, 246, 0.12), transparent 24rem),
    linear-gradient(180deg, #08111f 0%, #0f172a 100%);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

button,
input,
select,
textarea {
  font: inherit;
}

.password-input-wrap {
  position: relative;
  display: block;
}

.password-input-wrap input {
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  min-width: 20px;
  min-height: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text-soft);
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.password-toggle svg {
  width: 16px;
  height: 16px;
  display: block;
  margin: 0 auto;
  fill: currentColor;
}

.password-toggle:hover {
  transform: translateY(-50%);
  color: var(--text);
  background: transparent;
}

.password-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(15, 97, 116, 0.14);
  transform: translateY(-50%);
}

.page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 30px;
}

.page-shell-auth {
  width: min(760px, calc(100% - 24px));
}

.site-header,
.main-nav,
.status-card,
.flash-stack,
.content-card,
.form-card,
.access-tile,
.table-panel,
.copy-panel,
.empty-share-card,
.provider-card,
.filter-card,
.catalog-filters {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.site-header {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 252, 0.96)),
    var(--surface);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
}

.brand-block {
  min-width: 0;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-logo {
  width: clamp(118px, 13vw, 158px);
  height: auto;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 8px 14px rgba(15, 23, 42, 0.07));
}

.brand-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.brand-copy h1 {
  margin: 0;
  font-size: clamp(1.6rem, 1.9vw, 2.18rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  color: var(--text);
}

.eyebrow,
.section-label,
.status-kicker,
.field-kicker {
  margin: 0;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.72rem;
  font-weight: 800;
}

.subtitle,
.muted,
.helper-text,
.muted-inline,
.status-detail {
  color: var(--text-soft);
}

.subtitle {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.45;
}

.brand-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  margin-top: 4px;
}

.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-muted);
  border: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.header-action {
  flex-shrink: 0;
}

.header-action-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.theme-form {
  margin: 0;
}

.theme-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.theme-label span {
  white-space: nowrap;
}

.theme-label select {
  min-height: 36px;
  min-width: 112px;
  padding: 6px 30px 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
  box-shadow: none;
}

.main-nav {
  margin-top: 14px;
  padding: 8px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.96)),
    var(--surface);
}

.main-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 16px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-soft);
  min-height: 42px;
}

.main-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-xs);
}

.main-nav a.is-active {
  color: var(--primary-strong);
  background: rgba(37, 99, 235, 0.08);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.status-card {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-5);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(255, 255, 255, 0.96)),
    var(--surface);
}

.status-main {
  display: grid;
  gap: 4px;
}

.status-card strong {
  display: block;
  margin-top: 0;
  font-size: 1rem;
  letter-spacing: -0.015em;
}

.status-detail {
  max-width: 540px;
  text-align: right;
  font-size: 0.92rem;
  line-height: 1.45;
}

.flash-stack {
  margin-top: 14px;
  padding: 12px;
  border-radius: 20px;
  display: grid;
  gap: 10px;
}

.flash {
  border-radius: 16px;
  padding: 13px 14px;
  border: 1px solid transparent;
  font-weight: 700;
  line-height: 1.45;
}

.flash-error {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.14);
}

.flash-success {
  background: var(--success-soft);
  color: var(--success);
  border-color: rgba(21, 128, 61, 0.14);
}

.flash-info {
  background: var(--primary-soft);
  color: var(--primary-strong);
  border-color: rgba(37, 99, 235, 0.14);
}

.content-card {
  margin-top: 14px;
  border-radius: 30px;
  padding: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98)),
    var(--surface);
}

.content-card-auth {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  padding: 20px 22px 22px;
}

.site-footer {
  margin-top: 14px;
  padding: 0 6px 4px;
  position: relative;
}

.site-footer p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.74rem;
  text-align: center;
}

.site-footer-version {
  position: absolute;
  right: 6px;
  bottom: 4px;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 20px;
}

.section-head h2,
.auth-intro h2,
.content-card h3 {
  margin: 0;
  letter-spacing: -0.03em;
  color: var(--text);
}

.section-head h2 {
  font-size: clamp(1.45rem, 2vw, 1.92rem);
  line-height: 1.08;
}

.section-head p,
.auth-intro p,
.content-card h3 {
  margin-top: 0;
}

.section-head-narrow,
.dashboard-head {
  margin-bottom: 18px;
}

.section-tools,
.report-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 20px;
}

.schedule-grid {
  align-items: stretch;
}

.auth-shell {
  min-height: 0;
  display: grid;
  place-items: center;
  gap: 16px;
  padding: 2px 0 0;
}

.auth-intro {
  max-width: 440px;
}

.auth-intro-centered {
  max-width: 440px;
  text-align: center;
}

.auth-logo {
  width: 176px;
  height: auto;
  display: block;
  margin: 0 auto 14px;
  filter: drop-shadow(0 12px 24px rgba(15, 23, 42, 0.08));
}

.auth-intro h2 {
  font-size: clamp(1.7rem, 2vw, 2.2rem);
  line-height: 1.06;
}

.auth-intro .muted {
  max-width: 480px;
  margin: 8px auto 0;
  font-size: 1rem;
  line-height: 1.5;
}

.auth-stack {
  display: grid;
  gap: 16px;
}

.auth-stack-centered {
  width: min(100%, 400px);
  justify-items: stretch;
}

.auth-inline-link {
  justify-self: center;
  margin-top: -4px;
}

.auth-card,
.centered-card {
  max-width: 460px;
  width: 100%;
  margin: 0 auto;
}

.form-card,
.programacion-bulk-form,
.programacion-rows {
  display: grid;
  gap: 16px;
}

.form-card {
  border-radius: 24px;
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.98)),
    var(--surface);
}

.compact-card {
  padding: 20px;
}

.access-tile {
  border-radius: 22px;
  padding: 20px 22px;
  background:
    linear-gradient(180deg, rgba(255, 249, 241, 0.98), rgba(255, 255, 255, 0.96)),
    var(--surface);
}

.access-tile form {
  margin-top: 10px;
}

.stacked-info,
.notice-inline {
  display: grid;
  gap: 8px;
}

.copy-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.copy-inline-input {
  min-width: 0;
  flex: 1 1 140px;
  min-height: 40px;
  padding: 10px 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.copy-code-button {
  min-height: 40px;
}

.access-tile-muted {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.96)),
    var(--surface);
}

.access-tile h3,
.spotlight-card h3 {
  margin: 0 0 8px;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.spotlight-card {
  background:
    linear-gradient(180deg, rgba(245, 248, 255, 0.98), rgba(255, 255, 255, 0.96)),
    var(--surface);
}

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

.programacion-row {
  margin: 0;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 255, 0.96)),
    var(--surface);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.template-loader-inline {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  padding: 0 0 6px;
}

.template-loader-select {
  max-width: 520px;
}

.template-loader-actions {
  justify-content: space-between;
}

.programacion-row legend {
  padding: 0 10px;
  font-weight: 800;
  color: var(--accent-strong);
  letter-spacing: 0.06em;
}

.programacion-row [hidden] {
  display: none !important;
}

.programacion-row.is-suelos .frente-field {
  order: 1;
}

.programacion-row.is-suelos .ubicacion-field {
  order: 2;
}

.programacion-row.is-suelos .hora-field {
  order: 3;
}

.programacion-row.is-suelos .remove-row {
  order: 4;
}

label {
  display: grid;
  gap: 7px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 12px 14px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--text);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease, transform 160ms ease;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(37, 99, 235, 0.42);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
  background: #ffffff;
}

textarea {
  min-height: 98px;
  resize: vertical;
  line-height: 1.48;
}

button,
.primary-link,
.ghost-button,
.ghost-link,
.action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 14px;
  font-weight: 800;
  line-height: 1;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease, opacity 160ms ease;
}

button,
.primary-link {
  border: 1px solid transparent;
  background: linear-gradient(180deg, var(--primary), var(--primary-strong));
  color: #f8fbff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
}

button:hover,
.primary-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.24);
}

button:focus-visible,
.primary-link:focus-visible,
.ghost-button:focus-visible,
.ghost-link:focus-visible,
.action-link:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16);
}

button:disabled,
.ghost-button:disabled,
.secondary-button:disabled {
  opacity: 0.56;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.ghost-button,
.ghost-link,
.secondary-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  box-shadow: none;
}

.ghost-button:hover,
.ghost-link:hover,
.secondary-button:hover {
  background: var(--surface-soft);
  border-color: var(--line-strong);
  color: var(--primary-strong);
}

.table-panel {
  border-radius: 26px;
  padding: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.98)),
    var(--surface);
}

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

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  text-align: left;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(219, 227, 238, 0.9);
  vertical-align: middle;
}

th {
  background: #f8fbff;
  color: var(--text-muted);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
  position: sticky;
  top: 0;
  z-index: 1;
}

tbody tr {
  background: rgba(255, 255, 255, 0.98);
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

tbody tr:hover {
  background: #f9fbff;
}

.group-row td {
  padding: 12px 14px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.08), rgba(248, 250, 252, 0.96));
  color: var(--primary-strong);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  border-top: 1px solid var(--line);
}

.actions-cell {
  white-space: nowrap;
}

.empty-state {
  text-align: center;
  padding: 30px 16px;
  color: var(--text-soft);
}

.type-pill,
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.type-hormigon {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.type-suelos {
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
}

.type-asfalto {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.type-neutral {
  background: var(--neutral-soft);
  color: var(--text-soft);
}

.status-active,
.status-vigente {
  background: var(--success-soft);
  color: var(--success);
}

.status-cancelled,
.status-obsoleto {
  background: var(--danger-soft);
  color: var(--danger);
}

.schedule-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary-strong);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.summary-card {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.summary-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary-strong);
  font-size: 0.8rem;
  font-weight: 800;
}

.muted-pill {
  background: var(--neutral-soft);
  color: var(--text-soft);
}

.catalog-grid {
  display: grid;
  gap: 20px;
}

.catalog-provider-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.catalog-provider-tab {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text-soft);
  font-weight: 800;
  box-shadow: var(--shadow-xs);
}

.catalog-provider-tab:hover {
  background: rgba(255, 255, 255, 0.98);
  color: var(--text);
  border-color: var(--line-strong);
}

.catalog-provider-tab.is-active {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary-strong);
  border-color: rgba(37, 99, 235, 0.18);
}

.provider-card {
  padding: 20px;
}

.catalog-provider-panel.is-hidden {
  display: none;
}

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

.provider-card-head h3 {
  margin-bottom: 6px;
}

.provider-status-pill {
  font-weight: 800;
}

.provider-status-vigente {
  background: var(--success-soft);
  color: var(--success);
}

.provider-status-obsoleto {
  background: var(--danger-soft);
  color: var(--danger);
}

.catalog-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.98)),
    var(--surface);
}

.filter-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.filter-field span {
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.catalog-clear-button {
  align-self: end;
}

.catalog-table td {
  vertical-align: top;
}

.catalog-empty-state {
  margin: 14px 0 0;
  padding: 16px;
  border-radius: 16px;
  border: 1px dashed var(--line-strong);
  background: var(--surface-soft);
}

.catalog-row[hidden] {
  display: none;
}

.filter-card {
  padding: 8px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
}

.filter-label {
  gap: 6px;
  font-size: 0.84rem;
  color: var(--text-soft);
}

.filter-card select {
  min-height: 38px;
  padding-top: 8px;
  padding-bottom: 8px;
}

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

.full-span {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

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

.inline-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-filter-form {
  display: flex;
  align-items: center;
}

.link-button,
.action-link {
  min-height: auto;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  color: var(--primary);
  font-size: 0.9rem;
}

.link-button {
  color: var(--danger);
}

.link-button:hover,
.action-link:hover {
  transform: none;
  text-decoration: underline;
  box-shadow: none;
}

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

.responsive-table td a {
  font-weight: 700;
}

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

.whatsapp-card {
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-sm);
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98)),
    #0f172a;
  color: #eff6ff;
}

.whatsapp-card-cancelled {
  opacity: 0.72;
}

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

.whatsapp-card-head h3 {
  margin: 8px 0 0;
  color: #ffffff;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.whatsapp-date {
  margin: 0 0 12px;
  color: #cbd5e1;
  font-size: 0.9rem;
  font-weight: 700;
}

.whatsapp-card-body {
  display: grid;
  gap: 6px;
}

.whatsapp-card-body p {
  margin: 0;
  line-height: 1.5;
}

.copy-panel,
.empty-share-card {
  margin-top: 20px;
  padding: 22px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98)),
    var(--surface);
}

.copy-panel h3,
.empty-share-card h3 {
  margin: 0 0 8px;
}

.copy-textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  margin-top: 10px;
  line-height: 1.55;
  font-family: inherit;
}

body.theme-oscuro .site-header,
body.theme-oscuro .main-nav,
body.theme-oscuro .status-card,
body.theme-oscuro .flash-stack,
body.theme-oscuro .content-card,
body.theme-oscuro .form-card,
body.theme-oscuro .access-tile,
body.theme-oscuro .table-panel,
body.theme-oscuro .programacion-row,
body.theme-oscuro .table-wrap,
body.theme-oscuro .catalog-filters,
body.theme-oscuro .filter-card,
body.theme-oscuro .copy-panel,
body.theme-oscuro .empty-share-card,
body.theme-oscuro .provider-card {
  border-color: var(--line);
}

body.theme-oscuro .site-header,
body.theme-oscuro .content-card,
body.theme-oscuro .form-card,
body.theme-oscuro .table-panel,
body.theme-oscuro .copy-panel,
body.theme-oscuro .empty-share-card,
body.theme-oscuro .access-tile,
body.theme-oscuro .provider-card {
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.98), rgba(15, 23, 42, 0.98)),
    var(--surface);
}

body.theme-oscuro .access-tile-muted {
  background:
    linear-gradient(180deg, rgba(21, 31, 50, 0.98), rgba(15, 23, 42, 0.98)),
    var(--surface);
}

body.theme-oscuro .main-nav {
  background:
    linear-gradient(180deg, rgba(17, 24, 39, 0.96), rgba(15, 23, 42, 0.98)),
    var(--surface);
}

body.theme-oscuro .main-nav a:hover,
body.theme-oscuro .catalog-provider-tab:hover {
  background: rgba(255, 255, 255, 0.04);
}

body.theme-oscuro .main-nav a.is-active,
body.theme-oscuro .catalog-provider-tab.is-active {
  background: rgba(96, 165, 250, 0.12);
  color: var(--primary);
  border-color: rgba(96, 165, 250, 0.18);
}

body.theme-oscuro .status-card {
  background:
    linear-gradient(135deg, rgba(96, 165, 250, 0.09), rgba(17, 24, 39, 0.98)),
    var(--surface);
}

body.theme-oscuro .theme-label,
body.theme-oscuro .filter-card,
body.theme-oscuro .catalog-provider-tab,
body.theme-oscuro .catalog-filters,
body.theme-oscuro .meta-chip,
body.theme-oscuro .table-wrap {
  background: rgba(15, 23, 42, 0.72);
}

body.theme-oscuro .ghost-button,
body.theme-oscuro .ghost-link,
body.theme-oscuro .secondary-button {
  background: rgba(15, 23, 42, 0.84);
  color: var(--text);
  border-color: var(--line);
}

body.theme-oscuro .ghost-button:hover,
body.theme-oscuro .ghost-link:hover,
body.theme-oscuro .secondary-button:hover {
  background: rgba(30, 41, 59, 0.9);
}

body.theme-oscuro .theme-label select,
body.theme-oscuro input,
body.theme-oscuro select,
body.theme-oscuro textarea {
  background-color: rgba(15, 23, 42, 0.88);
  color: var(--text);
  border-color: var(--line);
}

body.theme-oscuro .theme-label select:focus,
body.theme-oscuro input:focus,
body.theme-oscuro select:focus,
body.theme-oscuro textarea:focus {
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.16);
}

body.theme-oscuro th {
  background: rgba(21, 31, 50, 0.98);
  color: #c5d1e0;
}

body.theme-oscuro table tbody tr {
  background: rgba(15, 23, 42, 0.74);
}

body.theme-oscuro table tbody tr:hover {
  background: rgba(21, 31, 50, 0.92);
}

body.theme-oscuro .group-row td {
  background: linear-gradient(90deg, rgba(96, 165, 250, 0.12), rgba(15, 23, 42, 0.94));
  color: #bfdbfe;
}

body.theme-oscuro .summary-pill {
  background: rgba(96, 165, 250, 0.12);
  color: #bfdbfe;
}

body.theme-oscuro .muted-pill {
  background: rgba(255, 255, 255, 0.06);
}

body.theme-oscuro .schedule-pill {
  background: rgba(96, 165, 250, 0.12);
  color: #bfdbfe;
}

body.theme-oscuro .flash-info {
  background: rgba(96, 165, 250, 0.16);
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.2);
}

body.theme-oscuro .flash-success {
  background: var(--success-soft);
  color: #bbf7d0;
}

body.theme-oscuro .flash-error {
  background: var(--danger-soft);
  color: #fecaca;
}

body.theme-oscuro .responsive-table tr {
  background: rgba(15, 23, 42, 0.9);
}

@media (min-width: 761px) and (max-width: 980px) {
  .page-shell,
  .page-shell-auth {
    width: min(100%, calc(100% - 20px));
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-action,
  .header-action-group,
  .header-action form,
  .theme-form,
  .header-action .secondary-button,
  .header-action button {
    width: 100%;
  }

  .header-action-group {
    justify-content: stretch;
  }

  .theme-label {
    width: 100%;
    justify-content: space-between;
  }

  .section-head,
  .split-grid,
  .provider-card-head {
    grid-template-columns: 1fr;
  }

  .provider-card-head {
    display: grid;
  }

  .section-tools {
    justify-content: flex-start;
  }

  .status-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .status-detail {
    max-width: none;
    text-align: left;
  }

  .whatsapp-card-head {
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  html {
    font-size: 14px;
  }

  .page-shell {
    padding-top: 12px;
    padding-bottom: 18px;
  }

  .site-header,
  .content-card,
  .content-card-auth,
  .status-card,
  .provider-card,
  .copy-panel,
  .empty-share-card {
    padding: 16px;
  }

  .brand-lockup {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-logo {
    width: 136px;
  }

  .main-nav,
  .catalog-provider-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .main-nav a,
  .catalog-provider-tab {
    white-space: nowrap;
  }

  .programacion-row,
  .catalog-filters {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    border: none;
    overflow: visible;
    background: transparent;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
    width: 100%;
  }

  .responsive-table tbody {
    display: grid;
    gap: 12px;
  }

  .responsive-table tr {
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: var(--surface-strong);
    box-shadow: var(--shadow-xs);
  }

  .responsive-table tr.group-row {
    border-radius: 14px;
    overflow: visible;
    box-shadow: none;
  }

  .responsive-table td {
    border-bottom: 1px solid rgba(219, 227, 238, 0.85);
    padding: 11px 12px;
  }

  .responsive-table td:last-child {
    border-bottom: none;
  }

  .responsive-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 5px;
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
  }

  .group-row td::before {
    display: none !important;
  }

  .group-row td {
    border-bottom: none;
  }

  .actions-cell,
  .inline-actions,
  .inline-form {
    white-space: normal;
  }

  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .form-actions > * {
    width: 100%;
  }
}

/* Dashboard industrial refresh */

:root {
  --bg: #f2f4f7;
  --bg-soft: #edf1f4;
  --bg-muted: #e6ebf0;
  --surface: rgba(255, 255, 255, 0.97);
  --surface-strong: #ffffff;
  --surface-soft: #f7f9fb;
  --surface-accent: #fdf7ee;
  --text: #11202c;
  --text-soft: #4d6476;
  --text-muted: #70879a;
  --primary: #0f5f73;
  --primary-strong: #0a4351;
  --primary-soft: rgba(15, 95, 115, 0.12);
  --accent: #d38d33;
  --accent-strong: #aa6820;
  --accent-soft: rgba(211, 141, 51, 0.14);
  --line: #d7e0e7;
  --line-strong: #c1ced8;
  --shadow-xs: 0 10px 24px rgba(17, 32, 44, 0.05);
  --shadow-sm: 0 18px 42px rgba(17, 32, 44, 0.08);
  --shadow-md: 0 28px 78px rgba(17, 32, 44, 0.12);
  --shadow-lg: 0 42px 120px rgba(17, 32, 44, 0.14);
}

body.theme-oscuro {
  --bg: #0d1720;
  --bg-soft: #0f1c26;
  --bg-muted: #162534;
  --surface: rgba(18, 30, 41, 0.96);
  --surface-strong: #132432;
  --surface-soft: #182b3a;
  --surface-accent: #2a2017;
  --text: #e6eef6;
  --text-soft: #b5c5d3;
  --text-muted: #89a0b2;
  --primary: #5fb5c9;
  --primary-strong: #8fd3e1;
  --primary-soft: rgba(95, 181, 201, 0.16);
  --accent: #f0ad4e;
  --accent-strong: #ffd18c;
  --accent-soft: rgba(240, 173, 78, 0.18);
  --line: rgba(156, 177, 193, 0.17);
  --line-strong: rgba(156, 177, 193, 0.3);
  --shadow-xs: 0 10px 24px rgba(2, 10, 16, 0.25);
  --shadow-sm: 0 22px 54px rgba(2, 10, 16, 0.34);
  --shadow-md: 0 34px 96px rgba(2, 10, 16, 0.4);
  --shadow-lg: 0 44px 130px rgba(2, 10, 16, 0.48);
}

html {
  font-size: 15px;
}

body {
  font-family: "Aptos", "Segoe UI Variable", "Segoe UI", "Trebuchet MS", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 8%, rgba(15, 95, 115, 0.08), transparent 18rem),
    radial-gradient(circle at 92% 5%, rgba(211, 141, 51, 0.12), transparent 17rem),
    linear-gradient(180deg, #eef2f5 0%, #f6f8fa 34%, #eef2f5 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(17, 32, 44, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 32, 44, 0.028) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.38), transparent 85%);
}

body.theme-oscuro {
  background:
    radial-gradient(circle at 10% 8%, rgba(95, 181, 201, 0.1), transparent 18rem),
    radial-gradient(circle at 90% 6%, rgba(240, 173, 78, 0.12), transparent 16rem),
    linear-gradient(180deg, #09131a 0%, #0d1720 100%);
}

body.theme-oscuro::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
}

.page-shell {
  width: min(1360px, calc(100% - 36px));
  padding-top: 26px;
  padding-bottom: 36px;
}

.page-shell-auth {
  width: min(820px, calc(100% - 28px));
}

.site-header,
.main-nav,
.status-card,
.flash-stack,
.content-card,
.form-card,
.access-tile,
.table-panel,
.copy-panel,
.empty-share-card,
.provider-card,
.catalog-filters,
.filter-card {
  backdrop-filter: none;
}

.site-header {
  padding: 26px 28px;
  border-radius: 30px;
  border: 1px solid rgba(9, 67, 81, 0.22);
  box-shadow: var(--shadow-md);
  background:
    linear-gradient(135deg, rgba(10, 67, 81, 0.98), rgba(15, 95, 115, 0.94) 58%, rgba(212, 143, 52, 0.88) 140%);
}

.site-header::before {
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.1));
}

.eyebrow,
.section-label,
.status-kicker,
.field-kicker {
  color: rgba(255, 244, 224, 0.84);
  letter-spacing: 0.2em;
}

.brand-copy h1,
.section-head h2,
.auth-intro h2,
.content-card h3,
.access-tile h3,
.spotlight-card h3 {
  font-family: "Aptos Display", "Segoe UI Variable Display", "Aptos", "Segoe UI", sans-serif;
}

.brand-copy h1 {
  color: #f8fbfd;
  font-size: clamp(1.9rem, 2.4vw, 2.6rem);
  line-height: 1;
}

.subtitle {
  color: rgba(232, 242, 247, 0.8);
  font-size: 1rem;
}

.brand-logo {
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.18));
}

.meta-chip {
  min-height: 34px;
  padding: 7px 13px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #eef7fb;
}

.theme-label,
.ghost-button,
.ghost-link,
.secondary-button {
  border-color: rgba(255, 255, 255, 0.12);
}

.theme-label {
  background: rgba(255, 255, 255, 0.08);
  color: #eef7fb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.theme-label select {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f8fbfd;
}

.header-action .secondary-button {
  color: #f8fbfd;
  background: rgba(255, 255, 255, 0.08);
}

.main-nav {
  margin-top: 18px;
  padding: 10px;
  border-radius: 24px;
  border: 1px solid rgba(9, 67, 81, 0.08);
  box-shadow: var(--shadow-xs);
  background: rgba(255, 255, 255, 0.76);
}

.main-nav a {
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 15px;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

.main-nav a:hover {
  background: rgba(15, 95, 115, 0.08);
}

.main-nav a.is-active {
  color: var(--primary-strong);
  background: linear-gradient(180deg, rgba(15, 95, 115, 0.12), rgba(15, 95, 115, 0.06));
  box-shadow: inset 0 0 0 1px rgba(15, 95, 115, 0.16);
}

.status-card {
  margin-top: 18px;
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(15, 95, 115, 0.12);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(243, 247, 250, 0.98)),
    var(--surface);
}

.status-card strong {
  font-size: 1.08rem;
}

.flash-stack,
.content-card,
.form-card,
.access-tile,
.table-panel,
.copy-panel,
.empty-share-card,
.provider-card,
.catalog-filters,
.filter-card {
  border-color: rgba(17, 32, 44, 0.08);
  box-shadow: var(--shadow-sm);
}

.content-card {
  margin-top: 18px;
  padding: 28px;
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 249, 251, 0.98)),
    var(--surface);
}

.content-card-auth {
  padding: 24px 24px 26px;
}

.section-head {
  gap: 22px;
  margin-bottom: 22px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 2.1vw, 2.25rem);
}

.section-head .muted {
  max-width: 760px;
  font-size: 0.97rem;
}

.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.dashboard-metrics-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 18px 18px 16px;
  border-radius: 24px;
  border: 1px solid rgba(17, 32, 44, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 247, 250, 0.98)),
    var(--surface);
  box-shadow: var(--shadow-xs);
}

.metric-card::after {
  content: "";
  position: absolute;
  inset: auto -20px -26px auto;
  width: 96px;
  height: 96px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(15, 95, 115, 0.12), rgba(15, 95, 115, 0));
  transform: rotate(18deg);
}

.metric-card-primary {
  color: #f8fbfd;
  border-color: rgba(9, 67, 81, 0.2);
  background:
    linear-gradient(135deg, rgba(10, 67, 81, 0.98), rgba(15, 95, 115, 0.92));
}

.metric-card-primary::after {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
}

.metric-card-accent {
  background:
    linear-gradient(135deg, rgba(253, 246, 236, 0.98), rgba(255, 255, 255, 0.98));
}

.metric-label {
  margin: 0;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 800;
}

.metric-card-primary .metric-label,
.metric-card-primary .metric-meta {
  color: rgba(237, 247, 251, 0.76);
}

.metric-value {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: "Aptos Display", "Segoe UI Variable Display", "Aptos", sans-serif;
  font-size: clamp(1.9rem, 2.2vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.metric-value-small {
  font-size: clamp(1.15rem, 1.4vw, 1.45rem);
  letter-spacing: -0.02em;
}

.metric-meta {
  position: relative;
  z-index: 1;
  color: var(--text-soft);
  font-size: 0.87rem;
  line-height: 1.45;
}

.table-panel,
.form-card,
.access-tile,
.provider-card,
.copy-panel,
.empty-share-card {
  border-radius: 28px;
}

.table-panel {
  padding: 14px;
}

.table-wrap {
  border-radius: 22px;
  border: 1px solid rgba(17, 32, 44, 0.08);
}

.filter-card {
  padding: 10px 14px;
  border-radius: 18px;
}

.form-card,
.programacion-row {
  gap: 18px;
}

.programacion-row {
  border-radius: 26px;
  border: 1px solid rgba(17, 32, 44, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 249, 251, 0.98)),
    var(--surface);
}

.programacion-row legend {
  color: var(--primary);
  letter-spacing: 0.08em;
}

label {
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

input,
select,
textarea {
  min-height: 48px;
  border-radius: 16px;
  border-color: rgba(17, 32, 44, 0.12);
  background: linear-gradient(180deg, #ffffff, #fbfcfd);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(15, 95, 115, 0.34);
  box-shadow: 0 0 0 4px rgba(15, 95, 115, 0.12);
}

textarea {
  min-height: 112px;
}

button,
.primary-link {
  min-height: 46px;
  border-radius: 15px;
  background: linear-gradient(180deg, #13697e, #0a4351);
  box-shadow: 0 14px 30px rgba(10, 67, 81, 0.22);
}

button:hover,
.primary-link:hover {
  box-shadow: 0 18px 36px rgba(10, 67, 81, 0.28);
}

.ghost-button,
.ghost-link,
.secondary-button {
  background: #ffffff;
  border-color: rgba(17, 32, 44, 0.12);
  color: var(--text);
}

.ghost-button:hover,
.ghost-link:hover,
.secondary-button:hover {
  background: #f7fafc;
  color: var(--primary);
}

th {
  background: linear-gradient(180deg, #133241, #112a37);
  color: rgba(239, 247, 251, 0.88);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

tbody tr {
  background: rgba(255, 255, 255, 0.98);
}

tbody tr:hover {
  background: #f3f8fa;
}

.group-row td {
  background: linear-gradient(90deg, rgba(15, 95, 115, 0.1), rgba(15, 95, 115, 0.02));
  color: var(--primary-strong);
}

.type-pill,
.status-badge,
.summary-pill,
.schedule-pill,
.meta-chip {
  font-weight: 800;
}

.type-hormigon {
  background: rgba(15, 95, 115, 0.1);
  color: var(--primary-strong);
}

.type-suelos {
  background: rgba(44, 128, 151, 0.12);
  color: #0f5f73;
}

.type-asfalto {
  background: rgba(211, 141, 51, 0.16);
  color: #945514;
}

.status-active,
.status-vigente {
  background: rgba(26, 148, 102, 0.12);
  color: #0d7f56;
}

.status-cancelled,
.status-obsoleto {
  background: rgba(218, 72, 72, 0.12);
  color: #bf3030;
}

.action-link,
.link-button {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(15, 95, 115, 0.08);
  color: var(--primary-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

.link-button {
  background: rgba(218, 72, 72, 0.08);
  color: #bf3030;
}

.action-link:hover,
.link-button:hover {
  text-decoration: none;
  background: rgba(15, 95, 115, 0.14);
}

.link-button:hover {
  background: rgba(218, 72, 72, 0.14);
}

.site-footer p,
.site-footer-version {
  color: rgba(76, 98, 112, 0.9);
}

body.theme-oscuro .site-header {
  border-color: rgba(95, 181, 201, 0.12);
  background:
    linear-gradient(135deg, rgba(11, 30, 40, 0.98), rgba(18, 53, 67, 0.94) 58%, rgba(110, 77, 34, 0.88) 140%);
}

body.theme-oscuro .main-nav,
body.theme-oscuro .status-card,
body.theme-oscuro .content-card,
body.theme-oscuro .form-card,
body.theme-oscuro .access-tile,
body.theme-oscuro .table-panel,
body.theme-oscuro .table-wrap,
body.theme-oscuro .provider-card,
body.theme-oscuro .copy-panel,
body.theme-oscuro .empty-share-card,
body.theme-oscuro .catalog-filters,
body.theme-oscuro .filter-card,
body.theme-oscuro .metric-card {
  border-color: var(--line);
}

body.theme-oscuro .main-nav,
body.theme-oscuro .status-card,
body.theme-oscuro .content-card,
body.theme-oscuro .form-card,
body.theme-oscuro .access-tile,
body.theme-oscuro .table-panel,
body.theme-oscuro .provider-card,
body.theme-oscuro .copy-panel,
body.theme-oscuro .empty-share-card,
body.theme-oscuro .catalog-filters,
body.theme-oscuro .filter-card,
body.theme-oscuro .metric-card {
  background:
    linear-gradient(180deg, rgba(18, 30, 41, 0.98), rgba(14, 24, 33, 0.98)),
    var(--surface);
}

body.theme-oscuro .metric-card-primary {
  background: linear-gradient(135deg, rgba(17, 73, 89, 0.98), rgba(10, 39, 48, 0.94));
}

body.theme-oscuro .metric-card-accent {
  background: linear-gradient(180deg, rgba(44, 34, 24, 0.98), rgba(18, 30, 41, 0.98));
}

body.theme-oscuro .main-nav a:hover,
body.theme-oscuro .ghost-button:hover,
body.theme-oscuro .ghost-link:hover,
body.theme-oscuro .secondary-button:hover {
  background: rgba(255, 255, 255, 0.05);
}

body.theme-oscuro .main-nav a.is-active {
  color: #d9f5fb;
  background: rgba(95, 181, 201, 0.14);
}

body.theme-oscuro input,
body.theme-oscuro select,
body.theme-oscuro textarea,
body.theme-oscuro .theme-label select {
  background: linear-gradient(180deg, rgba(22, 39, 53, 0.96), rgba(16, 29, 39, 0.98));
  border-color: var(--line);
}

body.theme-oscuro th {
  background: linear-gradient(180deg, #183241, #122734);
}

body.theme-oscuro tbody tr:hover {
  background: rgba(23, 42, 56, 0.94);
}

@media (max-width: 1100px) {
  .dashboard-metrics,
  .dashboard-metrics-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .page-shell,
  .page-shell-auth {
    width: min(100%, calc(100% - 18px));
  }

  .content-card,
  .content-card-auth,
  .site-header,
  .status-card,
  .table-panel,
  .form-card,
  .access-tile,
  .provider-card,
  .copy-panel,
  .empty-share-card {
    border-radius: 24px;
  }

  .dashboard-metrics,
  .dashboard-metrics-compact {
    grid-template-columns: 1fr;
  }
}

/* Structural redesign shell */

.app-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
  gap: 20px;
  padding: 18px;
}

.app-sidebar {
  position: sticky;
  top: 18px;
  align-self: start;
  display: grid;
  gap: 18px;
  max-height: calc(100vh - 36px);
  padding: 22px 20px;
  border-radius: 32px;
  border: 1px solid rgba(17, 32, 44, 0.08);
  background:
    linear-gradient(180deg, rgba(8, 31, 41, 0.98), rgba(15, 52, 64, 0.98) 65%, rgba(20, 37, 47, 0.98)),
    #0b2230;
  box-shadow: 0 32px 90px rgba(7, 22, 30, 0.28);
  overflow: auto;
}

.sidebar-brand,
.sidebar-panel,
.sidebar-nav,
.sidebar-user-panel {
  border-radius: 24px;
}

.sidebar-brand {
  display: grid;
  gap: 14px;
  padding: 6px 4px 0;
}

.sidebar-logo {
  width: 138px;
  height: auto;
  display: block;
}

.sidebar-brand-copy h1 {
  margin: 0;
  color: #f6fbfd;
  font-size: 1.72rem;
  letter-spacing: -0.04em;
}

.sidebar-brand-copy .muted,
.sidebar-panel .muted,
.sidebar-link span,
.sidebar-user-card .muted {
  color: rgba(216, 229, 236, 0.74);
}

.sidebar-panel,
.sidebar-nav {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-panel-label {
  margin: 0 0 14px;
  color: rgba(233, 244, 248, 0.62);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  font-weight: 800;
}

.sidebar-meta-list,
.sidebar-nav {
  display: grid;
  gap: 10px;
}

.sidebar-meta-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-meta-title {
  color: rgba(222, 236, 242, 0.62);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 800;
}

.sidebar-meta-item strong,
.sidebar-user-card strong {
  color: #f7fbfd;
}

.sidebar-link {
  display: grid;
  gap: 5px;
  padding: 14px 15px;
  border-radius: 20px;
  border: 1px solid transparent;
  color: #f7fbfd;
  background: rgba(255, 255, 255, 0.02);
}

.sidebar-link strong {
  font-size: 0.98rem;
  letter-spacing: -0.02em;
}

.sidebar-link span {
  font-size: 0.82rem;
  line-height: 1.4;
}

.sidebar-link-kicker {
  color: rgba(244, 192, 120, 0.88) !important;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.68rem !important;
  font-weight: 800;
}

.sidebar-link:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
}

.sidebar-link.is-active {
  border-color: rgba(126, 216, 230, 0.22);
  background: linear-gradient(180deg, rgba(95, 181, 201, 0.18), rgba(95, 181, 201, 0.08));
  box-shadow: inset 0 0 0 1px rgba(126, 216, 230, 0.1);
}

.sidebar-user-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.workspace-shell {
  min-width: 0;
  display: grid;
  gap: 18px;
  padding: 4px 6px 12px 0;
}

.workspace-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 4px 0;
}

.workspace-heading h2 {
  margin: 2px 0 4px;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.workspace-kicker {
  margin: 0;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 800;
}

.workspace-subtitle {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.workspace-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.workspace-main {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.workspace-flash-stack {
  margin-top: 0;
}

.workspace-footer,
.auth-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0 6px 4px;
}

.workspace-footer p,
.auth-footer p {
  margin: 0;
  color: rgba(76, 98, 112, 0.92);
  font-size: 0.76rem;
}

.auth-app-shell {
  min-height: 100vh;
  display: grid;
  gap: 18px;
  padding: 28px 18px 18px;
}

.auth-workspace {
  display: grid;
  place-items: center;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  gap: 16px;
}

.dashboard-hero-main,
.dashboard-hero-side,
.hero-focus-card {
  border-radius: 30px;
}

.dashboard-hero-main {
  padding: 28px;
  border: 1px solid rgba(17, 32, 44, 0.08);
  background:
    linear-gradient(135deg, rgba(10, 67, 81, 0.98), rgba(15, 95, 115, 0.94) 60%, rgba(211, 141, 51, 0.85) 160%);
  color: #f8fbfd;
  box-shadow: var(--shadow-md);
}

.dashboard-hero-main h1 {
  margin: 4px 0 10px;
  font-size: clamp(2rem, 2.8vw, 3rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.dashboard-hero-main .muted {
  max-width: 760px;
  color: rgba(239, 247, 251, 0.82);
  font-size: 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-actions .ghost-link {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fbfd;
  border-color: rgba(255, 255, 255, 0.12);
}

.dashboard-hero-side {
  display: grid;
  gap: 16px;
}

.hero-focus-card {
  display: grid;
  gap: 8px;
  min-height: 146px;
  padding: 22px;
  border: 1px solid rgba(17, 32, 44, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(245, 248, 250, 0.98)),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.hero-focus-card strong {
  font-size: 1.58rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

.hero-focus-card span {
  color: var(--text-soft);
}

.hero-focus-card-accent {
  background:
    linear-gradient(180deg, rgba(253, 247, 238, 0.98), rgba(255, 255, 255, 0.98)),
    var(--surface);
}

.hero-focus-label {
  margin: 0;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.72rem;
  font-weight: 800;
}

.dashboard-metrics-ops {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ops-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) 330px;
  gap: 16px;
}

.ops-main-column,
.ops-side-column {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.dashboard-table-panel {
  padding: 18px;
}

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

.panel-head h3 {
  margin: 2px 0 0;
  font-size: 1.28rem;
}

.filter-card-inline {
  min-width: 220px;
}

.table-actions-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.side-card {
  padding: 20px;
}

.side-stat-list,
.side-action-grid {
  display: grid;
  gap: 10px;
}

.side-stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(15, 95, 115, 0.06);
}

.side-stat-item strong {
  font-size: 1.15rem;
}

.side-action-link {
  justify-content: flex-start;
  min-height: 48px;
}

.route-modal-shell {
  position: relative;
}

.route-modal-backdrop {
  position: absolute;
  inset: 22px 0 0;
  border-radius: 34px;
  background:
    radial-gradient(circle at top left, rgba(15, 95, 115, 0.16), transparent 22rem),
    rgba(10, 22, 31, 0.36);
}

.route-modal-frame {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  min-height: calc(100vh - 150px);
}

.route-modal-sidebar,
.route-modal-content {
  border-radius: 32px;
  border: 1px solid rgba(17, 32, 44, 0.08);
  box-shadow: var(--shadow-md);
}

.route-modal-sidebar {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 24px;
  background:
    linear-gradient(180deg, rgba(7, 31, 41, 0.98), rgba(12, 48, 60, 0.98)),
    #0b2230;
  color: #f7fbfd;
}

.route-modal-sidebar h1 {
  margin: 4px 0 0;
  font-size: 2rem;
  line-height: 0.98;
  letter-spacing: -0.05em;
}

.route-modal-sidebar .muted,
.route-modal-sidebar li,
.route-modal-sidebar .metric-meta,
.route-modal-sidebar .metric-label {
  color: rgba(229, 240, 245, 0.8);
}

.dashboard-metrics-modal {
  grid-template-columns: 1fr;
}

.modal-note-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--text-soft);
}

.route-modal-content {
  padding: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(245, 248, 251, 0.98)),
    var(--surface);
}

.route-modal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.route-modal-toolbar h2 {
  margin: 2px 0 0;
  font-size: 1.7rem;
}

.modal-form-layout {
  gap: 16px;
}

.modal-form-topbar {
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  align-items: end;
}

.modal-programacion-rows {
  gap: 14px;
}

.modal-programacion-card {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.modal-textarea-field {
  grid-column: span 2;
}

.modal-template-loader {
  border-bottom: 1px solid rgba(17, 32, 44, 0.08);
  padding-bottom: 12px;
}

.modal-actions-bar {
  position: sticky;
  bottom: 0;
  padding: 14px 0 2px;
  margin-top: 4px;
  background: linear-gradient(180deg, rgba(245, 248, 251, 0), rgba(245, 248, 251, 0.95) 26%);
}

body.theme-oscuro .app-sidebar {
  border-color: rgba(255, 255, 255, 0.06);
  background:
    linear-gradient(180deg, rgba(6, 21, 28, 0.98), rgba(11, 33, 44, 0.98)),
    #09151d;
}

body.theme-oscuro .sidebar-panel,
body.theme-oscuro .sidebar-nav,
body.theme-oscuro .sidebar-link,
body.theme-oscuro .route-modal-sidebar,
body.theme-oscuro .route-modal-content {
  border-color: var(--line);
}

body.theme-oscuro .hero-focus-card,
body.theme-oscuro .route-modal-content,
body.theme-oscuro .workspace-main .table-panel,
body.theme-oscuro .workspace-main .form-card,
body.theme-oscuro .workspace-main .metric-card {
  background:
    linear-gradient(180deg, rgba(18, 30, 41, 0.98), rgba(14, 24, 33, 0.98)),
    var(--surface);
}

body.theme-oscuro .dashboard-hero-main {
  background:
    linear-gradient(135deg, rgba(11, 41, 51, 0.98), rgba(18, 78, 95, 0.94) 58%, rgba(110, 77, 34, 0.88) 160%);
}

body.theme-oscuro .route-modal-sidebar {
  background:
    linear-gradient(180deg, rgba(7, 25, 33, 0.98), rgba(10, 40, 51, 0.98)),
    #0b2230;
}

body.theme-oscuro .sidebar-link {
  background: rgba(255, 255, 255, 0.03);
}

body.theme-oscuro .sidebar-link:hover,
body.theme-oscuro .hero-actions .ghost-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 1320px) {
  .app-shell {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .route-modal-frame {
    grid-template-columns: 320px minmax(0, 1fr);
  }

  .modal-programacion-card {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .modal-textarea-field {
    grid-column: span 3;
  }
}

@media (max-width: 1100px) {
  .app-shell,
  .dashboard-hero,
  .ops-layout,
  .route-modal-frame {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
    max-height: none;
  }

  .workspace-topbar,
  .panel-head,
  .route-modal-toolbar,
  .modal-form-topbar {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .workspace-topbar-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 12px;
    gap: 14px;
  }

  .workspace-shell {
    padding-right: 0;
  }

  .dashboard-hero-main,
  .hero-focus-card,
  .route-modal-sidebar,
  .route-modal-content {
    padding: 20px;
  }

  .modal-programacion-card,
  .modal-form-topbar,
  .dashboard-metrics-ops {
    grid-template-columns: 1fr;
  }

  .modal-textarea-field {
    grid-column: auto;
  }

  .route-modal-backdrop {
    display: none;
  }
}

/* Enterprise dashboard correction pass */

body {
  font-family: "Segoe UI Variable Text", "Segoe UI", "Aptos", sans-serif;
  background:
    linear-gradient(180deg, #f3f6f9 0%, #eef2f6 100%);
}

body.theme-oscuro {
  background:
    linear-gradient(180deg, #0a1320 0%, #0f172a 100%);
}

.content-card,
.form-card,
.access-tile,
.table-panel,
.copy-panel,
.empty-share-card,
.provider-card,
.filter-card,
.catalog-filters,
.flash-stack {
  backdrop-filter: none;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.muted,
.helper-text,
.muted-inline,
.status-detail,
.workspace-subtitle,
.metric-meta {
  color: #5a6b7d;
}

body.theme-oscuro .muted,
body.theme-oscuro .helper-text,
body.theme-oscuro .muted-inline,
body.theme-oscuro .status-detail,
body.theme-oscuro .workspace-subtitle,
body.theme-oscuro .metric-meta {
  color: #a6b3c5;
}

label {
  font-size: 0.88rem;
  letter-spacing: 0;
  text-transform: none;
}

input,
select,
textarea,
.theme-label,
.theme-label select {
  min-height: 44px;
  border-radius: 10px;
}

input,
select,
textarea {
  border-color: #c9d4df;
  background: #ffffff;
  box-shadow: none;
}

input:focus,
select:focus,
textarea:focus {
  background: #ffffff;
  border-color: rgba(19, 105, 126, 0.48);
  box-shadow: 0 0 0 3px rgba(19, 105, 126, 0.12);
}

button,
.primary-link,
.ghost-button,
.ghost-link,
.action-link {
  border-radius: 10px;
}

button,
.primary-link {
  background: linear-gradient(180deg, #115c6f, #0c4654);
  box-shadow: 0 10px 22px rgba(12, 70, 84, 0.18);
}

button:hover,
.primary-link:hover {
  box-shadow: 0 14px 28px rgba(12, 70, 84, 0.2);
}

.ghost-button,
.ghost-link,
.secondary-button {
  background: #ffffff;
  color: var(--text);
}

.app-shell {
  display: block;
  min-height: 100vh;
  padding: 0;
}

.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 304px;
  height: 100vh;
  padding: 22px 18px 18px;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  box-shadow: 26px 0 70px rgba(7, 22, 30, 0.16);
}

.sidebar-main,
.sidebar-bottom {
  display: grid;
  gap: 16px;
}

.sidebar-brand {
  padding: 0;
  gap: 12px;
}

.sidebar-logo {
  width: 126px;
}

.sidebar-brand-copy h1 {
  font-size: 1.52rem;
}

.sidebar-panel,
.sidebar-nav,
.sidebar-brand,
.sidebar-user-panel {
  border-radius: 14px;
}

.sidebar-nav {
  padding: 0;
  border: none;
  background: transparent;
}

.sidebar-panel {
  padding: 14px;
}

.sidebar-panel-label {
  margin-bottom: 10px;
}

.sidebar-link {
  padding: 12px 14px;
  border-radius: 12px;
  border-color: rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.sidebar-link span {
  color: rgba(224, 236, 242, 0.78);
}

.sidebar-link strong {
  font-size: 0.95rem;
}

.sidebar-link-kicker {
  font-size: 0.66rem !important;
}

.sidebar-link.is-active {
  border-color: rgba(126, 216, 230, 0.24);
  background: rgba(95, 181, 201, 0.16);
  box-shadow: inset 0 0 0 1px rgba(126, 216, 230, 0.12);
}

.sidebar-user-card {
  align-items: center;
}

.sidebar-mini-status {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(224, 236, 242, 0.78);
  font-size: 0.76rem;
}

.sidebar-footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer-meta p {
  margin: 0;
  color: rgba(224, 236, 242, 0.72);
  font-size: 0.72rem;
  line-height: 1.45;
}

.sidebar-footer-meta .site-footer-version {
  position: static;
  color: rgba(224, 236, 242, 0.58);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
}

.workspace-shell {
  min-height: 100vh;
  margin-left: 304px;
  padding: 24px 28px 28px;
}

.workspace-topbar {
  padding: 0 0 18px;
  margin-bottom: 2px;
  border-bottom: 1px solid var(--line);
}

.workspace-heading h2 {
  font-size: 1.84rem;
}

.workspace-main {
  gap: 20px;
}

.dashboard-command {
  display: grid;
  gap: 14px;
}

.dashboard-command-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.dashboard-command-copy h1 {
  margin: 4px 0 8px;
  font-size: clamp(2rem, 2.4vw, 2.6rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.dashboard-command-copy .muted {
  max-width: 760px;
}

.dashboard-command-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.primary-link-strong {
  min-width: 220px;
  min-height: 52px;
  font-size: 0.98rem;
}

.dashboard-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.summary-stat-card {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.summary-stat-card strong {
  font-family: "Aptos Display", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  font-size: 1.85rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.summary-stat-card-primary {
  background: linear-gradient(180deg, #115c6f, #0c4654);
  border-color: rgba(12, 70, 84, 0.22);
  color: #f5fafc;
}

.summary-stat-card-primary .summary-stat-label {
  color: rgba(235, 245, 248, 0.76);
}

.summary-stat-label {
  color: #667788;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 800;
}

.dashboard-context-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-context-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: #516171;
  font-size: 0.78rem;
  font-weight: 700;
}

.ops-layout {
  grid-template-columns: minmax(0, 1.5fr) 300px;
  gap: 18px;
}

.dashboard-table-panel {
  padding: 18px;
  border-radius: 18px;
}

.panel-head {
  align-items: end;
  gap: 18px;
}

.panel-head h3 {
  margin: 4px 0 0;
}

.panel-head .muted {
  margin: 8px 0 0;
}

.filter-card-inline {
  min-width: 220px;
  padding: 10px 12px;
  border-radius: 12px;
}

.table-panel,
.table-wrap,
.programacion-row,
.route-modal-content,
.route-modal-sidebar {
  border-radius: 16px;
}

.table-wrap {
  border-radius: 12px;
  background: #ffffff;
}

th {
  background: #edf3f7;
  color: #4d5f70;
  border-bottom: 1px solid #d4deea;
}

tbody tr:hover {
  background: #f6fafc;
}

.group-row td {
  background: #f1f7fb;
  color: #0c4654;
  letter-spacing: 0.06em;
}

.side-card {
  padding: 18px;
}

.side-stat-item {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
}

.side-stat-item strong {
  font-size: 1rem;
}

.side-action-link {
  min-height: 44px;
  justify-content: flex-start;
}

.action-link,
.link-button {
  min-height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--text);
}

.link-button {
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.18);
  background: #fff7f6;
}

.action-link:hover {
  background: #f7fafc;
  color: var(--primary);
}

.link-button:hover {
  background: #ffefed;
}

.route-modal-backdrop {
  inset: 14px 0 0;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(10, 22, 31, 0.12), rgba(10, 22, 31, 0.08));
}

.route-modal-frame {
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 16px;
  min-height: auto;
  align-items: start;
}

.route-modal-sidebar,
.route-modal-content {
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.route-modal-sidebar {
  padding: 22px;
}

.route-modal-sidebar h1 {
  font-size: 1.82rem;
}

.route-modal-content {
  padding: 20px;
}

.route-modal-toolbar {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.route-modal-toolbar h2 {
  margin: 4px 0 0;
}

.route-modal-toolbar .muted {
  margin: 8px 0 0;
}

.modal-form-topbar {
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  border-radius: 14px;
}

.modal-programacion-card {
  padding: 18px;
}

.modal-programacion-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.field-span-2,
.modal-textarea-field {
  grid-column: span 2;
}

.modal-row-action {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.modal-row-action .ghost-button {
  min-width: 140px;
}

.modal-note-list {
  padding-left: 18px;
}

.modal-actions-bar {
  padding: 16px 0 2px;
  background: linear-gradient(180deg, rgba(245, 247, 250, 0), rgba(245, 247, 250, 0.96) 28%);
}

body.theme-oscuro .dashboard-command-main,
body.theme-oscuro .summary-stat-card,
body.theme-oscuro .dashboard-context-chip,
body.theme-oscuro .table-wrap,
body.theme-oscuro .action-link {
  background: #142131;
}

body.theme-oscuro .summary-stat-card-primary {
  background: linear-gradient(180deg, #1b7184, #134e5d);
}

body.theme-oscuro th {
  background: #18293b;
  color: #d3deea;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.theme-oscuro .group-row td {
  background: #112131;
  color: #8dd5e1;
}

body.theme-oscuro .side-stat-item,
body.theme-oscuro .filter-card-inline,
body.theme-oscuro .link-button {
  background: #142131;
}

body.theme-oscuro .dashboard-context-chip,
body.theme-oscuro .action-link,
body.theme-oscuro .ghost-button,
body.theme-oscuro .ghost-link,
body.theme-oscuro .secondary-button {
  color: #dbe6f1;
}

@media (max-width: 1100px) {
  .app-sidebar {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    border-radius: 18px;
  }

  .workspace-shell {
    margin-left: 0;
    padding: 16px;
  }

  .dashboard-command-main,
  .workspace-topbar,
  .panel-head,
  .route-modal-toolbar {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .workspace-topbar-actions,
  .dashboard-command-actions {
    justify-content: flex-start;
  }

  .dashboard-summary-strip,
  .modal-programacion-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-layout,
  .route-modal-frame,
  .modal-form-topbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .app-sidebar,
  .workspace-shell,
  .dashboard-command-main,
  .dashboard-table-panel,
  .route-modal-sidebar,
  .route-modal-content {
    padding: 18px;
  }

  .workspace-shell {
    padding: 12px;
  }

  .dashboard-summary-strip,
  .modal-programacion-grid {
    grid-template-columns: 1fr;
  }

  .field-span-2,
  .modal-textarea-field {
    grid-column: auto;
  }

  .primary-link-strong {
    width: 100%;
  }
}

/* Final enterprise hardening pass */

html {
  font-size: 14px;
}

body {
  background: #eef2f6 !important;
  color: #13202c;
}

body.theme-oscuro {
  background: #0f1724 !important;
  color: #e4ebf3;
}

a,
button,
input,
select,
textarea {
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.content-card,
.form-card,
.access-tile,
.table-panel,
.copy-panel,
.empty-share-card,
.provider-card,
.filter-card,
.catalog-filters,
.flash-stack,
.dashboard-command-main,
.summary-stat-card,
.side-stat-item,
.route-modal-sidebar,
.route-modal-content {
  border-radius: 8px !important;
  border: 1px solid #cfd8e3 !important;
  box-shadow: none !important;
  background: #ffffff !important;
}

body.theme-oscuro .content-card,
body.theme-oscuro .form-card,
body.theme-oscuro .access-tile,
body.theme-oscuro .table-panel,
body.theme-oscuro .copy-panel,
body.theme-oscuro .empty-share-card,
body.theme-oscuro .provider-card,
body.theme-oscuro .filter-card,
body.theme-oscuro .catalog-filters,
body.theme-oscuro .flash-stack,
body.theme-oscuro .dashboard-command-main,
body.theme-oscuro .summary-stat-card,
body.theme-oscuro .side-stat-item,
body.theme-oscuro .route-modal-sidebar,
body.theme-oscuro .route-modal-content {
  border-color: #263447 !important;
  background: #172230 !important;
}

.section-label,
.workspace-kicker,
.metric-label,
.summary-stat-label,
.sidebar-panel-label,
.hero-focus-label,
.eyebrow {
  color: #7d8fa3 !important;
  letter-spacing: 0.1em !important;
  font-size: 0.68rem !important;
}

body.theme-oscuro .section-label,
body.theme-oscuro .workspace-kicker,
body.theme-oscuro .metric-label,
body.theme-oscuro .summary-stat-label,
body.theme-oscuro .sidebar-panel-label,
body.theme-oscuro .hero-focus-label,
body.theme-oscuro .eyebrow {
  color: #9eb0c5 !important;
}

.muted,
.helper-text,
.muted-inline,
.subtitle,
.workspace-subtitle,
.metric-meta,
.sidebar-user-card .muted {
  color: #556678 !important;
}

body.theme-oscuro .muted,
body.theme-oscuro .helper-text,
body.theme-oscuro .muted-inline,
body.theme-oscuro .subtitle,
body.theme-oscuro .workspace-subtitle,
body.theme-oscuro .metric-meta,
body.theme-oscuro .sidebar-user-card .muted {
  color: #aab8c8 !important;
}

label {
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e2c3a;
}

body.theme-oscuro label {
  color: #d8e2ee;
}

input,
select,
textarea,
.theme-label,
.theme-label select {
  min-height: 42px !important;
  border-radius: 6px !important;
  border: 1px solid #bcc9d6 !important;
  background: #ffffff !important;
  color: #13202c !important;
  box-shadow: none !important;
}

body.theme-oscuro input,
body.theme-oscuro select,
body.theme-oscuro textarea,
body.theme-oscuro .theme-label,
body.theme-oscuro .theme-label select {
  border-color: #304155 !important;
  background: #111a25 !important;
  color: #edf3f9 !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #0f6174 !important;
  box-shadow: 0 0 0 2px rgba(15, 97, 116, 0.14) !important;
}

button,
.primary-link,
.ghost-button,
.ghost-link,
.action-link,
.link-button {
  min-height: 40px !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  transform: none !important;
}

button,
.primary-link {
  border: 1px solid #0a4b59 !important;
  background: #0f6174 !important;
  color: #ffffff !important;
}

button:hover,
.primary-link:hover {
  background: #0b5363 !important;
  box-shadow: none !important;
}

.ghost-button,
.ghost-link,
.secondary-button,
.action-link {
  border: 1px solid #bcc9d6 !important;
  background: #ffffff !important;
  color: #13202c !important;
}

.ghost-button:hover,
.ghost-link:hover,
.secondary-button:hover,
.action-link:hover {
  background: #f5f8fb !important;
  color: #0f6174 !important;
}

body.theme-oscuro .ghost-button,
body.theme-oscuro .ghost-link,
body.theme-oscuro .secondary-button,
body.theme-oscuro .action-link {
  border-color: #304155 !important;
  background: #172230 !important;
  color: #e4edf6 !important;
}

.link-button {
  border-color: #d5b9b6 !important;
  background: #fff7f6 !important;
  color: #9f2f25 !important;
}

body.theme-oscuro .link-button {
  border-color: #5c3631 !important;
  background: #291918 !important;
  color: #ffb4ab !important;
}

.auth-app-shell {
  background: #e9eef3 !important;
  padding: 28px;
}

body.theme-oscuro .auth-app-shell {
  background: #0f1724 !important;
}

.auth-workspace {
  display: block;
}

.content-card-auth {
  max-width: 1180px !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
}

.auth-enterprise-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 560px;
  border: 1px solid #cfd8e3;
  background: #ffffff;
}

.auth-enterprise-aside {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 28px 24px;
  background: #173042;
  color: #eff5fa;
}

.auth-enterprise-aside .muted {
  color: rgba(232, 240, 247, 0.82) !important;
}

.auth-enterprise-aside .section-label {
  color: #9fb6c8 !important;
}

.auth-enterprise-main {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 28px 32px;
  background: #f7f9fb;
}

.enterprise-login-form,
.auth-secondary-panel,
.auth-flow-form {
  max-width: 460px;
  width: 100%;
  margin: 0 auto;
  padding: 24px !important;
}

.auth-form-heading {
  display: grid;
  gap: 6px;
}

.enterprise-login-form {
  gap: 14px !important;
}

.auth-form-heading h3,
.auth-secondary-panel h3,
.auth-flow-intro h2 {
  margin: 0;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
}

.login-support-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.auth-secondary-inline {
  max-width: 460px;
  margin: 0 auto;
}

.auth-secondary-inline p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
}

.auth-flow-shell {
  display: grid;
  gap: 18px;
  max-width: 720px;
  margin: 0 auto;
}

.auth-flow-intro {
  display: grid;
  gap: 6px;
  padding: 8px 2px 0;
}

.app-sidebar {
  width: 248px !important;
  padding: 16px 14px !important;
  background: #173042 !important;
  border-right: 1px solid #203d52 !important;
  box-shadow: none !important;
}

.sidebar-main,
.sidebar-bottom {
  gap: 12px !important;
}

.sidebar-logo {
  width: 108px !important;
}

.sidebar-brand-copy h1 {
  font-size: 1.28rem !important;
}

.sidebar-brand-copy .muted {
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(230, 239, 246, 0.72) !important;
}

.sidebar-panel,
.sidebar-nav,
.sidebar-user-panel {
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}

.sidebar-nav {
  gap: 6px !important;
}

.sidebar-link {
  display: flex !important;
  align-items: center !important;
  min-height: 40px !important;
  padding: 9px 12px !important;
  border-radius: 6px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: #eff5fa !important;
}

.sidebar-link strong {
  font-size: 0.9rem !important;
  font-weight: 700 !important;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}

.sidebar-link.is-active {
  background: #0f6174 !important;
  border-color: #0f6174 !important;
  box-shadow: none !important;
}

.sidebar-user-panel {
  padding: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  background: rgba(10, 19, 29, 0.22) !important;
}

.sidebar-user-card {
  align-items: center !important;
}

.sidebar-mini-status {
  padding-top: 10px !important;
  margin-top: 10px !important;
  font-size: 0.72rem !important;
}

.sidebar-footer-meta {
  padding-top: 10px !important;
  gap: 8px !important;
}

.sidebar-footer-meta p,
.sidebar-footer-meta .site-footer-version {
  color: rgba(228, 238, 246, 0.68) !important;
}

.workspace-shell {
  margin-left: 248px !important;
  padding: 18px 20px 20px !important;
}

.workspace-topbar {
  align-items: center !important;
  padding: 0 0 14px !important;
  border-bottom: 1px solid #d5dde6 !important;
}

body.theme-oscuro .workspace-topbar {
  border-bottom-color: #29384a !important;
}

.workspace-heading h2 {
  margin: 2px 0 0 !important;
  font-size: 1.5rem !important;
}

.theme-label {
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}

.dashboard-command {
  gap: 12px !important;
}

.dashboard-command-main {
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 18px !important;
  padding: 20px !important;
}

.dashboard-command-copy h1 {
  font-size: 2rem !important;
}

.primary-link-strong {
  min-width: 240px !important;
  min-height: 44px !important;
}

.dashboard-summary-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.summary-stat-card {
  padding: 14px 16px !important;
}

.summary-stat-card strong {
  font-size: 1.5rem !important;
}

.summary-stat-card-primary {
  background: #173042 !important;
  border-color: #173042 !important;
  color: #ffffff !important;
}

.summary-stat-card-primary .summary-stat-label {
  color: rgba(232, 240, 247, 0.74) !important;
}

.dashboard-context-chip {
  min-height: 30px !important;
  padding: 6px 10px !important;
  border-radius: 999px !important;
  border-color: #d2dbe5 !important;
  background: #ffffff !important;
  color: #425466 !important;
}

body.theme-oscuro .dashboard-context-chip {
  border-color: #2c3c4f !important;
  background: #172230 !important;
  color: #d8e4ef !important;
}

.ops-layout {
  grid-template-columns: minmax(0, 1fr) 280px !important;
  gap: 14px !important;
}

.dashboard-table-panel {
  padding: 14px !important;
}

.panel-head {
  margin-bottom: 12px !important;
}

.filter-card-inline {
  padding: 8px 10px !important;
}

.table-wrap {
  border-radius: 6px !important;
  border: 1px solid #d1d9e2 !important;
  box-shadow: none !important;
}

body.theme-oscuro .table-wrap {
  border-color: #2b3b4d !important;
}

th,
td {
  padding: 11px 12px !important;
}

th {
  background: #edf2f6 !important;
  color: #435567 !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.09em !important;
}

body.theme-oscuro th {
  background: #1a2838 !important;
  color: #d0dbe7 !important;
}

tbody tr,
tbody tr:hover {
  background: #ffffff !important;
}

body.theme-oscuro tbody tr,
body.theme-oscuro tbody tr:hover {
  background: #172230 !important;
}

.group-row td {
  background: #f4f7fa !important;
  color: #0f6174 !important;
}

body.theme-oscuro .group-row td {
  background: #13202c !important;
  color: #93d2dd !important;
}

.type-pill,
.status-badge,
.schedule-pill,
.summary-pill,
.meta-chip {
  min-height: 24px !important;
  padding: 4px 8px !important;
  border-radius: 999px !important;
  box-shadow: none !important;
}

.side-card {
  padding: 14px !important;
}

.side-stat-list {
  gap: 8px !important;
}

.side-stat-item {
  padding: 10px 12px !important;
}

.route-modal-shell,
.route-modal-shell-drawer {
  position: relative;
}

.route-modal-shell-drawer {
  padding: 0 !important;
}

.route-modal-frame {
  grid-template-columns: 250px minmax(0, 1fr) !important;
  gap: 12px !important;
  min-height: 0 !important;
}

.route-modal-sidebar {
  padding: 18px !important;
  background: #173042 !important;
  border-color: #173042 !important;
  color: #edf4f9 !important;
}

.route-modal-sidebar h1 {
  font-size: 1.55rem !important;
}

.route-modal-sidebar .muted,
.route-modal-sidebar .metric-meta,
.route-modal-sidebar .metric-label,
.route-modal-sidebar .modal-note-list {
  color: rgba(232, 240, 247, 0.78) !important;
}

.route-modal-sidebar .metric-card {
  border-color: rgba(255, 255, 255, 0.12) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  color: #ffffff !important;
}

.route-modal-sidebar .metric-card-primary {
  background: #0f6174 !important;
  border-color: #0f6174 !important;
}

.route-modal-content {
  padding: 18px !important;
}

.route-modal-toolbar {
  margin-bottom: 14px !important;
  padding-bottom: 12px !important;
  border-bottom: 1px solid #d4dde6 !important;
}

body.theme-oscuro .route-modal-toolbar {
  border-bottom-color: #2a3b4e !important;
}

.dashboard-metrics-modal {
  gap: 10px !important;
}

.metric-card {
  padding: 14px !important;
}

.metric-card::after {
  display: none !important;
}

.metric-card-primary,
.metric-card-accent {
  background: #ffffff !important;
}

.modal-form-topbar {
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr) !important;
  padding: 14px !important;
}

.modal-programacion-card {
  padding: 16px !important;
  border-radius: 8px !important;
}

.modal-programacion-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.modal-template-loader {
  padding-bottom: 10px !important;
  border-bottom: 1px solid #d7dee7 !important;
}

body.theme-oscuro .modal-template-loader {
  border-bottom-color: #2b3c4f !important;
}

.modal-actions-bar {
  position: sticky;
  bottom: 0;
  padding: 14px 0 2px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.98) 34%) !important;
}

body.theme-oscuro .modal-actions-bar {
  background: linear-gradient(180deg, rgba(23, 34, 48, 0), rgba(23, 34, 48, 0.98) 34%) !important;
}

.drawer-page-shell {
  padding: 12px;
}

.drawer-page-shell .route-modal-frame {
  grid-template-columns: 220px minmax(0, 1fr) !important;
}

.dashboard-drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  align-items: stretch;
  justify-items: stretch;
}

.dashboard-drawer[hidden] {
  display: none;
}

.dashboard-drawer-backdrop {
  position: absolute;
  inset: 0;
  border: none !important;
  background: rgba(15, 23, 42, 0.38) !important;
}

.dashboard-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(1120px, calc(100vw - 56px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #edf2f6;
  border-left: 1px solid #cdd6e0;
  transform: translateX(100%);
}

.dashboard-drawer.is-open .dashboard-drawer-panel {
  transform: translateX(0);
}

.dashboard-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #d4dde6;
  background: #ffffff;
}

.dashboard-drawer-header h3 {
  margin: 2px 0 0;
  font-size: 1.2rem;
}

.dashboard-drawer-frame {
  min-height: 0;
}

.dashboard-drawer-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #edf2f6;
}

body.drawer-open {
  overflow: hidden;
}

body.theme-oscuro .dashboard-drawer-panel {
  background: #0f1724;
  border-left-color: #2a394b;
}

body.theme-oscuro .dashboard-drawer-header {
  background: #172230;
  border-bottom-color: #2a394b;
}

@media (max-width: 1200px) {
  .dashboard-summary-strip,
  .modal-programacion-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .route-modal-frame,
  .drawer-page-shell .route-modal-frame {
    grid-template-columns: 1fr !important;
  }

  .route-modal-sidebar {
    order: 2;
  }
}

@media (max-width: 1100px) {
  .app-sidebar {
    width: auto !important;
  }

  .workspace-shell {
    margin-left: 0 !important;
  }

  .auth-enterprise-shell,
  .dashboard-command-main,
  .ops-layout {
    grid-template-columns: 1fr !important;
  }

  .dashboard-drawer-panel {
    width: 100vw;
  }
}

@media (max-width: 760px) {
  .auth-enterprise-main,
  .auth-enterprise-aside,
  .workspace-shell,
  .dashboard-command-main,
  .dashboard-table-panel,
  .route-modal-content,
  .route-modal-sidebar {
    padding: 16px !important;
  }

  .dashboard-summary-strip,
  .modal-programacion-grid,
  .modal-form-topbar {
    grid-template-columns: 1fr !important;
  }

  .field-span-2,
  .modal-textarea-field {
    grid-column: auto !important;
  }
}

/* Password toggle fix */

.password-input-wrap {
  position: relative !important;
  display: block !important;
}

.password-input-wrap input {
  padding-right: 42px !important;
}

.password-input-wrap .password-toggle {
  position: absolute !important;
  top: 50% !important;
  right: 12px !important;
  transform: translateY(-50%) !important;
  width: 18px !important;
  min-width: 18px !important;
  height: 18px !important;
  min-height: 18px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #5f6f81 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 2;
}

.password-input-wrap .password-toggle:hover {
  transform: translateY(-50%) !important;
  background: transparent !important;
  color: #13202c !important;
}

.password-input-wrap .password-toggle:focus-visible {
  transform: translateY(-50%) !important;
  background: transparent !important;
  box-shadow: 0 0 0 2px rgba(15, 97, 116, 0.14) !important;
}

.password-input-wrap .password-toggle svg {
  width: 16px !important;
  height: 16px !important;
}

body.theme-oscuro .password-input-wrap .password-toggle {
  color: #aab8c8 !important;
}

body.theme-oscuro .password-input-wrap .password-toggle:hover {
  color: #edf3f9 !important;
}

/* GESVIAL enterprise design pass */

:root {
  --gesvial-navy: #08263d;
  --gesvial-navy-2: #103a57;
  --gesvial-navy-3: #174b6e;
  --gesvial-orange: #e28a1b;
  --gesvial-orange-2: #c97412;
  --gesvial-bg: #f6f8fb;
  --gesvial-panel: #ffffff;
  --gesvial-line: #d8e1ea;
  --gesvial-line-strong: #c5d2df;
  --gesvial-text: #102232;
  --gesvial-muted: #5b6f82;
  --gesvial-green: #168356;
  --gesvial-red: #c43d32;
}

html {
  font-size: 14px !important;
}

body {
  font-family: "Segoe UI", "Aptos", sans-serif !important;
  background: var(--gesvial-bg) !important;
  color: var(--gesvial-text) !important;
}

body.theme-oscuro {
  --gesvial-bg: #101923;
  --gesvial-panel: #162231;
  --gesvial-line: #2a3d50;
  --gesvial-line-strong: #3a5066;
  --gesvial-text: #edf3f8;
  --gesvial-muted: #a9b8c7;
  background: var(--gesvial-bg) !important;
  color: var(--gesvial-text) !important;
}

.app-shell {
  background: var(--gesvial-bg) !important;
}

.app-sidebar {
  width: 260px !important;
  background: var(--gesvial-navy) !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 18px 16px !important;
  box-shadow: none !important;
}

.sidebar-logo {
  width: 116px !important;
}

.sidebar-brand-copy h1 {
  color: #ffffff !important;
  font-size: 1.32rem !important;
  letter-spacing: 0 !important;
}

.sidebar-brand-copy .muted {
  color: rgba(235, 243, 248, 0.76) !important;
  font-size: 0.79rem !important;
}

.sidebar-panel-label,
.sidebar-brand .section-label {
  color: rgba(235, 243, 248, 0.62) !important;
}

.sidebar-link {
  min-height: 38px !important;
  padding: 9px 12px !important;
  border-radius: 6px !important;
  color: #eaf2f8 !important;
}

.sidebar-link strong {
  font-size: 0.9rem !important;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

.sidebar-link.is-active {
  background: var(--gesvial-navy-2) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
}

.sidebar-user-panel {
  padding: 12px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
}

.sidebar-user-card strong {
  color: #ffffff !important;
}

.sidebar-mini-status,
.sidebar-footer-meta p,
.sidebar-footer-meta .site-footer-version {
  color: rgba(235, 243, 248, 0.68) !important;
}

.workspace-shell {
  margin-left: 260px !important;
  padding: 20px 28px 24px !important;
}

.workspace-topbar {
  min-height: 58px !important;
  padding: 0 0 12px !important;
  border-bottom: 1px solid var(--gesvial-line) !important;
  align-items: center !important;
}

.workspace-heading h2 {
  font-size: 1.42rem !important;
  letter-spacing: 0 !important;
}

.workspace-kicker,
.section-label,
.metric-label,
.summary-stat-label,
.field-kicker {
  color: var(--gesvial-muted) !important;
  letter-spacing: 0.08em !important;
}

.workspace-subtitle,
.muted,
.helper-text,
.muted-inline,
.metric-meta {
  color: var(--gesvial-muted) !important;
}

.content-card,
.form-card,
.access-tile,
.table-panel,
.copy-panel,
.empty-share-card,
.provider-card,
.filter-card,
.catalog-filters,
.dashboard-command-main,
.summary-stat-card,
.side-stat-item,
.route-modal-content,
.metric-card {
  background: var(--gesvial-panel) !important;
  border: 1px solid var(--gesvial-line) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.dashboard-command {
  gap: 12px !important;
}

.dashboard-command-main {
  padding: 18px 20px !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
}

.dashboard-command-copy h1 {
  margin: 0 0 6px !important;
  font-size: 1.8rem !important;
  letter-spacing: 0 !important;
}

.dashboard-command-copy .muted {
  margin: 0 !important;
}

.button-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  font-weight: 900;
}

button,
.primary-link {
  min-height: 42px !important;
  border-radius: 6px !important;
  border: 1px solid var(--gesvial-orange) !important;
  background: var(--gesvial-orange) !important;
  color: #ffffff !important;
  font-weight: 750 !important;
  box-shadow: none !important;
}

button:hover,
.primary-link:hover {
  background: var(--gesvial-orange-2) !important;
  border-color: var(--gesvial-orange-2) !important;
}

.primary-link-strong {
  min-width: 214px !important;
}

.ghost-button,
.ghost-link,
.secondary-button,
.action-link {
  min-height: 38px !important;
  border-radius: 6px !important;
  border: 1px solid var(--gesvial-line-strong) !important;
  background: #ffffff !important;
  color: var(--gesvial-navy) !important;
  box-shadow: none !important;
}

body.theme-oscuro .ghost-button,
body.theme-oscuro .ghost-link,
body.theme-oscuro .secondary-button,
body.theme-oscuro .action-link {
  background: #182637 !important;
  color: #eaf2f8 !important;
  border-color: var(--gesvial-line-strong) !important;
}

.ghost-button:hover,
.ghost-link:hover,
.secondary-button:hover,
.action-link:hover {
  background: #f3f6f9 !important;
  border-color: var(--gesvial-navy-3) !important;
  color: var(--gesvial-navy) !important;
}

.link-button,
.danger-text {
  border-color: rgba(196, 61, 50, 0.28) !important;
  background: #fff7f6 !important;
  color: var(--gesvial-red) !important;
}

input,
select,
textarea,
.theme-label select {
  min-height: 40px !important;
  border-radius: 6px !important;
  border: 1px solid #cbd6e2 !important;
  background: #ffffff !important;
  color: var(--gesvial-text) !important;
  box-shadow: none !important;
  accent-color: var(--gesvial-orange);
}

textarea {
  min-height: 84px !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gesvial-orange) !important;
  box-shadow: 0 0 0 2px rgba(226, 138, 27, 0.18) !important;
}

label {
  color: var(--gesvial-text) !important;
  font-size: 0.83rem !important;
  font-weight: 700 !important;
}

.dashboard-summary-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.summary-stat-card {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 12px 14px !important;
}

.summary-stat-icon {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: var(--gesvial-navy);
  color: #ffffff;
  font-weight: 800;
}

.summary-stat-card strong {
  grid-column: 3;
  grid-row: 1 / span 2;
  font-size: 1.45rem !important;
  color: var(--gesvial-text);
}

.summary-stat-card-primary {
  background: #ffffff !important;
  color: var(--gesvial-text) !important;
  border-color: var(--gesvial-line) !important;
}

.summary-stat-card-primary .summary-stat-icon {
  background: var(--gesvial-orange);
}

.dashboard-context-strip,
.template-studio-toolbar,
.catalog-filters {
  display: flex !important;
  align-items: end !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  padding: 10px !important;
  border: 1px solid var(--gesvial-line) !important;
  border-radius: 8px !important;
  background: var(--gesvial-panel) !important;
}

.dashboard-context-chip {
  min-height: 32px !important;
  border-radius: 6px !important;
  border: 1px solid var(--gesvial-line) !important;
  background: #f8fafc !important;
  color: var(--gesvial-navy) !important;
}

.dashboard-context-filter {
  min-width: 210px;
}

.ops-layout {
  grid-template-columns: minmax(0, 1fr) 280px !important;
  gap: 14px !important;
}

.table-panel {
  padding: 12px !important;
}

.table-wrap {
  border: 1px solid var(--gesvial-line) !important;
  border-radius: 6px !important;
}

th,
td {
  padding: 10px 12px !important;
}

th {
  background: #eef3f7 !important;
  color: var(--gesvial-navy) !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.08em !important;
}

tbody tr {
  background: var(--gesvial-panel) !important;
}

tbody tr:hover {
  background: #f7fafc !important;
}

.group-row td {
  background: #f0f5f8 !important;
  color: var(--gesvial-navy) !important;
}

.status-active,
.status-vigente {
  background: rgba(22, 131, 86, 0.12) !important;
  color: var(--gesvial-green) !important;
}

.status-cancelled,
.status-obsoleto,
.flash-error {
  background: rgba(196, 61, 50, 0.12) !important;
  color: var(--gesvial-red) !important;
}

.type-hormigon {
  background: rgba(8, 38, 61, 0.1) !important;
  color: var(--gesvial-navy) !important;
}

.type-suelos,
.type-neutral {
  background: #eef3f7 !important;
  color: var(--gesvial-muted) !important;
}

.type-asfalto {
  background: rgba(226, 138, 27, 0.14) !important;
  color: var(--gesvial-orange-2) !important;
}

.side-card {
  padding: 14px !important;
}

.side-stat-item {
  display: flex !important;
  justify-content: space-between !important;
  min-height: 40px !important;
  padding: 9px 10px !important;
  background: #f8fafc !important;
}

.route-modal-frame {
  grid-template-columns: 230px minmax(0, 1fr) !important;
  gap: 12px !important;
}

.route-modal-sidebar {
  background: var(--gesvial-navy) !important;
  border: 1px solid var(--gesvial-navy) !important;
  border-radius: 8px !important;
  padding: 16px !important;
  color: #ffffff !important;
}

.route-modal-sidebar .muted,
.route-modal-sidebar .metric-meta,
.route-modal-sidebar .metric-label,
.route-modal-sidebar li {
  color: rgba(235, 243, 248, 0.78) !important;
}

.modal-title-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--gesvial-orange);
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 900;
}

.modal-title-icon-navy {
  background: var(--gesvial-navy);
}

.route-modal-sidebar h1 {
  margin: 0 !important;
  font-size: 1.35rem !important;
  letter-spacing: 0 !important;
}

.route-modal-content {
  padding: 14px !important;
}

.route-modal-toolbar {
  padding-bottom: 10px !important;
  margin-bottom: 12px !important;
  border-bottom: 1px solid var(--gesvial-line) !important;
}

.modal-form-topbar {
  grid-template-columns: 220px minmax(0, 1fr) !important;
  gap: 12px !important;
  padding: 12px !important;
}

.modal-template-loader-top {
  display: grid !important;
  grid-template-columns: minmax(240px, 1fr) auto !important;
  align-items: end !important;
  gap: 10px !important;
  padding: 0 !important;
  border: none !important;
}

.template-loader-actions {
  justify-content: flex-end !important;
  gap: 8px !important;
}

.template-load-button {
  background: var(--gesvial-orange) !important;
  border-color: var(--gesvial-orange) !important;
  color: #ffffff !important;
}

.modal-programacion-card {
  padding: 12px !important;
}

.modal-programacion-grid {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 10px !important;
  align-items: end !important;
}

.field-type {
  grid-column: span 2;
}

.field-frente {
  grid-column: span 5;
}

.field-provider,
.field-dose {
  grid-column: span 3;
}

.field-qty,
.field-time {
  grid-column: span 2;
}

.field-location {
  grid-column: span 8;
}

.modal-row-action {
  grid-column: span 2;
}

.modal-actions-bar {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  padding: 12px 0 0 !important;
  background: var(--gesvial-panel) !important;
  border-top: 1px solid var(--gesvial-line) !important;
}

.template-studio {
  display: grid;
  gap: 12px;
}

.template-studio-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--gesvial-line);
  border-radius: 8px;
  background: var(--gesvial-panel);
}

.template-studio-head h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.template-studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 14px;
  align-items: start;
}

.template-list-panel,
.template-editor-panel {
  min-width: 0;
}

.template-name-card {
  padding: 12px !important;
}

.toolbar-search {
  min-width: min(100%, 320px);
}

.catalog-provider-tabs {
  margin-bottom: 10px !important;
}

.catalog-provider-tab {
  border-radius: 6px !important;
  background: #ffffff !important;
  color: var(--gesvial-navy) !important;
}

.catalog-provider-tab.is-active {
  background: var(--gesvial-navy) !important;
  border-color: var(--gesvial-navy) !important;
  color: #ffffff !important;
}

.provider-card-head,
.section-head {
  margin-bottom: 12px !important;
}

.dashboard-metrics,
.dashboard-metrics-compact {
  gap: 10px !important;
}

.metric-card {
  padding: 12px !important;
}

.metric-value {
  font-size: 1.5rem !important;
  letter-spacing: 0 !important;
}

.split-grid.schedule-grid {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.7fr) !important;
  gap: 14px !important;
}

.schedule-pill {
  border-radius: 6px !important;
  background: #f3f6f9 !important;
  color: var(--gesvial-navy) !important;
}

body.theme-oscuro input,
body.theme-oscuro select,
body.theme-oscuro textarea {
  background: #101923 !important;
  color: var(--gesvial-text) !important;
  border-color: var(--gesvial-line-strong) !important;
}

body.theme-oscuro .side-stat-item,
body.theme-oscuro .dashboard-context-chip,
body.theme-oscuro th,
body.theme-oscuro .group-row td {
  background: #1b2a3a !important;
}

@media (max-width: 1200px) {
  .route-modal-frame,
  .template-studio-grid,
  .ops-layout,
  .split-grid.schedule-grid {
    grid-template-columns: 1fr !important;
  }

  .modal-form-topbar,
  .modal-template-loader-top {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 900px) {
  .workspace-shell {
    margin-left: 0 !important;
    padding: 16px !important;
  }

  .app-sidebar {
    position: static !important;
    width: auto !important;
    min-height: auto !important;
  }

  .dashboard-command-main,
  .dashboard-summary-strip {
    grid-template-columns: 1fr !important;
  }

  .summary-stat-card {
    grid-template-columns: 34px minmax(0, 1fr) auto !important;
  }

  .modal-programacion-grid {
    grid-template-columns: 1fr !important;
  }

  .field-type,
  .field-frente,
  .field-provider,
  .field-dose,
  .field-qty,
  .field-time,
  .field-location,
  .modal-row-action {
    grid-column: auto !important;
  }
}

/* Strict enterprise restructure: final layer to remove glass/soft legacy styling */
:root {
  --enterprise-navy: #08263d;
  --enterprise-navy-2: #123a56;
  --enterprise-orange: #e28a1b;
  --enterprise-orange-dark: #c97412;
  --enterprise-bg: #f3f6f9;
  --enterprise-surface: #ffffff;
  --enterprise-surface-2: #f8fafc;
  --enterprise-line: #cfd9e4;
  --enterprise-line-strong: #b8c7d6;
  --enterprise-text: #152333;
  --enterprise-muted: #657486;
  --enterprise-green: #168356;
  --enterprise-red: #c43d32;
}

html,
body {
  background: var(--enterprise-bg) !important;
}

body::before,
body::after,
.metric-card::after,
.dashboard-command-main::before,
.content-card::before,
.form-card::before,
.route-modal-backdrop::before,
.auth-enterprise-shell::before {
  display: none !important;
  content: none !important;
}

body,
button,
input,
select,
textarea {
  font-family: "Segoe UI", "Aptos", "Calibri", sans-serif !important;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-shell {
  display: block !important;
  min-height: 100vh !important;
  background: var(--enterprise-bg) !important;
}

.app-sidebar {
  position: fixed !important;
  inset: 0 auto 0 0 !important;
  width: 260px !important;
  min-height: 100vh !important;
  padding: 18px 14px !important;
  background: var(--enterprise-navy) !important;
  color: #ffffff !important;
  border: 0 !important;
  border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow-y: auto !important;
}

.sidebar-brand {
  display: grid !important;
  grid-template-columns: 48px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: center !important;
  padding: 0 4px 16px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14) !important;
}

.sidebar-logo {
  width: 48px !important;
  height: 48px !important;
  object-fit: contain !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  padding: 5px !important;
}

.sidebar-brand-copy h1 {
  margin: 0 !important;
  color: #ffffff !important;
  font-size: 1.04rem !important;
  letter-spacing: 0 !important;
}

.sidebar-brand-copy .muted {
  margin-top: 3px !important;
  color: rgba(231, 238, 245, 0.72) !important;
  font-size: 0.72rem !important;
  line-height: 1.25 !important;
}

.sidebar-nav {
  display: grid !important;
  gap: 4px !important;
  margin-top: 18px !important;
}

.sidebar-link {
  min-height: 38px !important;
  padding: 9px 10px !important;
  border-radius: 4px !important;
  color: rgba(241, 247, 252, 0.82) !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

.sidebar-link:hover,
.sidebar-link.is-active {
  background: var(--enterprise-navy-2) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
}

.sidebar-link.is-active {
  box-shadow: inset 3px 0 0 var(--enterprise-orange) !important;
}

.sidebar-bottom {
  gap: 10px !important;
}

.sidebar-panel,
.sidebar-user-card {
  border-radius: 4px !important;
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: none !important;
}

.sidebar-user-card {
  padding: 10px !important;
}

.sidebar-footer-meta {
  padding: 10px 4px 0 !important;
  color: rgba(231, 238, 245, 0.72) !important;
  font-size: 0.72rem !important;
}

.workspace-shell {
  margin-left: 260px !important;
  min-height: 100vh !important;
  padding: 0 !important;
  background: var(--enterprise-bg) !important;
}

.workspace-topbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-height: 66px !important;
  padding: 10px 28px !important;
  background: var(--enterprise-surface) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--enterprise-line) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.workspace-heading h2 {
  margin: 0 !important;
  color: var(--enterprise-text) !important;
  font-size: 1.14rem !important;
  font-weight: 800 !important;
}

.workspace-kicker,
.workspace-subtitle,
.section-label {
  color: var(--enterprise-muted) !important;
  font-size: 0.68rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
}

.workspace-subtitle {
  margin-top: 3px !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  font-weight: 600 !important;
}

.workspace-main {
  padding: 22px 28px 28px !important;
  background: var(--enterprise-bg) !important;
}

.content-card,
.form-card,
.table-panel,
.metric-card,
.summary-stat-card,
.dashboard-command-main,
.route-modal-content,
.modal-programacion-card,
.template-studio-head,
.template-studio-toolbar,
.catalog-filters,
.provider-card,
.schedule-config-card,
.schedule-active-card {
  background: var(--enterprise-surface) !important;
  border: 1px solid var(--enterprise-line) !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  background-image: none !important;
}

.dashboard-command {
  display: grid !important;
  gap: 12px !important;
  margin-bottom: 14px !important;
}

.dashboard-command-main {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 18px !important;
  padding: 16px 18px !important;
  border-left: 4px solid var(--enterprise-orange) !important;
}

.dashboard-command-copy h1,
.section-head h2,
.template-studio-head h2,
.route-modal-toolbar h2,
.auth-form-heading h3 {
  margin: 0 !important;
  color: var(--enterprise-text) !important;
  font-size: 1.42rem !important;
  font-weight: 850 !important;
  letter-spacing: -0.015em !important;
}

.muted,
.helper-text,
.metric-meta,
.muted-inline {
  color: var(--enterprise-muted) !important;
}

.dashboard-command-copy .muted {
  max-width: 760px !important;
  margin-top: 6px !important;
}

.dashboard-command-actions,
.section-tools,
.inline-actions,
.table-actions-stack {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

button,
.primary-link {
  min-height: 40px !important;
  border-radius: 4px !important;
  border: 1px solid var(--enterprise-orange) !important;
  background: var(--enterprise-orange) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow: none !important;
  background-image: none !important;
}

button:hover,
.primary-link:hover {
  background: var(--enterprise-orange-dark) !important;
  border-color: var(--enterprise-orange-dark) !important;
  transform: none !important;
}

.ghost-button,
.ghost-link,
.secondary-button,
.action-link {
  min-height: 36px !important;
  border-radius: 4px !important;
  border: 1px solid var(--enterprise-line-strong) !important;
  background: #ffffff !important;
  color: var(--enterprise-navy) !important;
  font-weight: 750 !important;
  box-shadow: none !important;
  background-image: none !important;
}

.link-button,
.danger-text {
  min-height: 36px !important;
  border: 1px solid rgba(196, 61, 50, 0.38) !important;
  background: #fff7f6 !important;
  color: var(--enterprise-red) !important;
}

input,
select,
textarea,
.theme-label select {
  width: 100% !important;
  min-height: 40px !important;
  border-radius: 4px !important;
  border: 1px solid var(--enterprise-line-strong) !important;
  background: #ffffff !important;
  color: var(--enterprise-text) !important;
  box-shadow: none !important;
  background-image: none !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--enterprise-orange) !important;
  box-shadow: 0 0 0 2px rgba(226, 138, 27, 0.2) !important;
  outline: none !important;
}

label {
  display: grid !important;
  gap: 5px !important;
  color: var(--enterprise-text) !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
}

.dashboard-summary-strip {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(140px, 1fr)) !important;
  gap: 8px !important;
}

.summary-stat-card {
  display: grid !important;
  grid-template-columns: 32px minmax(0, 1fr) auto !important;
  min-height: 58px !important;
  padding: 10px 12px !important;
}

.summary-stat-icon {
  width: 32px !important;
  height: 32px !important;
  border-radius: 4px !important;
  background: var(--enterprise-navy) !important;
}

.summary-stat-card-primary .summary-stat-icon {
  background: var(--enterprise-orange) !important;
}

.summary-stat-label,
.metric-label {
  color: var(--enterprise-muted) !important;
  font-size: 0.68rem !important;
  font-weight: 850 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

.summary-stat-card strong,
.metric-value {
  color: var(--enterprise-text) !important;
  font-size: 1.34rem !important;
  line-height: 1 !important;
}

.dashboard-context-strip {
  display: grid !important;
  grid-template-columns: auto auto auto minmax(190px, 240px) !important;
  align-items: end !important;
  gap: 8px !important;
  padding: 10px !important;
}

.dashboard-context-chip,
.summary-pill,
.type-pill,
.status-badge,
.schedule-pill {
  border-radius: 3px !important;
  box-shadow: none !important;
}

.ops-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 260px !important;
  gap: 12px !important;
  align-items: start !important;
}

.table-panel {
  padding: 10px !important;
}

.panel-head,
.provider-card-head,
.section-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 12px !important;
  margin-bottom: 10px !important;
}

.table-wrap {
  border: 1px solid var(--enterprise-line) !important;
  border-radius: 4px !important;
  overflow: auto !important;
  background: #ffffff !important;
}

.data-table {
  border-collapse: collapse !important;
}

th,
td {
  padding: 9px 10px !important;
  border-bottom: 1px solid #e4ebf2 !important;
  color: var(--enterprise-text) !important;
  vertical-align: middle !important;
}

th {
  background: #eaf0f5 !important;
  color: var(--enterprise-navy) !important;
  font-size: 0.68rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
}

tbody tr:hover {
  background: #f7f9fb !important;
}

.group-row td {
  background: #edf3f7 !important;
  color: var(--enterprise-navy) !important;
  font-weight: 850 !important;
}

.side-card {
  padding: 12px !important;
}

.side-stat-list {
  display: grid !important;
  gap: 6px !important;
}

.side-stat-item {
  min-height: 36px !important;
  padding: 8px 10px !important;
  border: 1px solid var(--enterprise-line) !important;
  border-radius: 3px !important;
  background: #f8fafc !important;
}

.status-active,
.status-vigente {
  background: rgba(22, 131, 86, 0.12) !important;
  color: var(--enterprise-green) !important;
}

.status-cancelled,
.status-obsoleto,
.flash-error {
  background: rgba(196, 61, 50, 0.12) !important;
  color: var(--enterprise-red) !important;
}

.type-hormigon {
  background: rgba(8, 38, 61, 0.1) !important;
  color: var(--enterprise-navy) !important;
}

.type-asfalto {
  background: rgba(226, 138, 27, 0.14) !important;
  color: var(--enterprise-orange-dark) !important;
}

.route-modal-shell,
.route-modal-shell-drawer {
  min-height: 100% !important;
  padding: 0 !important;
  background: transparent !important;
}

.route-modal-backdrop {
  position: fixed !important;
  inset: 0 !important;
  border-radius: 0 !important;
  background: rgba(8, 38, 61, 0.32) !important;
  background-image: none !important;
}

.route-modal-frame {
  position: relative !important;
  z-index: 1 !important;
  display: block !important;
  width: min(1180px, calc(100vw - 48px)) !important;
  max-width: none !important;
  margin: 24px auto !important;
  padding: 0 !important;
}

.route-modal-shell-drawer .route-modal-frame,
.drawer-page-shell .route-modal-frame {
  width: 100% !important;
  margin: 0 !important;
}

.route-modal-content {
  padding: 0 !important;
  overflow: hidden !important;
}

.route-modal-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 16px !important;
  padding: 16px 18px !important;
  border-bottom: 1px solid var(--enterprise-line) !important;
  background: #ffffff !important;
}

.modal-title-icon {
  width: 36px !important;
  height: 36px !important;
  flex: 0 0 36px !important;
  border-radius: 4px !important;
  background: var(--enterprise-orange) !important;
}

.modal-form-layout {
  display: grid !important;
  gap: 12px !important;
  padding: 14px 18px 0 !important;
}

.modal-form-topbar {
  display: grid !important;
  grid-template-columns: 220px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: end !important;
  padding: 12px !important;
  background: #f8fafc !important;
  border: 1px solid var(--enterprise-line) !important;
  border-radius: 4px !important;
}

.modal-programacion-rows {
  display: grid !important;
  gap: 12px !important;
}

.modal-programacion-card {
  padding: 12px !important;
  min-width: 0 !important;
}

.modal-programacion-card legend {
  padding: 0 6px !important;
  color: var(--enterprise-navy) !important;
  font-weight: 900 !important;
}

.modal-template-loader-top {
  display: grid !important;
  grid-template-columns: minmax(280px, 1fr) auto !important;
  gap: 10px !important;
  align-items: end !important;
  margin-bottom: 12px !important;
  padding: 10px !important;
  border: 1px solid var(--enterprise-line) !important;
  border-radius: 4px !important;
  background: #f8fafc !important;
}

.template-loader-actions {
  display: flex !important;
  justify-content: flex-end !important;
  gap: 8px !important;
}

.modal-programacion-grid {
  display: grid !important;
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 10px 12px !important;
  align-items: end !important;
}

.field-type {
  grid-column: span 2 !important;
}

.field-frente {
  grid-column: span 5 !important;
}

.field-provider {
  grid-column: span 3 !important;
}

.field-dose {
  grid-column: span 4 !important;
}

.field-qty,
.field-time {
  grid-column: span 2 !important;
}

.field-location {
  grid-column: span 10 !important;
}

.modal-row-action {
  grid-column: span 2 !important;
}

.field-frente input {
  margin-top: 6px !important;
}

.modal-actions-bar {
  position: sticky !important;
  bottom: 0 !important;
  z-index: 2 !important;
  display: flex !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  margin: 0 -18px !important;
  padding: 12px 18px !important;
  border-top: 1px solid var(--enterprise-line) !important;
  background: #ffffff !important;
  background-image: none !important;
}

.dashboard-drawer-panel {
  width: min(980px, 92vw) !important;
  border-radius: 0 !important;
  border-left: 1px solid var(--enterprise-line-strong) !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.dashboard-drawer-header {
  min-height: 54px !important;
  padding: 10px 14px !important;
  border-bottom: 1px solid var(--enterprise-line) !important;
  background: #ffffff !important;
}

.dashboard-drawer-backdrop {
  background: rgba(8, 38, 61, 0.28) !important;
}

.auth-app-shell {
  min-height: 100vh !important;
  display: grid !important;
  place-items: center !important;
  padding: 24px !important;
  background: var(--enterprise-bg) !important;
}

.auth-workspace {
  width: min(920px, 100%) !important;
}

.content-card-auth {
  padding: 0 !important;
  background: #ffffff !important;
  border: 1px solid var(--enterprise-line) !important;
  border-radius: 4px !important;
}

.auth-enterprise-shell {
  display: grid !important;
  grid-template-columns: 300px minmax(0, 1fr) !important;
  min-height: 430px !important;
  border: 1px solid var(--enterprise-line) !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  overflow: hidden !important;
  box-shadow: none !important;
}

.auth-enterprise-aside {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  padding: 28px !important;
  background: var(--enterprise-navy) !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #ffffff !important;
}

.auth-enterprise-aside .auth-logo {
  width: 150px !important;
  height: auto !important;
  padding: 10px !important;
  border-radius: 4px !important;
  background: #ffffff !important;
}

.auth-product-mark h2 {
  margin: 4px 0 0 !important;
  color: #ffffff !important;
  font-size: 1.8rem !important;
  letter-spacing: 0.06em !important;
}

.auth-enterprise-main {
  display: grid !important;
  align-content: center !important;
  padding: 34px 42px !important;
  background: #ffffff !important;
}

.enterprise-login-form {
  max-width: 390px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.password-input-wrap {
  position: relative !important;
  display: block !important;
}

.password-input-wrap input {
  padding-right: 46px !important;
}

.password-toggle {
  position: absolute !important;
  top: 50% !important;
  right: 6px !important;
  transform: translateY(-50%) !important;
  width: 32px !important;
  height: 30px !important;
  min-height: 30px !important;
  padding: 0 !important;
  border-radius: 4px !important;
  background: var(--enterprise-navy) !important;
  border-color: var(--enterprise-navy) !important;
}

.password-toggle svg {
  width: 16px !important;
  height: 16px !important;
  fill: #ffffff !important;
}

body.theme-oscuro {
  background: #101923 !important;
}

body.theme-oscuro .workspace-shell,
body.theme-oscuro .workspace-main {
  background: #101923 !important;
}

body.theme-oscuro .workspace-topbar,
body.theme-oscuro .content-card,
body.theme-oscuro .form-card,
body.theme-oscuro .table-panel,
body.theme-oscuro .metric-card,
body.theme-oscuro .summary-stat-card,
body.theme-oscuro .dashboard-command-main,
body.theme-oscuro .route-modal-content,
body.theme-oscuro .modal-programacion-card,
body.theme-oscuro .template-studio-head,
body.theme-oscuro .template-studio-toolbar,
body.theme-oscuro .catalog-filters,
body.theme-oscuro .provider-card,
body.theme-oscuro .schedule-config-card,
body.theme-oscuro .schedule-active-card {
  background: #172230 !important;
  border-color: #2d3e50 !important;
}

body.theme-oscuro .workspace-heading h2,
body.theme-oscuro .dashboard-command-copy h1,
body.theme-oscuro .section-head h2,
body.theme-oscuro .route-modal-toolbar h2,
body.theme-oscuro .auth-form-heading h3,
body.theme-oscuro th,
body.theme-oscuro td,
body.theme-oscuro label,
body.theme-oscuro .summary-stat-card strong,
body.theme-oscuro .metric-value {
  color: #eef5fb !important;
}

body.theme-oscuro input,
body.theme-oscuro select,
body.theme-oscuro textarea,
body.theme-oscuro .ghost-button,
body.theme-oscuro .ghost-link,
body.theme-oscuro .secondary-button,
body.theme-oscuro .action-link {
  background: #101923 !important;
  color: #eef5fb !important;
  border-color: #3a4d60 !important;
}

body.theme-oscuro th,
body.theme-oscuro .group-row td,
body.theme-oscuro .modal-form-topbar,
body.theme-oscuro .modal-template-loader-top,
body.theme-oscuro .side-stat-item {
  background: #1d2b3a !important;
}

@media (max-width: 1100px) {
  .ops-layout,
  .auth-enterprise-shell {
    grid-template-columns: 1fr !important;
  }

  .dashboard-context-strip,
  .dashboard-command-main,
  .modal-form-topbar,
  .modal-template-loader-top {
    grid-template-columns: 1fr !important;
  }

  .auth-enterprise-aside {
    gap: 20px !important;
  }
}

@media (max-width: 900px) {
  .app-sidebar {
    position: static !important;
    width: auto !important;
    min-height: auto !important;
  }

  .workspace-shell {
    margin-left: 0 !important;
  }

  .workspace-topbar,
  .workspace-main {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .dashboard-summary-strip,
  .modal-programacion-grid {
    grid-template-columns: 1fr !important;
  }

  .field-type,
  .field-frente,
  .field-provider,
  .field-dose,
  .field-qty,
  .field-time,
  .field-location,
  .modal-row-action {
    grid-column: auto !important;
  }
}

/* Reference-image alignment pass */
:root {
  --ref-navy: #062640;
  --ref-navy-deep: #031b31;
  --ref-blue: #0f4f8f;
  --ref-orange: #f28a00;
  --ref-orange-dark: #dc7600;
  --ref-bg: #f7f9fc;
  --ref-border: #cfdae7;
  --ref-text: #09213b;
  --ref-muted: #516179;
}

body.theme-claro {
  background: var(--ref-bg) !important;
}

.app-sidebar {
  width: 232px !important;
  padding: 18px 16px !important;
  background:
    radial-gradient(circle at 88% 18%, rgba(30, 88, 128, 0.34), transparent 19rem),
    linear-gradient(180deg, var(--ref-navy) 0%, var(--ref-navy-deep) 100%) !important;
}

.workspace-shell {
  margin-left: 232px !important;
}

.sidebar-brand {
  display: block !important;
  padding: 0 0 26px !important;
  border: 0 !important;
}

.sidebar-logo {
  width: 104px !important;
  height: 44px !important;
  padding: 0 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  object-fit: contain !important;
}

.sidebar-brand-copy .section-label {
  display: none !important;
}

.sidebar-brand-copy h1 {
  margin-top: 18px !important;
  font-size: 1.28rem !important;
  line-height: 1.1 !important;
}

.sidebar-brand-copy .muted {
  margin-top: 10px !important;
  max-width: 190px !important;
  color: rgba(236, 244, 252, 0.78) !important;
  font-size: 0.86rem !important;
  line-height: 1.45 !important;
}

.sidebar-panel-label {
  margin: 0 0 10px !important;
  color: rgba(236, 244, 252, 0.66) !important;
  font-size: 0.68rem !important;
  font-weight: 900 !important;
  letter-spacing: 0.14em !important;
  text-transform: uppercase !important;
}

.sidebar-nav {
  gap: 8px !important;
  margin-top: 0 !important;
}

.sidebar-link {
  display: grid !important;
  grid-template-columns: 26px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 44px !important;
  padding: 10px 13px !important;
  border-radius: 6px !important;
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 0.9rem !important;
}

.sidebar-link strong {
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

.sidebar-link.is-active,
.sidebar-link:hover {
  background: rgba(91, 133, 169, 0.25) !important;
  box-shadow: none !important;
}

.nav-icon,
.summary-stat-icon,
.schedule-card-icon,
.template-row-icon,
.side-stat-icon {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 24px !important;
  height: 24px !important;
  color: currentColor !important;
}

.nav-icon::before,
.nav-icon::after,
.summary-stat-icon::before,
.summary-stat-icon::after,
.schedule-card-icon::before,
.schedule-card-icon::after,
.template-row-icon::before,
.template-row-icon::after,
.side-stat-icon::before,
.side-stat-icon::after {
  content: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

.nav-icon svg,
.summary-stat-icon svg,
.schedule-card-icon svg,
.template-row-icon svg,
.side-stat-icon svg {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.sidebar-bottom {
  gap: 20px !important;
}

.sidebar-user-panel {
  padding: 14px !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.045) !important;
  border-color: rgba(255, 255, 255, 0.17) !important;
}

.sidebar-user-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.sidebar-user-card strong {
  color: #ffffff !important;
}

.sidebar-mini-status {
  margin-top: 14px !important;
  padding-top: 14px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
  font-size: 0.74rem !important;
}

.sidebar-footer-meta {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: end !important;
  gap: 8px !important;
  border-top: 1px solid rgba(255, 255, 255, 0.14) !important;
  padding-top: 18px !important;
}

.dashboard-command-main {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  gap: 24px !important;
}

.dashboard-command-copy h1,
.section-head h2 {
  font-size: 1.75rem !important;
  line-height: 1.1 !important;
}

.dashboard-command-copy .section-label {
  display: none !important;
}

.dashboard-command-actions {
  padding-top: 4px !important;
}

.primary-link-strong {
  min-width: 206px !important;
  height: 48px !important;
  justify-content: center !important;
  border-radius: 6px !important;
  background: linear-gradient(180deg, var(--ref-orange), var(--ref-orange-dark)) !important;
  border-color: var(--ref-orange) !important;
  box-shadow: 0 6px 14px rgba(242, 138, 0, 0.18) !important;
}

.button-icon {
  font-size: 1.32rem !important;
  line-height: 1 !important;
}

.dashboard-summary-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 18px !important;
  margin-top: 22px !important;
}

.summary-stat-card {
  grid-template-columns: 50px minmax(0, 1fr) !important;
  grid-template-rows: auto auto auto !important;
  min-height: 100px !important;
  padding: 22px !important;
  border-radius: 8px !important;
}

.summary-stat-icon {
  grid-row: 1 / span 3 !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 6px !important;
  background: linear-gradient(180deg, #08436f, #05243d) !important;
  color: #ffffff !important;
}

.summary-stat-card:nth-child(2) .summary-stat-icon,
.summary-stat-card:nth-child(4) .summary-stat-icon {
  background: linear-gradient(180deg, #0c5fa7, #084175) !important;
}

.summary-stat-card:nth-child(3) .summary-stat-icon {
  background: linear-gradient(180deg, #74808d, #53606e) !important;
}

.summary-stat-card strong {
  grid-column: 2 !important;
  font-size: 1.55rem !important;
}

.summary-stat-card small {
  grid-column: 2 !important;
  color: var(--ref-muted) !important;
}

.dashboard-context-strip {
  display: flex !important;
  justify-content: space-between !important;
  gap: 14px !important;
  margin-top: 16px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.dashboard-context-chip,
.dashboard-context-filter {
  min-height: 42px !important;
  padding: 0 14px !important;
  border: 1px solid var(--ref-border) !important;
  border-radius: 6px !important;
  background: #ffffff !important;
}

.dashboard-context-filter {
  margin-left: auto !important;
  display: grid !important;
  grid-template-columns: auto 92px !important;
  align-items: center !important;
  padding: 0 !important;
}

.dashboard-context-filter span {
  padding: 0 12px !important;
}

.dashboard-context-filter select {
  border: 0 !important;
}

.ops-layout {
  grid-template-columns: minmax(0, 1fr) 230px !important;
  gap: 22px !important;
  margin-top: 22px !important;
}

.table-panel,
.side-card,
.schedule-config-card,
.schedule-active-card,
.provider-card,
.template-studio-toolbar,
.template-list-panel,
.template-help-card {
  border-radius: 8px !important;
  border-color: var(--ref-border) !important;
  background: #ffffff !important;
}

.panel-head {
  padding: 16px 18px !important;
  margin: -10px -10px 0 !important;
  border-bottom: 1px solid var(--ref-border) !important;
}

.panel-head h3,
.side-card h3 {
  margin: 0 !important;
  color: var(--ref-text) !important;
  font-size: 1rem !important;
  font-weight: 850 !important;
}

.table-wrap {
  border: 0 !important;
  border-radius: 0 !important;
}

th {
  height: 42px !important;
  background: #f3f6f9 !important;
  font-size: 0.64rem !important;
}

td {
  height: 58px !important;
}

.actions-cell .inline-actions,
.table-actions-stack {
  justify-content: flex-start !important;
}

.action-link,
.link-button.action-icon-link {
  min-width: 36px !important;
  height: 36px !important;
  padding: 0 10px !important;
  border-radius: 5px !important;
}

.side-card {
  padding: 18px !important;
}

.side-card .section-label {
  color: #0a3762 !important;
}

.side-stat-list {
  margin-top: 16px !important;
  border-top: 1px solid var(--ref-border) !important;
}

.side-stat-item {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 56px !important;
  padding: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ref-border) !important;
  background: transparent !important;
}

.side-stat-icon {
  color: #7b8ba0 !important;
}

.dashboard-drawer {
  position: fixed !important;
  inset: 0 !important;
  z-index: 80 !important;
  display: grid !important;
  place-items: center !important;
  padding: 34px !important;
}

.dashboard-drawer[hidden] {
  display: none !important;
}

.dashboard-drawer-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(6, 20, 35, 0.62) !important;
  backdrop-filter: blur(4px) !important;
}

.dashboard-drawer-panel {
  position: relative !important;
  width: min(1040px, 92vw) !important;
  height: min(820px, 90vh) !important;
  overflow: hidden !important;
  border-radius: 8px !important;
  border: 1px solid var(--ref-border) !important;
  background: #ffffff !important;
}

.dashboard-drawer-frame,
.dashboard-drawer-iframe {
  width: 100% !important;
  height: 100% !important;
}

.dashboard-drawer-iframe {
  border: 0 !important;
}

.drawer-page-shell {
  background: transparent !important;
  padding: 0 !important;
}

.route-modal-shell-drawer {
  min-height: 100vh !important;
  background: #ffffff !important;
}

.route-modal-frame {
  width: min(1040px, calc(100vw - 48px)) !important;
  margin: 24px auto !important;
}

.drawer-page-shell .route-modal-frame,
.route-modal-shell-drawer .route-modal-frame {
  width: 100% !important;
  height: 100% !important;
}

.route-modal-content {
  border-radius: 8px !important;
}

.route-modal-toolbar {
  min-height: 92px !important;
  padding: 22px 26px !important;
}

.modal-title-lockup {
  align-items: center !important;
}

.modal-title-icon {
  width: 42px !important;
  height: 42px !important;
  flex-basis: 42px !important;
  border-radius: 7px !important;
  background: linear-gradient(180deg, var(--ref-orange), var(--ref-orange-dark)) !important;
}

.modal-title-icon-navy {
  background: linear-gradient(180deg, #0a3762, #05243d) !important;
}

.route-modal-toolbar h2 {
  font-size: 1.55rem !important;
}

.modal-form-layout {
  padding: 22px 26px 0 !important;
  gap: 18px !important;
}

.modal-form-topbar {
  grid-template-columns: 292px minmax(0, 1fr) !important;
  gap: 28px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  align-items: start !important;
}

.modal-date-field {
  position: relative !important;
}

.modal-date-field input {
  border-color: var(--ref-orange) !important;
}

.visual-calendar {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  left: 0 !important;
  z-index: 4 !important;
  width: 292px !important;
  padding: 16px !important;
  border: 1px solid #e0e7f0 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: 0 14px 32px rgba(9, 33, 59, 0.14) !important;
}

.visual-calendar-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 14px !important;
}

.visual-calendar-head button {
  width: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--ref-text) !important;
}

.visual-calendar-grid {
  display: grid !important;
  grid-template-columns: repeat(7, 1fr) !important;
  gap: 7px !important;
  text-align: center !important;
}

.visual-calendar-grid span {
  display: grid !important;
  place-items: center !important;
  height: 30px !important;
  border-radius: 4px !important;
  color: var(--ref-text) !important;
  font-size: 0.82rem !important;
}

.visual-calendar-weekdays span,
.visual-calendar-grid .is-muted {
  color: #9aa8b8 !important;
}

.visual-calendar-grid .is-selected {
  background: var(--ref-orange) !important;
  color: #ffffff !important;
  font-weight: 850 !important;
}

.visual-calendar p {
  margin: 10px 0 0 !important;
  color: var(--ref-muted) !important;
  font-size: 0.72rem !important;
}

.modal-template-loader {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 18px !important;
  align-items: end !important;
}

.modal-programacion-card {
  margin-top: 24px !important;
  padding: 26px !important;
  border-radius: 8px !important;
}

.modal-programacion-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 18px 28px !important;
}

.field-type,
.field-frente,
.field-provider,
.field-dose,
.field-qty,
.field-time {
  grid-column: auto !important;
}

.field-location {
  grid-column: 1 / -1 !important;
}

.modal-row-action {
  grid-column: 1 / -1 !important;
  justify-self: start !important;
}

.modal-actions-bar {
  margin: 12px -26px 0 !important;
  padding: 22px 26px !important;
  justify-content: space-between !important;
}

.modal-actions-bar button[type="submit"] {
  min-width: 246px !important;
  background: linear-gradient(180deg, var(--ref-orange), var(--ref-orange-dark)) !important;
  border-color: var(--ref-orange) !important;
}

.modal-actions-bar #add-programacion-row {
  margin-left: auto !important;
  margin-right: 28px !important;
}

.template-modal-shell {
  position: relative !important;
  max-width: 1180px !important;
  margin: -18px auto 0 !important;
  border: 1px solid var(--ref-border) !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  overflow: hidden !important;
}

.template-studio-head {
  padding: 34px 38px 24px !important;
  border: 0 !important;
}

.template-studio-toolbar {
  display: grid !important;
  grid-template-columns: minmax(280px, 1fr) 170px 170px 170px auto !important;
  gap: 18px !important;
  margin: 0 38px 20px !important;
  padding: 26px 20px !important;
}

.template-studio-grid {
  display: block !important;
  padding: 0 38px 0 !important;
}

.template-list-panel {
  padding: 0 !important;
  overflow: hidden !important;
}

.template-name-cell {
  display: grid !important;
  grid-template-columns: 36px minmax(0, 1fr) !important;
  gap: 12px !important;
  align-items: center !important;
}

.template-row-icon,
.template-help-icon {
  display: grid !important;
  place-items: center !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 6px !important;
  background: #07345c !important;
  color: #ffffff !important;
}

.template-table-footer,
.template-modal-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 16px 20px !important;
  color: var(--ref-muted) !important;
}

.template-help-card {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  gap: 14px !important;
  margin-top: 20px !important;
  padding: 18px !important;
}

.template-modal-footer {
  margin-top: 20px !important;
  border-top: 1px solid var(--ref-border) !important;
  padding: 18px 38px !important;
}

.schedule-dashboard {
  display: grid !important;
  gap: 20px !important;
}

.schedule-dashboard-header h1 {
  margin: 0 0 8px !important;
  color: #14324f !important;
  font-size: 2rem !important;
  line-height: 1.06 !important;
  letter-spacing: -0.04em !important;
}

.schedule-dashboard-header .muted {
  margin: 0 !important;
  max-width: 760px !important;
  color: #67788d !important;
}

.schedule-dashboard-kpis {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.schedule-dashboard-kpi {
  display: grid !important;
  grid-template-columns: 64px minmax(0, 1fr) !important;
  gap: 16px !important;
  align-items: center !important;
  min-height: 92px !important;
  padding: 18px 20px !important;
  border: 1px solid #dbe4ed !important;
  border-radius: 8px !important;
  background: #ffffff !important;
}

.schedule-dashboard-kpi-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 8px !important;
  color: #ffffff !important;
}

.schedule-dashboard-kpi-icon svg {
  width: 24px !important;
  height: 24px !important;
  display: block !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.schedule-dashboard-kpi-icon.is-navy { background: linear-gradient(180deg, #12395c, #08263d) !important; }
.schedule-dashboard-kpi-icon.is-blue { background: linear-gradient(180deg, #1762a4, #0d487e) !important; }
.schedule-dashboard-kpi-icon.is-green { background: linear-gradient(180deg, #1b9154, #147341) !important; }

.schedule-dashboard-kpi-label {
  display: block !important;
  color: #5f7388 !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  margin-bottom: 4px !important;
}

.schedule-dashboard-kpi strong {
  display: block !important;
  color: #102e4b !important;
  font-size: 1.48rem !important;
  line-height: 1.05 !important;
}

.schedule-dashboard-kpi small {
  color: #67788d !important;
}

.schedule-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 26px !important;
}

.schedule-config-card,
.schedule-active-card {
  padding: 0 !important;
  overflow: hidden !important;
}

.schedule-card-head {
  display: grid !important;
  grid-template-columns: 54px minmax(0, 1fr) !important;
  gap: 18px !important;
  align-items: center !important;
  padding: 24px !important;
  border-bottom: 1px solid var(--ref-border) !important;
}

.schedule-card-head h3 {
  margin: 0 !important;
  color: var(--ref-text) !important;
  font-size: 1.18rem !important;
}

.schedule-card-icon {
  width: 50px !important;
  height: 50px !important;
  border-radius: 6px !important;
  background: linear-gradient(180deg, #08436f, #05243d) !important;
  color: #ffffff !important;
}

.schedule-card-icon svg,
.side-stat-icon svg {
  width: 24px !important;
  height: 24px !important;
}

.schedule-config-body {
  display: grid !important;
  gap: 0 !important;
  padding: 0 24px 24px !important;
}

.schedule-config-body > label,
.schedule-config-body > .section-label,
.schedule-config-body > button,
.schedule-config-body > .helper-text,
.form-divider {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.schedule-config-body > .section-label {
  margin-top: 20px !important;
}

.form-divider {
  height: 1px !important;
  border: 0 !important;
  background: var(--ref-border) !important;
  margin-top: 24px !important;
  margin-bottom: 18px !important;
}

.schedule-config-body > button {
  width: 100% !important;
  margin-top: 26px !important;
  height: 48px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
}

.schedule-config-body > button svg {
  width: 18px !important;
  height: 18px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.schedule-config-body > .helper-text,
.schedule-active-card > .helper-text {
  margin-top: 22px !important;
  margin-bottom: 24px !important;
  padding: 14px 16px !important;
  border: 1px solid #e1e8f0 !important;
  border-radius: 6px !important;
  background: #fbfcfe !important;
}

.schedule-window-summary {
  display: grid !important;
  place-items: center !important;
  gap: 12px !important;
  padding: 44px 24px 28px !important;
  border-bottom: 1px solid #e7edf4 !important;
}

.schedule-window-summary strong {
  color: var(--ref-text) !important;
  font-size: 1.95rem !important;
  letter-spacing: -0.04em !important;
}

.schedule-detail-list {
  margin: 0 24px !important;
  border: 1px solid #e1e8f0 !important;
  border-radius: 6px !important;
  overflow: hidden !important;
}

.schedule-detail-list article {
  display: grid !important;
  grid-template-columns: 44px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 64px !important;
  padding: 0 16px !important;
  border-bottom: 1px solid #e1e8f0 !important;
}

.schedule-detail-list article:last-child {
  border-bottom: 0 !important;
}

.schedule-detail-list article strong {
  font-size: 1.08rem !important;
}

.schedule-note {
  display: grid !important;
  grid-template-columns: 18px minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 10px !important;
  color: #67788d !important;
}

.schedule-note-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  height: 18px !important;
  color: #57708a !important;
}

.schedule-note-icon svg {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

@media (max-width: 1100px) {
  .workspace-shell {
    margin-left: 0 !important;
  }

  .template-studio-toolbar,
  .modal-form-topbar,
  .modal-template-loader,
  .schedule-grid {
    grid-template-columns: 1fr !important;
  }

  .visual-calendar {
    position: static !important;
    margin-top: 8px !important;
  }
}

/* Modal form repair: keep desktop grid inside programacion/template work areas */
.dashboard-drawer-panel {
  width: min(1120px, calc(100vw - 72px)) !important;
  height: min(760px, calc(100vh - 56px)) !important;
}

.drawer-page-shell,
.route-modal-shell-drawer,
.route-modal-shell-drawer .route-modal-frame,
.drawer-page-shell .route-modal-frame,
.route-modal-shell-drawer .route-modal-content {
  min-height: 100% !important;
  height: 100% !important;
}

.route-modal-content {
  display: flex !important;
  flex-direction: column !important;
}

.modal-form-layout,
.template-form-modal {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow: auto !important;
}

.modal-form-layout {
  padding: 18px 26px 0 !important;
}

.route-modal-shell .modal-form-topbar,
.template-form-modal .modal-form-topbar {
  display: grid !important;
  grid-template-columns: 292px minmax(0, 1fr) !important;
  gap: 28px !important;
  align-items: start !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.route-modal-shell .modal-template-loader {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 18px !important;
  align-items: end !important;
}

.route-modal-shell .visual-calendar {
  position: absolute !important;
  top: calc(100% + 6px) !important;
  left: 0 !important;
  margin-top: 0 !important;
}

.route-modal-shell .modal-programacion-card,
.template-form-modal .modal-programacion-card {
  margin-top: 18px !important;
  padding: 22px 26px !important;
  min-height: auto !important;
}

.route-modal-shell .modal-programacion-grid,
.template-form-modal .modal-programacion-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px 28px !important;
  align-items: end !important;
}

.route-modal-shell .field-type,
.route-modal-shell .field-frente,
.route-modal-shell .field-provider,
.route-modal-shell .field-dose,
.route-modal-shell .field-qty,
.route-modal-shell .field-time,
.template-form-modal .field-type,
.template-form-modal .field-frente,
.template-form-modal .field-provider,
.template-form-modal .field-dose,
.template-form-modal .field-qty,
.template-form-modal .field-time {
  grid-column: auto !important;
  width: 100% !important;
  min-width: 0 !important;
}

.route-modal-shell .field-location,
.template-form-modal .field-location {
  grid-column: 1 / -1 !important;
  width: 100% !important;
}

.route-modal-shell textarea,
.template-form-modal textarea {
  min-height: 48px !important;
  height: 48px !important;
  resize: vertical !important;
}

.route-modal-shell .modal-row-action,
.template-form-modal .modal-row-action {
  grid-column: 1 / -1 !important;
  justify-self: start !important;
}

.route-modal-shell .modal-actions-bar,
.template-form-modal .modal-actions-bar {
  position: sticky !important;
  bottom: 0 !important;
  margin: 10px -26px 0 !important;
  padding: 18px 26px !important;
  background: #ffffff !important;
  border-top: 1px solid var(--ref-border) !important;
}

.template-editor-panel {
  margin-top: 22px !important;
}

.template-form-modal {
  display: flex !important;
  flex-direction: column !important;
  border: 1px solid var(--ref-border) !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  overflow: hidden !important;
}

.template-editor-toolbar {
  min-height: 84px !important;
  padding: 18px 26px !important;
}

.template-form-modal .template-name-card {
  margin: 18px 26px 0 !important;
  grid-template-columns: 1fr !important;
}

.template-form-modal .modal-programacion-rows {
  padding: 0 26px !important;
}

.template-form-modal .modal-actions-bar {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

@media (max-width: 760px) {
  .route-modal-shell .modal-form-topbar,
  .template-form-modal .modal-form-topbar,
  .route-modal-shell .modal-template-loader,
  .route-modal-shell .modal-programacion-grid,
  .template-form-modal .modal-programacion-grid {
    grid-template-columns: 1fr !important;
  }

  .route-modal-shell .visual-calendar {
    position: static !important;
    width: 100% !important;
    margin-top: 8px !important;
  }
}

/* Final fixes: use the real browser date picker and keep password eye inside input */
.visual-calendar,
[data-visual-calendar] {
  display: none !important;
}

.route-modal-shell .modal-date-field {
  position: static !important;
}

.route-modal-shell input[type="date"] {
  appearance: auto !important;
  -webkit-appearance: auto !important;
  color-scheme: light !important;
  cursor: pointer !important;
}

.dashboard-drawer-panel {
  height: auto !important;
  max-height: min(760px, calc(100vh - 56px)) !important;
}

.dashboard-drawer-frame,
.dashboard-drawer-iframe {
  height: min(760px, calc(100vh - 56px)) !important;
  max-height: min(760px, calc(100vh - 56px)) !important;
}

.route-modal-shell-drawer .route-modal-content {
  max-height: min(760px, calc(100vh - 56px)) !important;
}

.route-modal-shell-drawer .modal-form-layout {
  max-height: calc(min(760px, calc(100vh - 56px)) - 92px) !important;
}

.enterprise-login-form .password-input-wrap,
.auth-flow-form .password-input-wrap {
  position: relative !important;
  display: block !important;
  width: 100% !important;
}

.enterprise-login-form .password-input-wrap input,
.auth-flow-form .password-input-wrap input {
  padding-right: 48px !important;
}

.enterprise-login-form .password-toggle,
.auth-flow-form .password-toggle {
  position: absolute !important;
  top: 50% !important;
  right: 6px !important;
  left: auto !important;
  transform: translateY(-50%) !important;
  width: 34px !important;
  height: 30px !important;
  min-width: 34px !important;
  min-height: 30px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 5px !important;
  background: var(--ref-navy) !important;
  border-color: var(--ref-navy) !important;
  color: #ffffff !important;
  z-index: 2 !important;
}

.enterprise-login-form .password-toggle svg,
.auth-flow-form .password-toggle svg {
  width: 16px !important;
  height: 16px !important;
  fill: currentColor !important;
}

/* Footer collision fix */
.sidebar-footer-meta {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 6px !important;
  align-items: start !important;
  min-width: 0 !important;
}

.sidebar-footer-meta p {
  min-width: 0 !important;
  margin: 0 !important;
  overflow-wrap: anywhere !important;
  line-height: 1.35 !important;
}

.sidebar-footer-meta .site-footer-version {
  justify-self: start !important;
  margin: 0 !important;
  font-size: 0.72rem !important;
  line-height: 1 !important;
}

.auth-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  text-align: center !important;
}

.auth-footer p,
.auth-footer .site-footer-version {
  margin: 0 !important;
  white-space: normal !important;
}

/* Mis plantillas floating modal, aligned with reference image 2 */
.template-floating-backdrop {
  position: fixed !important;
  inset: 0 !important;
  z-index: 60 !important;
  background: rgba(6, 20, 35, 0.58) !important;
  backdrop-filter: blur(3px) !important;
}

.template-floating-window {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  z-index: 61 !important;
  transform: translate(-50%, -50%) !important;
  width: min(1180px, calc(100vw - 56px)) !important;
  max-height: min(860px, calc(100vh - 40px)) !important;
  overflow: hidden !important;
  border: 1px solid var(--ref-border) !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: 0 22px 70px rgba(3, 21, 36, 0.24) !important;
}

.template-list-window {
  display: flex !important;
  flex-direction: column !important;
}

.template-list-window .template-studio-head {
  flex: 0 0 auto !important;
  padding: 30px 38px 22px !important;
  border: 0 !important;
}

.template-close-x {
  min-width: 34px !important;
  width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--ref-text) !important;
  font-size: 1.65rem !important;
  line-height: 1 !important;
}

.template-list-window .template-studio-toolbar {
  flex: 0 0 auto !important;
  display: grid !important;
  grid-template-columns: minmax(260px, 1fr) 170px 170px 170px auto !important;
  gap: 18px !important;
  margin: 0 38px 18px !important;
  padding: 22px !important;
  border: 1px solid var(--ref-border) !important;
  border-radius: 8px !important;
  background: #ffffff !important;
}

.template-list-window .template-list-panel {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  margin: 0 38px !important;
  padding: 0 !important;
  overflow: auto !important;
  border: 1px solid var(--ref-border) !important;
  border-radius: 8px !important;
}

.template-list-window .table-wrap {
  overflow: auto !important;
}

.template-list-window th {
  height: 46px !important;
  padding: 0 16px !important;
  background: #f8fafc !important;
  color: #183b60 !important;
}

.template-list-window td {
  height: 72px !important;
  padding: 12px 16px !important;
}

.template-list-window td[data-label="Acciones"],
.template-list-window .actions-cell {
  white-space: nowrap !important;
}

.template-list-window td[data-label="Acciones"] .inline-actions,
.template-list-window .actions-cell .inline-actions {
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
}

.template-list-window td[data-label="Acciones"] .inline-form,
.template-list-window .actions-cell .inline-form {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
}

.template-list-window .template-name-cell strong {
  display: block !important;
  color: var(--ref-text) !important;
  font-size: 0.82rem !important;
}

.template-list-window .template-row-icon {
  width: 34px !important;
  height: 34px !important;
  border-radius: 6px !important;
}

.template-list-window .action-icon-link {
  min-width: 68px !important;
  height: 38px !important;
  padding: 0 14px !important;
  border-radius: 6px !important;
  white-space: nowrap !important;
}

.template-list-window .template-table-footer {
  padding: 16px 18px !important;
  border-top: 1px solid var(--ref-border) !important;
}

.template-list-window .template-help-card {
  flex: 0 0 auto !important;
  margin: 18px 38px 0 !important;
  padding: 18px !important;
  border: 1px solid var(--ref-border) !important;
  border-radius: 8px !important;
  background: #ffffff !important;
}

.template-list-window .template-modal-footer {
  flex: 0 0 auto !important;
  margin-top: 18px !important;
  padding: 18px 38px !important;
  border-top: 1px solid var(--ref-border) !important;
  justify-content: flex-start !important;
}

.template-list-window .template-modal-footer .primary-link {
  min-width: 280px !important;
  justify-content: center !important;
  background: linear-gradient(180deg, var(--ref-orange), var(--ref-orange-dark)) !important;
  border-color: var(--ref-orange) !important;
}

.template-empty-copy {
  padding: 24px !important;
}

.template-form-window {
  width: min(1040px, calc(100vw - 72px)) !important;
  max-height: min(760px, calc(100vh - 56px)) !important;
  display: flex !important;
}

.template-form-window .template-form-modal {
  width: 100% !important;
  height: min(760px, calc(100vh - 56px)) !important;
  max-height: min(760px, calc(100vh - 56px)) !important;
  border: 0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

.template-form-window .template-editor-toolbar {
  min-height: 92px !important;
  padding: 22px 26px !important;
}

.template-form-window .template-name-card {
  margin: 20px 26px 0 !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.template-form-window .template-form-scroll {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-bottom: 18px !important;
}

.template-form-window .modal-programacion-rows {
  padding: 0 26px !important;
}

.template-form-window .modal-programacion-card {
  margin-top: 18px !important;
  padding: 22px 26px !important;
}

.template-form-window .modal-actions-bar {
  flex: 0 0 auto !important;
  position: static !important;
  margin: 12px 0 0 !important;
  padding: 18px 26px !important;
}

.template-form-window .modal-actions-bar button[type="submit"] {
  min-width: 246px !important;
}

.template-list-window .template-studio-head .primary-link {
  min-width: 170px !important;
  justify-content: center !important;
  background: linear-gradient(180deg, var(--ref-orange), var(--ref-orange-dark)) !important;
  border-color: var(--ref-orange) !important;
}

@media (max-width: 980px) {
  .template-floating-window {
    width: calc(100vw - 24px) !important;
    max-height: calc(100vh - 24px) !important;
  }

  .template-list-window .template-studio-toolbar,
  .template-list-window .template-studio-head,
  .template-list-window .template-list-panel,
  .template-list-window .template-help-card,
  .template-list-window .template-modal-footer {
    margin-left: 18px !important;
    margin-right: 18px !important;
  }

  .template-list-window .template-studio-toolbar {
    grid-template-columns: 1fr !important;
  }
}

/* Programaciones dashboard refresh */
.programaciones-dashboard {
  display: grid !important;
  gap: 18px !important;
}

.programaciones-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 18px !important;
  align-items: start !important;
}

.programaciones-header-copy h1 {
  margin: 0 0 8px !important;
  color: #14324f !important;
  font-size: 2rem !important;
  line-height: 1.08 !important;
  letter-spacing: -0.04em !important;
}

.programaciones-header-copy .muted {
  max-width: 760px !important;
  margin: 0 !important;
  color: #67788d !important;
}

.programaciones-header-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

.programaciones-primary-action,
.programaciones-secondary-action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  min-height: 46px !important;
  padding: 0 20px !important;
  border-radius: 8px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

.programaciones-primary-action {
  background: linear-gradient(180deg, #f69a07, #e58700) !important;
  border: 1px solid #f69a07 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

.programaciones-primary-action:hover {
  background: linear-gradient(180deg, #ec9309, #da8100) !important;
  color: #ffffff !important;
  transform: none !important;
}

.programaciones-secondary-action {
  background: #ffffff !important;
  border: 1px solid #d8e2ec !important;
  color: #173553 !important;
  box-shadow: none !important;
}

.programaciones-secondary-action:hover {
  background: #f7fafc !important;
  color: #173553 !important;
  transform: none !important;
}

.programaciones-button-icon,
.programaciones-filter-icon,
.programaciones-side-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
}

.programaciones-button-icon svg,
.programaciones-filter-icon svg,
.programaciones-side-icon svg,
.programaciones-action-button svg {
  width: 16px !important;
  height: 16px !important;
  display: block !important;
}

.programaciones-kpis {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

.programaciones-kpi {
  display: grid !important;
  grid-template-columns: 58px minmax(0, 1fr) !important;
  gap: 16px !important;
  align-items: center !important;
  min-height: 88px !important;
  padding: 16px 18px !important;
  border: 1px solid #dbe4ed !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.programaciones-kpi-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 8px !important;
  color: #ffffff !important;
}

.programaciones-kpi-icon svg {
  width: 22px !important;
  height: 22px !important;
  display: block !important;
}

.programaciones-kpi-icon.is-navy {
  background: linear-gradient(180deg, #12395c, #08263d) !important;
}

.programaciones-kpi-icon.is-blue {
  background: linear-gradient(180deg, #1762a4, #0d487e) !important;
}

.programaciones-kpi-icon.is-slate {
  background: linear-gradient(180deg, #7a8591, #5a6673) !important;
}

.programaciones-kpi-copy {
  display: grid !important;
  gap: 4px !important;
}

.programaciones-kpi-label {
  color: #5f7388 !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
}

.programaciones-kpi-copy strong {
  color: #102e4b !important;
  font-size: 1.75rem !important;
  line-height: 1 !important;
  letter-spacing: -0.04em !important;
}

.programaciones-kpi-copy small {
  color: #5f7388 !important;
  font-size: 0.92rem !important;
}

.programaciones-filters {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 12px !important;
  align-items: center !important;
}

.programaciones-filters-left {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

.programaciones-hidden-copy {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.programaciones-filter-chip,
.programaciones-status-filter,
.programaciones-user-filter {
  min-height: 42px !important;
  border: 1px solid #d8e2ec !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #173553 !important;
  box-shadow: none !important;
}

.programaciones-filter-chip {
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 14px !important;
  font-weight: 700 !important;
}

.programaciones-status-filter {
  display: inline-grid !important;
  grid-template-columns: auto auto 88px !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 0 12px !important;
  color: #173553 !important;
  font-weight: 800 !important;
  overflow: hidden !important;
}

.programaciones-status-filter span:last-of-type {
  white-space: nowrap !important;
}

.programaciones-status-filter select {
  min-height: 40px !important;
  border: 0 !important;
  border-left: 1px solid #d8e2ec !important;
  border-radius: 0 !important;
  padding: 0 26px 0 12px !important;
  background: #ffffff !important;
  color: #173553 !important;
  box-shadow: none !important;
  font-weight: 700 !important;
}

.programaciones-filter-icon {
  color: #71869b !important;
}

.programaciones-user-filter {
  display: grid !important;
  grid-template-columns: auto 108px !important;
  align-items: center !important;
  padding-left: 14px !important;
  overflow: hidden !important;
}

.programaciones-user-filter span {
  color: #61778d !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
}

.programaciones-user-filter select {
  min-height: 40px !important;
  border: 0 !important;
  border-left: 1px solid #d8e2ec !important;
  border-radius: 0 !important;
  padding: 0 30px 0 12px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.programaciones-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 260px !important;
  gap: 16px !important;
  align-items: start !important;
}

.programaciones-table-card,
.programaciones-side-card {
  border: 1px solid #dbe4ed !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.programaciones-table-card {
  overflow: hidden !important;
}

.programaciones-table-head {
  padding: 18px 18px 10px !important;
  border-bottom: 1px solid #e7edf4 !important;
}

.programaciones-table-head .section-label,
.programaciones-side-card .section-label {
  margin: 0 0 6px !important;
  color: #1b4f84 !important;
}

.programaciones-table-head h3,
.programaciones-side-card h3 {
  margin: 0 0 4px !important;
  color: #173553 !important;
  font-size: 1.05rem !important;
}

.programaciones-table-head .muted,
.programaciones-side-card .muted {
  margin: 0 !important;
  color: #6b7d90 !important;
  font-size: 0.88rem !important;
}

.programaciones-table-card .table-wrap {
  border: 0 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
}

.programaciones-table-card th {
  position: static !important;
  height: 42px !important;
  padding: 10px 12px !important;
  background: #f8fafc !important;
  color: #5f7388 !important;
  font-size: 0.69rem !important;
  letter-spacing: 0.11em !important;
  border-bottom: 1px solid #e6edf4 !important;
}

.programaciones-table-card td {
  padding: 12px !important;
  font-size: 0.92rem !important;
  color: #183652 !important;
  border-bottom: 1px solid #edf2f7 !important;
  background: #ffffff !important;
}

.programaciones-table-card tbody tr:hover td {
  background: #fbfdff !important;
}

.programaciones-table-card .type-pill,
.programaciones-table-card .status-badge {
  min-height: 24px !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  font-size: 0.72rem !important;
}

.programaciones-table-actions {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
}

.programaciones-action-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border-radius: 6px !important;
  background: #ffffff !important;
  border: 1px solid #dbe4ed !important;
  box-shadow: none !important;
}

.programaciones-action-button.is-edit {
  color: #165891 !important;
}

.programaciones-action-button.is-danger {
  color: #d24d4d !important;
  border-color: #f0caca !important;
}

.programaciones-action-button:hover {
  transform: none !important;
  background: #f8fbfe !important;
}

.programaciones-table-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 14px 18px !important;
  color: #6b7d90 !important;
  font-size: 0.88rem !important;
}

.programaciones-pager {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.programaciones-pager-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 34px !important;
  height: 34px !important;
  border: 1px solid #dbe4ed !important;
  border-radius: 6px !important;
  font-weight: 800 !important;
}

.programaciones-pager-button.is-muted {
  background: #173553 !important;
  border-color: #173553 !important;
  color: #ffffff !important;
}

.programaciones-side-card {
  padding: 18px !important;
}

.programaciones-side-list {
  display: grid !important;
  gap: 0 !important;
  margin-top: 12px !important;
}

.programaciones-side-item {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 10px !important;
  min-height: 54px !important;
  padding: 0 !important;
  border-top: 1px solid #e8eef4 !important;
  background: transparent !important;
}

.programaciones-side-item:first-child {
  border-top: 1px solid #e8eef4 !important;
}

.programaciones-side-icon {
  color: #7a8da2 !important;
}

.programaciones-side-item span {
  color: #173553 !important;
  font-size: 0.92rem !important;
}

.programaciones-side-item strong {
  color: #102e4b !important;
  font-size: 0.98rem !important;
  white-space: nowrap !important;
}

body.theme-oscuro .programaciones-header-copy h1,
body.theme-oscuro .programaciones-kpi-copy strong,
body.theme-oscuro .programaciones-table-card td,
body.theme-oscuro .programaciones-side-item span,
body.theme-oscuro .programaciones-side-item strong,
body.theme-oscuro .programaciones-table-head h3,
body.theme-oscuro .programaciones-side-card h3 {
  color: #eef5fb !important;
}

body.theme-oscuro .programaciones-primary-action {
  color: #ffffff !important;
}

body.theme-oscuro .programaciones-secondary-action,
body.theme-oscuro .programaciones-filter-chip,
body.theme-oscuro .programaciones-status-filter,
body.theme-oscuro .programaciones-user-filter,
body.theme-oscuro .programaciones-table-card,
body.theme-oscuro .programaciones-side-card,
body.theme-oscuro .programaciones-kpi,
body.theme-oscuro .programaciones-table-card .table-wrap,
body.theme-oscuro .programaciones-action-button {
  background: #132131 !important;
  border-color: #2b3a4b !important;
}

body.theme-oscuro .programaciones-table-card th {
  background: #17283a !important;
  border-bottom-color: #2b3a4b !important;
}

body.theme-oscuro .programaciones-table-card td,
body.theme-oscuro .programaciones-side-item,
body.theme-oscuro .programaciones-table-head,
body.theme-oscuro .programaciones-table-footer {
  border-color: #243546 !important;
}

body.theme-oscuro .programaciones-header-copy .muted,
body.theme-oscuro .programaciones-kpi-label,
body.theme-oscuro .programaciones-kpi-copy small,
body.theme-oscuro .programaciones-table-head .muted,
body.theme-oscuro .programaciones-table-footer,
body.theme-oscuro .programaciones-user-filter span,
body.theme-oscuro .programaciones-table-card th {
  color: #a8b7c6 !important;
}

body.theme-oscuro .programaciones-user-filter select {
  background: #132131 !important;
  border-left-color: #2b3a4b !important;
  color: #eef5fb !important;
}

body.theme-oscuro .programaciones-status-filter select {
  background: #132131 !important;
  border-left-color: #2b3a4b !important;
  color: #eef5fb !important;
}

@media (max-width: 1180px) {
  .programaciones-layout {
    grid-template-columns: 1fr !important;
  }

  .programaciones-side-card {
    order: -1 !important;
  }
}

@media (max-width: 980px) {
  .programaciones-header,
  .programaciones-filters {
    grid-template-columns: 1fr !important;
  }

  .programaciones-header-actions {
    justify-content: flex-start !important;
  }

  .programaciones-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 720px) {
  .programaciones-kpis {
    grid-template-columns: 1fr !important;
  }

  .programaciones-kpi {
    grid-template-columns: 44px minmax(0, 1fr) !important;
    padding: 14px !important;
  }

  .programaciones-header-copy h1 {
    font-size: 1.7rem !important;
  }

  .programaciones-side-item {
    grid-template-columns: 20px minmax(0, 1fr) auto !important;
  }
}

/* Inicio */
.inicio-dashboard,
.consulta-dashboard,
.programacion-hoy-dashboard,
.usuarios-dashboard {
  display: grid !important;
  gap: 18px !important;
}

.inicio-hero,
.consulta-header,
.programacion-hoy-header,
.usuarios-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 18px !important;
  align-items: start !important;
}

.inicio-hero h1,
.consulta-header h1,
.programacion-hoy-header h1,
.usuarios-header h1 {
  margin: 0 0 8px !important;
  color: #14324f !important;
  font-size: 2rem !important;
  line-height: 1.06 !important;
  letter-spacing: -0.04em !important;
}

.inicio-hero .muted,
.consulta-header .muted,
.programacion-hoy-header .muted,
.usuarios-header .muted {
  margin: 0 !important;
  color: #67788d !important;
  max-width: 760px !important;
}

.inicio-hero-stats {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(120px, 1fr)) !important;
  gap: 12px !important;
}

.inicio-stat-card,
.programacion-hoy-kpi {
  display: grid !important;
  gap: 4px !important;
  min-height: 88px !important;
  padding: 14px 16px !important;
  border: 1px solid #dbe4ed !important;
  border-radius: 8px !important;
  background: #ffffff !important;
}

.inicio-stat-label,
.programacion-hoy-kpi-label {
  color: #5f7388 !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
}

.inicio-stat-card strong,
.programacion-hoy-kpi strong {
  color: #102e4b !important;
  font-size: 1.55rem !important;
  line-height: 1 !important;
}

.inicio-stat-card small {
  color: #67788d !important;
}

.inicio-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr) !important;
  gap: 16px !important;
}

.inicio-card,
.programacion-hoy-table-card,
.usuarios-table-card {
  border: 1px solid #dbe4ed !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.inicio-card {
  padding: 18px !important;
}

.inicio-card h3,
.programacion-hoy-table-head h3 {
  margin: 0 0 4px !important;
  color: #173553 !important;
  font-size: 1.08rem !important;
}

.inicio-notes-list,
.inicio-summary-list {
  display: grid !important;
  gap: 10px !important;
  margin-top: 14px !important;
}

.inicio-note-item,
.inicio-summary-item {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 52px !important;
  padding: 12px 14px !important;
  border: 1px solid #e6edf4 !important;
  border-radius: 8px !important;
  background: #fbfcfe !important;
}

.inicio-summary-item {
  grid-template-columns: minmax(0, 1fr) auto !important;
}

.inicio-note-bullet {
  width: 10px !important;
  height: 10px !important;
  border-radius: 999px !important;
  background: #f69a07 !important;
}

.inicio-summary-item span,
.inicio-note-item span:last-child {
  color: #173553 !important;
}

.inicio-summary-item strong {
  color: #102e4b !important;
}

/* Consulta hormigones */
.consulta-provider-tabs {
  display: flex !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}

.consulta-provider-tab {
  min-height: 42px !important;
  padding: 0 20px !important;
  border: 1px solid #dbe4ed !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #173553 !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

.consulta-provider-tab.is-active {
  background: #08263d !important;
  border-color: #08263d !important;
  color: #ffffff !important;
}

.consulta-summary-band {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.consulta-summary-item {
  display: grid !important;
  grid-template-columns: 58px minmax(0, 1fr) !important;
  gap: 16px !important;
  align-items: center !important;
  min-height: 90px !important;
  padding: 18px 20px !important;
  border: 1px solid #dbe4ed !important;
  border-radius: 8px !important;
  background: #ffffff !important;
}

.consulta-summary-icon {
  width: 48px !important;
  height: 48px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: #ffffff !important;
}

.consulta-summary-icon::before,
.consulta-summary-icon::after {
  content: none !important;
}

.consulta-summary-icon svg {
  width: 24px !important;
  height: 24px !important;
  display: block !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.consulta-summary-icon.is-navy { background: linear-gradient(180deg, #12395c, #08263d) !important; }
.consulta-summary-icon.is-green { background: linear-gradient(180deg, #1b9154, #147341) !important; }
.consulta-summary-icon.is-red { background: linear-gradient(180deg, #de4f4f, #b93939) !important; }
.consulta-summary-icon.is-muted { background: linear-gradient(180deg, #8a96a4, #697584) !important; }

.consulta-summary-item strong {
  display: block !important;
  color: #102e4b !important;
  font-size: 1.6rem !important;
  line-height: 1.05 !important;
}

.consulta-summary-label {
  display: block !important;
  color: #5f7388 !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  margin-bottom: 4px !important;
}

.consulta-summary-item small {
  color: #67788d !important;
  line-height: 1.3 !important;
}

.consulta-grid {
  display: grid !important;
  gap: 16px !important;
}

.consulta-provider-panel {
  display: grid !important;
  gap: 14px !important;
}

.consulta-provider-panel.is-hidden {
  display: none !important;
}

.consulta-provider-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 14px !important;
  align-items: start !important;
}

.consulta-provider-title {
  display: grid !important;
  grid-template-columns: 52px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 16px !important;
}

.consulta-provider-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 46px !important;
  height: 46px !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, #12395c, #08263d) !important;
  color: #ffffff !important;
}

.consulta-provider-icon svg {
  width: 23px !important;
  height: 23px !important;
  display: block !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.consulta-provider-head h3 {
  margin: 0 0 4px !important;
  color: #173553 !important;
}

.consulta-provider-head .muted {
  margin: 0 !important;
}

.consulta-provider-stats {
  display: flex !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  justify-content: flex-end !important;
}

.consulta-filters {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto !important;
  gap: 12px !important;
  align-items: end !important;
  padding: 18px !important;
  border: 1px solid #dbe4ed !important;
  border-radius: 8px !important;
  background: #ffffff !important;
}

.catalog-clear-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  min-height: 42px !important;
  white-space: nowrap !important;
}

.catalog-clear-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 16px !important;
  height: 16px !important;
}

.catalog-clear-icon svg {
  width: 16px !important;
  height: 16px !important;
  display: block !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.9 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.consulta-summary-copy.is-updated strong {
  font-size: 1.24rem !important;
  letter-spacing: -0.03em !important;
}

.consulta-summary-time {
  line-height: 1.15 !important;
}

.consulta-table-card .catalog-table tbody tr:hover td {
  background: #f8fbff !important;
}

.consulta-table-card {
  border: 1px solid #dbe4ed !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  background: #ffffff !important;
}

.consulta-table-card .table-wrap,
.usuarios-table-card .table-wrap,
.programacion-hoy-table-card .table-wrap {
  border: 0 !important;
  border-radius: 0 !important;
  background: #ffffff !important;
}

/* Programacion para hoy */
.programacion-hoy-date-chip {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 42px !important;
  padding: 0 16px !important;
  border: 1px solid #dbe4ed !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #173553 !important;
  font-weight: 800 !important;
}

.programacion-hoy-kpis {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.programacion-hoy-kpi small {
  color: #67788d !important;
}

.programacion-hoy-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 260px !important;
  gap: 16px !important;
  align-items: start !important;
}

.programacion-hoy-table-head {
  padding: 18px !important;
  border-bottom: 1px solid #e7edf4 !important;
}

.programacion-hoy-table-head .muted {
  margin: 4px 0 0 !important;
  color: #6b7d90 !important;
  font-size: 0.88rem !important;
}

.programacion-hoy-table-footer,
.reportes-table-footer {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  padding: 14px 18px !important;
  color: #6b7d90 !important;
  font-size: 0.88rem !important;
}

.programacion-hoy-side-card,
.reportes-table-card {
  border: 1px solid #dbe4ed !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  box-shadow: none !important;
}

.programacion-hoy-side-card {
  padding: 18px !important;
}

.programacion-hoy-side-card h3,
.reportes-table-head h3 {
  margin: 0 0 4px !important;
  color: #173553 !important;
  font-size: 1.08rem !important;
}

.programacion-hoy-side-list {
  display: grid !important;
  gap: 0 !important;
  margin-top: 12px !important;
}

.programacion-hoy-side-item {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 12px !important;
  min-height: 52px !important;
  border-top: 1px solid #e7edf4 !important;
}

.programacion-hoy-side-item span {
  color: #173553 !important;
}

.programacion-hoy-side-item strong {
  color: #102e4b !important;
}

/* Usuarios */
.user-connection-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 26px !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  font-size: 0.76rem !important;
  font-weight: 800 !important;
}

.user-connection-badge.is-online {
  background: rgba(21, 128, 61, 0.12) !important;
  color: #15803d !important;
}

.user-connection-badge.is-offline {
  background: rgba(100, 116, 139, 0.14) !important;
  color: #64748b !important;
}

/* Mi programacion specific additions */
.mi-programacion-compare-grid,
.mi-programacion-whatsapp-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

.mi-programacion-inline-actions {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  margin-top: 14px !important;
}

.mi-programacion-history-card td:last-child .ghost-link {
  min-height: 34px !important;
  padding: 6px 12px !important;
  border-radius: 6px !important;
}

/* Reportes */
.reportes-dashboard {
  display: grid !important;
  gap: 18px !important;
}

.reportes-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 18px !important;
  align-items: start !important;
}

.reportes-header-copy h1 {
  margin: 0 0 8px !important;
  color: #14324f !important;
  font-size: 2rem !important;
  line-height: 1.06 !important;
  letter-spacing: -0.04em !important;
}

.reportes-header-copy .muted {
  margin: 0 !important;
  color: #67788d !important;
}

.reportes-header-actions {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

.reportes-primary-action {
  min-height: 42px !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, #f69a07, #e58700) !important;
  border-color: #f69a07 !important;
  box-shadow: none !important;
}

.reportes-kpis {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.reportes-kpi {
  display: grid !important;
  gap: 4px !important;
  min-height: 88px !important;
  padding: 14px 16px !important;
  border: 1px solid #dbe4ed !important;
  border-radius: 8px !important;
  background: #ffffff !important;
}

.reportes-kpi-label {
  color: #5f7388 !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
}

.reportes-kpi strong {
  color: #102e4b !important;
  font-size: 1.55rem !important;
  line-height: 1.1 !important;
}

.reportes-kpi small {
  color: #67788d !important;
}

.reportes-table-card {
  overflow: hidden !important;
}

.reportes-table-head {
  padding: 18px !important;
  border-bottom: 1px solid #e7edf4 !important;
}

.reportes-table-head .muted {
  margin: 4px 0 0 !important;
  color: #6b7d90 !important;
  font-size: 0.88rem !important;
}

.report-action-link {
  min-height: 34px !important;
  padding: 6px 12px !important;
  border-radius: 6px !important;
}

/* Dark theme correction pass */
body.theme-oscuro {
  background: linear-gradient(180deg, #09131f 0%, #0c1724 100%) !important;
  color: #eef5fb !important;
}

body.theme-oscuro .workspace-shell {
  background: #0f1b29 !important;
}

body.theme-oscuro .workspace-topbar,
body.theme-oscuro .workspace-main,
body.theme-oscuro .flash-stack,
body.theme-oscuro .table-panel,
body.theme-oscuro .form-card,
body.theme-oscuro .copy-panel,
body.theme-oscuro .empty-share-card,
body.theme-oscuro .filter-card,
body.theme-oscuro .consulta-summary-item,
body.theme-oscuro .consulta-filters,
body.theme-oscuro .consulta-table-card,
body.theme-oscuro .inicio-card,
body.theme-oscuro .inicio-stat-card,
body.theme-oscuro .schedule-dashboard-kpi,
body.theme-oscuro .schedule-config-card,
body.theme-oscuro .schedule-active-card,
body.theme-oscuro .programacion-hoy-kpi,
body.theme-oscuro .programacion-hoy-table-card,
body.theme-oscuro .programacion-hoy-side-card,
body.theme-oscuro .reportes-kpi,
body.theme-oscuro .reportes-table-card,
body.theme-oscuro .usuarios-table-card {
  border-color: #2a3b4c !important;
  background: #132131 !important;
}

body.theme-oscuro .workspace-subtitle,
body.theme-oscuro .muted,
body.theme-oscuro .helper-text,
body.theme-oscuro .catalog-empty-state,
body.theme-oscuro .inicio-stat-card small,
body.theme-oscuro .consulta-summary-item small,
body.theme-oscuro .schedule-dashboard-kpi small,
body.theme-oscuro .schedule-note,
body.theme-oscuro .programacion-hoy-kpi small,
body.theme-oscuro .programacion-hoy-table-head .muted,
body.theme-oscuro .programacion-hoy-table-footer,
body.theme-oscuro .reportes-kpi small,
body.theme-oscuro .reportes-table-head .muted,
body.theme-oscuro .reportes-table-footer,
body.theme-oscuro .reportes-header-copy .muted {
  color: #aab9c7 !important;
}

body.theme-oscuro input,
body.theme-oscuro select,
body.theme-oscuro textarea,
body.theme-oscuro .ghost-button,
body.theme-oscuro .ghost-link,
body.theme-oscuro .secondary-button,
body.theme-oscuro .programaciones-secondary-action,
body.theme-oscuro .programaciones-filter-chip,
body.theme-oscuro .programaciones-status-filter,
body.theme-oscuro .programaciones-user-filter,
body.theme-oscuro .consulta-provider-tab,
body.theme-oscuro .programacion-hoy-date-chip {
  background: #17283a !important;
  color: #eef5fb !important;
  border-color: #304355 !important;
}

body.theme-oscuro th {
  background: #18293a !important;
  color: #b8c6d4 !important;
  border-bottom-color: #304355 !important;
}

body.theme-oscuro td {
  color: #eef5fb !important;
  border-bottom-color: #243546 !important;
  background: #132131 !important;
}

body.theme-oscuro tbody tr:hover td {
  background: #18293a !important;
}

body.theme-oscuro .table-wrap,
body.theme-oscuro .programaciones-table-card .table-wrap,
body.theme-oscuro .mi-programacion-history-card .table-wrap,
body.theme-oscuro .consulta-table-card .table-wrap,
body.theme-oscuro .usuarios-table-card .table-wrap,
body.theme-oscuro .programacion-hoy-table-card .table-wrap {
  background: #132131 !important;
  border-color: #2a3b4c !important;
}

body.theme-oscuro .theme-label span,
body.theme-oscuro label,
body.theme-oscuro .workspace-kicker,
body.theme-oscuro .section-label,
body.theme-oscuro .consulta-summary-label,
body.theme-oscuro .inicio-stat-label,
body.theme-oscuro .programacion-hoy-kpi-label {
  color: #9fb4c8 !important;
}

body.theme-oscuro .inicio-hero h1,
body.theme-oscuro .consulta-header h1,
body.theme-oscuro .schedule-dashboard-header h1,
body.theme-oscuro .programacion-hoy-header h1,
body.theme-oscuro .usuarios-header h1,
body.theme-oscuro .reportes-header-copy h1,
body.theme-oscuro .inicio-card h3,
body.theme-oscuro .programacion-hoy-table-head h3,
body.theme-oscuro .programacion-hoy-side-card h3,
body.theme-oscuro .reportes-table-head h3,
body.theme-oscuro .consulta-provider-head h3,
body.theme-oscuro .workspace-heading h2 {
  color: #eef5fb !important;
}

body.theme-oscuro .inicio-note-item,
body.theme-oscuro .inicio-summary-item,
body.theme-oscuro .schedule-config-body > .helper-text,
body.theme-oscuro .schedule-active-card > .helper-text {
  background: #17283a !important;
  border-color: #2a3b4c !important;
}

body.theme-oscuro .inicio-summary-item span,
body.theme-oscuro .inicio-summary-item strong,
body.theme-oscuro .inicio-note-item span:last-child,
body.theme-oscuro .consulta-summary-item strong,
body.theme-oscuro .schedule-dashboard-kpi strong,
body.theme-oscuro .programacion-hoy-kpi strong,
body.theme-oscuro .programacion-hoy-side-item span,
body.theme-oscuro .programacion-hoy-side-item strong,
body.theme-oscuro .reportes-kpi strong,
body.theme-oscuro .programacion-hoy-date-chip,
body.theme-oscuro .user-connection-badge.is-offline {
  color: #eef5fb !important;
}

body.theme-oscuro .programacion-hoy-side-item,
body.theme-oscuro .programacion-hoy-table-head,
body.theme-oscuro .programacion-hoy-table-footer,
body.theme-oscuro .reportes-table-head,
body.theme-oscuro .reportes-table-footer,
body.theme-oscuro .schedule-card-head,
body.theme-oscuro .schedule-window-summary,
body.theme-oscuro .schedule-detail-list,
body.theme-oscuro .schedule-detail-list article {
  border-color: #243546 !important;
}

body.theme-oscuro .consulta-table-card .catalog-table tbody tr:hover td {
  background: #18293a !important;
}

body.theme-oscuro .user-connection-badge.is-online {
  color: #81e5a8 !important;
  background: rgba(34, 197, 94, 0.18) !important;
}

body.theme-oscuro .user-connection-badge.is-offline {
  background: rgba(148, 163, 184, 0.16) !important;
}

@media (max-width: 1180px) {
  .inicio-grid,
  .mi-programacion-compare-grid,
  .mi-programacion-whatsapp-grid,
  .consulta-summary-band,
  .schedule-dashboard-kpis,
  .programacion-hoy-kpis,
  .reportes-kpis {
    grid-template-columns: 1fr !important;
  }

  .programacion-hoy-layout {
    grid-template-columns: 1fr !important;
  }

  .consulta-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 860px) {
  .inicio-hero,
  .consulta-header,
  .programacion-hoy-header,
  .usuarios-header,
  .reportes-header {
    grid-template-columns: 1fr !important;
  }

  .inicio-hero-stats,
  .programacion-hoy-kpis,
  .reportes-kpis {
    grid-template-columns: 1fr !important;
  }

  .consulta-provider-head {
    grid-template-columns: 1fr !important;
  }

  .consulta-filters {
    grid-template-columns: 1fr !important;
  }
}

/* Final normalization: rebuilt toolbar */
.app-workspace-shell {
  min-height: 100vh !important;
  margin-left: 260px !important;
  padding: 0 28px 28px !important;
  background: transparent !important;
}

.app-flash-stack {
  margin: 0 !important;
}

.app-workspace-main {
  display: grid !important;
  gap: 20px !important;
  padding: 14px 0 0 !important;
}

.global-toolbar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  min-height: 48px !important;
  margin: 0 0 8px !important;
  padding: 6px 0 10px !important;
  border-bottom: 1px solid var(--line) !important;
}

.global-toolbar-meta {
  display: grid !important;
  gap: 3px !important;
  min-width: 0 !important;
}

.global-toolbar-kicker {
  margin: 0 !important;
  color: #0a3762 !important;
  font-size: 0.72rem !important;
  line-height: 1.1 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
  font-weight: 800 !important;
}

.global-toolbar-path {
  margin: 0 !important;
  color: #5a6b7d !important;
  font-size: 0.9rem !important;
  line-height: 1.2 !important;
}

.global-toolbar-controls,
.global-toolbar-theme-form,
.global-toolbar-logout-form {
  display: flex !important;
  align-items: center !important;
  margin: 0 !important;
}

.global-toolbar-controls {
  gap: 10px !important;
  justify-content: flex-end !important;
  flex-wrap: nowrap !important;
}

.global-toolbar-theme-field {
  all: unset;
  display: grid !important;
  grid-template-columns: auto 126px !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 38px !important;
  color: #0f172a !important;
}

.global-toolbar-theme-text {
  all: unset;
  display: inline-flex !important;
  align-items: center !important;
  min-height: 18px !important;
  white-space: nowrap !important;
  font-size: 0.83rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}

.global-toolbar-select {
  all: unset;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-width: 126px !important;
  height: 38px !important;
  padding: 0 34px 0 14px !important;
  border: 1px solid #cdd7e1 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #0f172a !important;
  font-size: 0.88rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  appearance: none !important;
  background-image:
    linear-gradient(45deg, transparent 50%, #173553 50%),
    linear-gradient(135deg, #173553 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 16px,
    calc(100% - 12px) 16px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.global-toolbar-logout-button {
  all: unset;
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 142px !important;
  height: 38px !important;
  padding: 0 18px !important;
  border: 1px solid #cdd7e1 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #173553 !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

.mi-programacion-dashboard {
  display: grid !important;
  gap: 18px !important;
}

.mi-programacion-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 396px) !important;
  gap: 18px !important;
  align-items: start !important;
}

.mi-programacion-header-copy {
  display: grid !important;
  gap: 8px !important;
}

.mi-programacion-header-chips {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

.mi-programacion-chip {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 30px !important;
  padding: 5px 10px !important;
  border: 1px solid #dbe4ed !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  color: #35506c !important;
  font-size: 0.77rem !important;
  font-weight: 800 !important;
}

.mi-programacion-header-copy h1 {
  margin: 0 !important;
  font-size: 2rem !important;
  line-height: 1.02 !important;
  letter-spacing: -0.05em !important;
}

.mi-programacion-header-copy .muted {
  margin: 0 !important;
  max-width: 720px !important;
}

.mi-programacion-header-stats {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.mi-programacion-stat-card {
  min-height: 96px !important;
  padding: 16px !important;
  border-radius: 8px !important;
}

.mi-programacion-stat-card strong {
  font-size: 1.9rem !important;
}

.mi-programacion-stat-card small {
  font-size: 0.84rem !important;
}

.mi-programacion-compare-grid,
.mi-programacion-whatsapp-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
}

.mi-programacion-panel {
  padding: 18px !important;
  border-radius: 8px !important;
}

.mi-programacion-panel-head {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: space-between !important;
  gap: 14px !important;
  margin-bottom: 16px !important;
}

.mi-programacion-panel-head > div {
  min-width: 0 !important;
}

.mi-programacion-panel-head h3 {
  margin: 0 0 4px !important;
  font-size: 1.08rem !important;
  line-height: 1.2 !important;
}

.mi-programacion-panel-count {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 30px !important;
  padding: 5px 12px !important;
  border: 1px solid #dbe4ed !important;
  border-radius: 999px !important;
  background: #f8fbff !important;
  color: #35506c !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}

.mi-programacion-list {
  display: grid !important;
  gap: 12px !important;
}

.mi-programacion-row-card {
  padding: 16px !important;
  border-radius: 8px !important;
}

.mi-programacion-row-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

.mi-programacion-row-field {
  min-height: 68px !important;
}

.mi-programacion-row-field.is-wide {
  grid-column: 1 / -1 !important;
}

.mi-programacion-empty {
  min-height: 120px !important;
  display: grid !important;
  align-content: center !important;
  gap: 10px !important;
}

.mi-programacion-empty h3,
.mi-programacion-empty .muted {
  margin: 0 !important;
}

.mi-programacion-copy-box {
  display: grid !important;
  gap: 12px !important;
}

#whatsapp-programacion-hoy-text.copy-textarea,
#whatsapp-programacion-text.copy-textarea {
  min-height: 128px !important;
  border-radius: 8px !important;
}

.mi-programacion-copy-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

.mi-programacion-copy-button {
  min-width: 228px !important;
  min-height: 42px !important;
  border-radius: 8px !important;
}

.mi-programacion-history-panel {
  padding: 18px !important;
}

.mi-programacion-history-groups {
  display: grid !important;
  gap: 14px !important;
}

.mi-programacion-history-head {
  padding: 16px 18px 12px !important;
}

body.theme-oscuro .global-toolbar {
  border-bottom-color: #2a3b4c !important;
}

body.theme-oscuro .app-workspace-shell,
body.theme-oscuro .app-workspace-main {
  background: transparent !important;
}

body.theme-oscuro .global-toolbar-kicker {
  color: #9fb4c8 !important;
}

body.theme-oscuro .global-toolbar-path,
body.theme-oscuro .global-toolbar-theme-text {
  color: #d8e4ef !important;
}

body.theme-oscuro .global-toolbar-select,
body.theme-oscuro .global-toolbar-logout-button {
  background: #17283a !important;
  color: #eef5fb !important;
  border-color: #304355 !important;
}

body.theme-oscuro .global-toolbar-select {
  background-image:
    linear-gradient(45deg, transparent 50%, #d8e4ef 50%),
    linear-gradient(135deg, #d8e4ef 50%, transparent 50%);
}

body.theme-oscuro .mi-programacion-panel-count {
  background: #17283a !important;
  border-color: #304355 !important;
  color: #eef5fb !important;
}

body.theme-oscuro .mi-programacion-chip {
  background: #17283a !important;
  border-color: #304355 !important;
  color: #eef5fb !important;
}

@media (max-width: 1180px) {
  .mi-programacion-header,
  .mi-programacion-compare-grid,
  .mi-programacion-whatsapp-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 860px) {
  .app-workspace-shell {
    margin-left: 0 !important;
    padding: 0 16px 20px !important;
  }

  .global-toolbar {
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
  }

  .global-toolbar-controls {
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }

  .mi-programacion-header-stats,
  .mi-programacion-row-grid {
    grid-template-columns: 1fr !important;
  }

  .mi-programacion-panel-head {
    flex-direction: column !important;
    align-items: stretch !important;
  }
}

/* Root refresh: contrast, pagination and planning layouts */
body {
  --workspace-panel: rgba(255, 255, 255, 0.94);
  --workspace-panel-strong: #ffffff;
  --workspace-panel-soft: #f5f8fc;
  --workspace-border: rgba(203, 213, 225, 0.85);
  --workspace-heading: #12314d;
  --workspace-text: #29415c;
  --workspace-muted: #60758d;
  --workspace-subtle: rgba(37, 99, 235, 0.08);
  --workspace-highlight: rgba(245, 158, 11, 0.14);
  --workspace-shadow: 0 22px 54px rgba(15, 23, 42, 0.08);
}

body.theme-oscuro {
  --workspace-panel: rgba(12, 20, 33, 0.94);
  --workspace-panel-strong: rgba(15, 23, 38, 0.98);
  --workspace-panel-soft: rgba(21, 33, 51, 0.92);
  --workspace-border: rgba(74, 92, 117, 0.72);
  --workspace-heading: #f4f8fc;
  --workspace-text: #dce7f2;
  --workspace-muted: #a9bbcf;
  --workspace-subtle: rgba(96, 165, 250, 0.16);
  --workspace-highlight: rgba(245, 158, 11, 0.18);
  --workspace-shadow: 0 26px 60px rgba(2, 6, 23, 0.34);
}

.app-sidebar,
.programaciones-kpi,
.programaciones-table-card,
.programaciones-side-card,
.inicio-card,
.inicio-stat-card,
.programacion-hoy-kpi,
.programacion-hoy-table-card,
.programacion-hoy-side-card,
.mi-programacion-panel,
.mi-programacion-stat-card,
.mi-programacion-summary-card,
.mi-programacion-row-card,
.mi-programacion-history-card,
.global-toolbar-select,
.global-toolbar-logout-button,
.programaciones-filter-chip,
.programaciones-status-filter,
.programaciones-user-filter,
.programacion-hoy-date-chip {
  background: var(--workspace-panel) !important;
  border-color: var(--workspace-border) !important;
  box-shadow: var(--workspace-shadow) !important;
}

.app-sidebar,
.programaciones-table-card .table-wrap,
.programacion-hoy-table-card .table-wrap,
.mi-programacion-history-card .table-wrap,
.table-wrap {
  background: var(--workspace-panel-strong) !important;
  border-color: var(--workspace-border) !important;
}

.global-toolbar {
  border-bottom-color: var(--workspace-border) !important;
}

.global-toolbar-kicker,
.programaciones-kpi-label,
.inicio-stat-label,
.programacion-hoy-kpi-label,
.mi-programacion-stat-label,
.mi-programacion-summary-card span {
  color: var(--workspace-muted) !important;
}

.global-toolbar-path,
.global-toolbar-theme-text,
.programaciones-header-copy .muted,
.programaciones-table-head .muted,
.programacion-hoy-header .muted,
.programacion-hoy-table-head .muted,
.programacion-hoy-table-footer,
.inicio-hero .muted,
.inicio-stat-card small,
.mi-programacion-header-copy .muted,
.mi-programacion-row-meta,
.mi-programacion-copy-actions .muted-inline {
  color: var(--workspace-muted) !important;
}

.sidebar-brand-copy h1,
.sidebar-link strong,
.sidebar-user-card strong,
.sidebar-footer-meta p,
.programaciones-header-copy h1,
.programaciones-kpi-copy strong,
.programaciones-table-head h3,
.programaciones-side-card h3,
.programaciones-side-item span,
.programaciones-side-item strong,
.inicio-hero h1,
.inicio-card h3,
.inicio-summary-item span,
.inicio-summary-item strong,
.inicio-note-item span:last-child,
.programacion-hoy-header h1,
.programacion-hoy-table-head h3,
.programacion-hoy-side-card h3,
.programacion-hoy-side-item span,
.programacion-hoy-side-item strong,
.programacion-hoy-kpi strong,
.mi-programacion-header-copy h1,
.mi-programacion-panel-head h3,
.mi-programacion-row-heading h4,
.mi-programacion-row-field strong,
.mi-programacion-summary-card strong,
.mi-programacion-history-head strong {
  color: var(--workspace-heading) !important;
}

.sidebar-link {
  color: var(--workspace-muted) !important;
  border: 1px solid transparent !important;
  background: transparent !important;
}

.sidebar-link:hover,
.sidebar-link.is-active {
  color: var(--workspace-heading) !important;
  background: var(--workspace-subtle) !important;
  border-color: var(--workspace-border) !important;
}

.sidebar-user-card,
.sidebar-mini-status,
.inicio-note-item,
.inicio-summary-item,
.programaciones-side-item,
.programacion-hoy-side-item,
.mi-programacion-summary-card,
.mi-programacion-row-meta {
  background: var(--workspace-panel-soft) !important;
  border-color: var(--workspace-border) !important;
}

th {
  background: var(--workspace-panel-soft) !important;
  color: var(--workspace-muted) !important;
  border-bottom-color: var(--workspace-border) !important;
}

td {
  color: var(--workspace-text) !important;
  border-bottom-color: var(--workspace-border) !important;
  background: var(--workspace-panel-strong) !important;
}

tbody tr:hover td {
  background: var(--workspace-panel-soft) !important;
}

.programaciones-filters {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
}

.programaciones-filters-left {
  flex: 1 1 460px !important;
}

.programaciones-inline-tools {
  margin: 0 !important;
}

.programacion-hoy-table-head {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 12px !important;
  align-items: end !important;
}

.programaciones-pager {
  flex-wrap: wrap !important;
}

.programaciones-pager-button {
  border: 1px solid var(--workspace-border) !important;
  background: var(--workspace-panel-soft) !important;
  color: var(--workspace-text) !important;
}

.programaciones-pager-button.is-current {
  background: linear-gradient(180deg, var(--primary), var(--primary-strong)) !important;
  border-color: transparent !important;
  color: #f8fbff !important;
}

.status-modified {
  background: var(--warning-soft) !important;
  color: var(--warning) !important;
}

.inicio-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: start !important;
}

.inicio-card {
  min-height: 100% !important;
}

.inicio-card-accent {
  background:
    linear-gradient(180deg, rgba(245, 158, 11, 0.08), rgba(255, 255, 255, 0.92)),
    var(--workspace-panel) !important;
}

body.theme-oscuro .inicio-card-accent {
  background:
    linear-gradient(180deg, rgba(245, 158, 11, 0.12), rgba(15, 23, 38, 0.96)),
    var(--workspace-panel) !important;
}

.mi-programacion-chip {
  background: var(--workspace-panel-soft) !important;
  border-color: var(--workspace-border) !important;
  color: var(--workspace-text) !important;
}

.mi-programacion-chip.is-action {
  background: linear-gradient(180deg, var(--primary), var(--primary-strong)) !important;
  border-color: transparent !important;
  color: #f8fbff !important;
}

.mi-programacion-summary-strip {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

.mi-programacion-summary-card {
  display: grid !important;
  gap: 6px !important;
  min-height: 92px !important;
  padding: 16px 18px !important;
  border: 1px solid var(--workspace-border) !important;
  border-radius: 18px !important;
}

.mi-programacion-summary-card strong {
  font-size: 1.85rem !important;
  line-height: 1 !important;
}

.mi-programacion-row-card {
  border: 1px solid var(--workspace-border) !important;
  border-radius: 20px !important;
}

.mi-programacion-row-card.is-cancelled {
  border-color: rgba(220, 38, 38, 0.32) !important;
}

.mi-programacion-row-meta {
  display: flex !important;
  justify-content: space-between !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  margin-top: 12px !important;
  padding: 10px 12px !important;
  border: 1px solid var(--workspace-border) !important;
  border-radius: 12px !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
}

.mi-programacion-inline-actions {
  margin-top: 12px !important;
}

.route-modal-shell .modal-form-topbar,
.template-form-modal .modal-form-topbar {
  grid-template-columns: 300px minmax(0, 1fr) !important;
}

.modal-form-topbar-compact {
  grid-template-columns: minmax(0, 320px) !important;
}

.route-modal-shell .modal-programacion-grid,
.template-form-modal .modal-programacion-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr)) !important;
  gap: 16px 20px !important;
}

.route-modal-shell .field-type,
.template-form-modal .field-type {
  grid-column: span 3 !important;
}

.route-modal-shell .field-frente,
.template-form-modal .field-frente {
  grid-column: span 5 !important;
}

.route-modal-shell .field-provider,
.route-modal-shell .field-dose,
.route-modal-shell .field-qty,
.route-modal-shell .field-time,
.template-form-modal .field-provider,
.template-form-modal .field-dose,
.template-form-modal .field-qty,
.template-form-modal .field-time {
  grid-column: span 4 !important;
}

.programacion-row.is-ground-like .field-type {
  grid-column: span 3 !important;
}

.programacion-row.is-ground-like .field-frente {
  grid-column: span 5 !important;
}

.programacion-row.is-ground-like .field-time {
  grid-column: span 4 !important;
}

.programacion-row.is-ground-like .field-location textarea {
  min-height: 88px !important;
}

body.theme-oscuro input,
body.theme-oscuro select,
body.theme-oscuro textarea,
body.theme-oscuro .ghost-button,
body.theme-oscuro .ghost-link,
body.theme-oscuro .secondary-button,
body.theme-oscuro .programaciones-primary-action,
body.theme-oscuro .programaciones-secondary-action {
  color: var(--workspace-text) !important;
}

body.theme-oscuro input,
body.theme-oscuro select,
body.theme-oscuro textarea,
body.theme-oscuro .ghost-button,
body.theme-oscuro .ghost-link,
body.theme-oscuro .secondary-button,
body.theme-oscuro .global-toolbar-select,
body.theme-oscuro .global-toolbar-logout-button,
body.theme-oscuro .programaciones-secondary-action,
body.theme-oscuro .programaciones-user-filter,
body.theme-oscuro .programaciones-status-filter,
body.theme-oscuro .programaciones-filter-chip,
body.theme-oscuro .programacion-hoy-date-chip {
  background: var(--workspace-panel-soft) !important;
  border-color: var(--workspace-border) !important;
}

body.theme-oscuro .programaciones-primary-action,
body.theme-oscuro .mi-programacion-chip.is-action,
body.theme-oscuro .programaciones-pager-button.is-current {
  color: #f8fbff !important;
}

@media (max-width: 1180px) {
  .inicio-grid,
  .mi-programacion-summary-strip {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 860px) {
  .programacion-hoy-table-head,
  .programaciones-filters,
  .route-modal-shell .modal-form-topbar,
  .template-form-modal .modal-form-topbar,
  .route-modal-shell .modal-programacion-grid,
  .template-form-modal .modal-programacion-grid {
    grid-template-columns: 1fr !important;
  }

  .mi-programacion-row-meta {
    flex-direction: column !important;
  }
}

/* Theme QA pass: unified contrast for all views */
body.theme-claro {
  --qa-bg-start: #f4f7fb;
  --qa-bg-end: #e8eef6;
  --qa-surface: #ffffff;
  --qa-surface-2: #f4f8fc;
  --qa-surface-3: #e9f0f8;
  --qa-sidebar: #f6f9fd;
  --qa-sidebar-2: #ffffff;
  --qa-border: #c4d0de;
  --qa-border-strong: #acbdd0;
  --qa-text: #223447;
  --qa-text-soft: #4d6378;
  --qa-heading: #0f2238;
  --qa-muted: #667b91;
  --qa-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  --qa-shadow-strong: 0 18px 42px rgba(15, 23, 42, 0.12);
  --qa-primary: #1a5d97;
  --qa-primary-strong: #154a79;
  --qa-accent: #f39a13;
  --qa-accent-strong: #db8300;
}

body.theme-oscuro {
  --qa-bg-start: #0c1422;
  --qa-bg-end: #121d2e;
  --qa-surface: #142235;
  --qa-surface-2: #1a2b42;
  --qa-surface-3: #20344f;
  --qa-sidebar: #111b2b;
  --qa-sidebar-2: #152235;
  --qa-border: #31455e;
  --qa-border-strong: #405775;
  --qa-text: #e4edf7;
  --qa-text-soft: #c0cedc;
  --qa-heading: #f5f8fc;
  --qa-muted: #9db0c4;
  --qa-shadow: 0 18px 42px rgba(2, 6, 23, 0.34);
  --qa-shadow-strong: 0 24px 56px rgba(2, 6, 23, 0.44);
  --qa-primary: #6dafff;
  --qa-primary-strong: #4e93eb;
  --qa-accent: #f2a226;
  --qa-accent-strong: #dd8a09;
}

body.theme-claro,
body.theme-oscuro {
  color: var(--qa-text) !important;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--qa-accent) 10%, transparent), transparent 20rem),
    radial-gradient(circle at 88% 0%, color-mix(in srgb, var(--qa-primary) 9%, transparent), transparent 24rem),
    linear-gradient(180deg, var(--qa-bg-start) 0%, var(--qa-bg-end) 100%) !important;
}

.app-sidebar {
  background:
    linear-gradient(180deg, var(--qa-sidebar) 0%, var(--qa-sidebar-2) 100%) !important;
  border-right: 1px solid var(--qa-border) !important;
  box-shadow: var(--qa-shadow) !important;
}

.sidebar-brand-copy h1,
.sidebar-link strong,
.sidebar-user-card strong,
.global-toolbar-path,
.programaciones-header-copy h1,
.inicio-hero h1,
.programacion-hoy-header h1,
.reportes-header-copy h1,
.usuarios-header h1,
.consulta-header h1,
.schedule-dashboard-header h1,
.mi-programacion-header-copy h1,
.workspace-heading h2,
.inicio-card h3,
.programaciones-table-head h3,
.programaciones-side-card h3,
.programacion-hoy-table-head h3,
.programacion-hoy-side-card h3,
.consulta-provider-head h3,
.reportes-table-head h3,
.mi-programacion-panel-head h3,
.mi-programacion-row-heading h4,
.mi-programacion-summary-card strong,
.schedule-card-head h3,
.reportes-kpi strong,
.programaciones-kpi-copy strong,
.programacion-hoy-kpi strong {
  color: var(--qa-heading) !important;
}

.sidebar-brand-copy .muted,
.sidebar-panel-label,
.sidebar-mini-status,
.sidebar-footer-meta p,
.global-toolbar-kicker,
.global-toolbar-theme-text,
.programaciones-header-copy .muted,
.programaciones-kpi-label,
.programaciones-kpi-copy small,
.programaciones-table-head .muted,
.programaciones-table-footer,
.programaciones-user-filter span,
.inicio-hero .muted,
.inicio-stat-card small,
.inicio-stat-label,
.inicio-summary-item span,
.inicio-note-item span:last-child,
.programacion-hoy-header .muted,
.programacion-hoy-kpi-label,
.programacion-hoy-table-head .muted,
.programacion-hoy-table-footer,
.programacion-hoy-side-item span,
.consulta-header .muted,
.consulta-summary-label,
.reportes-header-copy .muted,
.reportes-kpi-label,
.reportes-table-head .muted,
.reportes-table-footer,
.usuarios-header .muted,
.schedule-note,
.mi-programacion-header-copy .muted,
.mi-programacion-stat-label,
.mi-programacion-row-field span,
.mi-programacion-row-meta,
.mi-programacion-copy-actions .muted-inline {
  color: var(--qa-text-soft) !important;
}

.sidebar-link {
  color: var(--qa-text-soft) !important;
  border: 1px solid transparent !important;
  background: transparent !important;
}

.sidebar-link:hover,
.sidebar-link.is-active {
  color: var(--qa-heading) !important;
  background: color-mix(in srgb, var(--qa-primary) 16%, var(--qa-surface-2)) !important;
  border-color: var(--qa-border) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

.sidebar-user-card,
.sidebar-mini-status,
.global-toolbar,
.workspace-topbar,
.flash-stack,
.dashboard-command-main,
.dashboard-summary-strip,
.dashboard-context-strip,
.dashboard-table-panel,
.dashboard-hero-main,
.dashboard-hero-side,
.summary-stat-card,
.programaciones-kpi,
.programaciones-header,
.programaciones-filters,
.programaciones-table-card,
.programaciones-side-card,
.inicio-hero,
.inicio-card,
.inicio-stat-card,
.programacion-hoy-header,
.programacion-hoy-kpi,
.programacion-hoy-table-card,
.programacion-hoy-side-card,
.reportes-header,
.consulta-summary-item,
.consulta-filters,
.consulta-table-card,
.reportes-kpi,
.reportes-table-card,
.usuarios-header,
.schedule-dashboard-header,
.usuarios-table-card,
.schedule-dashboard-kpi,
.schedule-config-card,
.schedule-active-card,
.mi-programacion-header,
.mi-programacion-panel,
.mi-programacion-stat-card,
.mi-programacion-summary-card,
.mi-programacion-row-card,
.mi-programacion-history-card,
.filter-card,
.copy-panel,
.empty-share-card,
.provider-card {
  background: var(--qa-surface) !important;
  border-color: var(--qa-border) !important;
  box-shadow: var(--qa-shadow) !important;
}

.workspace-topbar,
.programaciones-header,
.programacion-hoy-header,
.reportes-header,
.usuarios-header,
.schedule-dashboard-header,
.mi-programacion-header,
.inicio-hero {
  background: color-mix(in srgb, var(--qa-surface) 88%, transparent) !important;
  border: 1px solid color-mix(in srgb, var(--qa-border) 82%, transparent) !important;
  box-shadow: var(--qa-shadow) !important;
  backdrop-filter: blur(14px);
}

.inicio-card-accent {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--qa-accent) 12%, var(--qa-surface)), var(--qa-surface)) !important;
}

.inicio-note-item,
.inicio-summary-item,
.programaciones-side-item,
.programacion-hoy-side-item,
.mi-programacion-row-meta,
.mi-programacion-summary-card,
.schedule-window-summary,
.schedule-detail-list article,
.notice-inline {
  background: var(--qa-surface-3) !important;
  border-color: var(--qa-border) !important;
}

.table-wrap,
.programaciones-table-card .table-wrap,
.programacion-hoy-table-card .table-wrap,
.mi-programacion-history-card .table-wrap,
.consulta-table-card .table-wrap,
.usuarios-table-card .table-wrap,
.dashboard-table-panel .table-wrap {
  background: var(--qa-surface-2) !important;
  border-color: var(--qa-border) !important;
}

th,
.programaciones-table-card th,
.programacion-hoy-table-card th,
.usuarios-table-card th,
.consulta-table-card th,
.reportes-table-card th {
  background: var(--qa-surface-3) !important;
  color: var(--qa-text-soft) !important;
  border-bottom-color: var(--qa-border) !important;
}

td,
.programaciones-table-card td,
.programacion-hoy-table-card td,
.usuarios-table-card td,
.consulta-table-card td,
.reportes-table-card td {
  color: var(--qa-text) !important;
  background: var(--qa-surface) !important;
  border-bottom-color: var(--qa-border) !important;
}

tbody tr:hover td,
.consulta-table-card .catalog-table tbody tr:hover td {
  background: var(--qa-surface-2) !important;
}

input,
select,
textarea,
.ghost-button,
.ghost-link,
.secondary-button,
.programaciones-secondary-action,
.programaciones-filter-chip,
.programaciones-status-filter,
.programaciones-user-filter,
.programacion-hoy-date-chip,
.global-toolbar-select,
.global-toolbar-logout-button,
.mi-programacion-chip,
.catalog-provider-tab,
.report-action-link {
  background: var(--qa-surface-2) !important;
  color: var(--qa-text) !important;
  border-color: var(--qa-border) !important;
}

input::placeholder,
textarea::placeholder {
  color: var(--qa-muted) !important;
}

input:hover,
select:hover,
textarea:hover,
.ghost-button:hover,
.ghost-link:hover,
.secondary-button:hover,
.programaciones-secondary-action:hover,
.catalog-provider-tab:hover,
.global-toolbar-logout-button:hover {
  border-color: var(--qa-border-strong) !important;
  background: var(--qa-surface-3) !important;
}

input:focus,
select:focus,
textarea:focus,
.global-toolbar-select:focus,
.global-toolbar-logout-button:focus,
.ghost-button:focus,
.ghost-link:focus {
  border-color: color-mix(in srgb, var(--qa-primary) 58%, white) !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--qa-primary) 18%, transparent) !important;
  background: var(--qa-surface) !important;
}

button,
.primary-link,
.programaciones-primary-action,
.reportes-primary-action,
.mi-programacion-chip.is-action {
  background: linear-gradient(180deg, var(--qa-accent), var(--qa-accent-strong)) !important;
  color: #fffdf7 !important;
  border-color: transparent !important;
  box-shadow: 0 16px 30px color-mix(in srgb, var(--qa-accent) 28%, transparent) !important;
}

button:hover,
.primary-link:hover,
.programaciones-primary-action:hover,
.reportes-primary-action:hover,
.mi-programacion-chip.is-action:hover {
  background: linear-gradient(180deg, color-mix(in srgb, var(--qa-accent) 92%, white), var(--qa-accent-strong)) !important;
  color: #fffdf7 !important;
}

.global-toolbar {
  background: transparent !important;
  border-bottom: 1px solid var(--qa-border) !important;
  box-shadow: none !important;
}

.workspace-topbar {
  border-bottom-color: var(--qa-border) !important;
}

.dashboard-command-copy .muted,
.dashboard-hero-main .muted,
.dashboard-hero-side .muted,
.dashboard-context-chip span:last-child,
.summary-stat-card small,
.mi-programacion-panel-count,
.mi-programacion-copy-box .muted,
.programaciones-side-item span:last-child,
.programacion-hoy-side-item span:last-child {
  color: var(--qa-text-soft) !important;
}

.dashboard-summary-strip,
.dashboard-context-strip,
.summary-stat-card {
  border-color: var(--qa-border) !important;
}

.dashboard-table-panel,
.dashboard-command-main,
.dashboard-hero-main,
.dashboard-hero-side {
  border-color: var(--qa-border) !important;
}

.programaciones-action-button,
.mi-programacion-copy-button,
.programacion-hoy-action-button,
.report-action-link.is-primary {
  box-shadow: 0 10px 24px color-mix(in srgb, var(--qa-accent) 22%, transparent) !important;
}

.global-toolbar-select,
.global-toolbar-logout-button,
.theme-label,
.theme-label select {
  box-shadow: none !important;
}

.programaciones-pager-button {
  background: var(--qa-surface-2) !important;
  color: var(--qa-text) !important;
  border-color: var(--qa-border) !important;
}

.programaciones-pager-button.is-current {
  background: linear-gradient(180deg, var(--qa-primary), var(--qa-primary-strong)) !important;
  color: #f8fbff !important;
  border-color: transparent !important;
}

.programaciones-pager-button.is-muted {
  color: var(--qa-text-soft) !important;
}

.type-neutral {
  background: color-mix(in srgb, var(--qa-primary) 10%, var(--qa-surface-2)) !important;
  color: var(--qa-text-soft) !important;
}

.status-modified {
  background: color-mix(in srgb, #f59e0b 18%, transparent) !important;
  color: #d78600 !important;
}

body.theme-oscuro .status-modified {
  color: #ffbe55 !important;
}

.mi-programacion-row-card,
.mi-programacion-summary-card,
.mi-programacion-history-card,
.route-modal-shell .modal-programacion-card,
.template-form-modal .modal-programacion-card,
.route-modal-shell .modal-actions-bar,
.template-form-modal .modal-actions-bar,
.template-form-modal {
  background: var(--qa-surface) !important;
  border-color: var(--qa-border) !important;
}

.mi-programacion-row-card.is-cancelled {
  border-color: color-mix(in srgb, #ef4444 38%, var(--qa-border)) !important;
}

.route-modal-shell .modal-template-loader,
.template-form-modal .template-name-card {
  background: transparent !important;
}

.route-modal-shell textarea,
.template-form-modal textarea {
  background: var(--qa-surface-2) !important;
}

body.theme-claro .programaciones-primary-action,
body.theme-claro .reportes-primary-action,
body.theme-claro .mi-programacion-chip.is-action {
  color: #fffaf2 !important;
}

body.theme-oscuro .sidebar-link:hover,
body.theme-oscuro .sidebar-link.is-active {
  background: color-mix(in srgb, var(--qa-primary) 16%, var(--qa-surface-3)) !important;
}

body.theme-oscuro .sidebar-user-card,
body.theme-oscuro .sidebar-mini-status {
  background: rgba(255, 255, 255, 0.02) !important;
}

body.theme-claro .app-sidebar {
  box-shadow: 8px 0 30px rgba(15, 23, 42, 0.06) !important;
}

body.theme-claro .workspace-topbar,
body.theme-claro .programaciones-header,
body.theme-claro .programacion-hoy-header,
body.theme-claro .reportes-header,
body.theme-claro .usuarios-header,
body.theme-claro .schedule-dashboard-header,
body.theme-claro .mi-programacion-header,
body.theme-claro .inicio-hero {
  background: rgba(255, 255, 255, 0.84) !important;
}

body.theme-oscuro .workspace-topbar,
body.theme-oscuro .programaciones-header,
body.theme-oscuro .programacion-hoy-header,
body.theme-oscuro .reportes-header,
body.theme-oscuro .usuarios-header,
body.theme-oscuro .schedule-dashboard-header,
body.theme-oscuro .mi-programacion-header,
body.theme-oscuro .inicio-hero {
  background: rgba(20, 34, 53, 0.9) !important;
}

body.theme-oscuro .dashboard-command-copy .muted,
body.theme-oscuro .dashboard-hero-main .muted,
body.theme-oscuro .dashboard-hero-side .muted,
body.theme-oscuro .summary-stat-card small,
body.theme-oscuro .programaciones-header-copy .muted,
body.theme-oscuro .programacion-hoy-header .muted,
body.theme-oscuro .mi-programacion-header-copy .muted,
body.theme-oscuro .reportes-header-copy .muted,
body.theme-oscuro .usuarios-header .muted,
body.theme-oscuro .consulta-header .muted,
body.theme-oscuro .programaciones-table-head .muted,
body.theme-oscuro .programacion-hoy-table-head .muted,
body.theme-oscuro .reportes-table-head .muted {
  color: #c9d7e6 !important;
}

body.theme-oscuro .programaciones-table-card,
body.theme-oscuro .programacion-hoy-table-card,
body.theme-oscuro .consulta-table-card,
body.theme-oscuro .reportes-table-card,
body.theme-oscuro .usuarios-table-card,
body.theme-oscuro .mi-programacion-panel,
body.theme-oscuro .schedule-config-card,
body.theme-oscuro .schedule-active-card {
  box-shadow: var(--qa-shadow-strong) !important;
}

/* Interface polish pass: rounded geometry, spacing, and cleaner composition */
body.theme-claro,
body.theme-oscuro {
  --qa-radius-sm: 12px;
  --qa-radius-md: 18px;
  --qa-radius-lg: 24px;
  --qa-radius-xl: 30px;
}

.workspace-shell {
  padding: 22px 24px 28px !important;
}

.workspace-main,
.programaciones-dashboard,
.programacion-hoy-dashboard,
.reportes-dashboard,
.usuarios-dashboard,
.schedule-dashboard,
.mi-programacion-dashboard,
.inicio-dashboard {
  gap: 20px !important;
}

.sidebar-user-card,
.sidebar-mini-status,
.flash-stack,
.workspace-topbar,
.dashboard-command-main,
.dashboard-summary-strip,
.dashboard-context-strip,
.dashboard-table-panel,
.dashboard-hero-main,
.dashboard-hero-side,
.summary-stat-card,
.programaciones-header,
.programaciones-filters,
.programaciones-kpi,
.programaciones-table-card,
.programaciones-side-card,
.inicio-hero,
.inicio-card,
.inicio-stat-card,
.programacion-hoy-header,
.programacion-hoy-kpi,
.programacion-hoy-table-card,
.programacion-hoy-side-card,
.consulta-filters,
.consulta-summary-item,
.consulta-table-card,
.reportes-header,
.reportes-kpi,
.reportes-table-card,
.usuarios-header,
.usuarios-table-card,
.schedule-dashboard-header,
.schedule-dashboard-kpi,
.schedule-config-card,
.schedule-active-card,
.mi-programacion-header,
.mi-programacion-panel,
.mi-programacion-stat-card,
.mi-programacion-summary-card,
.mi-programacion-row-card,
.mi-programacion-history-card,
.filter-card,
.copy-panel,
.empty-share-card,
.provider-card,
.route-modal-shell .modal-programacion-card,
.template-form-modal .modal-programacion-card,
.template-form-modal,
.route-modal-shell .modal-actions-bar,
.template-form-modal .modal-actions-bar {
  border-radius: var(--qa-radius-lg) !important;
}

.workspace-topbar,
.programaciones-header,
.programacion-hoy-header,
.reportes-header,
.usuarios-header,
.schedule-dashboard-header,
.mi-programacion-header,
.inicio-hero,
.dashboard-command-main,
.dashboard-hero-main,
.dashboard-hero-side {
  padding: 20px 22px !important;
}

.programaciones-filters,
.consulta-filters,
.dashboard-context-strip,
.dashboard-summary-strip {
  padding: 16px 18px !important;
}

.programaciones-kpi,
.programacion-hoy-kpi,
.inicio-stat-card,
.mi-programacion-stat-card,
.schedule-dashboard-kpi,
.reportes-kpi,
.summary-stat-card {
  border-radius: var(--qa-radius-md) !important;
  padding: 18px 18px !important;
}

.programaciones-kpis,
.programaciones-filters,
.programaciones-layout,
.programacion-hoy-layout,
.inicio-content-grid,
.inicio-summary-grid,
.inicio-hero-stats,
.mi-programacion-header,
.mi-programacion-header-stats,
.mi-programacion-grid,
.mi-programacion-whatsapp-grid {
  gap: 18px !important;
}

.programaciones-table-card,
.programacion-hoy-table-card,
.usuarios-table-card,
.consulta-table-card,
.reportes-table-card,
.mi-programacion-history-card,
.dashboard-table-panel {
  overflow: hidden !important;
}

.table-wrap,
.programaciones-table-card .table-wrap,
.programacion-hoy-table-card .table-wrap,
.usuarios-table-card .table-wrap,
.consulta-table-card .table-wrap,
.reportes-table-card .table-wrap,
.mi-programacion-history-card .table-wrap,
.dashboard-table-panel .table-wrap {
  border-radius: var(--qa-radius-md) !important;
  overflow: hidden !important;
}

.programaciones-table-head,
.programacion-hoy-table-head,
.reportes-table-head,
.mi-programacion-panel-head,
.mi-programacion-history-head,
.consulta-provider-head {
  padding: 20px 22px 12px !important;
}

.programaciones-table-head + .table-wrap,
.programacion-hoy-table-head + .table-wrap,
.reportes-table-head + .table-wrap,
.mi-programacion-history-head + .table-wrap {
  margin: 0 18px 18px !important;
}

.programaciones-table-footer,
.programacion-hoy-table-footer,
.reportes-table-footer {
  padding: 14px 18px 18px !important;
}

.programaciones-filter-chip,
.programaciones-status-filter,
.programaciones-user-filter,
.programacion-hoy-date-chip,
.mi-programacion-chip,
.catalog-provider-tab,
.global-toolbar-select,
.global-toolbar-logout-button,
.theme-label select,
input,
select,
textarea,
.ghost-button,
.ghost-link,
.secondary-button,
.programaciones-secondary-action,
.report-action-link {
  border-radius: 14px !important;
  min-height: 44px !important;
}

button,
.primary-link,
.programaciones-primary-action,
.reportes-primary-action,
.mi-programacion-chip.is-action,
.mi-programacion-copy-button,
.programaciones-action-button,
.programacion-hoy-action-button {
  border-radius: 14px !important;
}

.programaciones-pager-button,
.programaciones-action-button,
.status-badge,
.type-pill,
.summary-pill,
.muted-pill,
.schedule-pill {
  border-radius: 999px !important;
}

.inicio-note-item,
.inicio-summary-item,
.programaciones-side-item,
.programacion-hoy-side-item,
.mi-programacion-row-meta,
.mi-programacion-summary-card,
.schedule-window-summary,
.schedule-detail-list article,
.notice-inline {
  border-radius: var(--qa-radius-md) !important;
}

.mi-programacion-panel,
.mi-programacion-row-card,
.mi-programacion-history-card,
.copy-panel {
  padding: 20px 22px !important;
}

.mi-programacion-copy-box,
.programaciones-side-list,
.programacion-hoy-side-list,
.inicio-notes,
.inicio-summary-list {
  gap: 14px !important;
}

.app-sidebar .sidebar-link {
  border-radius: 16px !important;
  min-height: 46px !important;
}

body.theme-claro .programaciones-table-card,
body.theme-claro .programacion-hoy-table-card,
body.theme-claro .usuarios-table-card,
body.theme-claro .consulta-table-card,
body.theme-claro .reportes-table-card,
body.theme-claro .mi-programacion-panel,
body.theme-claro .inicio-card,
body.theme-claro .programaciones-kpi,
body.theme-claro .programacion-hoy-kpi,
body.theme-claro .mi-programacion-stat-card {
  box-shadow: 0 18px 40px rgba(148, 163, 184, 0.18) !important;
}

body.theme-oscuro .programaciones-table-card,
body.theme-oscuro .programacion-hoy-table-card,
body.theme-oscuro .usuarios-table-card,
body.theme-oscuro .consulta-table-card,
body.theme-oscuro .reportes-table-card,
body.theme-oscuro .mi-programacion-panel,
body.theme-oscuro .inicio-card,
body.theme-oscuro .programaciones-kpi,
body.theme-oscuro .programacion-hoy-kpi,
body.theme-oscuro .mi-programacion-stat-card {
  box-shadow: 0 22px 48px rgba(2, 6, 23, 0.42) !important;
}

@media (max-width: 860px) {
  .workspace-shell {
    padding: 16px 14px 22px !important;
  }

  .workspace-topbar,
  .programaciones-header,
  .programacion-hoy-header,
  .reportes-header,
  .usuarios-header,
  .schedule-dashboard-header,
  .mi-programacion-header,
  .inicio-hero,
  .dashboard-command-main,
  .dashboard-hero-main,
  .dashboard-hero-side,
  .mi-programacion-panel,
  .mi-programacion-row-card,
  .mi-programacion-history-card {
    padding: 16px !important;
  }

  .programaciones-table-head + .table-wrap,
  .programacion-hoy-table-head + .table-wrap,
  .reportes-table-head + .table-wrap,
  .mi-programacion-history-head + .table-wrap {
    margin: 0 12px 12px !important;
  }
}

/* Sidebar session and release polish */
.sidebar-user-panel {
  gap: 14px !important;
  padding: 18px !important;
}

.sidebar-user-card {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 10px !important;
  padding: 16px 16px 14px !important;
  border: 1px solid color-mix(in srgb, var(--qa-border) 72%, transparent) !important;
  background: color-mix(in srgb, var(--qa-surface-2) 88%, transparent) !important;
}

.sidebar-user-identity {
  min-width: 0 !important;
  display: grid !important;
  gap: 4px !important;
}

.sidebar-user-identity strong {
  display: block !important;
  font-size: 0.98rem !important;
  line-height: 1.24 !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
}

.sidebar-user-identity .muted {
  margin: 0 !important;
  font-size: 0.84rem !important;
}

.sidebar-user-card .status-badge {
  justify-self: start !important;
  align-self: start !important;
  min-height: 28px !important;
  padding: 0 12px !important;
  white-space: nowrap !important;
  font-size: 0.74rem !important;
}

.sidebar-mini-status {
  display: grid !important;
  gap: 6px !important;
  padding: 14px 16px !important;
  border: 1px solid color-mix(in srgb, var(--qa-border) 72%, transparent) !important;
  background: color-mix(in srgb, var(--qa-surface-2) 92%, transparent) !important;
}

.sidebar-mini-status .sidebar-mini-label {
  color: var(--qa-text-soft) !important;
  font-size: 0.75rem !important;
  line-height: 1.25 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
}

.sidebar-mini-status strong {
  color: var(--qa-heading) !important;
  font-size: 0.96rem !important;
  line-height: 1.28 !important;
}

.sidebar-mini-status small {
  color: var(--qa-muted) !important;
  font-size: 0.76rem !important;
  line-height: 1.4 !important;
}

.sidebar-footer-meta {
  display: grid !important;
  gap: 10px !important;
  padding-top: 14px !important;
  margin-top: 2px !important;
  border-top: 1px solid color-mix(in srgb, var(--qa-border) 62%, transparent) !important;
}

.sidebar-footer-meta p {
  margin: 0 !important;
  max-width: 100% !important;
  color: var(--qa-text-soft) !important;
  font-size: 0.75rem !important;
  line-height: 1.45 !important;
  overflow-wrap: anywhere !important;
}

.site-footer-version {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  align-self: start !important;
  min-height: 28px !important;
  padding: 0 12px !important;
  border-radius: 999px !important;
  border: 1px solid color-mix(in srgb, var(--qa-border) 80%, transparent) !important;
  background: color-mix(in srgb, var(--qa-primary) 12%, var(--qa-surface-2)) !important;
  color: var(--qa-heading) !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

.auth-footer {
  gap: 10px !important;
}

body.theme-oscuro .sidebar-user-card,
body.theme-oscuro .sidebar-mini-status {
  background: rgba(255, 255, 255, 0.03) !important;
}

body.theme-oscuro .site-footer-version {
  background: color-mix(in srgb, var(--qa-primary) 16%, var(--qa-surface-2)) !important;
  color: #f3f8ff !important;
}

/* ERP density overhaul: compact, sober, space-efficient across the app */
body.theme-claro,
body.theme-oscuro {
  --qa-radius-sm: 8px;
  --qa-radius-md: 12px;
  --qa-radius-lg: 16px;
  --qa-radius-xl: 20px;
  --qa-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
  --qa-shadow-strong: 0 12px 24px rgba(15, 23, 42, 0.1);
}

body.theme-oscuro {
  --qa-shadow: 0 10px 22px rgba(2, 6, 23, 0.22);
  --qa-shadow-strong: 0 14px 28px rgba(2, 6, 23, 0.3);
}

body.theme-claro,
body.theme-oscuro {
  background:
    linear-gradient(180deg, var(--qa-bg-start) 0%, var(--qa-bg-end) 100%) !important;
}

.app-shell {
  grid-template-columns: 218px minmax(0, 1fr) !important;
  gap: 12px !important;
  padding: 12px !important;
}

.app-sidebar {
  top: 12px !important;
  max-height: calc(100vh - 24px) !important;
  padding: 12px 10px !important;
  border-radius: 16px !important;
  box-shadow: var(--qa-shadow) !important;
}

.sidebar-main,
.sidebar-bottom {
  gap: 8px !important;
}

.sidebar-brand {
  gap: 8px !important;
  padding: 2px 2px 0 !important;
}

.sidebar-logo {
  width: 92px !important;
}

.sidebar-brand-copy h1 {
  font-size: 1.18rem !important;
  letter-spacing: -0.03em !important;
}

.sidebar-brand-copy .muted {
  font-size: 0.72rem !important;
  line-height: 1.35 !important;
}

.sidebar-panel,
.sidebar-nav,
.sidebar-user-panel {
  padding: 10px !important;
  border-radius: 14px !important;
}

.sidebar-panel-label {
  margin: 0 0 8px !important;
  font-size: 0.62rem !important;
  letter-spacing: 0.16em !important;
}

.sidebar-nav {
  gap: 4px !important;
}

.app-sidebar .sidebar-link {
  display: flex !important;
  align-items: center !important;
  gap: 9px !important;
  min-height: 38px !important;
  padding: 7px 10px !important;
  border-radius: 12px !important;
}

.app-sidebar .sidebar-link strong {
  font-size: 0.84rem !important;
  font-weight: 700 !important;
}

.nav-icon,
.programaciones-button-icon,
.programaciones-filter-icon,
.programaciones-side-icon {
  width: 16px !important;
  height: 16px !important;
  flex: 0 0 16px !important;
}

.nav-icon svg,
.programaciones-button-icon svg,
.programaciones-filter-icon svg,
.programaciones-side-icon svg {
  width: 16px !important;
  height: 16px !important;
}

.sidebar-user-panel {
  gap: 10px !important;
  padding: 12px !important;
}

.sidebar-user-card {
  gap: 8px !important;
  padding: 10px 11px !important;
  border-radius: 12px !important;
}

.sidebar-user-identity strong {
  font-size: 0.9rem !important;
}

.sidebar-user-identity .muted {
  font-size: 0.76rem !important;
}

.sidebar-user-card .status-badge {
  min-height: 24px !important;
  padding: 0 10px !important;
  font-size: 0.67rem !important;
}

.sidebar-mini-status {
  gap: 4px !important;
  padding: 10px 11px !important;
  border-radius: 12px !important;
}

.sidebar-mini-status .sidebar-mini-label {
  font-size: 0.66rem !important;
}

.sidebar-mini-status strong {
  font-size: 0.82rem !important;
}

.sidebar-mini-status small {
  font-size: 0.7rem !important;
  line-height: 1.35 !important;
}

.sidebar-footer-meta {
  gap: 8px !important;
  padding-top: 10px !important;
}

.sidebar-footer-meta p {
  font-size: 0.69rem !important;
  line-height: 1.35 !important;
}

.site-footer-version {
  min-height: 24px !important;
  padding: 0 10px !important;
  font-size: 0.64rem !important;
  letter-spacing: 0.1em !important;
}

.app-workspace-shell {
  gap: 10px !important;
  padding: 6px 4px 16px !important;
}

.global-toolbar {
  padding: 0 0 8px !important;
  gap: 10px !important;
}

.global-toolbar-meta {
  gap: 4px !important;
}

.global-toolbar-kicker {
  font-size: 0.62rem !important;
  letter-spacing: 0.15em !important;
}

.global-toolbar-path {
  font-size: 0.88rem !important;
  line-height: 1.25 !important;
}

.global-toolbar-controls,
.global-toolbar-theme-form,
.global-toolbar-logout-form {
  gap: 8px !important;
}

.global-toolbar-select,
.global-toolbar-logout-button,
.theme-label select,
input,
select,
textarea,
button,
.ghost-button,
.ghost-link,
.secondary-button,
.programaciones-secondary-action,
.programaciones-primary-action,
.reportes-primary-action,
.report-action-link,
.mi-programacion-chip,
.mi-programacion-copy-button,
.programaciones-action-button,
.programacion-hoy-action-button {
  min-height: 36px !important;
  padding: 0 12px !important;
  font-size: 0.82rem !important;
}

.workspace-topbar,
.programaciones-header,
.programacion-hoy-header,
.reportes-header,
.usuarios-header,
.schedule-dashboard-header,
.mi-programacion-header,
.inicio-hero,
.dashboard-command-main,
.dashboard-hero-main,
.dashboard-hero-side {
  padding: 14px 16px !important;
  border-radius: 16px !important;
  backdrop-filter: none !important;
}

.programaciones-header,
.programacion-hoy-header,
.reportes-header,
.mi-programacion-header,
.inicio-hero {
  align-items: start !important;
}

.programaciones-header-copy h1,
.programacion-hoy-header h1,
.reportes-header-copy h1,
.usuarios-header h1,
.consulta-header h1,
.schedule-dashboard-header h1,
.mi-programacion-header-copy h1,
.inicio-hero h1 {
  font-size: 1.85rem !important;
  line-height: 1.05 !important;
  letter-spacing: -0.04em !important;
  margin-bottom: 6px !important;
}

.programaciones-header-copy .muted,
.programacion-hoy-header .muted,
.reportes-header-copy .muted,
.usuarios-header .muted,
.consulta-header .muted,
.schedule-dashboard-header .muted,
.mi-programacion-header-copy .muted,
.inicio-hero .muted,
.programaciones-table-head .muted,
.programacion-hoy-table-head .muted,
.reportes-table-head .muted,
.mi-programacion-panel-head .muted {
  font-size: 0.82rem !important;
  line-height: 1.4 !important;
}

.section-label {
  font-size: 0.62rem !important;
  letter-spacing: 0.16em !important;
}

.programaciones-header-actions,
.reportes-header-actions,
.mi-programacion-header-chips,
.global-toolbar-controls {
  gap: 8px !important;
}

.programaciones-kpis,
.programacion-hoy-kpis,
.reportes-kpis,
.schedule-dashboard-kpis,
.inicio-hero-stats,
.mi-programacion-header-stats,
.programaciones-layout,
.programacion-hoy-layout,
.inicio-grid,
.consulta-grid,
.mi-programacion-grid,
.mi-programacion-whatsapp-grid {
  gap: 12px !important;
}

.programaciones-layout,
.programacion-hoy-layout {
  grid-template-columns: minmax(0, 1fr) 248px !important;
}

.inicio-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.mi-programacion-whatsapp-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.programaciones-filters,
.consulta-filters,
.dashboard-context-strip,
.dashboard-summary-strip {
  padding: 12px !important;
  border-radius: 14px !important;
}

.programaciones-filters {
  grid-template-columns: minmax(0, 1fr) auto auto !important;
  align-items: center !important;
}

.programaciones-filters-left {
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.programaciones-filter-chip,
.programaciones-status-filter,
.programaciones-user-filter,
.programacion-hoy-date-chip,
.catalog-provider-tab {
  min-height: 36px !important;
  gap: 6px !important;
  font-size: 0.78rem !important;
}

.programaciones-kpi,
.programacion-hoy-kpi,
.inicio-stat-card,
.mi-programacion-stat-card,
.schedule-dashboard-kpi,
.reportes-kpi,
.summary-stat-card {
  padding: 12px 14px !important;
  border-radius: 14px !important;
}

.programaciones-kpi-icon,
.schedule-dashboard-kpi-icon {
  width: 40px !important;
  height: 40px !important;
  border-radius: 10px !important;
}

.programaciones-kpi-copy strong,
.schedule-dashboard-kpi strong,
.reportes-kpi strong,
.inicio-stat-card strong,
.mi-programacion-stat-card strong,
.programacion-hoy-kpi strong {
  font-size: 1.5rem !important;
  line-height: 1 !important;
}

.programaciones-kpi-label,
.schedule-dashboard-kpi-label,
.reportes-kpi-label,
.inicio-stat-label,
.mi-programacion-stat-label,
.programacion-hoy-kpi-label {
  font-size: 0.66rem !important;
  letter-spacing: 0.12em !important;
}

.programaciones-kpi-copy small,
.schedule-dashboard-kpi small,
.reportes-kpi small,
.inicio-stat-card small,
.mi-programacion-stat-card small,
.programacion-hoy-kpi small {
  font-size: 0.74rem !important;
}

.inicio-card,
.programaciones-table-card,
.programaciones-side-card,
.programacion-hoy-table-card,
.programacion-hoy-side-card,
.consulta-summary-item,
.consulta-table-card,
.reportes-table-card,
.usuarios-table-card,
.schedule-config-card,
.schedule-active-card,
.mi-programacion-panel,
.mi-programacion-row-card,
.mi-programacion-history-card {
  border-radius: 16px !important;
}

.inicio-card,
.programaciones-table-card,
.programaciones-side-card,
.programacion-hoy-table-card,
.programacion-hoy-side-card,
.consulta-summary-item,
.consulta-table-card,
.reportes-table-card,
.usuarios-table-card,
.schedule-config-card,
.schedule-active-card,
.mi-programacion-panel,
.mi-programacion-row-card,
.mi-programacion-history-card,
.copy-panel,
.provider-card {
  box-shadow: var(--qa-shadow) !important;
}

.inicio-card,
.mi-programacion-panel,
.mi-programacion-row-card,
.mi-programacion-history-card,
.copy-panel {
  padding: 16px !important;
}

.inicio-card h3,
.programaciones-table-head h3,
.programacion-hoy-table-head h3,
.reportes-table-head h3,
.mi-programacion-panel-head h3,
.schedule-card-head h3 {
  font-size: 1.05rem !important;
  line-height: 1.15 !important;
  margin: 4px 0 !important;
}

.inicio-notes-list,
.inicio-summary-list,
.programaciones-side-list,
.programacion-hoy-side-list {
  gap: 10px !important;
}

.inicio-note-item,
.inicio-summary-item,
.programaciones-side-item,
.programacion-hoy-side-item,
.mi-programacion-summary-card,
.mi-programacion-row-meta {
  padding: 10px 12px !important;
  border-radius: 12px !important;
}

.inicio-summary-item strong,
.programaciones-side-item strong,
.programacion-hoy-side-item strong {
  font-size: 0.92rem !important;
}

.programaciones-table-head,
.programacion-hoy-table-head,
.reportes-table-head,
.mi-programacion-panel-head,
.mi-programacion-history-head,
.consulta-provider-head {
  padding: 14px 16px 8px !important;
}

.programaciones-table-head + .table-wrap,
.programacion-hoy-table-head + .table-wrap,
.reportes-table-head + .table-wrap,
.mi-programacion-history-head + .table-wrap {
  margin: 0 14px 14px !important;
}

.table-wrap,
.programaciones-table-card .table-wrap,
.programacion-hoy-table-card .table-wrap,
.usuarios-table-card .table-wrap,
.consulta-table-card .table-wrap,
.reportes-table-card .table-wrap,
.mi-programacion-history-card .table-wrap {
  border-radius: 10px !important;
}

th,
.programaciones-table-card th,
.programacion-hoy-table-card th,
.usuarios-table-card th,
.consulta-table-card th,
.reportes-table-card th {
  padding: 10px 12px !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.08em !important;
}

td,
.programaciones-table-card td,
.programacion-hoy-table-card td,
.usuarios-table-card td,
.consulta-table-card td,
.reportes-table-card td {
  padding: 10px 12px !important;
  font-size: 0.81rem !important;
  line-height: 1.35 !important;
}

.empty-state {
  min-height: 88px !important;
  padding: 20px 14px !important;
  font-size: 0.82rem !important;
  text-align: center !important;
  vertical-align: middle !important;
}

.programaciones-table-footer,
.programacion-hoy-table-footer,
.reportes-table-footer {
  padding: 10px 14px 14px !important;
  font-size: 0.76rem !important;
}

.programaciones-pager {
  gap: 6px !important;
}

.programaciones-pager-button {
  min-width: 34px !important;
  min-height: 32px !important;
  padding: 0 10px !important;
  font-size: 0.76rem !important;
}

.type-pill,
.status-badge,
.summary-pill,
.muted-pill,
.schedule-pill {
  min-height: 24px !important;
  padding: 0 9px !important;
  font-size: 0.68rem !important;
}

.programaciones-table-actions,
.inline-actions,
.mi-programacion-inline-actions,
.mi-programacion-copy-actions {
  gap: 6px !important;
}

.route-modal-shell .modal-programacion-card,
.template-form-modal .modal-programacion-card,
.route-modal-shell .modal-actions-bar,
.template-form-modal .modal-actions-bar,
.template-form-modal {
  border-radius: 16px !important;
}

.route-modal-shell .modal-programacion-card,
.template-form-modal .modal-programacion-card {
  padding: 14px !important;
}

body.theme-claro .inicio-card,
body.theme-claro .programaciones-kpi,
body.theme-claro .programaciones-table-card,
body.theme-claro .programacion-hoy-kpi,
body.theme-claro .programacion-hoy-table-card,
body.theme-claro .reportes-kpi,
body.theme-claro .reportes-table-card,
body.theme-claro .usuarios-table-card,
body.theme-claro .schedule-dashboard-kpi,
body.theme-claro .schedule-config-card,
body.theme-claro .schedule-active-card,
body.theme-claro .mi-programacion-panel {
  box-shadow: 0 8px 18px rgba(148, 163, 184, 0.12) !important;
}

body.theme-oscuro .inicio-card,
body.theme-oscuro .programaciones-kpi,
body.theme-oscuro .programaciones-table-card,
body.theme-oscuro .programacion-hoy-kpi,
body.theme-oscuro .programacion-hoy-table-card,
body.theme-oscuro .reportes-kpi,
body.theme-oscuro .reportes-table-card,
body.theme-oscuro .usuarios-table-card,
body.theme-oscuro .schedule-dashboard-kpi,
body.theme-oscuro .schedule-config-card,
body.theme-oscuro .schedule-active-card,
body.theme-oscuro .mi-programacion-panel {
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.22) !important;
}

.workspace-main .route-modal-shell,
.app-workspace-main .route-modal-shell {
  min-width: 0 !important;
}

.workspace-main .route-modal-shell:not(.route-modal-shell-drawer) .route-modal-frame,
.app-workspace-main .route-modal-shell:not(.route-modal-shell-drawer) .route-modal-frame {
  width: min(1040px, 100%) !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 188px minmax(0, 1fr) !important;
  }

  .programaciones-layout,
  .programacion-hoy-layout {
    grid-template-columns: minmax(0, 1fr) 228px !important;
  }
}

@media (max-width: 940px) {
  .app-shell {
    grid-template-columns: 1fr !important;
  }

  .app-sidebar {
    position: static !important;
    top: auto !important;
    max-height: none !important;
  }

  .sidebar-brand {
    grid-template-columns: auto 1fr !important;
    align-items: center !important;
  }

  .sidebar-main,
  .sidebar-bottom {
    gap: 10px !important;
  }

  .programaciones-layout,
  .programacion-hoy-layout,
  .inicio-grid,
  .mi-programacion-whatsapp-grid {
    grid-template-columns: 1fr !important;
  }

  .programaciones-filters {
    grid-template-columns: 1fr !important;
  }
}

/* Mi programacion: panel comparativo mas compacto */
.mi-programacion-compare-grid {
  gap: 12px !important;
  align-items: start !important;
}

.mi-programacion-compare-grid .mi-programacion-panel {
  padding: 12px !important;
  border-radius: 14px !important;
}

.mi-programacion-compare-grid .mi-programacion-panel-head {
  padding: 2px 2px 6px !important;
  margin-bottom: 8px !important;
  gap: 10px !important;
  align-items: flex-start !important;
}

.mi-programacion-compare-grid .mi-programacion-panel-head h3 {
  font-size: 0.98rem !important;
  line-height: 1.12 !important;
  margin: 2px 0 !important;
}

.mi-programacion-compare-grid .mi-programacion-panel-head .muted {
  font-size: 0.78rem !important;
  line-height: 1.35 !important;
}

.mi-programacion-compare-grid .mi-programacion-panel-count {
  min-height: 26px !important;
  padding: 3px 10px !important;
  font-size: 0.72rem !important;
}

.mi-programacion-compare-grid .mi-programacion-list {
  gap: 8px !important;
}

.mi-programacion-compare-grid .mi-programacion-row-card {
  padding: 12px !important;
  border-radius: 14px !important;
}

.mi-programacion-compare-grid .mi-programacion-row-top {
  gap: 8px !important;
  margin-bottom: 10px !important;
}

.mi-programacion-compare-grid .mi-programacion-row-heading {
  gap: 7px !important;
}

.mi-programacion-compare-grid .mi-programacion-row-heading h4 {
  font-size: 0.96rem !important;
  line-height: 1.15 !important;
}

.mi-programacion-compare-grid .mi-programacion-row-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px 10px !important;
}

.mi-programacion-compare-grid .mi-programacion-row-field {
  min-height: 0 !important;
  padding: 0 !important;
}

.mi-programacion-compare-grid .mi-programacion-row-field span {
  font-size: 0.69rem !important;
  line-height: 1.2 !important;
}

.mi-programacion-compare-grid .mi-programacion-row-field strong {
  font-size: 0.84rem !important;
  line-height: 1.25 !important;
}

.mi-programacion-compare-grid .mi-programacion-row-meta {
  margin-top: 10px !important;
  padding: 8px 10px !important;
  gap: 8px !important;
  font-size: 0.74rem !important;
}

.mi-programacion-compare-grid .mi-programacion-inline-actions {
  margin-top: 10px !important;
}

.mi-programacion-compare-grid .mi-programacion-empty {
  min-height: 88px !important;
  gap: 6px !important;
  padding: 4px 2px !important;
}

.mi-programacion-compare-grid .mi-programacion-empty h3 {
  font-size: 0.98rem !important;
  line-height: 1.15 !important;
}

.mi-programacion-compare-grid .mi-programacion-empty .muted {
  font-size: 0.79rem !important;
  line-height: 1.38 !important;
}

@media (max-width: 780px) {
  .mi-programacion-compare-grid .mi-programacion-panel-head {
    padding: 0 0 6px !important;
  }

  .mi-programacion-compare-grid .mi-programacion-row-grid {
    grid-template-columns: 1fr !important;
  }
}

.runtime-banner {
  display: grid !important;
  gap: 6px !important;
  margin: 0 0 12px !important;
  padding: 12px 14px !important;
  border-radius: 14px !important;
  border: 1px solid var(--workspace-border) !important;
  background: color-mix(in srgb, var(--card-background) 94%, transparent) !important;
  box-shadow: var(--qa-shadow) !important;
}

.runtime-banner strong {
  color: var(--qa-heading) !important;
  font-size: 0.96rem !important;
  line-height: 1.25 !important;
}

.runtime-banner p {
  margin: 0 !important;
  color: var(--qa-text-soft) !important;
  font-size: 0.78rem !important;
  line-height: 1.42 !important;
}

.runtime-banner-success {
  border-color: color-mix(in srgb, #16a34a 34%, var(--workspace-border)) !important;
  background: color-mix(in srgb, #16a34a 9%, var(--card-background)) !important;
}

.runtime-banner-error {
  border-color: color-mix(in srgb, #dc2626 34%, var(--workspace-border)) !important;
  background: color-mix(in srgb, #dc2626 9%, var(--card-background)) !important;
}

@media (max-width: 720px) {
  .app-shell {
    padding: 8px !important;
    gap: 8px !important;
  }

  .app-sidebar {
    padding: 10px 9px !important;
  }

  .app-workspace-shell {
    padding: 2px 0 12px !important;
  }

  .global-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .global-toolbar-controls {
    justify-content: space-between !important;
    flex-wrap: wrap !important;
  }

  .workspace-topbar,
  .programaciones-header,
  .programacion-hoy-header,
  .reportes-header,
  .usuarios-header,
  .schedule-dashboard-header,
  .mi-programacion-header,
  .inicio-hero {
    padding: 12px !important;
  }

  .programaciones-header-copy h1,
  .programacion-hoy-header h1,
  .reportes-header-copy h1,
  .usuarios-header h1,
  .consulta-header h1,
  .schedule-dashboard-header h1,
  .mi-programacion-header-copy h1,
  .inicio-hero h1 {
    font-size: 1.5rem !important;
  }

  th,
  td {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

/* Responsive retrofit 2026-06-27: desktop amplio, tablet fluida y movil tactil. */
.mobile-menu-button,
.mobile-menu-backdrop,
.mobile-sidebar-close,
.mobile-section-nav,
.mobile-details-nav,
.desktop-section-nav {
  display: none;
}

.app-workspace-main,
.app-workspace-shell,
.programaciones-dashboard,
.programacion-hoy-dashboard,
.mi-programacion-dashboard,
.reportes-dashboard,
.usuarios-dashboard,
.consulta-dashboard,
.schedule-dashboard {
  min-width: 0;
}

.global-toolbar {
  position: sticky !important;
  top: 0 !important;
  z-index: 30 !important;
  border-radius: 0 0 18px 18px !important;
  background: color-mix(in srgb, var(--surface-strong) 92%, transparent) !important;
  backdrop-filter: blur(18px) !important;
}

.data-table {
  table-layout: auto;
}

.data-table th,
.data-table td {
  overflow-wrap: anywhere;
}

.inline-actions,
.programaciones-table-actions,
.mi-programacion-inline-actions,
.report-actions,
.form-actions {
  flex-wrap: wrap !important;
}

@media (min-width: 1181px) {
  .app-shell {
    grid-template-columns: minmax(230px, 250px) minmax(0, 1fr) !important;
    max-width: 1720px !important;
    margin: 0 auto !important;
  }

  .app-workspace-main {
    width: min(100%, 1420px) !important;
  }
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 208px minmax(0, 1fr) !important;
    gap: 10px !important;
  }

  .programaciones-layout,
  .programacion-hoy-layout,
  .mi-programacion-grid,
  .consulta-grid,
  .split-grid {
    grid-template-columns: 1fr !important;
  }

  .programaciones-kpis,
  .programacion-hoy-kpis,
  .reportes-kpis,
  .schedule-dashboard-kpis,
  .inicio-hero-stats,
  .mi-programacion-header-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 900px) {
  body.mobile-menu-lock {
    overflow: hidden;
  }

  .app-shell {
    display: block !important;
    padding: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .app-sidebar {
    position: fixed !important;
    inset: 10px auto 10px 10px !important;
    width: min(86vw, 330px) !important;
    max-height: calc(100dvh - 20px) !important;
    overflow: auto !important;
    z-index: 220 !important;
    transform: translateX(calc(-100% - 18px)) !important;
    transition: transform 220ms ease, box-shadow 220ms ease !important;
  }

  .app-shell.mobile-nav-open .app-sidebar {
    transform: translateX(0) !important;
    box-shadow: 0 26px 80px rgba(15, 23, 42, 0.34) !important;
  }

  .mobile-menu-backdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 210 !important;
    display: block !important;
    width: 100% !important;
    min-height: 100dvh !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: rgba(15, 23, 42, 0.48) !important;
    box-shadow: none !important;
  }

  .mobile-menu-backdrop[hidden] {
    display: none !important;
  }

  .mobile-menu-button {
    position: fixed !important;
    top: max(10px, env(safe-area-inset-top)) !important;
    left: max(10px, env(safe-area-inset-left)) !important;
    z-index: 190 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    min-height: 46px !important;
    padding: 0 15px !important;
    border-radius: 16px !important;
    background: linear-gradient(180deg, var(--primary), var(--primary-strong)) !important;
    color: #fff !important;
    border: 0 !important;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22) !important;
  }

  .app-shell.mobile-nav-open .mobile-menu-button {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .mobile-sidebar-close {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 44px !important;
    margin: 0 0 10px !important;
    border-radius: 14px !important;
    border: 1px solid var(--line) !important;
    background: var(--surface-strong) !important;
    color: var(--text) !important;
    box-shadow: none !important;
  }

  .mobile-menu-button-lines,
  .mobile-menu-button-lines::before,
  .mobile-menu-button-lines::after {
    display: block !important;
    width: 18px !important;
    height: 2px !important;
    border-radius: 999px !important;
    background: currentColor !important;
    content: "" !important;
  }

  .mobile-menu-button-lines {
    position: relative !important;
  }

  .mobile-menu-button-lines::before,
  .mobile-menu-button-lines::after {
    position: absolute !important;
    left: 0 !important;
  }

  .mobile-menu-button-lines::before {
    top: -6px !important;
  }

  .mobile-menu-button-lines::after {
    top: 6px !important;
  }

  .global-toolbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 62px 0 12px !important;
  }

  .global-toolbar-controls {
    grid-column: 1 / -1 !important;
    justify-content: stretch !important;
  }

  .global-toolbar-theme-form,
  .global-toolbar-logout-form,
  .global-toolbar-theme-field,
  .global-toolbar-select,
  .global-toolbar-logout-button {
    width: 100% !important;
  }

  .global-toolbar-theme-field {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
  }

  .sidebar-nav {
    max-height: none !important;
  }

  .sidebar-link {
    min-height: 48px !important;
  }

  .app-workspace-shell {
    padding: 0 0 14px !important;
  }

  .mobile-details-nav {
    position: sticky !important;
    top: 8px !important;
    z-index: 205 !important;
    display: block !important;
    width: 100% !important;
    margin: 0 0 10px !important;
    border: 1px solid var(--line) !important;
    border-radius: 18px !important;
    background: var(--surface-strong) !important;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16) !important;
    overflow: hidden !important;
  }

  .mobile-details-nav summary {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    min-height: 54px !important;
    padding: 0 18px !important;
    cursor: pointer !important;
    list-style: none !important;
    background: linear-gradient(180deg, var(--primary), var(--primary-strong)) !important;
    color: #fff !important;
    font-size: 1rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.01em !important;
  }

  .mobile-details-nav summary::-webkit-details-marker {
    display: none !important;
  }

  .mobile-details-nav summary::after {
    content: "Abrir" !important;
    min-height: 30px !important;
    padding: 6px 10px !important;
    border-radius: 999px !important;
    background: rgba(255, 255, 255, 0.18) !important;
    color: #fff !important;
    font-size: 0.74rem !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.08em !important;
  }

  .mobile-details-nav[open] summary::after {
    content: "Cerrar" !important;
  }

  .mobile-details-nav-links {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 10px !important;
    background: var(--surface-strong) !important;
  }

  .mobile-details-nav-links a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 48px !important;
    padding: 0 14px !important;
    border: 1px solid var(--line) !important;
    border-radius: 14px !important;
    background: var(--surface-soft) !important;
    color: var(--text) !important;
    font-weight: 850 !important;
  }

  .mobile-details-nav-links a.is-active {
    border-color: color-mix(in srgb, var(--primary) 38%, var(--line)) !important;
    background: var(--primary-soft) !important;
    color: var(--primary-strong) !important;
  }

  .mobile-section-nav {
    position: sticky !important;
    top: 0 !important;
    z-index: 60 !important;
    display: flex !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 0 0 12px !important;
    padding: 8px !important;
    overflow-x: auto !important;
    overscroll-behavior-x: contain !important;
    scrollbar-width: none !important;
    border: 1px solid var(--line) !important;
    border-radius: 18px !important;
    background: color-mix(in srgb, var(--surface-strong) 94%, transparent) !important;
    box-shadow: var(--shadow-xs) !important;
    backdrop-filter: blur(16px) !important;
  }

  .mobile-section-nav::-webkit-scrollbar {
    display: none !important;
  }

  .mobile-section-link {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 42px !important;
    padding: 0 14px !important;
    border-radius: 999px !important;
    border: 1px solid var(--line) !important;
    background: var(--surface-soft) !important;
    color: var(--text-soft) !important;
    font-size: 0.86rem !important;
    font-weight: 850 !important;
    white-space: nowrap !important;
  }

  .mobile-section-link.is-active {
    background: linear-gradient(180deg, var(--primary), var(--primary-strong)) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.2) !important;
  }
}

@media (max-width: 760px) {
  html {
    font-size: 16px !important;
  }

  body {
    overflow-x: hidden !important;
  }

  .auth-app-shell,
  .auth-workspace,
  .content-card-auth,
  .auth-enterprise-shell,
  .auth-flow-shell {
    width: 100% !important;
    max-width: 100% !important;
  }

  .auth-enterprise-shell {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .auth-enterprise-aside,
  .auth-enterprise-main,
  .auth-card,
  .form-card,
  .content-card,
  .route-modal-content,
  .route-modal-frame {
    width: 100% !important;
    max-width: 100% !important;
  }

  .content-card,
  .form-card,
  .programaciones-header,
  .programacion-hoy-header,
  .reportes-header,
  .usuarios-header,
  .schedule-dashboard-header,
  .mi-programacion-header,
  .inicio-hero,
  .consulta-header {
    padding: 16px !important;
    border-radius: 20px !important;
  }

  .programaciones-header,
  .programacion-hoy-header,
  .reportes-header,
  .mi-programacion-header,
  .section-head,
  .dashboard-head {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-items: stretch !important;
  }

  .programaciones-header-actions,
  .reportes-header-actions,
  .mi-programacion-header-chips,
  .section-tools {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }

  .programaciones-primary-action,
  .programaciones-secondary-action,
  .reportes-primary-action,
  .report-action-link,
  .primary-link,
  .ghost-link,
  .ghost-button,
  button,
  .secondary-button,
  .action-link {
    width: 100% !important;
    min-height: 50px !important;
    justify-content: center !important;
    white-space: normal !important;
  }

  .form-grid,
  .programacion-row,
  .modal-programacion-grid,
  .modal-form-topbar,
  .template-loader-inline,
  .programaciones-filters,
  .consulta-filters,
  .schedule-grid,
  .inicio-grid,
  .programaciones-kpis,
  .programacion-hoy-kpis,
  .reportes-kpis,
  .schedule-dashboard-kpis,
  .inicio-hero-stats,
  .mi-programacion-header-stats,
  .mi-programacion-whatsapp-grid,
  .mi-programacion-row-grid,
  .mi-programacion-compare-grid {
    grid-template-columns: 1fr !important;
  }

  label,
  .programaciones-user-filter,
  .programaciones-status-filter,
  .modal-date-field {
    width: 100% !important;
  }

  input,
  select,
  textarea {
    width: 100% !important;
    min-height: 50px !important;
    font-size: 1rem !important;
  }

  textarea {
    min-height: 118px !important;
  }

  .inline-form,
  .inline-actions,
  .programaciones-table-actions,
  .mi-programacion-inline-actions,
  .form-actions,
  .modal-actions-bar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .table-wrap,
  .programaciones-table-card .table-wrap,
  .programacion-hoy-table-card .table-wrap,
  .usuarios-table-card .table-wrap,
  .consulta-table-card .table-wrap,
  .reportes-table-card .table-wrap,
  .mi-programacion-history-card .table-wrap,
  .dashboard-table-panel .table-wrap {
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  table.responsive-table,
  table.responsive-table thead,
  table.responsive-table tbody,
  table.responsive-table tr,
  table.responsive-table th,
  table.responsive-table td {
    display: block !important;
    width: 100% !important;
  }

  table.responsive-table thead {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
  }

  table.responsive-table tbody {
    display: grid !important;
    gap: 12px !important;
  }

  table.responsive-table tr {
    border: 1px solid var(--line) !important;
    border-radius: 18px !important;
    padding: 10px !important;
    background: var(--surface-strong) !important;
    box-shadow: var(--shadow-xs) !important;
  }

  table.responsive-table tr.group-row {
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  table.responsive-table td {
    display: grid !important;
    grid-template-columns: minmax(104px, 38%) minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: start !important;
    padding: 10px 8px !important;
    border-bottom: 1px solid var(--line) !important;
    text-align: right !important;
  }

  table.responsive-table td:last-child {
    border-bottom: 0 !important;
  }

  table.responsive-table td::before {
    content: attr(data-label) !important;
    color: var(--text-muted) !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.08em !important;
    text-align: left !important;
    text-transform: uppercase !important;
  }

  table.responsive-table td.actions-cell,
  table.responsive-table td.empty-state {
    display: block !important;
    text-align: left !important;
  }

  table.responsive-table td.actions-cell::before {
    display: block !important;
    margin-bottom: 8px !important;
  }

  table.responsive-table td.empty-state::before {
    display: none !important;
  }

  .actions-cell .muted-inline,
  .programaciones-table-actions .muted-inline {
    display: block !important;
    text-align: center !important;
  }

  .programaciones-table-footer,
  .programacion-hoy-table-footer,
  .reportes-table-footer {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    text-align: center !important;
  }

  .programaciones-pager {
    justify-content: center !important;
  }

  .route-modal-shell {
    padding: 8px !important;
  }

  .route-modal-frame {
    min-height: auto !important;
  }

  .modal-programacion-card,
  .programacion-row {
    padding: 14px !important;
    border-radius: 18px !important;
  }
}

@media (max-width: 420px) {
  .app-shell {
    padding: 6px !important;
  }

  .global-toolbar {
    grid-template-columns: 1fr !important;
  }

  .mobile-menu-button {
    width: auto !important;
  }

  .global-toolbar-meta {
    text-align: center !important;
  }

  table.responsive-table td {
    grid-template-columns: 1fr !important;
    text-align: left !important;
  }
}

/* Final responsive polish: celular horizontal/tablet no debe romper tablas ni perder menu. */
@media (min-width: 1024px) {
  .app-shell {
    display: grid !important;
    grid-template-columns: 240px minmax(0, 1fr) !important;
    gap: 16px !important;
    width: min(100%, 1720px) !important;
    max-width: 1720px !important;
    margin: 0 auto !important;
    padding: 14px !important;
  }

  .app-sidebar {
    display: flex !important;
    position: sticky !important;
    top: 14px !important;
    width: 240px !important;
    max-height: calc(100vh - 28px) !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 20 !important;
  }

  .app-workspace-shell {
    min-width: 0 !important;
    padding: 0 0 18px !important;
  }

  .global-toolbar {
    padding: 0 0 10px !important;
  }

  .mobile-menu-button,
  .mobile-menu-backdrop,
  .mobile-sidebar-close,
  .mobile-section-nav,
  .mobile-details-nav {
    display: none !important;
  }

  .desktop-section-nav {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 0 0 14px !important;
    padding: 8px !important;
    overflow-x: auto !important;
    border: 1px solid var(--line) !important;
    border-radius: 18px !important;
    background: var(--surface) !important;
    box-shadow: var(--shadow-xs) !important;
  }

  .desktop-section-link {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 40px !important;
    padding: 0 15px !important;
    border-radius: 999px !important;
    border: 1px solid transparent !important;
    color: var(--text-soft) !important;
    font-size: 0.84rem !important;
    font-weight: 850 !important;
    white-space: nowrap !important;
  }

  .desktop-section-link:hover,
  .desktop-section-link.is-active {
    background: var(--primary-soft) !important;
    border-color: color-mix(in srgb, var(--primary) 24%, var(--line)) !important;
    color: var(--primary-strong) !important;
  }
}

/* Catalogo administrable de hormigones. */
.catalog-admin-panel {
  display: grid;
  gap: 16px;
  margin: 0 0 20px;
  padding: clamp(16px, 2vw, 24px);
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--line));
  border-radius: 24px;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--primary) 14%, transparent), transparent 34%),
    var(--surface-strong);
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.09);
}

.catalog-admin-copy h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.1;
}

.catalog-admin-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(360px, 1.3fr);
  gap: 14px;
  align-items: stretch;
}

.catalog-admin-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: color-mix(in srgb, var(--card-background) 96%, transparent);
  box-shadow: var(--shadow-xs);
}

.catalog-admin-card label,
.catalog-form-grid label {
  display: grid;
  gap: 7px;
  color: var(--text-soft);
  font-weight: 850;
}

.catalog-admin-card input,
.catalog-admin-card select {
  width: 100%;
}

.catalog-provider-form {
  align-content: start;
}

.catalog-form-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.catalog-form-title h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
}

.catalog-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.catalog-row-actions {
  min-width: 180px;
}

.catalog-delete-form,
.catalog-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.danger-ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, #dc2626 34%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, #dc2626 8%, var(--surface-strong));
  color: #b91c1c;
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 900px) {
  .catalog-admin-grid,
  .catalog-form-grid {
    grid-template-columns: 1fr;
  }

  .catalog-form-title {
    display: grid;
  }

  .catalog-admin-card button,
  .catalog-row-actions button,
  .catalog-delete-form,
  .catalog-delete-form button {
    width: 100%;
  }

  .catalog-row-actions {
    display: grid;
    grid-template-columns: 1fr;
    min-width: 0;
  }
}

@media (min-width: 761px) and (max-width: 1023px) {
  .mobile-details-nav {
    display: block !important;
  }

  .programaciones-layout,
  .programacion-hoy-layout {
    grid-template-columns: 1fr !important;
  }

  .programaciones-side-card,
  .programacion-hoy-side-card {
    order: 2 !important;
  }

  .programaciones-table-card,
  .programacion-hoy-table-card,
  .reportes-table-card,
  .usuarios-table-card,
  .consulta-table-card,
  .mi-programacion-history-card {
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .table-wrap,
  .programaciones-table-card .table-wrap,
  .programacion-hoy-table-card .table-wrap,
  .reportes-table-card .table-wrap,
  .usuarios-table-card .table-wrap,
  .consulta-table-card .table-wrap,
  .mi-programacion-history-card .table-wrap {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    border: 1px solid var(--line) !important;
    background: var(--surface-strong) !important;
  }

  .data-table,
  table.responsive-table {
    min-width: 980px !important;
    table-layout: fixed !important;
  }

  .data-table th,
  .data-table td,
  table.responsive-table th,
  table.responsive-table td {
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
  }

  .programaciones-table-card th,
  .programaciones-table-card td {
    font-size: 0.78rem !important;
    line-height: 1.35 !important;
  }

  .programaciones-table-card .type-pill,
  .programaciones-table-card .status-badge {
    white-space: nowrap !important;
    min-width: max-content !important;
  }

  .programaciones-table-card th:nth-child(1),
  .programaciones-table-card td:nth-child(1) {
    width: 150px !important;
  }

  .programaciones-table-card th:nth-child(2),
  .programaciones-table-card td:nth-child(2) {
    width: 110px !important;
  }

  .programaciones-table-card th:nth-child(3),
  .programaciones-table-card td:nth-child(3) {
    width: 170px !important;
  }

  .programaciones-table-card th:nth-child(4),
  .programaciones-table-card td:nth-child(4) {
    width: 96px !important;
  }

  .programaciones-table-card th:nth-child(5),
  .programaciones-table-card td:nth-child(5) {
    width: 82px !important;
  }

  .programaciones-table-card th:nth-child(6),
  .programaciones-table-card td:nth-child(6) {
    width: 160px !important;
  }

  .programaciones-table-card th:nth-child(7),
  .programaciones-table-card td:nth-child(7) {
    width: 105px !important;
  }

  .programaciones-table-card th:nth-child(8),
  .programaciones-table-card td:nth-child(8) {
    width: 125px !important;
  }

  .programaciones-table-card th:nth-child(9),
  .programaciones-table-card td:nth-child(9) {
    width: 135px !important;
  }

  .programaciones-table-card th:nth-child(10),
  .programaciones-table-card td:nth-child(10) {
    width: 92px !important;
  }
}

@media (min-width: 761px) {
  .programaciones-table-card .table-wrap {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .programaciones-table-card table.responsive-table {
    min-width: 1220px !important;
    table-layout: fixed !important;
  }

  .programaciones-table-card th,
  .programaciones-table-card td {
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
  }
}

@media (min-width: 761px) and (max-width: 980px) {
  .global-toolbar {
    padding-top: 10px !important;
  }

  .mobile-menu-button {
    position: static !important;
    width: max-content !important;
  }

  .programaciones-header,
  .programacion-hoy-header,
  .reportes-header,
  .usuarios-header {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .programaciones-header-actions,
  .reportes-header-actions {
    justify-content: start !important;
  }
}

/* Mobile cleanup 2026-06-28: una sola navegacion visible, menu lateral desplegable. */
.mobile-details-nav,
.mobile-section-nav,
.desktop-section-nav {
  display: none !important;
}

@media (min-width: 1024px) {
  .app-shell {
    display: grid !important;
    grid-template-columns: 252px minmax(0, 1fr) !important;
    gap: 18px !important;
    width: min(100%, 1740px) !important;
    max-width: 1740px !important;
    margin: 0 auto !important;
    padding: 16px !important;
  }

  .app-sidebar {
    display: flex !important;
    position: sticky !important;
    top: 16px !important;
    width: 252px !important;
    max-height: calc(100vh - 32px) !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 20 !important;
  }

  .mobile-menu-button,
  .mobile-menu-backdrop,
  .mobile-sidebar-close {
    display: none !important;
  }

  .app-workspace-shell {
    min-width: 0 !important;
    padding: 0 0 18px !important;
  }
}

@media (max-width: 1023px) {
  body.mobile-menu-lock {
    overflow: hidden !important;
  }

  .app-shell {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px !important;
  }

  .app-sidebar {
    display: flex !important;
    position: fixed !important;
    inset: 10px auto 10px 10px !important;
    width: min(88vw, 340px) !important;
    max-height: calc(100dvh - 20px) !important;
    overflow: auto !important;
    z-index: 220 !important;
    transform: translateX(calc(-100% - 18px)) !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: transform 220ms ease, box-shadow 220ms ease !important;
  }

  .app-shell.mobile-nav-open .app-sidebar {
    transform: translateX(0) !important;
    box-shadow: 0 28px 90px rgba(15, 23, 42, 0.34) !important;
  }

  .mobile-menu-backdrop {
    position: fixed !important;
    inset: 0 !important;
    z-index: 210 !important;
    display: block !important;
    width: 100% !important;
    min-height: 100dvh !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: rgba(15, 23, 42, 0.5) !important;
    box-shadow: none !important;
  }

  .mobile-menu-backdrop[hidden] {
    display: none !important;
  }

  .mobile-sidebar-close {
    display: flex !important;
    width: 100% !important;
    min-height: 46px !important;
    margin: 0 0 10px !important;
    border-radius: 14px !important;
    border: 1px solid var(--line) !important;
    background: var(--surface-strong) !important;
    color: var(--text) !important;
    box-shadow: none !important;
  }

  .mobile-menu-button {
    position: fixed !important;
    top: max(10px, env(safe-area-inset-top)) !important;
    left: max(10px, env(safe-area-inset-left)) !important;
    z-index: 190 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    width: auto !important;
    min-height: 48px !important;
    padding: 0 16px !important;
    border: 0 !important;
    border-radius: 16px !important;
    background: linear-gradient(180deg, var(--primary), var(--primary-strong)) !important;
    color: #fff !important;
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28) !important;
  }

  .app-shell.mobile-nav-open .mobile-menu-button {
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .global-toolbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    padding: 64px 0 12px !important;
  }

  .global-toolbar-controls {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .global-toolbar-theme-form,
  .global-toolbar-logout-form,
  .global-toolbar-theme-field,
  .global-toolbar-select,
  .global-toolbar-logout-button {
    width: 100% !important;
  }
}

@media (max-width: 760px) {
  .app-workspace-shell,
  .app-workspace-main,
  .inicio-dashboard,
  .programaciones-dashboard,
  .programacion-hoy-dashboard,
  .mi-programacion-dashboard,
  .reportes-dashboard,
  .usuarios-dashboard,
  .consulta-dashboard,
  .schedule-dashboard {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .global-toolbar-controls {
    grid-template-columns: 1fr !important;
  }

  .inicio-hero,
  .programaciones-header,
  .programacion-hoy-header,
  .mi-programacion-header,
  .reportes-header,
  .usuarios-header,
  .consulta-header,
  .schedule-dashboard-header,
  .section-head,
  .dashboard-head {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    padding: 16px !important;
    border-radius: 20px !important;
  }

  .inicio-hero h1,
  .programaciones-header h1,
  .programacion-hoy-header h1,
  .mi-programacion-header h1,
  .reportes-header h1,
  .usuarios-header h1,
  .consulta-header h1,
  .schedule-dashboard-header h1 {
    font-size: clamp(1.65rem, 8vw, 2.25rem) !important;
    line-height: 1.02 !important;
  }

  .inicio-grid,
  .inicio-hero-stats,
  .programaciones-kpis,
  .programacion-hoy-kpis,
  .reportes-kpis,
  .schedule-dashboard-kpis,
  .mi-programacion-header-stats,
  .mi-programacion-compare-grid,
  .mi-programacion-whatsapp-grid,
  .programaciones-layout,
  .programacion-hoy-layout,
  .consulta-grid,
  .schedule-grid,
  .split-grid,
  .form-grid,
  .modal-programacion-grid,
  .programaciones-filters,
  .consulta-filters {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .programaciones-header-actions,
  .reportes-header-actions,
  .mi-programacion-header-chips,
  .inline-actions,
  .programaciones-table-actions,
  .mi-programacion-inline-actions,
  .form-actions,
  .modal-actions-bar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
  }

  button,
  .primary-link,
  .ghost-button,
  .ghost-link,
  .secondary-button,
  .action-link,
  .programaciones-primary-action,
  .programaciones-secondary-action,
  .reportes-primary-action,
  .report-action-link {
    width: 100% !important;
    min-height: 50px !important;
    justify-content: center !important;
  }

  input,
  select,
  textarea,
  label {
    width: 100% !important;
  }

  input,
  select {
    min-height: 50px !important;
  }

  textarea {
    min-height: 118px !important;
  }

  .content-card,
  .form-card,
  .inicio-card,
  .programaciones-table-card,
  .programaciones-side-card,
  .programacion-hoy-table-card,
  .programacion-hoy-side-card,
  .reportes-table-card,
  .usuarios-table-card,
  .consulta-table-card,
  .mi-programacion-panel,
  .mi-programacion-row-card,
  .mi-programacion-history-card,
  .schedule-config-card,
  .schedule-active-card {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 18px !important;
  }

  .table-wrap,
  .programaciones-table-card .table-wrap,
  .programacion-hoy-table-card .table-wrap,
  .reportes-table-card .table-wrap,
  .usuarios-table-card .table-wrap,
  .consulta-table-card .table-wrap,
  .mi-programacion-history-card .table-wrap {
    overflow: visible !important;
    border: 0 !important;
    background: transparent !important;
  }

  table.responsive-table,
  table.responsive-table thead,
  table.responsive-table tbody,
  table.responsive-table tr,
  table.responsive-table th,
  table.responsive-table td {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  table.responsive-table {
    table-layout: auto !important;
  }

  table.responsive-table thead {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
  }

  table.responsive-table tbody {
    display: grid !important;
    gap: 12px !important;
  }

  table.responsive-table tr {
    padding: 12px !important;
    border: 1px solid var(--line) !important;
    border-radius: 18px !important;
    background: var(--surface-strong) !important;
    box-shadow: var(--shadow-xs) !important;
  }

  table.responsive-table td {
    display: grid !important;
    grid-template-columns: minmax(104px, 38%) minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: start !important;
    padding: 10px 4px !important;
    border-bottom: 1px solid var(--line) !important;
    text-align: right !important;
    overflow-wrap: anywhere !important;
  }

  table.responsive-table td:last-child {
    border-bottom: 0 !important;
  }

  table.responsive-table td::before {
    content: attr(data-label) !important;
    color: var(--text-muted) !important;
    font-size: 0.72rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.08em !important;
    text-align: left !important;
    text-transform: uppercase !important;
  }

  table.responsive-table td.actions-cell,
  table.responsive-table td.empty-state {
    display: block !important;
    text-align: left !important;
  }

  table.responsive-table td.empty-state::before {
    display: none !important;
  }
}

/* Desktop repair 2026-06-28: sidebar pegada y contenido usando ancho real. */
@media (min-width: 1024px) {
  body {
    overflow-x: hidden !important;
  }

  .app-shell {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .app-sidebar {
    position: fixed !important;
    inset: 0 auto 0 0 !important;
    display: flex !important;
    width: 286px !important;
    height: 100vh !important;
    max-height: 100vh !important;
    padding: 18px 16px !important;
    border-radius: 0 24px 24px 0 !important;
    border-left: 0 !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 100 !important;
    overflow-y: auto !important;
  }

  .app-workspace-shell {
    width: calc(100% - 286px) !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: 286px !important;
    padding: 12px 24px 32px !important;
  }

  .app-workspace-main,
  .inicio-dashboard,
  .programaciones-dashboard,
  .programacion-hoy-dashboard,
  .mi-programacion-dashboard,
  .reportes-dashboard,
  .usuarios-dashboard,
  .consulta-dashboard,
  .schedule-dashboard {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }

  .mobile-menu-button,
  .mobile-menu-backdrop,
  .mobile-sidebar-close,
  .mobile-details-nav,
  .mobile-section-nav,
  .desktop-section-nav {
    display: none !important;
  }

  .global-toolbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 60 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 16px !important;
    width: 100% !important;
    margin: 0 0 12px !important;
    padding: 0 0 10px !important;
    border-radius: 0 0 18px 18px !important;
  }

  .global-toolbar-controls {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    width: auto !important;
  }

  .global-toolbar-theme-form,
  .global-toolbar-logout-form {
    width: auto !important;
  }

  .global-toolbar-select {
    width: 150px !important;
  }

  .global-toolbar-logout-button {
    width: 160px !important;
  }

  .inicio-hero,
  .programaciones-header,
  .programacion-hoy-header,
  .mi-programacion-header,
  .reportes-header,
  .usuarios-header,
  .consulta-header,
  .schedule-dashboard-header,
  .section-head,
  .dashboard-head {
    width: 100% !important;
    max-width: none !important;
  }

  .programaciones-kpis,
  .programacion-hoy-kpis,
  .reportes-kpis,
  .schedule-dashboard-kpis,
  .inicio-hero-stats,
  .mi-programacion-header-stats {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px !important;
  }

  .inicio-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }

  .programaciones-layout,
  .programacion-hoy-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
    width: 100% !important;
  }

  .programaciones-table-card,
  .programacion-hoy-table-card,
  .reportes-table-card,
  .usuarios-table-card,
  .consulta-table-card,
  .mi-programacion-history-card {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    overflow: hidden !important;
  }

  .programaciones-side-card,
  .programacion-hoy-side-card {
    width: 100% !important;
    max-width: none !important;
    order: 2 !important;
  }

  .programaciones-side-list,
  .programacion-hoy-side-list {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  .programaciones-side-item,
  .programacion-hoy-side-item {
    min-height: 64px !important;
  }

  .table-wrap,
  .programaciones-table-card .table-wrap,
  .programacion-hoy-table-card .table-wrap,
  .reportes-table-card .table-wrap,
  .usuarios-table-card .table-wrap,
  .consulta-table-card .table-wrap,
  .mi-programacion-history-card .table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch !important;
  }

  table.responsive-table,
  .data-table {
    width: 100% !important;
    min-width: 1080px !important;
    table-layout: auto !important;
  }

  .programaciones-table-card table.responsive-table,
  .programacion-hoy-table-card table.responsive-table {
    min-width: 1160px !important;
  }

  table.responsive-table th,
  table.responsive-table td,
  .data-table th,
  .data-table td {
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
  }

  .programaciones-table-card th,
  .programaciones-table-card td,
  .programacion-hoy-table-card th,
  .programacion-hoy-table-card td {
    padding: 13px 12px !important;
    font-size: 0.84rem !important;
    line-height: 1.35 !important;
  }

  .programaciones-table-card .type-pill,
  .programaciones-table-card .status-badge,
  .programacion-hoy-table-card .type-pill,
  .programacion-hoy-table-card .status-badge {
    white-space: nowrap !important;
  }

  .consulta-grid,
  .schedule-grid,
  .split-grid,
  .mi-programacion-whatsapp-grid {
    width: 100% !important;
    max-width: none !important;
  }

  .mi-programacion-compare-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }
}
