﻿:root {
  --red: #e4002b;
  --red-dark: #b8001f;
  --dark: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f3f4f8;
  --ok: #16a34a;
  --ok-bg: #f0fdf4;
  --warn: #d97706;
  --warn-bg: #fffbeb;
  --blue: #2563eb;
  --card: #fff;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(17, 24, 39, 0.08);
  --ease: cubic-bezier(.4, 0, .2, 1);
}

* { box-sizing: border-box; }

.is-hidden {
  display: none !important;
}

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

body {
  margin: 0;
  font-family: "Segoe UI", Inter, system-ui, Arial, sans-serif;
  background: var(--bg);
  color: #1f2937;
  line-height: 1.45;
}

a { color: inherit; }

/* -- Topbar -- */
.topbar {
  min-height: 64px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}

.brand {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 800;
  font-size: 15px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 900;
}

.brand-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: block;
  background: transparent;
}

.brand-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-core-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  margin-left: -2px;
}

.brand-core-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav { display: flex; gap: 6px; flex-wrap: wrap; }

.nav a, .btn, button {
  border: 0;
  border-radius: 10px;
  background: var(--dark);
  color: #fff;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s, opacity .15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
}

button.is-loading {
  pointer-events: none;
  opacity: .92;
}

.nav a:hover, button:hover:not(:disabled) { transform: translateY(-1px); }
button:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.nav a.active, .btn-red { background: var(--red); }
.btn-red:hover { background: var(--red-dark); }

.btn-ghost {
  background: #fff !important;
  color: var(--dark) !important;
  border: 1px solid var(--line) !important;
}

.btn-gps {
  background: linear-gradient(135deg, #1d4ed8, #2563eb) !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-red {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ico, .ico-pill, .ico-btn, .ico-inline, .ico-chip, .ico-alert, .ico-ok, .ico-pager {
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ico-pill { width: 12px; height: 12px; }
.ico-btn { width: 16px; height: 16px; }
.ico-inline { width: 13px; height: 13px; }
.ico-chip { width: 10px; height: 10px; }
.ico-alert { width: 14px; height: 14px; stroke-width: 2.5; }
.ico-ok { width: 16px; height: 16px; stroke-width: 2.5; }
.ico-pager { width: 14px; height: 14px; stroke-width: 2.5; }

/* -- Layout -- */
.shell { max-width: 1400px; margin: 0 auto; padding: 24px; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.panel h1 { margin: 0 0 4px; font-size: 22px; }
.panel .subtitle {
  color: var(--muted);
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.panel,
.panel *,
.modal-card,
.modal-card * {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.filters {
  display: grid;
  grid-template-columns: 140px 1fr 150px auto;
  gap: 12px;
  align-items: end;
}

label {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  display: block;
  margin-bottom: 5px;
}

label.micro {
  font-size: 10px;
  margin-bottom: 3px;
  text-transform: none;
  letter-spacing: 0;
}

select, input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  font: inherit;
  transition: border-color .15s, box-shadow .15s;
  min-width: 0;
}

select.is-loading {
  color: var(--muted);
  font-style: italic;
  background-color: #f9fafb;
  cursor: wait;
}

.week-select.week-current {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, .14);
  background: linear-gradient(180deg, #fff, #f0fdf4);
}

.week-select.week-past {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .13);
  background: linear-gradient(180deg, #fff, #fef2f2);
}

.week-select.week-future {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .16);
  background: linear-gradient(180deg, #fff, #fffbeb);
}

.week-select option.week-option-current {
  background: #dcfce7;
  color: #166534;
}

.week-select option.week-option-past {
  background: #fee2e2;
  color: #991b1b;
}

.week-select option.week-option-future {
  background: #fef3c7;
  color: #92400e;
}

select:focus, input:focus, textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(228, 0, 43, .12);
}

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

/* -- Hero / Landing -- */
.hero {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 16px;
  align-items: stretch;
}

.hero-main {
  background: linear-gradient(145deg, #0f172a, #1e293b);
  color: #fff;
  border-radius: var(--radius);
  padding: 36px;
  min-height: 240px;
}

.hero-main h1 { font-size: 36px; line-height: 1.1; margin: 0 0 14px; }
.hero-main p { color: #cbd5e1; font-size: 15px; margin: 0; max-width: 52ch; }

.flow-steps {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.flow-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.flow-step b {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  flex-shrink: 0;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.module-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  display: block;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  box-shadow: var(--shadow);
}

.module-card:hover {
  transform: translateY(-3px);
  border-color: var(--red);
  box-shadow: 0 8px 32px rgba(228, 0, 43, .12);
}

.module-card b { font-size: 18px; display: block; margin-bottom: 6px; }
.module-card p { color: var(--muted); margin: 0; font-size: 14px; }
.module-card .tag {
  display: inline-block;
  margin-top: 12px;
  font-size: 11px;
  font-weight: 800;
  color: var(--red);
  text-transform: uppercase;
}

/* -- Home / Landing KFC -- */
body.home {
  background: #f8f9fc;
  background-image:
    radial-gradient(circle at 100% 0%, rgba(228, 0, 43, .06), transparent 42%),
    radial-gradient(circle at 0% 100%, rgba(228, 0, 43, .04), transparent 38%);
}

.topbar-home {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom-color: rgba(228, 0, 43, .1);
}

.brand-kfc { gap: 12px; }

.home .brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  flex: 0 0 auto;
  width: max-content;
}

.brand-title {
  font-size: 15px;
  font-weight: 900;
  color: var(--dark);
}

.brand-sub {
  max-width: 165px;
  font-size: 10.5px;
  font-weight: 750;
  line-height: 1.08;
  color: rgba(75, 85, 99, .72);
  letter-spacing: 0;
}

.brand-link .brand-core-mark,
.brand-kfc .brand-core-mark {
  margin-left: -4px;
}

.nav-home a {
  background: #f3f4f6;
  color: var(--dark);
}

.nav-home a:hover {
  background: #fff1f2;
  color: var(--red);
}

.shell-home {
  max-width: 1180px;
  padding-top: 20px;
  padding-bottom: 32px;
}

.home-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 28px;
  box-shadow: 0 20px 60px rgba(228, 0, 43, .22), 0 8px 24px rgba(15, 23, 42, .12);
  max-width: 100%;
}

.home-hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #b8001f 0%, #e4002b 38%, #ff1a3d 100%);
}

.home-hero-bg::before,
.home-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.home-hero-bg::before {
  background: repeating-linear-gradient(
    -12deg,
    transparent,
    transparent 14px,
    rgba(255, 255, 255, .06) 14px,
    rgba(255, 255, 255, .06) 18px
  );
}

.home-hero-bg::after {
  background: radial-gradient(circle at 85% 20%, rgba(255, 255, 255, .18), transparent 45%);
}

.home-hero-inner {
  position: relative;
  z-index: 1;
  padding: 40px 40px 36px;
  color: #fff;
  max-width: 100%;
  box-sizing: border-box;
}

.home-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .22);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.home-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -.02em;
}

.home-hero h1 span {
  color: #ffe4e8;
}

.home-lead {
  margin: 0 0 22px;
  max-width: 54ch;
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255, 255, 255, .88);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.home-lead-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  max-width: 100%;
}

.home-lead-step {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .22);
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  letter-spacing: .02em;
  white-space: nowrap;
}

.home-ctas {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  width: 100%;
  min-width: 0;
}

.home-ctas-4 {
  grid-template-columns: 1fr;
}

.home-obj-link {
  margin: 14px 0 0;
  font-size: 13px;
  font-weight: 700;
}

.home-obj-link .link-arrow {
  color: rgba(255, 255, 255, .92);
}

.nav-wide a {
  font-size: 12px;
  padding: 8px 11px;
}

.btn-hero {
  text-decoration: none;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s;
  min-height: 64px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.btn-hero::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: auto;
  flex-shrink: 0;
  border-right: 2px solid rgba(15, 23, 42, .28);
  border-bottom: 2px solid rgba(15, 23, 42, .28);
  transform: rotate(-45deg);
}

.btn-hero-main {
  background: #fff;
  color: var(--dark);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .14);
}

.btn-hero-main:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .2);
}

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

.cta-copy b {
  display: block;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.cta-copy small {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: .01em;
  overflow-wrap: anywhere;
}

.cta-visual {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(145deg, #fff8f9, #ffe8ec);
  border: 1px solid rgba(228, 0, 43, .14);
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

.cta-visual svg {
  width: 24px;
    height: 24px;
  stroke: var(--red);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cta-step-num {
  position: absolute;
  top: -7px;
  left: -7px;
  min-width: 24px;
    height: 24px;
  padding: 0 5px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .04em;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 8px rgba(228, 0, 43, .35);
}

.btn-hero-main:hover .cta-visual {
  border-color: rgba(228, 0, 43, .28);
  transform: scale(1.04);
  transition: transform .18s var(--ease), border-color .18s;
}

.home-section-head {
  margin-bottom: 16px;
}

.home-section-head h2 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 900;
  color: var(--dark);
}

.home-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.home-guide {
  margin-bottom: 28px;
}

.home-instructions {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.home-instructions-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  font-size: 15px;
  font-weight: 800;
  color: var(--dark);
  transition: background .15s;
  user-select: none;
}

.home-instructions-btn::-webkit-details-marker { display: none; }

.home-instructions-btn::marker { content: ""; }

.home-instructions-btn:hover {
  background: #fff9fa;
}

.home-instructions-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff1f2;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.home-instructions-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--red);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-instructions-chevron {
  margin-left: auto;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
  transform: rotate(45deg);
  transition: transform .2s var(--ease);
  flex-shrink: 0;
}

.home-instructions[open] .home-instructions-chevron {
  transform: rotate(-135deg);
  margin-top: 6px;
}

.home-instructions[open] .home-instructions-btn {
  border-bottom: 1px solid var(--line);
  background: #fffafb;
}

.home-instructions-panel {
  padding: 20px 20px 22px;
  animation: modalIn .25s var(--ease);
}

.home-instructions-head {
  margin-bottom: 14px;
}

.home-instructions-head h2 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 900;
}

.home-instructions-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.home-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.home-step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s;
}

.home-step:hover {
  border-color: rgba(228, 0, 43, .25);
  box-shadow: 0 8px 28px rgba(228, 0, 43, .08);
}

.home-step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(228, 0, 43, .35);
}

.home-step-body { min-width: 0; }

.home-step-body h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 900;
}

.home-step-body p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.home-modules { margin-bottom: 20px; }

/* -- Home mini dashboard (desplegable) -- */
.home-minidash {
  margin-bottom: 24px;
}

.home-minidash-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.home-minidash-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background .15s;
}

.home-minidash-summary::-webkit-details-marker { display: none; }
.home-minidash-summary::marker { content: ""; }

.home-minidash-summary:hover { background: #fff9fa; }

.home-minidash-summary-text { min-width: 0; flex: 1; }

.home-minidash-title {
  display: block;
  font-size: 20px;
  font-weight: 900;
  color: var(--dark);
  line-height: 1.2;
}

.home-minidash-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.home-minidash-chevron {
  margin-left: auto;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
  transform: rotate(45deg);
  transition: transform .2s var(--ease);
  flex-shrink: 0;
}

.home-minidash-panel[open] .home-minidash-chevron {
  transform: rotate(-135deg);
  margin-top: 6px;
}

.home-minidash-panel[open] .home-minidash-summary {
  border-bottom: 1px solid var(--line);
  background: #fffafb;
}

.home-minidash-panel-body {
  padding: 0 20px 20px;
  animation: modalIn .25s var(--ease);
}

.home-minidash-filters {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
  padding-top: 16px;
  margin-bottom: 14px;
}

.home-minidash-filters label {
  margin-bottom: 4px;
}

.home-minidash-filters select {
  min-width: 120px;
}

.home-minidash-body { min-height: 80px; }

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

.home-trend-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.home-trend-kpis span {
  display: block;
  padding: 12px 14px;
  border: 1px solid #eef2f7;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff, #f8fafc);
  color: #64748b;
  font-size: .82rem;
  font-weight: 800;
}

.home-trend-kpis b {
  display: block;
  color: #111827;
  font-size: 1.35rem;
  line-height: 1;
  margin-bottom: 4px;
}

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

.home-trend-card {
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, .06);
}

.home-trend-card header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 12px;
}

.home-trend-card h3 {
  margin: 0;
  color: #111827;
  font-size: .98rem;
  font-weight: 950;
  line-height: 1.15;
}

.home-trend-card header span {
  color: #64748b;
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.home-trend-list {
  display: grid;
  gap: 9px;
}

.home-trend-row {
  display: grid;
  grid-template-columns: minmax(92px, .7fr) minmax(0, 1fr) 44px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}

.home-trend-main b {
  display: block;
  color: #111827;
  font-size: .9rem;
  font-weight: 950;
  line-height: 1.15;
}

.home-trend-main span {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: .72rem;
  font-weight: 700;
}

.home-trend-bars {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.home-trend-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.home-trend-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e4002b, #fb7185);
}

.home-trend-meta {
  color: #64748b;
  font-size: .72rem;
  font-weight: 800;
}

.home-trend-meta strong {
  color: #111827;
}

.home-trend-meta em {
  color: #16a34a;
  font-style: normal;
  margin-left: 8px;
}

.home-trend-rate {
  display: grid;
  place-items: center;
  min-height: 32px;
  border-radius: 10px;
  background: #ecfdf5;
  color: #15803d;
  font-size: .8rem;
  font-weight: 950;
}

.mini-dash-sections {
  display: grid;
  gap: 8px;
}

.mini-dash-fold {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafbfc;
  overflow: hidden;
}

.mini-dash-fold-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: background .15s;
}

.mini-dash-fold-summary::-webkit-details-marker { display: none; }
.mini-dash-fold-summary::marker { content: ""; }

.mini-dash-fold-summary:hover { background: #fff; }

.mini-dash-fold-title {
  font-size: 13px;
  font-weight: 900;
  color: var(--dark);
  line-height: 1.2;
}

.mini-dash-fold-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.mini-fold-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--red);
  border-bottom: 2px solid var(--red);
  transform: rotate(45deg);
  transition: transform .2s var(--ease);
  flex-shrink: 0;
}

.mini-dash-fold[open] .mini-fold-chevron {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.mini-dash-fold[open] .mini-dash-fold-summary {
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.mini-dash-fold-body {
  padding: 12px 14px 14px;
}

.mini-dash-fold-body .mini-card-sub {
  margin-top: 0;
  margin-bottom: 12px;
}

.mini-dash-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 900;
}

.mini-loc-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.mini-loc-card-head .mini-card-sub {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.mini-loc-card-head h3 { margin: 0 0 4px; }

.btn-mini-excel {
  border: 1px solid #86efac;
  background: #f0fdf4;
  color: #166534;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, transform .15s;
  min-height: auto;
}

.btn-mini-excel:hover {
  background: #dcfce7;
  transform: translateY(-1px);
}

.mini-loc-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.btn-pager {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--dark);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  min-height: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-pager:hover:not(:disabled) {
  border-color: var(--red);
  color: var(--red);
}

.btn-pager:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.mini-pager-info {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.mini-card-sub {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--muted);
}

.mini-loc-list, .mini-franja-list {
  display: grid;
  gap: 10px;
}

.mini-loc-row {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
}

.mini-rank {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #fff1f2;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  display: grid;
  place-items: center;
}

.mini-loc-body { min-width: 0; }

.mini-loc-body b {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

.mini-loc-body small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.mini-bar-track {
  height: 6px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 4px;
}

.mini-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--red), #ff6b7a);
  transition: width .35s var(--ease);
}

.mini-bar-manana { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.mini-bar-tarde { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.mini-bar-noche { background: linear-gradient(90deg, #7c3aed, #a78bfa); }

.mini-franja-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.mini-franja-top b { font-size: 14px; }
.mini-franja-top span { font-size: 11px; color: var(--muted); font-weight: 600; }
.mini-franja-top strong {
  margin-left: auto;
  font-size: 18px;
  color: var(--dark);
}

.mini-franja small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.mini-dash-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.mini-dash-foot-inner {
  margin: 0;
  padding: 0;
  border-top: 0;
  display: grid;
  gap: 8px;
}

.mini-dash-foot-inner span {
  font-size: 12px;
  color: var(--dark);
  font-weight: 600;
}

.mini-dash-foot-inner b {
  color: var(--red);
  font-weight: 900;
  margin-right: 4px;
}

.home-minidash-link {
  margin: 14px 0 0;
  text-align: right;
  font-size: 13px;
  font-weight: 800;
}

.home-minidash-link a {
  color: var(--red);
  text-decoration: none;
}

.home-minidash-link a.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.home-minidash-link a.link-arrow svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .15s var(--ease);
}

.home-minidash-link a.link-arrow:hover svg { transform: translateX(2px); }
.home-minidash-link a:hover { text-decoration: underline; }

.home-module-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.home-module {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px 22px 20px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  box-shadow: var(--shadow);
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
  overflow: hidden;
}

.home-module::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--red), #ff6b7a);
  opacity: .85;
}

.home-module:hover {
  transform: translateY(-4px);
  border-color: rgba(228, 0, 43, .3);
  box-shadow: 0 16px 40px rgba(228, 0, 43, .12);
}

.home-module-featured {
  border-color: rgba(228, 0, 43, .22);
  background: linear-gradient(180deg, #fff 0%, #fff9fa 100%);
}

.home-module-step {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--red);
  margin-bottom: 10px;
}

.home-module-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.home-module h3 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 900;
}

.home-module p {
  margin: 0;
  flex: 1;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}

.home-module-btn {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  transition: background .15s, transform .15s;
}

.home-module:hover .home-module-btn {
  background: var(--red-dark);
  transform: translateX(2px);
}

.home-tip {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
}

.home-tip-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, #fffbeb, #fef3c7);
  border: 1px solid #fde68a;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85);
}

.home-tip-icon svg {
  width: 20px;
  height: 20px;
  stroke: #d97706;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-tip b {
  display: block;
  margin-bottom: 4px;
  color: #92400e;
  font-size: 13px;
}

.home-tip p {
  margin: 0;
  color: #78350f;
}

.home-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.home-footer span:last-child {
  color: var(--red);
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* -- Planner / Validator days -- */
.planner, .validator {
  display: grid;
  grid-template-columns: repeat(7, minmax(200px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
}

.validator {
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  overflow: visible;
  align-items: start;
}

.validator .day-panel {
  min-width: 0;
}

.validator .day-panel header {
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
}

.validator .visit-card {
  margin: 10px;
  padding: 12px;
}

.validator .visit-time {
  white-space: normal;
  line-height: 1.18;
}

.validator .visit-card .pill {
  max-width: 160px;
  justify-content: center;
  text-align: center;
  line-height: 1.15;
}

@media (min-width: 1180px) {
  .validator {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1580px) {
  .validator {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.day-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 200px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.day-panel header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
}

.day-panel-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.day-panel-title b {
  font-size: 14px;
  line-height: 1.2;
}

.day-date {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}

.slot-picker-hint {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  line-height: 1.25;
}

.day-panel.today {
  border-color: #fca5a5;
  box-shadow: 0 0 0 2px rgba(228, 0, 43, .15), var(--shadow);
}

.day-panel.today header { background: #fff1f2; }

.today-badge {
  align-self: flex-start;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  text-transform: uppercase;
}

/* Slot picker 1-2-3 */
.slot-picker {
  display: flex;
  gap: 4px;
  background: #eef0f4;
  padding: 4px;
  border-radius: 10px;
}

.slot-pick {
  flex: 1;
  padding: 6px 0 !important;
  font-size: 12px !important;
  background: transparent !important;
  color: var(--muted) !important;
  border-radius: 8px !important;
}

.slot-pick.active {
  background: #fff !important;
  color: var(--dark) !important;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}

.slots { padding: 10px; display: grid; gap: 10px; }

.planner-loading-panel {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  min-height: 86px;
  padding: 18px 20px;
  border: 1px solid #fecdd3;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fff 0%, #fff5f7 100%);
  box-shadow: var(--shadow);
}

.planner-loading-panel strong {
  display: block;
  margin-bottom: 4px;
  color: var(--dark);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.planner-loading-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.planner-loading-mark {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #e4002b;
  box-shadow: 0 12px 24px rgba(228,0,43,.18);
}

.planner-loading-mark span {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255,255,255,.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .75s linear infinite;
}

.planner-loading-days {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(7, minmax(160px, 1fr));
  gap: 10px;
  min-width: 0;
}

.planner-day-skeleton {
  min-height: 138px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.planner-day-skeleton b,
.planner-day-skeleton span {
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, #eef1f5 0%, #f8fafc 45%, #eef1f5 90%);
  background-size: 220% 100%;
  animation: skeletonFlow 1.1s ease-in-out infinite;
}

.planner-day-skeleton b {
  width: 52%;
  height: 12px;
  margin-bottom: 18px;
}

.planner-day-skeleton span {
  height: 12px;
  margin-top: 12px;
}

.planner-day-skeleton span:nth-child(2) { width: 88%; }
.planner-day-skeleton span:nth-child(3) { width: 68%; }
.planner-day-skeleton span:nth-child(4) { width: 78%; }

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

@media (max-width: 640px) {
  .planner-loading-panel {
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    min-height: 74px;
  }

  .planner-loading-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .planner-loading-panel strong {
    font-size: 13px;
  }

  .planner-loading-panel p {
    font-size: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .planner-loading-days {
    grid-template-columns: repeat(7, minmax(132px, 1fr));
  }

  .planner-day-skeleton {
    min-height: 116px;
  }
}

.slot-row {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafbfc;
}

.slot-head { display: flex; justify-content: space-between; align-items: center; }

.slot-num {
  font-size: 11px;
  font-weight: 800;
  color: var(--red);
  text-transform: uppercase;
}

.time-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.time-pair select.hi,
.time-pair select.hf {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: #fff;
}

/* -- Carga 2-step flow -- */
.carga-step-badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #fff1f2;
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.carga-step1 .subtitle { margin-bottom: 0; }

.filters-carga {
  grid-template-columns: minmax(280px, 340px) minmax(320px, 1fr);
  margin-top: 16px;
}

.filter-jefe { grid-column: span 1; }

.planner-workspace {
  animation: modalIn .3s var(--ease);
}

.planner-workspace[hidden] { display: none !important; }

.carga-step2-head { margin-bottom: 12px; }

.carga-step2-head h2 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 900;
}

.carga-step2-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: end;
  margin-top: 8px;
}

.carga-week-wrap { min-width: 140px; }

.carga-week-wrap label {
  margin-bottom: 5px;
}

.save-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.save-hint { color: var(--muted); font-size: 13px; margin: 0; }

/* -- Validation cards -- */
.visit-card {
  margin: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.visit-card h3 { margin: 4px 0; font-size: 15px; }
.visit-card p { margin: 0; color: var(--muted); font-size: 13px; }
.visit-time {
  font-size: 13px;
  font-weight: 800;
  color: var(--dark);
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
  white-space: nowrap;
}

.visit-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.visit-top > div:first-child { min-width: 0; flex: 1; }

.visit-card.st-completada { border-color: #86efac; background: var(--ok-bg); }
.visit-card.st-actividad { border-color: #fcd34d; background: var(--warn-bg); }
.visit-card.st-pendiente { border-color: var(--line); }

.visit-card.validated-done {
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}

.visit-card.validated-done:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(22, 163, 74, .15);
}

.validated-summary {
  margin-top: 10px;
  padding: 10px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #bbf7d0;
}

.validated-summary p { margin: 4px 0; font-size: 13px; }

.validated-checks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #166534;
}

.check-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.check-sep { opacity: .45; font-weight: 400; }
.validated-summary small { color: var(--muted); font-size: 11px; }
.planned { color: var(--muted); font-size: 12px; }
.tap-hint { margin: 8px 0 0; font-size: 11px; color: var(--ok); font-weight: 700; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
  max-width: 100%;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  word-break: break-word;
}

.pill.st-pendiente { background: #f3f4f6; color: #4b5563; }
.pill.st-completada { background: #dcfce7; color: #166534; }
.pill.st-actividad { background: #fef3c7; color: #92400e; }

.steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 12px 0 10px;
  font-size: 11px;
  font-weight: 700;
  flex-wrap: wrap;
  row-gap: 6px;
}

.step {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
}

.step span {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 10px;
  background: #fff;
}

.step.active span { border-color: var(--blue); color: var(--blue); background: #eff6ff; }
.step.done span { border-color: var(--ok); background: var(--ok); color: #fff; }
.step.done { color: var(--ok); }

.step-line {
  flex: 1;
  height: 2px;
  background: var(--line);
  margin: 0 6px;
  min-width: 16px;
}

.step-line.done { background: var(--ok); }

.visit-actions { display: grid; gap: 8px; }
.hint { font-size: 12px; color: var(--muted); margin: 0; font-style: italic; }
.hint.warn-date { color: #b45309; background: #fffbeb; padding: 8px; border-radius: 8px; font-style: normal; font-weight: 600; }

.validar-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.validar-head h1 { margin: 0; }

.validar-strip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 8px 4px 6px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.vchip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 4px;
  color: var(--dark);
  white-space: nowrap;
}

.vchip b {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.vchip-ok {
  color: #166534;
  padding: 2px 6px;
  border-radius: 999px;
  background: #ecfdf5;
}

.vchip-ok b { display: none; }

.vsep {
  width: 8px;
  height: 1px;
  background: #cbd5e1;
  flex-shrink: 0;
}

.validar-status {
  margin-bottom: 12px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.validar-status.loading {
  background: #eff6ff;
  color: #1d4ed8;
  display: flex;
  align-items: center;
  gap: 10px;
}
.validar-status.ok { background: #f0fdf4; color: #166534; border-color: #86efac; }
.validar-status.err { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.validar-status.warn { background: #fffbeb; color: #92400e; border-color: #fcd34d; }

/* -- Dashboard metrics (compacto) -- */
.metrics {
  display: grid;
  grid-template-columns: 1.4fr .8fr 1.2fr;
  gap: 6px;
  margin-bottom: 10px;
  padding: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.metric {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 6px 8px;
  box-shadow: none;
}

.metric b {
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.metric span {
  color: var(--muted);
  font-weight: 700;
  font-size: 10px;
  line-height: 1.15;
  min-width: 0;
}

.metric-ok b { color: var(--ok); }
.metric-warn b { color: var(--warn); }
.metric-muted b { color: var(--muted); }
.metric-pct b { color: var(--red); }
.metric-carga b { color: #1d4ed8; }
.metric-danger b { color: #dc2626; }
.metric-danger { border-color: #fecaca; background: #fffafa; }

/* -- Dashboard secciones carga / sin carga -- */
.dash-section { margin-bottom: 18px; }

.dash-section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.dash-section-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
}

.dash-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.dash-badge-ok { background: #dcfce7; color: #166534; }
.dash-badge-warn { background: #fee2e2; color: #b91c1c; }

.dash-section-missing { margin-top: 8px; }

.missing-panel {
  background: #fff;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.missing-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  background: linear-gradient(180deg, #fff5f5, #fff);
  font-weight: 800;
}

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

.missing-summary-title {
  font-size: 15px;
  color: #991b1b;
}

.missing-summary-hint {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.missing-panel-body {
  padding: 0 18px 18px;
  border-top: 1px solid #fee2e2;
}

.missing-intro {
  margin: 14px 0 12px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
}

.missing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.missing-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fffafa;
}

.missing-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fee2e2;
  color: #b91c1c;
  display: grid;
  place-items: center;
}

.missing-body { min-width: 0; }

.missing-body b {
  display: block;
  font-size: 14px;
}

.missing-body small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.missing-tag {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: #b91c1c;
  background: #fee2e2;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.missing-all-ok {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: var(--ok-bg);
  border: 1px solid #86efac;
  color: #166534;
  font-size: 14px;
  font-weight: 700;
}

.missing-ok-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

/* -- Week board -- */
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 12px;
  font-size: 12px;
  font-weight: 700;
}

.legend span { display: flex; align-items: center; gap: 6px; }
.legend-hint { color: var(--muted); margin-left: auto; font-weight: 600; }

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.st-pendiente { background: #d1d5db; }
.dot.st-completada { background: var(--ok); }
.dot.st-actividad { background: #fbbf24; }

.week-board-tools {
  display: none;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.btn-board-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--dark);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  min-height: auto;
}

.btn-board-tool.is-on {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.btn-board-tool:hover { transform: translateY(-1px); }

.week-board {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: auto;
  box-shadow: var(--shadow);
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.week-header, .week-row {
  display: grid;
  grid-template-columns: 180px repeat(7, minmax(132px, 1fr));
  min-width: 1100px;
}

.week-header {
  background: var(--dark);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 2;
}

.week-corner, .week-day-col, .week-worker, .week-cell {
  padding: 12px 10px;
  border-right: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid var(--line);
}

.week-day-col { text-align: center; position: relative; }
.week-day-col b { display: block; font-size: 13px; }
.week-day-col small { opacity: .75; font-size: 11px; }

.today-tag {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fde68a;
  color: #92400e;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.week-corner {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: var(--dark);
  color: #fff;
  display: flex;
  align-items: center;
}

.week-worker {
  background: #f8fafc;
  border-right: 1px solid var(--line);
}

.week-worker b { display: block; font-size: 13px; }
.week-worker small { color: var(--muted); font-size: 11px; }

.worker-bar {
  height: 4px;
  background: #e5e7eb;
  border-radius: 999px;
  margin-top: 8px;
  overflow: hidden;
}

.worker-bar div {
  height: 100%;
  background: linear-gradient(90deg, var(--ok), #22c55e);
  border-radius: 999px;
  transition: width .4s ease;
}

.week-cell {
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 80px;
  vertical-align: top;
  align-items: stretch;
}

.cell-empty { color: #d1d5db; font-size: 18px; text-align: center; display: block; padding-top: 8px; }

.act-chip {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  width: 100%;
  min-width: 0;
  padding: 7px 8px 6px !important;
  border-radius: 10px !important;
  border: 1px solid var(--line) !important;
  background: #f9fafb !important;
  color: var(--dark) !important;
  text-align: left;
  font-size: 11px !important;
  line-height: 1.25;
  transition: transform .12s, box-shadow .12s, border-color .12s;
  cursor: pointer;
}

.act-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, .1);
  border-color: #d1d5db !important;
}

.act-chip:active { transform: translateY(0); }

.act-chip.st-pendiente { border-left: 3px solid #d1d5db !important; }
.act-chip.st-completada {
  border-left: 4px solid var(--ok) !important;
  background: var(--ok-bg) !important;
  border-color: #86efac !important;
}
.act-chip.st-actividad {
  border-left: 4px solid #fbbf24 !important;
  background: var(--warn-bg) !important;
}

.chip-local {
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  min-width: 0;
}

.chip-time {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}

.chip-status {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  align-self: flex-start;
  max-width: 100%;
  margin-top: 1px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
}

.chip-status-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.chip-status.st-pendiente {
  background: #f3f4f6;
  color: #4b5563;
}

.chip-status.st-actividad {
  background: #fef3c7;
  color: #92400e;
}

.chip-status.st-completada {
  background: #dcfce7;
  color: #166534;
}

.chip-hint {
  font-size: 8px;
  font-weight: 700;
  color: #9ca3af;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-top: 1px;
}

.act-chip:hover .chip-hint { color: var(--red); }

.act-chip .ico-chip {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
}

.week-cell.cell-all-done { background: #ecfdf5; }
.week-cell.cell-partial { background: #f0fdf4; }

.day-progress {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: var(--ok);
  margin-bottom: 4px;
  text-align: right;
}

/* -- Modal -- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.modal.open { opacity: 1; pointer-events: auto; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 24px 64px rgba(0,0,0,.25);
  animation: modalIn .25s ease;
}

@keyframes modalIn {
  from { transform: translateY(16px) scale(.98); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.modal-head h2 { margin: 0; font-size: 18px; }

.modal-close {
  width: 36px;
  height: 36px;
  padding: 0 !important;
  font-size: 22px;
  line-height: 1;
  background: #f3f4f6 !important;
  color: var(--dark) !important;
  border-radius: 10px !important;
}

.modal-body { padding: 20px; display: grid; gap: 14px; }

.modal-status { justify-self: start; }

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.lbl {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}

.modal-block p {
  margin: 4px 0 0;
  font-size: 14px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.modal-head h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: calc(100% - 48px);
}
.summary-block { background: var(--ok-bg); padding: 12px; border-radius: 10px; border: 1px solid #86efac; }
.summary-block small { color: var(--muted); }

.summary-block.is-expanded .clamp-text {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.summary-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0 6px;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(22, 163, 74, .28);
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  color: #166534;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.summary-toggle:hover {
  background: #fff;
  border-color: rgba(22, 163, 74, .45);
}

.map-wrap iframe {
  width: 100%;
  height: 220px;
  border: 0;
  border-radius: 10px;
  margin-top: 8px;
}

.map-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--blue) !important;
  font-weight: 700;
  font-size: 13px;
}

.geo-meta { font-size: 11px; color: var(--muted); margin: 6px 0 0; }

/* -- Empty / Toast -- */
.empty {
  padding: 24px;
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.empty strong { display: block; color: var(--dark); margin-bottom: 6px; }
.empty.small { border: 0; padding: 12px; background: transparent; text-align: left; }

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: var(--dark);
  color: #fff;
  padding: 14px 18px;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,.2);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: .2s;
  z-index: 200;
  max-width: 340px;
  font-size: 14px;
  font-weight: 600;
}

.toast.show { transform: none; opacity: 1; }
.toast.err { background: #b91c1c; }
.toast.warn { background: #92400e; }

/* -- Text clamp / overflow -- */
.clamp-text {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  word-break: break-word;
  min-width: 0;
}

.clamp-1 { -webkit-line-clamp: 1; }
.clamp-3 { -webkit-line-clamp: 3; }

.validated-summary p {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.week-worker { min-width: 0; overflow: hidden; }
.flow-step > div { min-width: 0; overflow-wrap: break-word; }
.module-card p { overflow-wrap: break-word; }
.metrics .metric span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day-panel-title b,
.day-date { overflow: hidden; text-overflow: ellipsis; }
.day-panel-title b { white-space: nowrap; }

/* -- Loading spinners -- */
@keyframes spin { to { transform: rotate(360deg); } }

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .65s linear infinite;
  flex-shrink: 0;
}

.spinner.dark {
  border-color: rgba(17, 24, 39, .15);
  border-top-color: var(--red);
}

.spinner.lg {
  width: 40px;
  height: 40px;
  border-width: 3px;
  border-color: rgba(228, 0, 43, .18);
  border-top-color: var(--red);
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: radial-gradient(circle at 50% 40%, rgba(228, 0, 43, .18), rgba(15, 23, 42, .72));
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s var(--ease);
}

.page-loader.show {
  opacity: 1;
  pointer-events: auto;
}

.loader-card {
  background: #fff;
  padding: 32px 40px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .22);
  min-width: 240px;
  animation: modalIn .28s var(--ease);
}

.loader-card-kfc {
  padding: 36px 44px 32px;
  min-width: 280px;
  border: 1px solid rgba(228, 0, 43, .12);
  box-shadow: 0 28px 72px rgba(228, 0, 43, .18), 0 16px 40px rgba(0, 0, 0, .12);
}

.loader-kfc {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
}

.loader-kfc-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(228, 0, 43, .45);
  animation: kfcRing 1.8s var(--ease) infinite;
}

.loader-kfc-ring-2 {
  animation-delay: .55s;
  border-color: rgba(228, 0, 43, .25);
}

.loader-kfc-logo {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  background: transparent;
  animation: kfcPulse 1.4s var(--ease) infinite;
}

.loader-kfc-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.loader-title {
  margin: 18px 0 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: .01em;
}

.loader-sub {
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  animation: loaderSubPulse 2s ease-in-out infinite;
}

.loader-progress {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  opacity: 0;
  transform: translateY(4px) scale(.96);
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}

.loader-progress.show {
  opacity: 1;
  transform: none;
}

.loader-progress-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 118px;
}

.loader-progress-track {
  flex: 1;
  height: 3px;
  background: #eef0f4;
  border-radius: 999px;
  overflow: hidden;
}

.loader-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff1a3d 0%, #e4002b 45%, #ff6b7a 100%);
  background-size: 220% 100%;
  animation: progressShine .9s linear infinite;
  transition: width .16s var(--ease);
  box-shadow: 0 0 8px rgba(228, 0, 43, .35);
}

.loader-progress-pct {
  font-size: 9px;
  font-weight: 800;
  color: var(--red);
  font-variant-numeric: tabular-nums;
  min-width: 24px;
  text-align: right;
  letter-spacing: .02em;
  opacity: .9;
}

.top-progress {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(220px, 42vw);
  height: 2px;
  z-index: 400;
  background: rgba(255, 255, 255, .08);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease);
}

.top-progress.show {
  opacity: 1;
  transform: translateX(-50%);
}

.top-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff1a3d, #e4002b, #ff4d6d);
  background-size: 200% 100%;
  animation: progressShine .9s linear infinite;
  transition: width .16s var(--ease);
  box-shadow: 0 0 10px rgba(228, 0, 43, .45);
}

.top-progress.done .top-progress-fill {
  box-shadow: 0 0 20px rgba(228, 0, 43, .7);
}

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

.loader-card p {
  margin: 16px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

@keyframes kfcPulse {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 6px 16px rgba(228, 0, 43, .35));
  }
  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 10px 28px rgba(228, 0, 43, .55));
  }
}

@keyframes kfcRing {
  0% {
    transform: scale(.75);
    opacity: .9;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

@keyframes loaderSubPulse {
  0%, 100% { opacity: .55; }
  50% { opacity: 1; }
}

/* -- Responsive -- */
@media (max-width: 900px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 10px; }
  .shell { padding: 16px; }
  .hero { grid-template-columns: 1fr; }
  .module-grid, .filters { grid-template-columns: repeat(2, 1fr); }
  .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    padding: 6px;
  }
  .metric { padding: 5px 7px; gap: 5px; }
  .metric b { font-size: 16px; }
  .metric span { font-size: 9px; }
  @media (max-width: 520px) {
    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
  .hero-main h1 { font-size: 28px; }
  .home-hero-inner { padding: 28px 20px 24px; }
  .home-ctas, .home-steps, .home-module-grid { grid-template-columns: 1fr; }
  .home-ctas-4 { grid-template-columns: 1fr; }
  .home-minidash-filters { width: 100%; }
  .home-footer { flex-direction: column; align-items: flex-start; }
  .filters-carga, .carga-step2-row { grid-template-columns: 1fr; }
  .validar-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .planner, .validator { grid-template-columns: 1fr; overflow: visible; }
  .day-panel { min-width: 0; }
  .legend-hint { margin-left: 0; width: 100%; }
  .modal-grid { grid-template-columns: 1fr; }

  .week-board-tools {
    display: flex;
  }

  .week-board {
    max-height: min(72vh, 640px);
  }

  .week-header,
  .week-row {
    min-width: 940px;
    grid-template-columns: 132px repeat(7, minmax(116px, 1fr));
  }

  .act-chip {
    padding: 6px 7px 5px !important;
    gap: 2px;
  }

  .chip-local {
    font-size: 10px;
    -webkit-line-clamp: 2;
  }

  .chip-time { font-size: 9px; }
  .chip-status { font-size: 8px; padding: 2px 5px; }
  .chip-hint { font-size: 7px; }

  .week-corner,
  .week-worker {
    min-width: 132px;
    max-width: 132px;
  }

  .week-board.pin-names .week-corner,
  .week-board.pin-names .week-worker {
    position: sticky;
    left: 0;
    z-index: 4;
  }

  .week-board.pin-names .week-corner {
    z-index: 6;
    box-shadow: 4px 0 10px rgba(0, 0, 0, .18);
  }

  .week-board.pin-names .week-worker {
    background: #f8fafc;
    box-shadow: 4px 0 10px rgba(15, 23, 42, .08);
  }

  .week-header .week-day-col.is-today {
    background: #9a3412;
    box-shadow: inset 0 -3px 0 #fde68a;
  }

  .week-cell.is-today {
    background: #fffbeb;
    box-shadow: inset 3px 0 0 #f59e0b;
  }

  .week-cell.is-today.cell-all-done { background: #ecfdf5; box-shadow: inset 3px 0 0 var(--ok); }
  .week-cell.is-today.cell-partial { background: #f0fdf4; box-shadow: inset 3px 0 0 #86efac; }
}

/* -- Cargar Objetivos Semanales -- */
.obj-workspace[hidden] { display: none !important; }

.obj-supervisor-link {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.obj-board {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.obj-intro-panel {
  margin-bottom: 0;
  padding: 14px;
}

.obj-intro-text {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
}

.obj-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.obj-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
  min-width: 0;
  overflow: hidden;
}

.obj-summary-card {
  border-color: rgba(228, 0, 43, .18);
  background: linear-gradient(180deg, #fff, #fff7f8);
}

.obj-card.obj-final {
  background: #fafafa;
}

.obj-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.obj-slot-badge {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--red);
  background: #fff5f7;
  border: 1px solid rgba(228, 0, 43, .15);
  padding: 4px 9px;
  border-radius: 999px;
}

.obj-text,
.obj-como,
.obj-nota {
  width: 100%;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  resize: vertical;
}

.obj-apoyo,
.obj-req-apoyo {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}

.obj-req-apoyo {
  min-height: 40px;
  background: #fff;
}

.obj-apoyo-wrap.is-hidden,
.obj-dash-apoyo-wrap.is-hidden,
.obj-outcome-wrap.is-hidden {
  display: none;
}

.obj-summary-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.obj-summary-actions .btn-ghost {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 0.76rem;
}

.obj-summary-body,
.obj-summary-body-dash {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.obj-summary-body span {
  margin-top: 6px;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #6b7280;
}

.obj-summary-body p {
  margin: 0;
  color: var(--dark);
  line-height: 1.32;
  font-size: 0.93rem;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.obj-loading-panel {
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.obj-loading-panel strong {
  display: block;
  font-size: 0.98rem;
  color: var(--dark);
}

.obj-loading-panel p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.obj-loading-spinner {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 3px solid #ffe1e7;
  border-top-color: var(--red);
  animation: spin .8s linear infinite;
  flex: 0 0 auto;
}

.obj-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.obj-actions .btn-ghost,
.obj-actions .btn-red {
  flex: 1 1 auto;
  min-width: 120px;
  justify-content: center;
}

.btn-obj-fail {
  color: #b45309;
  border-color: #fde68a;
  background: #fffbeb;
}

.obj-closed-hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.obj-pendiente { --obj-accent: #94a3b8; }
.obj-proceso { --obj-accent: #2563eb; }
.obj-cumplido { --obj-accent: var(--ok); }
.obj-nocumplido { --obj-accent: #dc2626; }

.pill.obj-pendiente { background: #f8fafc; color: #64748b; border-color: #e2e8f0; }
.pill.obj-proceso { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.pill.obj-cumplido { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.pill.obj-nocumplido { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

.obj-jefe-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.obj-jefe-block {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  min-width: 0;
}

.obj-jefe-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}

.obj-jefe-head > div {
  min-width: 0;
}

.obj-jefe-head h3 {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.obj-jefe-head small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.obj-jefe-bar {
  width: 120px;
  flex-shrink: 0;
}

.obj-dash-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 10px;
  padding: 12px;
}

.obj-dash-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
  border-left: 4px solid var(--obj-accent, #cbd5e1);
  min-width: 0;
  overflow: hidden;
}

.obj-dash-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.obj-dash-text {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.obj-dash-apoyo {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.obj-dash-apoyo span {
  font-weight: 800;
  color: var(--dark);
}

.obj-dash-nota {
  margin: 6px 0 0;
  font-size: 12px;
  color: #475569;
  font-style: italic;
}

.obj-save-bar {
  margin-top: 0;
}

.mini-dash-fold-obj .mini-dash-fold-summary {
  background: linear-gradient(90deg, #fff8f9, #fff);
}

.mini-obj-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.mini-obj-chip {
  font-size: 11px;
  font-weight: 800;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
}

.mini-obj-chip.obj-cumplido { color: #047857; border-color: #a7f3d0; background: #ecfdf5; }
.mini-obj-chip.obj-proceso { color: #1d4ed8; border-color: #bfdbfe; background: #eff6ff; }
.mini-obj-chip.obj-pendiente { color: #64748b; border-color: #e2e8f0; background: #f8fafc; }
.mini-obj-chip.obj-nocumplido { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }

.mini-obj-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-obj-row {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}

.mini-bar-fill.mini-bar-obj {
  background: linear-gradient(90deg, #fbbf24, var(--ok));
}

.home-minidash-link-inner {
  margin: 12px 0 0;
}

.mini-dash-empty-agenda {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px dashed var(--line);
}

@media (min-width: 900px) {
  .home-ctas-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (min-width: 1200px) {
  .home-ctas-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

@media (max-width: 899px) {
  .home-hero-inner {
    padding: 28px 18px 24px;
  }

  .home-lead {
    max-width: 100%;
    font-size: 15px;
    margin-bottom: 20px;
    gap: 14px;
  }

  .home-lead-steps {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .home-lead-step {
    white-space: normal;
    justify-content: flex-start;
    width: 100%;
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 10px;
  }

  .home-ctas-4 {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .btn-hero {
    padding: 12px 14px;
    min-height: 58px;
    gap: 10px;
  }

  .topbar-home {
    padding: 10px 14px;
  }

  .topbar-home .nav-wide {
    width: 100%;
    gap: 6px;
  }

  .topbar-home .nav-wide a {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    font-size: 11px;
    padding: 8px 6px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .home-hero-inner {
    padding: 24px 16px 20px;
  }

  .home-hero h1 {
    font-size: 28px;
  }

  .home-lead {
    font-size: 14px;
    margin-bottom: 18px;
  }

  .home-lead-step {
    font-size: 11px;
    padding: 7px 10px;
  }

  .cta-visual {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }

  .cta-visual svg {
    width: 20px;
    height: 20px;
  }

  .cta-copy b {
    font-size: 14px;
  }

  .cta-copy small {
    font-size: 10px;
  }
}

@media (max-width: 900px) {
  .obj-jefe-head { flex-direction: column; align-items: flex-start; }
  .obj-jefe-bar { width: 100%; }
}
/* Inicio ejecutivo */
.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 20%, rgba(228, 0, 43, .13), transparent 28%),
    linear-gradient(135deg, #101827 0%, #1c2433 48%, #f4f6fa 48%, #ffffff 100%);
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-shell {
  width: min(760px, 100%);
}

.login-card {
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 18px;
  box-shadow: 0 28px 90px rgba(15, 23, 42, .22);
  padding: clamp(22px, 4vw, 36px);
  overflow: hidden;
}

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

.login-brand .brand-logo {
  width: 70px;
  height: 70px;
  flex: 0 0 auto;
}

.login-kicker {
  display: inline-flex;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
}

.login-brand h1 {
  margin: 0;
  font-size: clamp(28px, 4.5vw, 46px);
  line-height: 1;
  color: var(--dark);
}

.login-core-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  white-space: nowrap;
  margin-top: -3px;
}

.login-core-wordmark {
  display: inline-block;
  font-size: clamp(40px, 6vw, 62px);
  font-weight: 950;
  line-height: .9;
  letter-spacing: 0;
  color: #0f172a;
  text-shadow: 0 10px 28px rgba(15, 23, 42, .12);
  white-space: nowrap;
}

.login-core-title img {
  width: clamp(56px, 7.8vw, 72px);
  height: clamp(56px, 7.8vw, 72px);
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(15, 23, 42, .14));
}

.login-core-tagline {
  display: block;
  margin-top: 9px;
  color: rgba(75, 85, 99, .54);
  font-size: clamp(12px, 1.6vw, 15px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .55);
}

.login-brand p {
  margin: 12px 0 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.login-form {
  margin-top: 24px;
  display: grid;
  gap: 12px;
}

.login-form label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.login-form input {
  width: 100%;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 16px;
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
  background: #fff;
}

.login-form input::placeholder {
  color: rgba(100, 116, 139, .34);
  font-size: 15px;
  font-weight: 700;
}

.login-form button {
  justify-self: start;
  min-height: 52px;
  padding-inline: 22px;
}

.login-msg {
  min-height: 22px;
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

.login-msg.is-ok { color: var(--ok); }
.login-msg.is-err { color: var(--red); }
.login-msg.is-loading { color: #475569; }

@media (max-width: 560px) {
  .login-page {
    min-height: 100dvh;
    padding: 14px;
    align-items: center;
    background:
      linear-gradient(150deg, #101827 0 34%, #eef2f7 34% 100%);
  }

  .login-card {
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 18px 54px rgba(15, 23, 42, .2);
  }

  .login-brand {
    gap: 12px;
    align-items: center;
  }

  .login-brand .brand-logo {
    width: 58px;
    height: 58px;
  }

  .login-kicker {
    font-size: 10px;
    margin-bottom: 5px;
  }

  .login-brand h1 {
    font-size: clamp(24px, 7vw, 30px);
    line-height: 1.02;
  }

  .login-core-title {
    gap: 6px;
    min-width: 0;
  }

  .login-core-wordmark {
    font-size: clamp(30px, 10.4vw, 39px);
    line-height: .88;
    white-space: nowrap;
  }

  .login-core-title img {
    width: 43px;
    height: 43px;
  }

  .login-core-tagline {
    margin-top: 7px;
    font-size: 10.5px;
    color: rgba(75, 85, 99, .48);
    white-space: nowrap;
  }

  .login-brand p {
    margin-top: 7px;
    font-size: 13px;
    line-height: 1.35;
  }

  .login-form {
    margin-top: 18px;
    gap: 9px;
  }

  .login-form input {
    min-height: 50px;
    font-size: 17px;
    border-radius: 12px;
  }

  .login-form input::placeholder {
    font-size: 13px;
  }

  .login-form button {
    width: 100%;
    min-height: 48px;
  }
}

.home-hero-exec {
  min-height: clamp(560px, 72vh, 760px);
  display: flex;
  align-items: stretch;
  background: #111827;
  color: #fff;
  overflow: hidden;
}

.home-hero-exec .home-hero-bg {
  background:
    linear-gradient(115deg, rgba(10, 17, 32, 0.96) 0%, rgba(17, 24, 39, 0.9) 48%, rgba(185, 28, 28, 0.78) 100%),
    radial-gradient(circle at 88% 24%, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.16) 24%, transparent 25%),
    url('kfc-logo.png') right 7vw center/260px auto no-repeat;
  opacity: 1;
}

.home-exec-layout {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(380px, 1.08fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
  padding: clamp(56px, 8vw, 92px) 0 clamp(44px, 7vw, 76px);
}

.home-exec-copy { max-width: 640px; }

.home-hero-exec .home-badge {
  color: #fecaca;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.home-hero-exec h1 {
  max-width: 620px;
  margin: 14px 0 16px;
  font-size: clamp(2.35rem, 3.35vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.home-hero-exec .home-lead {
  max-width: 600px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.02rem, 1.8vw, 1.25rem);
}

.home-exec-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.home-exec-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
  font-size: 0.78rem;
}

.home-command-panel {
  width: 100%;
  padding: clamp(18px, 2.4vw, 26px);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.35);
  color: #111827;
  backdrop-filter: blur(14px);
}

.home-panel-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}

.home-panel-heading strong {
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.1;
}

.home-panel-kicker {
  color: #b91c1c;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.home-workflow-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.home-action-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  min-height: 96px;
  align-items: center;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.home-action-card:hover {
  transform: translateY(-2px);
  border-color: #ef4444;
  box-shadow: 0 14px 32px rgba(17, 24, 39, 0.12);
}

.home-action-number {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #111827;
  color: #fff;
  font-weight: 950;
  font-size: 1rem;
  box-shadow: inset 0 -10px 18px rgba(255, 255, 255, 0.06);
}

.home-action-label {
  display: block;
  font-weight: 950;
  font-size: 1.06rem;
  line-height: 1.15;
}

.home-action-copy {
  display: block;
  min-width: 0;
}

.home-action-card small {
  display: block;
  margin-top: 7px;
  max-width: 32rem;
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.35;
}

.home-supervision-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding: 14px;
  border-radius: 12px;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

.home-supervision-card span {
  display: block;
  color: #6b7280;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.home-supervision-card strong {
  display: block;
  margin-top: 2px;
  font-size: 0.96rem;
}

.home-supervision-card a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #d1d5db;
  color: #111827;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.home-flow-sections {
  display: grid;
  gap: 10px;
}

.home-action-primary {
  grid-template-columns: 58px minmax(0, 1fr) 28px;
  align-items: center;
  min-height: 64px;
  padding: 12px 14px;
  border-color: rgba(228, 0, 43, .24);
  background:
    linear-gradient(135deg, rgba(228, 0, 43, .045), rgba(255,255,255,0) 58%),
    linear-gradient(135deg, #fff7f8, #fff);
  box-shadow: 0 10px 24px rgba(17, 24, 39, .08);
  transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease, background 200ms ease;
}

.home-action-primary:hover {
  transform: translateY(-2px);
  border-color: rgba(228, 0, 43, .46);
  box-shadow: 0 16px 34px rgba(17, 24, 39, .13), 0 8px 20px rgba(228, 0, 43, .10);
  background:
    linear-gradient(135deg, rgba(228, 0, 43, .07), rgba(255,255,255,0) 58%),
    linear-gradient(135deg, #fff5f6, #fff);
}

.home-action-primary-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: #e4002b;
}

.home-action-primary-icon svg {
  width: 52px;
  height: 52px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-action-primary .home-action-label {
  color: #b00020;
  font-size: 1.08rem;
  letter-spacing: .01em;
}

.home-action-primary small {
  margin-top: 4px;
  font-size: .86rem;
  line-height: 1.25;
}

.home-action-primary-chevron {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: #e4002b;
  opacity: .72;
  transition: transform 200ms ease, opacity 200ms ease;
}

.home-action-primary-chevron svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-action-primary:hover .home-action-primary-chevron {
  transform: translateX(3px);
  opacity: 1;
}

/* Ajuste final del acceso principal Ver Agendas */
.home-flow-sections > .home-action-primary {
  grid-template-columns: 42px minmax(0, 1fr) 22px !important;
  gap: 10px !important;
  min-height: 70px !important;
  padding: 10px 12px !important;
  border-radius: 12px !important;
}

.home-flow-sections > .home-action-primary .home-action-primary-icon {
  width: 40px;
  height: 40px;
}

.home-flow-sections > .home-action-primary .home-action-primary-icon svg {
  width: 40px;
  height: 40px;
  stroke-width: 1.85;
}

.home-flow-sections > .home-action-primary .home-action-label {
  font-size: 1rem;
  line-height: 1.1;
}

.home-flow-sections > .home-action-primary small {
  margin-top: 4px;
  font-size: .82rem;
  line-height: 1.22;
}

.home-flow-sections > .home-action-primary .home-action-primary-chevron {
  align-self: center;
  justify-self: end;
  width: 22px;
  height: 22px;
}

.home-flow-sections > .home-action-primary .home-action-primary-chevron svg {
  width: 18px;
  height: 18px;
}

.home-flow-group {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.home-flow-group h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #6b7280;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.home-flow-group h3::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.home-flow-group .home-action-card {
  min-height: 74px;
  padding: 12px 14px;
  border-radius: 12px;
  gap: 12px;
  grid-template-columns: 46px minmax(0, 1fr);
  box-shadow: none;
}

.home-flow-group .home-action-number {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  font-size: .95rem;
}

.home-flow-group .home-action-label {
  font-size: 1rem;
}

.home-flow-group .home-action-card small {
  margin-top: 4px;
  font-size: .82rem;
  line-height: 1.25;
}

.home-flow-plan .home-action-number { background: #111827; }
.home-flow-validate .home-action-number { background: var(--red); }
.home-flow-audit .home-action-number { background: #374151; }
.home-flow-summary .home-action-number { background: #be123c; }

.home-flow-plan .home-action-card:hover { border-color: #cbd5e1; }
.home-flow-validate .home-action-card:hover,
.home-flow-summary .home-action-card:hover { border-color: rgba(228, 0, 43, .46); }
.home-flow-audit .home-action-card:hover { border-color: #9ca3af; }

.home-guide-exec { margin-top: clamp(18px, 3vw, 30px); }
.home-steps-exec { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home-step-muted { background: #f9fafb; border-style: dashed; }

@media (max-width: 980px) {
  .home-exec-layout { grid-template-columns: 1fr; align-items: start; }
  .home-exec-copy { max-width: 760px; }
  .home-command-panel { max-width: 760px; }
  .home-steps-exec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .home-hero-exec {
    min-height: auto;
  }

  .home-hero-exec .home-hero-bg {
    background-size: auto, auto, 160px auto;
    background-position: center, center, right 18px top 18px;
  }

  .home-exec-layout {
    width: min(100% - 24px, 1180px);
    padding: 22px 0 24px;
    gap: 16px;
  }

  .home-hero-exec .home-badge {
    min-height: 28px;
    padding: 6px 12px;
    font-size: 0.72rem;
  }

  .home-hero-exec h1 {
    margin: 12px 0 10px;
    font-size: clamp(1.9rem, 8.2vw, 2.1rem);
    line-height: 0.96;
  }

  .home-hero-exec .home-lead {
    font-size: 0.98rem;
    line-height: 1.34;
    max-width: 25rem;
  }
  .home-command-panel {
    padding: 12px;
    border-radius: 14px;
  }

  .home-panel-heading {
    margin-bottom: 10px;
    gap: 6px;
  }

  .home-panel-heading strong {
    font-size: 1rem;
    line-height: 1.12;
  }

  .home-panel-kicker {
    font-size: 0.66rem;
  }

  .home-workflow-grid {
    gap: 8px;
  }
  .home-panel-heading, .home-supervision-card { grid-template-columns: 1fr; display: grid; align-items: start; }
  .home-action-card {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    min-height: 74px;
    padding: 11px 12px;
    border-radius: 12px;
  }
  .home-action-number {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 0.9rem;
  }
  .home-action-label {
    font-size: 0.98rem;
    line-height: 1.1;
  }
  .home-action-card small {
    margin-top: 4px;
    font-size: 0.82rem;
    line-height: 1.25;
    max-width: none;
  }

  .home-flow-sections {
    gap: 8px;
  }

  .home-flow-group {
    gap: 7px;
    padding: 8px;
    border-radius: 12px;
  }

  .home-flow-group h3 {
    font-size: .64rem;
    letter-spacing: .06em;
  }

  .home-flow-group .home-action-card {
    grid-template-columns: 40px minmax(0, 1fr);
    min-height: 66px;
    padding: 10px;
    gap: 9px;
  }

  .home-flow-group .home-action-number {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: .82rem;
  }

  .home-flow-group .home-action-label {
    font-size: .92rem;
    line-height: 1.12;
  }

  .home-trend-kpis,
  .home-trend-grid {
    grid-template-columns: 1fr;
  }

  .home-trend-card {
    padding: 12px;
  }

  .home-trend-card header {
    display: grid;
    gap: 4px;
  }

  .home-trend-row {
    grid-template-columns: minmax(78px, .55fr) minmax(0, 1fr) 40px;
    gap: 8px;
    padding: 9px;
  }

  .home-trend-meta em {
    display: block;
    margin: 2px 0 0;
  }

  .home-supervision-card {
    gap: 8px;
    margin-top: 10px;
    padding: 10px;
    border-radius: 12px;
  }

  .home-supervision-card strong {
    font-size: 0.9rem;
  }

  .home-supervision-card a {
    min-height: 34px;
    padding: 8px 10px;
    font-size: 0.84rem;
  }
  .home-steps-exec { grid-template-columns: 1fr; }
}







/* Navegacion: separa flujo principal y consultas */
.nav-section-label {
  display: none;
}

.nav a.nav-consulta {
  background: rgba(228, 0, 43, 0.70);
  color: #fff;
  border: 1px solid rgba(228, 0, 43, 0.22);
  box-shadow: 0 8px 18px rgba(228, 0, 43, 0.16);
}

.nav a.nav-consulta:hover {
  background: rgba(228, 0, 43, 0.82);
  color: #fff;
  border-color: rgba(228, 0, 43, 0.34);
}

.nav a.nav-consulta.active {
  background: rgba(228, 0, 43, 0.86);
  color: #fff;
  border-color: rgba(228, 0, 43, 0.42);
}

.nav a.nav-logout {
  background: #111827;
  color: #fff;
  border: 1px solid rgba(17, 24, 39, .18);
  box-shadow: 0 8px 18px rgba(17, 24, 39, .12);
}

.nav a.nav-logout:hover {
  background: #0b1220;
  color: #fff;
  border-color: rgba(17, 24, 39, .34);
}

@media (max-width: 640px) {
  .topbar .nav-wide {
    align-items: stretch;
  }

  .topbar .nav-wide .nav-section-label {
    display: flex;
    flex: 1 1 100%;
    align-items: center;
    gap: 8px;
    margin: 2px 0 -2px;
    color: #6b7280;
    font-size: 0.68rem;
    font-weight: 950;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .topbar .nav-wide .nav-section-label::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #e5e7eb;
  }

  .topbar .nav-wide a.nav-consulta {
    flex: 1 1 calc(50% - 4px);
    background: rgba(228, 0, 43, 0.70);
    border: 1px solid rgba(228, 0, 43, 0.22);
    color: #fff;
  }

  .topbar .nav-wide a.nav-logout {
    flex: 1 1 100%;
  }
}




/* Header consistente en todo el flujo */
.brand-link {
  color: inherit;
  text-decoration: none;
}

.brand-link:hover {
  transform: none;
}

.topbar-flow {
  background: rgba(255, 255, 255, .94);
  border-bottom-color: rgba(228, 0, 43, .1);
}

.topbar-flow .brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
}

.topbar-flow .nav-home a.active:not(.nav-consulta) {
  background: #f3f4f6;
  color: var(--dark);
  border: 1px solid rgba(228, 0, 43, 0.20);
  box-shadow: inset 0 -3px 0 rgba(228, 0, 43, 0.72);
}

.topbar-flow .nav-home a.active:not(.nav-consulta):hover {
  background: #fff1f2;
  color: var(--red);
}

.topbar-flow .nav-home a.nav-consulta.active {
  background: rgba(228, 0, 43, 0.86);
  color: #fff;
  border-color: rgba(228, 0, 43, 0.42);
}

@media (max-width: 640px) {
  .topbar-flow {
    padding: 10px 14px;
  }
}


.topbar-flow .nav-home a[href="index.html"] {
  background: #f3f4f6;
  color: var(--dark);
}

.nav-home a.nav-plan {
  background: #f3f4f6;
  color: #111827;
  border-color: #e5e7eb;
}

.nav-home a.nav-validacion {
  background: rgba(228, 0, 43, .70);
  color: #fff;
  border-color: rgba(228, 0, 43, .22);
}

.nav-home a.nav-auditoria {
  background: rgba(17, 24, 39, .92);
  color: #fff;
  border-color: rgba(17, 24, 39, .18);
}

.nav-home a.nav-resumen {
  background: rgba(228, 0, 43, .70);
  color: #fff;
  border-color: rgba(228, 0, 43, .22);
  box-shadow: 0 8px 18px rgba(228, 0, 43, .16);
}

.nav-home a.nav-plan:hover,
.nav-home a.nav-validacion:hover,
.nav-home a.nav-auditoria:hover,
.nav-home a.nav-resumen:hover {
  filter: saturate(1.08);
  transform: translateY(-1px);
}

.topbar-flow .nav-home a[href="index.html"]:hover {
  background: #fff1f2;
  color: var(--red);
}

body.home .nav-home a {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.04)),
    linear-gradient(135deg, #2d3440, #151b24);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -14px 22px rgba(0,0,0,.14),
    0 10px 22px rgba(15, 23, 42, .14);
  backdrop-filter: blur(10px) saturate(1.15);
}

body.home .nav-home a::before {
  display: none;
}

body.home .nav-home a.nav-auditoria {
  background:
    linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.04)),
    linear-gradient(135deg, #2d3440, #151b24);
  color: #fff;
  border-color: rgba(255,255,255,.18);
}

body.home .nav-home a.nav-resumen {
  background:
    linear-gradient(135deg, rgba(255,255,255,.2), rgba(255,255,255,.03)),
    linear-gradient(135deg, #f04a66, #d4072f 58%, #a90022);
  color: #fff;
  border-color: rgba(255, 255, 255, .2);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.24),
    inset 0 -14px 24px rgba(120,0,20,.18),
    0 12px 24px rgba(228, 0, 43, .24);
}

body.home .nav-home a.nav-logout {
  background:
    linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,255,255,.03)),
    linear-gradient(135deg, #151b24, #05070b);
  color: #fff;
  border-color: rgba(255,255,255,.16);
}

body.home .nav-home a.nav-logout::before {
  display: none;
}

body.home .nav-home a:hover {
  transform: translateY(-1px);
  filter: none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    inset 0 -16px 26px rgba(0,0,0,.18),
    0 14px 28px rgba(15, 23, 42, .18);
}

body.home .nav-home a.nav-plan:hover,
body.home .nav-home a.nav-validacion:hover,
body.home .nav-home a.nav-auditoria:hover {
  background:
    linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.05)),
    linear-gradient(135deg, #3b4451, #1a212c);
  border-color: rgba(255,255,255,.26);
  color: #fff;
}

body.home .nav-home a.nav-logout:hover {
  background: #020617;
  color: #fff;
}

body.home .nav-home a.nav-resumen:hover {
  background:
    linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.04)),
    linear-gradient(135deg, #ff4c68, #e4002b 54%, #96001f);
  border-color: rgba(255, 255, 255, .26);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    inset 0 -16px 26px rgba(120,0,20,.24),
    0 16px 30px rgba(228, 0, 43, .28);
}

/* Auditoria / Visita Restaurante */
.audit-shell {
  display: grid;
  gap: 16px;
}

.audit-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}

.audit-week-pill {
  min-width: 120px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff1f2;
  color: var(--red);
  text-align: center;
  border: 1px solid rgba(228, 0, 43, .15);
}

.audit-week-pill span,
.audit-section-head span {
  display: block;
  font-size: .7rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.audit-week-pill strong {
  display: block;
  margin-top: 2px;
  color: var(--dark);
}

.audit-form {
  display: grid;
  gap: 16px;
}

.audit-section {
  display: grid;
  gap: 16px;
}

.audit-section-head {
  display: grid;
  gap: 4px;
}

.audit-section-head span {
  color: var(--red);
}

.audit-section-head h2 {
  margin: 0;
}

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

.audit-form-grid > div {
  min-width: 0;
}

.audit-turno-card {
  min-height: 50px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, .28);
  background: linear-gradient(135deg, #fff, #f8fafc);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    0 8px 22px rgba(15, 23, 42, .05);
  overflow: hidden;
  position: relative;
}

.audit-turno-card::after {
  content: "";
  position: absolute;
  inset: auto -20px -26px auto;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: rgba(255,255,255,.45);
  pointer-events: none;
}

.audit-turno-icon {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 8px 16px rgba(15, 23, 42, .08);
}

.audit-turno-card span {
  font-size: .7rem;
  font-weight: 950;
  text-transform: uppercase;
  color: rgba(15, 23, 42, .62);
  position: relative;
  z-index: 1;
}

.audit-turno-card b {
  font-size: 1rem;
  color: var(--dark);
  position: relative;
  z-index: 1;
  text-align: right;
}

.audit-turno-dia {
  background: linear-gradient(135deg, #fff8e1 0%, #ecfeff 100%);
  border-color: #facc15;
}

.audit-turno-dia .audit-turno-icon {
  background: radial-gradient(circle, #fde047 0 34%, #f59e0b 36% 58%, rgba(245, 158, 11, .14) 60%);
}

.audit-turno-dia b { color: #92400e; }

.audit-turno-tarde {
  background: linear-gradient(135deg, #fff1f2 0%, #fffbeb 100%);
  border-color: #fb7185;
}

.audit-turno-tarde .audit-turno-icon {
  background: linear-gradient(135deg, #fb7185, #f97316);
}

.audit-turno-tarde .audit-turno-icon::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  box-shadow: 9px 0 0 -3px rgba(255,255,255,.45);
}

.audit-turno-tarde b { color: #be123c; }

.audit-turno-noche {
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%);
  border-color: #a5b4fc;
}

.audit-turno-noche .audit-turno-icon {
  background: linear-gradient(135deg, #312e81, #6366f1);
}

.audit-turno-noche .audit-turno-icon::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 7px -2px 0 0 #6366f1;
}

.audit-turno-noche b { color: #3730a3; }

.audit-turno-empty {
  background: #f8fafc;
  border-color: #e5e7eb;
}
.audit-local-info {
  display: grid;
  grid-template-columns: 1.4fr .8fr 1.2fr;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.audit-local-info article {
  min-width: 0;
}

.audit-local-info span,
.audit-local-info article span {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.audit-local-info b {
  display: block;
  margin-top: 3px;
  color: var(--dark);
  font-size: .88rem;
  overflow-wrap: anywhere;
}

.audit-questions {
  display: grid;
  gap: 14px;
}

.audit-question-group {
  display: grid;
  gap: 10px;
}

.audit-question-group h3 {
  margin: 8px 0 0;
  color: var(--dark);
  font-size: 1rem;
}

.audit-question {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.audit-question.is-hidden,
.audit-question-group.is-hidden,
.audit-plan.is-hidden {
  display: none !important;
}

.audit-question-title {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: start;
}

.audit-question-title span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #111827;
  color: #fff;
  font-weight: 950;
}

.audit-question-title p {
  margin: 4px 0 0;
  color: var(--dark);
  font-weight: 850;
  line-height: 1.35;
}

.audit-answer-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.audit-answer {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  font-weight: 900;
  cursor: pointer;
}

.audit-answer input {
  width: auto;
  accent-color: var(--red);
}

.audit-answer.audit-ok {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.audit-answer.audit-bad {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.audit-plan {
  display: grid;
  gap: 6px;
}

.audit-upload {
  display: grid;
  gap: 8px;
}

.audit-photo-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.audit-photo-list span {
  padding: 6px 9px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--dark);
  font-size: .8rem;
  font-weight: 800;
}

.audit-photo-list b {
  color: var(--muted);
}

.audit-save-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.audit-save-panel p {
  margin: 4px 0 0;
  color: var(--muted);
}

.audit-success-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  border-color: #bbf7d0;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.audit-success-panel > div:not(.audit-success-mark):not(.audit-success-actions):not(.audit-email-panel) {
  min-width: 0;
}

.audit-success-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: #16a34a;
  color: #fff;
  font-weight: 950;
}

.audit-success-panel h2 {
  margin: 2px 0 4px;
  color: var(--dark);
}

.audit-success-panel p {
  margin: 0;
  color: var(--muted);
}

.audit-success-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.audit-success-actions a,
.audit-success-actions button {
  min-height: 42px;
}

.audit-success-actions a,
.audit-success-actions button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: .86rem;
  font-weight: 950;
  line-height: 1.1;
  text-decoration: none !important;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
  cursor: pointer;
}

.audit-success-actions a:first-child {
  background: #111827 !important;
  color: #fff !important;
  border-color: #111827 !important;
}

.audit-success-actions a:first-child:hover {
  background: #020617 !important;
}

.audit-success-actions .btn-red {
  background: var(--red) !important;
  color: #fff !important;
  border-color: var(--red) !important;
}

.audit-success-actions .btn-red:hover {
  background: var(--red-dark) !important;
}

.audit-success-actions button.btn-ghost {
  background: #fff !important;
  color: var(--dark) !important;
  border-color: #dbe2ea !important;
}

.audit-success-actions button.btn-ghost:hover {
  border-color: #f43f5e !important;
  color: var(--red) !important;
}
.audit-summary-grid {
  display: grid;
  gap: 16px;
}

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

.audit-result-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.audit-result-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.audit-result-card header b {
  display: block;
  color: var(--dark);
  font-size: 1rem;
}

.audit-result-card header small,
.audit-result-card p {
  color: var(--muted);
}

.audit-result-card header span {
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f0fdf4;
  color: #166534;
  font-size: .76rem;
  font-weight: 950;
}

.audit-result-meta,
.audit-photo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.audit-result-meta span,
.audit-photo-links a {
  padding: 6px 9px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--dark);
  font-size: .78rem;
  font-weight: 850;
  text-decoration: none;
}

.audit-result-compact {
  gap: 8px;
  padding: 12px;
}

.audit-result-compact header {
  align-items: center;
}

.audit-result-compact header b {
  font-size: .98rem;
}

.audit-result-compact header small {
  display: block;
  margin-top: 3px;
  font-size: .78rem;
}

.audit-result-compact .audit-result-meta span {
  padding: 5px 8px;
  font-size: .72rem;
}

.audit-detail-toggle {
  margin-top: 2px;
}

.audit-detail-toggle > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  font-weight: 950;
  cursor: pointer;
  list-style: none;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .14);
}

.audit-detail-toggle > summary::-webkit-details-marker,
.audit-summary-disclosure > summary::-webkit-details-marker {
  display: none;
}

.audit-detail-toggle[open] > summary {
  background: var(--red);
}

.audit-full-detail {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.audit-full-detail h3 {
  margin: 0 0 8px;
  color: var(--dark);
  font-size: .92rem;
}

.audit-summary-disclosure {
  padding: 0;
}

.audit-summary-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
  list-style: none;
  color: var(--dark);
  font-weight: 950;
}

.audit-summary-disclosure > summary span {
  min-width: 0;
}

.audit-summary-disclosure > summary b {
  flex-shrink: 0;
  min-width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff1f2;
  color: var(--red);
  font-size: .8rem;
}

.audit-summary-disclosure > summary::after {
  content: "";
  width: 9px;
  height: 9px;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: rotate(45deg);
  transition: transform .16s ease;
}

.audit-summary-disclosure[open] > summary::after {
  transform: rotate(225deg);
}

.audit-summary-disclosure > .op-intel-row,
.audit-summary-disclosure > .audit-plan-line,
.audit-summary-disclosure > .op-empty {
  margin: 0 16px 10px;
}

.audit-summary-disclosure > :last-child {
  margin-bottom: 16px;
}

.audit-plan-line {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.audit-plan-line b {
  color: #9a3412;
}

.audit-plan-line span,
.audit-plan-line small {
  color: #7c2d12;
}

.audit-measure-line {
  display: grid;
  gap: 4px;
  padding: 10px;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.audit-measure-line b {
  color: #1e3a8a;
}

.audit-measure-line span {
  color: #1d4ed8;
  font-weight: 950;
}

.audit-measure-line small {
  color: #475569;
  font-weight: 800;
}

.audit-timer-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fbff, #eff6ff);
}

.audit-timer-head,
.audit-time-summary,
.audit-time-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
}

.audit-timer-head {
  grid-template-columns: 1fr auto;
  padding-bottom: 4px;
}

.audit-timer-head span,
.audit-time-summary span {
  color: #64748b;
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.audit-timer-head b,
.audit-time-summary strong {
  color: #1d4ed8;
  font-weight: 950;
}

.audit-time-row {
  padding: 10px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: rgba(255,255,255,.86);
}

.audit-time-row > div {
  display: grid;
  gap: 2px;
}

.audit-time-row strong {
  color: var(--dark);
  font-size: .9rem;
}

.audit-time-value {
  font-variant-numeric: tabular-nums;
  color: #1e3a8a;
  font-size: 1.05rem;
  font-weight: 950;
}

.audit-time-row.is-running {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.audit-time-row.is-done {
  border-color: #86efac;
  background: #f0fdf4;
}

.audit-time-start,
.audit-time-stop {
  min-height: 38px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  font-weight: 950;
  cursor: pointer;
}

.audit-time-start {
  background: #111827;
  color: #fff;
}

.audit-time-stop {
  background: var(--red);
  color: #fff;
}

.audit-time-start:disabled,
.audit-time-stop:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.audit-time-summary {
  grid-template-columns: 1fr auto;
  padding: 10px;
  border-radius: 12px;
  background: #fff;
  border: 1px dashed #bfdbfe;
}

/* Configuracion / soporte */
.admin-gear {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.06)),
    linear-gradient(135deg, #111827, #020617);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  line-height: 1;
  font-size: 1.35rem;
  cursor: pointer;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .28);
  transition: transform .16s ease, box-shadow .16s ease;
}

.admin-gear:hover {
  transform: translateY(-2px) rotate(18deg);
  box-shadow: 0 22px 46px rgba(15, 23, 42, .34);
}

.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, .52);
  backdrop-filter: blur(10px);
}

.admin-modal.is-hidden { display: none; }

.admin-modal-card {
  width: min(430px, 100%);
  position: relative;
  padding: 28px;
  border-radius: 22px;
  background: linear-gradient(135deg, #fff 0%, #f8fafc 100%);
  border: 1px solid rgba(255,255,255,.75);
  box-shadow: 0 28px 80px rgba(15, 23, 42, .32);
}

.admin-modal-card h2 {
  margin: 8px 0 6px;
  color: var(--dark);
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.admin-modal-card p {
  margin: 0 0 18px;
  color: var(--muted);
}

.admin-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  background: #f1f5f9;
  color: var(--dark);
  font-size: 1.4rem;
  font-weight: 900;
  cursor: pointer;
}

.config-shell {
  display: grid;
  gap: 18px;
}

.config-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,250,252,.92)),
    radial-gradient(circle at top right, rgba(228,0,43,.10), transparent 40%);
}

.config-hero h1,
.config-editor h2 {
  margin: 4px 0;
  color: var(--dark);
}

.config-hero p,
.config-editor p {
  margin: 0;
  color: var(--muted);
}

.config-admin-pill {
  min-width: 190px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #111827;
  color: #fff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .16);
}

.config-admin-pill span {
  display: block;
  font-size: .72rem;
  text-transform: uppercase;
  font-weight: 950;
  color: rgba(255,255,255,.65);
}

.config-admin-pill strong {
  display: block;
  margin-top: 3px;
}

.config-tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.config-tool-card {
  width: 100%;
  text-align: left;
  padding: 16px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.config-tool-card:hover {
  transform: translateY(-2px);
  border-color: rgba(228,0,43,.24);
  box-shadow: 0 16px 34px rgba(15, 23, 42, .09);
}

.config-tool-card span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 10px;
  border-radius: 12px;
  background: #eef2f7;
  color: #111827;
  font-size: .78rem;
  font-weight: 950;
}

.config-tool-card strong {
  display: block;
  color: var(--dark);
}

.config-tool-card p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: .9rem;
}

.config-tool-card.is-active {
  border-color: rgba(228,0,43,.24);
  background: linear-gradient(135deg, #fff, #fff1f2);
}

.config-tool-card.is-active span {
  background: var(--red);
  color: #fff;
}

.config-editor {
  display: grid;
  gap: 14px;
}

.config-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.config-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.btn-dark {
  border: 0;
  border-radius: 12px;
  min-height: 42px;
  padding: 10px 16px;
  background: #111827;
  color: #fff;
  font-weight: 950;
  cursor: pointer;
}

.config-msg {
  min-height: 24px;
  font-size: .9rem;
  font-weight: 800;
  color: var(--muted);
}

.config-msg.is-ok { color: #15803d; }
.config-msg.is-err { color: var(--red); }

.config-table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  -webkit-overflow-scrolling: touch;
}

.config-question-table {
  width: 100%;
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0;
}

.config-question-table th {
  padding: 12px;
  text-align: left;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
  line-height: 1.2;
}

.config-question-table td {
  padding: 10px 12px;
  vertical-align: top;
  border-bottom: 1px solid #eef2f7;
  word-break: normal;
  overflow-wrap: normal;
}

.config-question-table tr:last-child td { border-bottom: 0; }
.config-question-table tr.is-off { opacity: .62; background: #f8fafc; }

.config-question-table input,
.config-question-table select,
.config-question-table textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 1px solid #dbe2ea;
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  color: var(--dark);
  font: inherit;
  font-weight: 700;
}

.config-question-table textarea {
  min-height: 62px;
  resize: vertical;
  line-height: 1.35;
}

.config-question-table th:first-child,
.config-question-table td:first-child { width: 92px; }
.config-question-table th:nth-child(2),
.config-question-table td:nth-child(2) { width: 210px; }
.config-question-table th:nth-child(4),
.config-question-table td:nth-child(4) { width: 220px; }
.config-question-table th:nth-child(5),
.config-question-table td:nth-child(5) { width: 190px; }
.config-question-table th:nth-child(6),
.config-question-table td:nth-child(6) { width: 130px; }
.config-question-table th:last-child,
.config-question-table td:last-child { width: 120px; }
.config-question-wrap {
  overflow: visible;
  border: 0;
  background: transparent;
}

.config-question-list {
  display: grid;
  gap: 14px;
}

.config-question-item {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}

.config-question-item.is-off {
  opacity: .7;
  background: #f8fafc;
  border-style: dashed;
}

.config-question-head {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) minmax(130px, 160px) minmax(130px, auto);
  gap: 12px;
  align-items: end;
}

.config-question-badge {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: #0f172a;
  color: #fff;
  font-weight: 950;
  align-self: end;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .16);
}

.config-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.config-field span {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 950;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.config-field input,
.config-field select,
.config-field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  background: #fff;
  padding: 11px 12px;
  color: var(--dark);
  font: inherit;
  font-weight: 800;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.config-field textarea {
  min-height: 92px;
  line-height: 1.4;
  resize: vertical;
  overflow-wrap: anywhere;
}

.config-field input:focus,
.config-field select:focus,
.config-field textarea:focus {
  border-color: rgba(228, 0, 43, .55);
  box-shadow: 0 0 0 4px rgba(228, 0, 43, .08);
}

.config-question-settings {
  display: grid;
  grid-template-columns: 110px minmax(260px, 1fr) minmax(230px, 300px);
  gap: 12px;
  align-items: end;
}

.config-order-field input { text-align: center; }

.config-question-item .cfg-soft-delete {
  min-width: 136px;
  white-space: nowrap;
  align-self: end;
}

.config-question-item .cfg-time-config {
  min-width: 0;
  height: 100%;
  align-content: center;
  border-radius: 14px;
}

.config-question-item .cfg-time-config label {
  grid-template-columns: 70px minmax(0, 1fr);
}

.config-master-table th:first-child,
.config-master-table td:first-child { width: 130px; }
.config-master-table th:nth-child(2),
.config-master-table td:nth-child(2) { width: 270px; }
.config-master-table th:nth-child(3),
.config-master-table td:nth-child(3) { width: 310px; }
.config-master-table th:nth-child(4),
.config-master-table td:nth-child(4) { width: 130px; }

.config-users-table th:first-child,
.config-users-table td:first-child { width: 320px; }
.config-users-table th:nth-child(2),
.config-users-table td:nth-child(2) { width: 190px; }
.config-users-table th:nth-child(3),
.config-users-table td:nth-child(3) { width: 130px; }
.config-users-table th:nth-child(4),
.config-users-table td:nth-child(4) { width: 190px; }

.cfg-readonly {
  display: block;
  padding: 10px;
  border-radius: 10px;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 800;
  min-height: 42px;
}

.cfg-time-config {
  display: grid;
  gap: 6px;
  min-width: 150px;
  padding: 9px;
  border: 1px dashed #dbe2ea;
  border-radius: 12px;
  background: #f8fafc;
  color: var(--muted);
}

.cfg-time-config span {
  font-size: .68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.cfg-time-config label {
  display: grid;
  grid-template-columns: 62px 1fr;
  align-items: center;
  gap: 7px;
  font-size: .78rem;
  font-weight: 850;
}

.cfg-time-config input {
  min-height: 36px;
  padding: 7px !important;
  text-align: center;
}

.cfg-time-config.is-on {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.cfg-soft-delete {
  width: 100%;
  min-height: 40px;
  border: 1px solid #fecdd3;
  border-radius: 10px;
  background: #fff1f2;
  color: var(--red);
  font-weight: 950;
  cursor: pointer;
}

@media (max-width: 900px) {
  .audit-hero,
  .audit-save-panel,
  .audit-success-panel,
  .audit-result-card header {
    flex-direction: column;
    align-items: stretch;
  }

  .audit-success-panel {
    grid-template-columns: 1fr;
  }

  .audit-success-actions a,
  .audit-success-actions button {
    width: 100%;
    justify-content: center;
  }

  .audit-form-grid,
  .audit-local-info {
    grid-template-columns: 1fr;
  }

  .audit-answer-row {
    grid-template-columns: 1fr;
  }

  .audit-time-row {
    grid-template-columns: 1fr;
  }

  .config-hero,
  .config-editor-head {
    flex-direction: column;
    align-items: stretch;
  }

  .config-tool-grid {
    grid-template-columns: 1fr;
  }

  .config-actions > * {
    flex: 1 1 100%;
  }

  .admin-gear {
    right: 14px;
    bottom: 14px;
  }
}

/* Guia rapida compacta */
.home-guide-exec {
  margin-top: 12px;
  margin-bottom: 18px;
}

.home-guide-exec .home-instructions {
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.08);
}

.home-guide-summary {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
  background: #fff;
  color: #111827;
  font-weight: 950;
  font-size: 0.92rem;
}

.home-guide-summary::-webkit-details-marker { display: none; }
.home-guide-summary::marker { content: ""; }

.home-guide-summary::before {
  content: "+";
  width: 24px;
    height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(228, 0, 43, 0.10);
  color: #e4002b;
  font-weight: 950;
  line-height: 1;
}

.home-instructions[open] .home-guide-summary::before {
  content: "-";
}

.home-guide-summary small {
  margin-left: auto;
  color: #6b7280;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.home-instructions[open] .home-guide-summary {
  border-bottom: 1px solid #f3f4f6;
  background: #fffafb;
}

.home-guide-exec .home-steps {
  gap: 10px;
  padding: 12px;
}

.home-guide-exec .home-step {
  padding: 12px 14px;
  border-radius: 12px;
  gap: 10px;
  box-shadow: none;
}

.home-guide-exec .home-step strong {
  min-width: 112px;
  font-size: 0.9rem;
  line-height: 1.2;
}

.home-guide-exec .home-step span {
  color: #4b5563;
  font-size: 0.84rem;
  line-height: 1.32;
}

@media (max-width: 640px) {
  .home-guide-exec {
    margin-top: 10px;
    margin-bottom: 14px;
  }

  .home-guide-summary {
    min-height: 40px;
    padding: 9px 12px;
  }

  .home-guide-exec .home-steps {
    gap: 8px;
    padding: 10px;
  }

  .home-guide-exec .home-step {
    display: grid;
    grid-template-columns: minmax(92px, 0.42fr) minmax(0, 1fr);
    padding: 10px 11px;
    gap: 9px;
  }

  .home-guide-exec .home-step strong {
    min-width: 0;
    font-size: 0.84rem;
  }

  .home-guide-exec .home-step span {
    font-size: 0.8rem;
    line-height: 1.26;
  }
}


/* Seguimiento Objetivos editable */
.obj-load-card .obj-card-head {
  gap: 10px;
}

.obj-delete-btn {
  min-height: 32px;
  padding: 7px 10px;
  font-size: 0.78rem;
}

.obj-edit-cards {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.obj-edit-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.obj-edit-card .micro {
  margin-top: 2px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
}

.obj-summary-dash-card {
  border-left: 4px solid var(--obj-accent, var(--line));
  background: #fff;
  min-width: 0;
  overflow: hidden;
}

.obj-week-policy,
.obj-locked-panel {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #991b1b;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
}

.obj-week-policy {
  display: grid;
  gap: 2px;
}

.obj-week-policy.is-open {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.obj-week-policy strong,
.obj-locked-panel strong {
  font-size: 0.86rem;
  font-weight: 900;
}

.obj-week-policy span,
.obj-locked-panel p {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.3;
}

.obj-locked-panel {
  display: grid;
  gap: 8px;
  margin: 8px 0 0;
}

.obj-unlock-btn {
  justify-content: center;
  min-height: 34px;
  background: #fff;
}

.obj-edit-panel.is-locked {
  display: none;
}

.obj-summary-body-dash {
  padding: 8px 0 4px;
}

.obj-summary-body-dash span,
.obj-summary-body-dash p,
.obj-edit-panel .micro {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.obj-edit-panel {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.obj-edit-panel summary {
  min-height: 36px;
  border-radius: 10px;
  background: rgba(228, 0, 43, .08);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  font-size: 0.86rem;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.obj-edit-panel summary::-webkit-details-marker {
  display: none;
}

.obj-edit-panel[open] summary {
  margin-bottom: 10px;
  background: var(--red);
  color: #fff;
}

.obj-edit-panel .micro {
  margin-top: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6b7280;
}

.obj-dash-edit-text,
.obj-dash-edit-note,
.obj-dash-edit-input,
.obj-status-select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--dark);
  font: inherit;
  font-size: 0.9rem;
}

.obj-dash-edit-text,
.obj-dash-edit-note {
  min-height: 68px;
  padding: 10px 11px;
  resize: vertical;
  line-height: 1.35;
}

.obj-dash-edit-note {
  min-height: 58px;
}

.obj-dash-edit-input,
.obj-status-select {
  min-height: 38px;
  padding: 8px 10px;
}

.obj-edit-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
    align-items: center;
  margin-top: 2px;
}

.obj-edit-actions .btn-red {
  min-height: 38px;
  padding: 8px 12px;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .obj-cards,
  .obj-dash-cards,
  .obj-edit-cards {
    grid-template-columns: 1fr;
  }

  .obj-dash-cards {
    padding: 8px;
  }

  .obj-card,
  .obj-dash-card {
    padding: 10px;
    border-radius: 10px;
  }

  .obj-summary-body p {
    font-size: 0.86rem;
    line-height: 1.28;
  }

  .obj-summary-body span {
    font-size: 0.66rem;
    line-height: 1.2;
  }

  .obj-jefe-head {
    align-items: flex-start;
    padding: 10px 12px;
  }

  .obj-jefe-bar {
    width: 86px;
  }

  .obj-edit-actions {
    grid-template-columns: 1fr;
  }

  .obj-edit-actions .btn-red {
    width: 100%;
  }
}

/* Resumen operativo completo */
.home-summary-full-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(228, 0, 43, .18);
  background: linear-gradient(135deg, rgba(228, 0, 43, .92), rgba(185, 28, 28, .86));
  color: #fff;
  font-weight: 900;
  font-size: 0.88rem;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(228, 0, 43, .14);
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.home-summary-full-link:hover {
  transform: translateY(-1px);
  filter: saturate(1.04);
  box-shadow: 0 16px 30px rgba(228, 0, 43, .2);
}

.shell-op-summary {
  max-width: 1400px;
}

.op-control-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.op-control-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.op-control-actions .btn-ghost {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.op-control-actions a,
.op-control-actions button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: .82rem;
  font-weight: 950;
  line-height: 1.1;
  text-decoration: none !important;
  white-space: nowrap;
  border: 1px solid transparent;
  box-shadow: 0 10px 20px rgba(15, 23, 42, .08);
}

.op-control-actions .btn-red {
  background: var(--red) !important;
  color: #fff !important;
  border-color: var(--red) !important;
}

.op-control-actions .btn-red:hover {
  background: var(--red-dark) !important;
}

.op-control-actions .btn-ghost {
  background: #fff !important;
  color: var(--dark) !important;
  border-color: #dbe2ea !important;
}

.op-control-actions .btn-ghost:hover {
  color: var(--red) !important;
  border-color: rgba(228, 0, 43, .28) !important;
  background: #fff7f8 !important;
}
.op-summary-filters {
  grid-column: 1 / -1;
  grid-template-columns: 150px 170px 170px 170px 170px minmax(190px, 1fr) minmax(180px, 1fr) auto;
}

.op-summary-grid {
  display: grid;
  gap: 16px;
}

.op-week-range.is-hidden,
.op-week-single.is-hidden {
  display: none;
}

.op-hero-card,
.op-card,
.op-metric {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 6px 22px rgba(15, 23, 42, .06);
  min-width: 0;
  overflow: hidden;
}

.op-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 22px;
  background: linear-gradient(135deg, #111827 0%, #2b1218 60%, #e4002b 140%);
  color: #fff;
}

.op-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.op-hero-card h1 {
  margin: 0 0 6px;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.05;
}

.op-hero-card p {
  margin: 0;
  max-width: 680px;
  color: rgba(255,255,255,.82);
}

.op-score {
  min-width: 150px;
  text-align: center;
  padding: 16px;
  border-radius: 12px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.18);
}

.op-score strong {
  display: block;
  font-size: 2.4rem;
  line-height: 1;
}

.op-score span {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.op-intelligence-card {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(228, 0, 43, .14);
  border-radius: 14px;
  background: linear-gradient(135deg, #fff 0%, #fff7f8 100%);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .07);
  min-width: 0;
}

.op-intelligence-head h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 1.25rem;
  line-height: 1.1;
}

.op-intelligence-head p {
  margin: 0;
  max-width: 1100px;
  color: #4b5563;
  line-height: 1.55;
  font-weight: 650;
}

.op-intel-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.op-intel-columns article {
  min-width: 0;
  padding: 14px;
  border: 1px solid #f1d5db;
  border-radius: 12px;
  background: rgba(255,255,255,.86);
}

.op-intel-columns h3 {
  margin: 0 0 10px;
  color: #111827;
  font-size: .95rem;
  line-height: 1.15;
}

.op-intel-row,
.op-sample-row {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #edf2f7;
  min-width: 0;
}

.op-intel-row + .op-intel-row,
.op-sample-row + .op-sample-row {
  margin-top: 8px;
}

.op-intel-row b,
.op-sample-row b {
  color: #111827;
  overflow-wrap: anywhere;
}

.op-intel-row small,
.op-sample-row small {
  color: #6b7280;
  font-weight: 800;
}

.op-sample-row p {
  margin: 4px 0 0;
  color: #4b5563;
  font-size: .86rem;
  line-height: 1.4;
}

.op-intel-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.op-intel-list li {
  padding: 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #edf2f7;
  color: #374151;
  font-weight: 750;
  line-height: 1.35;
}

.op-text-dashboard {
  display: grid;
  gap: 12px;
}

.op-section-intro {
  margin: 0 !important;
  color: #4b5563 !important;
  font-weight: 700;
}

.op-ranked-row b {
  color: var(--red);
}

.op-word-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.op-word-cloud span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: calc(5px + var(--weight) * 1px) calc(8px + var(--weight) * 2px);
  border-radius: 999px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #9f1239;
  font-size: calc(.74rem + var(--weight) * .035rem);
  font-weight: 900;
}

.op-word-cloud b {
  color: #111827;
}

.op-attention-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.op-attention-strip article {
  min-width: 0;
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid rgba(228, 0, 43, .16);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
}

.op-attention-strip span {
  display: block;
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.op-attention-strip b {
  display: block;
  margin: 5px 0 2px;
  font-size: 2rem;
  line-height: 1;
  color: #111827;
}

.op-attention-strip small {
  color: #6b7280;
  font-weight: 850;
}

.op-metric-grid,
.op-grid-3,
.op-grid-2 {
  display: grid;
  gap: 12px;
}

.op-metric-grid {
  grid-template-columns: 1.4fr .8fr 1.2fr;
}

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

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

.op-metric {
  padding: 14px;
  border-top: 3px solid #cbd5e1;
}

.op-metric b {
  display: block;
  font-size: 1.8rem;
  line-height: 1;
  color: #111827;
}

.op-metric span {
  display: block;
  margin-top: 7px;
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.op-metric.op-ok { border-top-color: #16a34a; }
.op-metric.op-warn { border-top-color: #f59e0b; }
.op-metric.op-danger { border-top-color: var(--red); }
.op-metric.op-info { border-top-color: #2563eb; }

.op-card {
  padding: 16px;
}

.op-card header {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  min-width: 0;
}

.op-card h2 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.15;
}

.op-card header span {
  flex-shrink: 0;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff1f2;
  color: var(--red);
  font-size: 0.74rem;
  font-weight: 900;
}

.op-card p {
  margin: 10px 0 0;
  color: #6b7280;
  line-height: 1.45;
}

.op-ring-line,
.op-progress-row div {
  height: 9px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.op-ring-line i,
.op-progress-row i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), #16a34a);
}

.op-pill-row,
.op-alert-stack {
  display: grid;
  gap: 8px;
}

.op-pill-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.op-pill-row span,
.op-alert-stack span {
  padding: 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  font-weight: 850;
  color: #111827;
}

.op-alert-stack span {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.op-list {
  display: grid;
  gap: 8px;
}

.op-list-item,
.op-rank-row {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  min-width: 0;
}

.op-list-item b,
.op-rank-row b {
  overflow-wrap: anywhere;
}

.op-list-item small,
.op-rank-row small,
.op-more,
.op-empty {
  color: #6b7280;
  font-weight: 750;
}

.op-more,
.op-empty {
  margin: 10px 0 0;
  font-size: 0.86rem;
}

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

.op-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 10px;
  align-items: center;
}

.op-progress-row div,
.op-progress-row small {
  grid-column: 1 / -1;
}

.op-progress-row span,
.op-progress-row b {
  font-weight: 900;
}

.op-wide {
  overflow: hidden;
}

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

.op-jefe-cards {
  display: none;
  gap: 10px;
  margin-bottom: 12px;
}

.op-jefe-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  background: #f8fafc;
  min-width: 0;
}

.op-jefe-card b {
  overflow-wrap: anywhere;
}

.op-jefe-card small {
  color: #6b7280;
  font-weight: 750;
}

.op-jefe-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.op-jefe-stats span {
  padding: 7px;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font-size: 0.72rem;
  font-weight: 900;
  text-align: center;
}

.op-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.op-table th,
.op-table td {
  padding: 10px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.op-table th {
  background: #111827;
  color: #fff;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.shell-training-findings {
  max-width: 1420px;
}

.training-control-panel {
  border-color: rgba(228, 0, 43, .12);
}

.training-filters {
  grid-column: 1 / -1;
  grid-template-columns: 145px 165px 155px 155px 155px minmax(180px, 1fr) minmax(180px, 1fr) 150px 150px 150px minmax(220px, 1.3fr);
}

.training-week-range.is-hidden,
.training-week-single.is-hidden {
  display: none;
}

.training-search-field input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: #111827;
  font: inherit;
  font-weight: 800;
}

.training-findings-grid {
  display: grid;
  gap: 16px;
}

.training-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 22px;
  border: 1px solid rgba(228, 0, 43, .18);
  border-radius: 14px;
  background: linear-gradient(135deg, #111827 0%, #2b1218 60%, #e4002b 140%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
  min-width: 0;
}

.training-hero-card h1 {
  margin: 0 0 6px;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  line-height: 1.05;
}

.training-hero-card p {
  margin: 0;
  max-width: 720px;
  color: rgba(255,255,255,.82);
  font-weight: 750;
}

.training-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.training-kpi-grid article {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 22px rgba(15, 23, 42, .06);
}

.training-kpi-grid span {
  display: block;
  color: #6b7280;
  font-size: .76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.training-kpi-grid b {
  display: block;
  margin-top: 6px;
  color: #111827;
  font-size: 2rem;
  line-height: 1;
}

.training-top-card {
  padding: 16px;
}

.training-top-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.training-top-card > summary::-webkit-details-marker {
  display: none;
}

.training-top-card > summary span {
  display: grid;
  gap: 2px;
}

.training-top-card > summary b {
  color: #111827;
  font-size: 1rem;
  font-weight: 950;
}

.training-top-card > summary small,
.training-top-card > summary em {
  color: #64748b;
  font-size: .78rem;
  font-style: normal;
  font-weight: 900;
}

.training-top-card > summary em {
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff1f2;
  color: var(--red);
}

.training-top-card[open] > summary {
  margin-bottom: 12px;
}

.training-schema-card {
  padding: 16px;
}

.training-schema-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.training-schema-card > summary::-webkit-details-marker {
  display: none;
}

.training-schema-card > summary span {
  display: grid;
  gap: 2px;
}

.training-schema-card > summary b {
  color: #111827;
  font-size: 1rem;
  font-weight: 950;
}

.training-schema-card > summary small,
.training-schema-card > summary em {
  color: #64748b;
  font-size: .78rem;
  font-style: normal;
  font-weight: 900;
}

.training-schema-card > summary em {
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff1f2;
  color: var(--red);
}

.training-schema-card[open] > summary {
  margin-bottom: 12px;
}

.training-schema-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.training-table-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.training-table-counts span {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(228, 0, 43, .14);
  border-radius: 10px;
  background: #fff7f8;
  color: #475569;
  font-size: .78rem;
  font-weight: 900;
}

.training-table-counts b {
  color: var(--red);
  font-size: 1.15rem;
  line-height: 1;
}

.training-schema-grid span {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #edf2f7;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  font-size: .76rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.training-schema-grid b {
  color: #111827;
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.training-sample-box {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.training-sample-box > b {
  color: #111827;
  font-size: .78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.training-sample-box pre {
  max-height: 180px;
  margin: 0;
  padding: 10px;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #0f172a;
  color: #e5e7eb;
  font-size: .72rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

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

.training-finding-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.training-finding-card header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.training-local {
  display: block;
  color: #111827;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.training-finding-card header small {
  display: block;
  margin-top: 4px;
  color: #6b7280;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.training-pill-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.training-date-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.training-date-row span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 7px 10px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: .78rem;
  font-weight: 950;
}

.training-status,
.training-critical {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.training-status.is-open {
  background: #fff1f2;
  color: #be123c;
}

.training-status.is-follow {
  background: #fff7ed;
  color: #c2410c;
}

.training-status.is-closed {
  background: #ecfdf5;
  color: #047857;
}

.training-critical.is-high {
  background: linear-gradient(135deg, #e4002b, #be123c);
  color: #fff;
  box-shadow: 0 8px 18px rgba(228, 0, 43, .18);
}

.training-critical.is-mid {
  background: #fff7ed;
  color: #c2410c;
  border: 1px solid #fed7aa;
}

.training-critical.is-low {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #bbf7d0;
}

.training-finding-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.training-finding-meta span {
  padding: 6px 8px;
  border: 1px solid #edf2f7;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: .74rem;
  font-weight: 900;
}

.training-evidence-thumb-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 4px 7px 4px 10px;
  border: 1px solid rgba(228, 0, 43, .18);
  border-radius: 999px;
  background: #fff7f8;
  color: #be123c;
  font-size: .74rem;
  font-weight: 950;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.training-evidence-thumb-btn i {
  position: relative;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 50%;
  border: 2px solid #fff;
  background:
    linear-gradient(135deg, rgba(228, 0, 43, .92), rgba(190, 18, 60, .74)),
    radial-gradient(circle at 35% 32%, #fff 0 8%, transparent 9%);
  box-shadow: 0 0 0 1px rgba(228, 0, 43, .24), 0 8px 14px rgba(228, 0, 43, .2);
}

.training-evidence-thumb-btn i::before,
.training-evidence-thumb-btn i::after {
  content: "";
  position: absolute;
  border-radius: 3px;
  background: rgba(255, 255, 255, .94);
}

.training-evidence-thumb-btn i::before {
  left: 7px;
  right: 7px;
  top: 8px;
  height: 8px;
}

.training-evidence-thumb-btn i::after {
  left: 9px;
  top: 6px;
  width: 8px;
  height: 3px;
}

.training-evidence-thumb-btn:hover {
  transform: translateY(-1px);
  background: #fff1f2;
  border-color: rgba(228, 0, 43, .36);
  box-shadow: 0 12px 24px rgba(15, 23, 42, .1);
}

.training-evidence-loading,
.training-evidence-empty {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
  color: #475569;
  font-weight: 800;
}

.training-evidence-loading strong,
.training-evidence-empty strong {
  color: #111827;
  font-size: 1.05rem;
}

.training-evidence-empty p {
  margin: 0;
}

.training-evidence-modal {
  display: grid;
  gap: 14px;
}

.training-evidence-modal img {
  display: block;
  width: 100%;
  max-height: min(68vh, 720px);
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #0f172a;
}

.training-evidence-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.training-evidence-info strong,
.training-evidence-info span,
.training-evidence-info small {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: .82rem;
  font-weight: 900;
}

.training-evidence-info strong {
  background: #111827;
  color: #fff;
}

.training-text-block {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid #edf2f7;
  border-radius: 10px;
  background: #fbfdff;
}

.training-text-block b {
  color: #111827;
  font-size: .76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.training-text-block p {
  margin: 0;
  color: #374151;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .op-metric-grid,
  .op-grid-3,
  .op-grid-2,
  .op-attention-strip,
  .training-kpi-grid,
  .training-card-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .shell-op-summary {
    padding-left: 10px;
    padding-right: 10px;
  }

  .op-control-panel,
  .op-hero-card,
  .op-intel-columns,
  .op-metric-grid,
  .op-grid-3,
  .op-grid-2,
  .op-attention-strip,
  .op-pill-row,
  .op-summary-filters,
  .training-filters,
  .training-hero-card,
  .training-kpi-grid,
  .training-card-list,
  .training-table-counts,
  .training-schema-grid,
  .training-finding-card header {
    grid-template-columns: 1fr;
  }

  .op-control-panel {
    gap: 10px;
    padding: 14px;
  }

  .op-control-panel h1 {
    font-size: 1.25rem;
  }

  .op-control-panel .subtitle {
    margin-bottom: 0;
    font-size: 0.86rem;
  }

  .op-control-actions {
    justify-content: stretch;
  }

  .op-control-actions .btn-ghost,
  .home-summary-full-link {
    width: 100%;
  }

  .op-hero-card,
  .op-intelligence-card,
  .op-card {
    padding: 14px;
  }

  .op-intelligence-head h2 {
    font-size: 1.08rem;
  }

  .op-intelligence-head p,
  .op-intel-list li,
  .op-sample-row p {
    font-size: .86rem;
  }

  .op-hero-card {
    gap: 12px;
    border-radius: 14px;
  }

  .op-hero-card h1 {
    font-size: 1.55rem;
  }

  .op-hero-card p {
    font-size: 0.9rem;
  }

  .op-score {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    text-align: left;
    padding: 12px;
  }

  .op-score strong {
    font-size: 2rem;
  }

  .op-score span {
    margin: 0;
  }

  .op-metric-grid {
    gap: 8px;
  }

  .op-metric {
    padding: 11px;
  }

  .op-metric b {
    font-size: 1.55rem;
  }

  .op-metric span {
    font-size: 0.69rem;
    line-height: 1.15;
  }

  .op-card h2 {
    font-size: 0.95rem;
  }

  .op-card header span {
    font-size: 0.68rem;
  }

  .op-attention-strip {
    gap: 8px;
  }

  .op-attention-strip article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 10px;
    align-items: center;
    padding: 12px;
  }

  .op-attention-strip b {
    grid-row: 1 / span 2;
    grid-column: 2;
    margin: 0;
    font-size: 1.8rem;
  }

  .op-jefe-cards {
    display: grid;
  }

  .op-table-wrap {
    display: none;
  }

  .op-jefe-stats {
    grid-template-columns: 1fr;
  }

  .op-word-cloud span {
    font-size: .78rem;
  }

  .training-pill-stack {
    justify-content: flex-start;
  }

  .training-kpi-grid b {
    font-size: 1.55rem;
  }
}

@media print {
  @page {
    size: A4;
    margin: 10mm;
  }

  .topbar,
  .op-control-actions,
  .op-summary-filters,
  .toast,
  .page-loader,
  .top-progress {
    display: none !important;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  html,
  body {
    background: #fff !important;
    color: #111827 !important;
    font-size: 10.5pt;
  }

  .shell,
  .shell-op-summary {
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .op-control-panel {
    display: block;
    border: 0;
    padding: 0 0 8mm;
    margin: 0;
    box-shadow: none;
  }

  .op-control-panel h1 {
    font-size: 20pt;
    margin: 0 0 2mm;
  }

  .op-control-panel .subtitle {
    margin: 0;
    color: #4b5563;
    font-size: 10pt;
  }

  .panel,
  .op-card,
  .op-metric,
  .op-hero-card,
  .op-intelligence-card {
    box-shadow: none !important;
    break-inside: avoid;
    overflow: visible !important;
  }

  .op-intelligence-card {
    break-inside: auto;
    page-break-inside: auto;
  }

  .op-intel-columns article,
  .op-intel-row,
  .op-sample-row,
  .op-intel-list li {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .op-summary-grid {
    gap: 5mm;
  }

  .op-pdf-page {
    page-break-before: always;
  }

  .op-hero-card {
    page-break-after: avoid;
    padding: 9mm;
    border-radius: 5mm;
    background: #111827 !important;
    color: #fff !important;
  }

  .op-hero-card h1 {
    font-size: 22pt;
  }

  .op-hero-card p {
    font-size: 10pt;
  }

  .op-kicker {
    border-color: rgba(255,255,255,.35);
  }

  .op-score {
    min-width: 34mm;
    padding: 6mm;
    border-color: rgba(255,255,255,.28);
  }

  .op-score strong {
    font-size: 26pt;
  }

  .op-attention-strip,
  .op-intel-columns,
  .op-metric-grid,
  .op-grid-3,
  .op-grid-2 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4mm;
  }

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

  .op-metric,
  .op-card,
  .op-intelligence-card,
  .op-intel-columns article,
  .op-attention-strip article {
    border: 1px solid #d1d5db;
    border-radius: 4mm;
    padding: 5mm;
    background: #fff !important;
  }

  .op-intelligence-head p {
    color: #374151 !important;
    font-size: 9.2pt;
    line-height: 1.42;
  }

  .op-intel-columns h3 {
    font-size: 9.5pt;
    margin-bottom: 3mm;
  }

  .op-intel-list li,
  .op-intel-row small,
  .op-sample-row small,
  .op-sample-row p {
    font-size: 8pt;
    line-height: 1.35;
  }

  .op-metric b,
  .op-attention-strip b {
    font-size: 19pt;
  }

  .op-metric span,
  .op-attention-strip span,
  .op-card header span {
    font-size: 7.5pt;
  }

  .op-card h2 {
    font-size: 11pt;
  }

  .op-list-item,
  .op-rank-row,
  .op-intel-row,
  .op-sample-row,
  .op-intel-list li,
  .op-word-cloud span,
  .op-pill-row span,
  .op-alert-stack span {
    padding: 3mm;
    border-color: #e5e7eb;
    background: #f9fafb !important;
  }

  .op-wide {
    page-break-before: always;
  }

  .op-jefe-cards {
    display: none !important;
  }

  .op-table-wrap {
    display: block !important;
    overflow: visible;
    border-radius: 0;
  }

  .op-table {
    min-width: 0;
    table-layout: fixed;
    font-size: 8.2pt;
  }

  .op-table th,
  .op-table td {
    padding: 2.5mm;
    font-size: 8.2pt;
  }

  .op-table th {
    background: #111827 !important;
    color: #fff !important;
  }

  .op-table tr {
    break-inside: avoid;
  }
}

@media (max-width: 900px) {
  .config-question-head,
  .config-question-settings {
    grid-template-columns: 1fr;
  }

  .config-question-badge {
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .config-question-item {
    padding: 13px;
    border-radius: 16px;
  }

  .config-question-item .cfg-soft-delete {
    width: 100%;
  }
}

.config-question-item .cfg-soft-delete {
  width: auto;
  padding: 0 14px;
}
@media (max-width: 900px) {
  .config-question-item .cfg-soft-delete { width: 100%; }
}


.config-add-count {
  display: inline-grid;
  grid-template-columns: auto 64px;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px 8px 6px 12px;
  border: 1px solid rgba(15, 23, 42, .10);
  border-radius: 13px;
  background: rgba(248, 250, 252, .92);
  color: var(--muted);
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.config-add-count input {
  width: 58px;
  min-height: 30px;
  border: 1px solid #dbe2ea;
  border-radius: 10px;
  background: #fff;
  color: var(--dark);
  text-align: center;
  font: inherit;
  font-size: .9rem;
  font-weight: 950;
}

@media (max-width: 720px) {
  .config-actions {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .config-add-count,
  .config-actions button {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .config-actions {
    justify-content: stretch;
  }

  .config-actions > * {
    flex: 1 1 100%;
  }
}

.config-import-card {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(280px, auto);
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(228, 0, 43, .18);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #fff7f8 100%);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}

.config-import-card h3 {
  margin: 3px 0 4px;
  color: var(--dark);
  font-size: 1.05rem;
}

.config-import-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.config-file-picker {
  display: inline-grid;
  gap: 5px;
  min-width: 230px;
  padding: 8px 10px;
  border: 1px solid #dbe2ea;
  border-radius: 13px;
  background: rgba(255,255,255,.9);
  color: var(--muted);
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.config-file-picker input {
  max-width: 240px;
  color: var(--dark);
  font-size: .82rem;
  font-weight: 800;
  text-transform: none;
  letter-spacing: 0;
}

.config-import-preview {
  grid-column: 1 / -1;
  padding: 11px 12px;
  border: 1px dashed #fecdd3;
  border-radius: 13px;
  background: rgba(255, 255, 255, .74);
  color: var(--muted);
  font-size: .88rem;
  font-weight: 800;
}

@media (max-width: 860px) {
  .config-import-card {
    grid-template-columns: 1fr;
  }

  .config-import-controls {
    justify-content: stretch;
  }

  .config-import-controls > *,
  .config-file-picker input {
    width: 100%;
    max-width: none;
  }
}

.config-actions-bd {
  align-items: stretch;
  max-width: 760px;
}

.config-actions-bd .config-file-picker-inline {
  min-width: 190px;
  padding: 7px 10px;
}

.config-actions-bd .config-file-picker-inline input {
  max-width: 185px;
  font-size: .76rem;
}

@media (max-width: 900px) {
  .config-actions-bd {
    max-width: none;
  }
}

/* Menu consistente: mismo lenguaje visual en inicio y pantallas internas */
.topbar-flow .nav-home a {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.04)),
    linear-gradient(135deg, #2d3440, #151b24);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -14px 22px rgba(0,0,0,.14),
    0 10px 22px rgba(15, 23, 42, .14);
  backdrop-filter: blur(10px) saturate(1.15);
}

.topbar-flow .nav-home a::before {
  display: none;
}

.topbar-flow .nav-home a.nav-consulta,
.topbar-flow .nav-home a.nav-resumen {
  background:
    linear-gradient(135deg, rgba(255,255,255,.20), rgba(255,255,255,.03)),
    linear-gradient(135deg, #f04a66, #d4072f 58%, #a90022);
  color: #fff;
  border-color: rgba(255,255,255,.20);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.24),
    inset 0 -14px 24px rgba(120,0,20,.18),
    0 12px 24px rgba(228, 0, 43, .24);
}

.topbar-flow .nav-home a.nav-logout {
  background:
    linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,255,255,.03)),
    linear-gradient(135deg, #151b24, #05070b);
  color: #fff;
  border-color: rgba(255,255,255,.16);
}

.topbar-flow .nav-home a.active,
.topbar-flow .nav-home a.active:not(.nav-consulta),
.topbar-flow .nav-home a[href="index.html"].active {
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.05)),
    linear-gradient(135deg, #3b4451, #1a212c);
  border-color: rgba(228, 0, 43, .34);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.30),
    inset 0 -16px 26px rgba(0,0,0,.18),
    inset 0 -3px 0 rgba(228, 0, 43, .86),
    0 14px 28px rgba(15, 23, 42, .18);
}

.topbar-flow .nav-home a.nav-consulta.active,
.topbar-flow .nav-home a.nav-resumen.active {
  background:
    linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.04)),
    linear-gradient(135deg, #ff4c68, #e4002b 54%, #96001f);
  border-color: rgba(255,255,255,.26);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.30),
    inset 0 -16px 26px rgba(120,0,20,.24),
    inset 0 -3px 0 rgba(255,255,255,.58),
    0 16px 30px rgba(228, 0, 43, .28);
}

.topbar-flow .nav-home a:hover {
  transform: translateY(-1px);
  filter: none;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.05)),
    linear-gradient(135deg, #3b4451, #1a212c);
  border-color: rgba(255,255,255,.26);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    inset 0 -16px 26px rgba(0,0,0,.18),
    0 14px 28px rgba(15, 23, 42, .18);
}

.topbar-flow .nav-home a.nav-consulta:hover,
.topbar-flow .nav-home a.nav-resumen:hover {
  background:
    linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.04)),
    linear-gradient(135deg, #ff4c68, #e4002b 54%, #96001f);
  border-color: rgba(255,255,255,.26);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.28),
    inset 0 -16px 26px rgba(120,0,20,.24),
    0 16px 30px rgba(228, 0, 43, .28);
}

.topbar-flow .nav-home a.nav-logout:hover {
  background:
    linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.03)),
    linear-gradient(135deg, #0b1220, #020617);
}

/* Reporte de auditorias: detalle, estandares y evidencias */
.audit-detail-toggle > summary {
  width: max-content;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--red);
  color: #fff;
  border: 2px solid #111827;
  box-shadow: 0 10px 20px rgba(228, 0, 43, .18);
  font-weight: 950;
  cursor: pointer;
  list-style: none;
}

.audit-detail-toggle > summary::-webkit-details-marker { display: none; }
.audit-detail-toggle > summary .summary-close { display: none; }
.audit-detail-toggle[open] > summary .summary-open { display: none; }
.audit-detail-toggle[open] > summary .summary-close { display: inline; }
.audit-detail-toggle[open] > summary {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

.audit-exec-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}

.audit-standard-card {
  min-width: 0;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.audit-standard-card > span {
  display: block;
  color: #64748b;
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.audit-standard-card > b {
  display: block;
  margin: 4px 0 8px;
  color: var(--dark);
  font-size: 1.55rem;
  line-height: 1;
}

.audit-standard-card ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.audit-standard-card li {
  min-width: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  color: #334155;
  font-size: .86rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.audit-standard-card li span {
  display: block;
  margin-top: 4px;
  color: #7c2d12;
  font-size: .8rem;
  font-weight: 700;
}

.audit-standard-card.is-ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.audit-standard-card.is-ok > b { color: #15803d; }
.audit-standard-card.is-ok li { background: rgba(255,255,255,.84); }

.audit-standard-card.is-bad {
  border-color: #fed7aa;
  background: #fff7ed;
}

.audit-standard-card.is-bad > b { color: #c2410c; }
.audit-standard-card.is-bad li { background: rgba(255,255,255,.88); }

.audit-photo-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.audit-photo-thumb {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 7px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  color: var(--dark);
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
}

.audit-photo-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 10px;
  background: #f1f5f9;
}

.audit-photo-thumb span {
  color: #475569;
  font-size: .76rem;
  font-weight: 950;
  text-align: center;
}

.audit-photo-thumb:hover {
  transform: translateY(-1px);
  border-color: rgba(228, 0, 43, .32);
  box-shadow: 0 12px 22px rgba(228, 0, 43, .12);
}

@media (max-width: 720px) {
  .audit-detail-toggle > summary {
    width: 100%;
  }

  .audit-exec-summary {
    grid-template-columns: 1fr;
  }

  .audit-photo-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Panel administrativo de registros */
.config-admin-filter {
  min-width: 145px;
}

.config-admin-filter input,
.config-admin-filter select {
  min-height: 44px;
}

.config-data-grid {
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.admin-data-table {
  width: 100%;
  min-width: 1480px;
  border-collapse: collapse;
  table-layout: auto;
}

.admin-data-table th,
.admin-data-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: .82rem;
  line-height: 1.25;
}

.admin-data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .7rem;
  white-space: nowrap;
  height: 44px;
}

.admin-data-table .admin-data-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  box-shadow: none;
}

.admin-data-table input.admin-data-short {
  min-width: 96px;
  min-height: 42px;
  white-space: nowrap;
}

.admin-data-table textarea.admin-data-long {
  min-width: 220px;
  min-height: 48px;
  max-height: 92px;
  resize: vertical;
  overflow: auto;
}

.admin-data-table .admin-data-input:focus {
  outline: none;
  border-color: rgba(229, 0, 45, .55);
  box-shadow: 0 0 0 3px rgba(229, 0, 45, .1);
}

.admin-data-table .cfg-readonly,
.admin-data-table .admin-pk {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-data-table .admin-pk {
  max-width: 250px;
  font-weight: 900;
}

.admin-data-table .admin-data-readonly {
  max-width: 240px;
  color: #334155;
  font-weight: 750;
}

.admin-data-table .admin-col-action {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 128px;
  background: linear-gradient(90deg, rgba(255,255,255,.72), #fff 18%);
  box-shadow: -10px 0 20px rgba(15, 23, 42, .04);
}

.admin-data-save,
.admin-data-delete {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  font-weight: 900;
  font-size: .78rem;
  cursor: pointer;
}

.admin-data-save {
  color: #fff;
  background: linear-gradient(180deg, #1f2937, #111827);
  box-shadow: 0 10px 24px rgba(17, 24, 39, .14);
}

.admin-data-delete {
  margin-top: 6px;
  color: #e5002d;
  background: rgba(229, 0, 45, .08);
  border: 1px solid rgba(229, 0, 45, .18);
}

.admin-data-table .admin-col-id_agenda,
.admin-data-table .admin-col-id_validacion,
.admin-data-table .admin-col-id_objetivo,
.admin-data-table .admin-col-id_auditoria {
  min-width: 250px;
}

.admin-data-table .admin-col-ano,
.admin-data-table .admin-col-semana,
.admin-data-table .admin-col-slot,
.admin-data-table .admin-col-latitud,
.admin-data-table .admin-col-longitud,
.admin-data-table .admin-col-total_dentro,
.admin-data-table .admin-col-total_fuera {
  min-width: 86px;
  max-width: 110px;
}

.admin-data-table .admin-col-region,
.admin-data-table .admin-col-dia,
.admin-data-table .admin-col-estado,
.admin-data-table .admin-col-estado_obj,
.admin-data-table .admin-col-activo {
  min-width: 130px;
}

.admin-data-table .admin-col-fecha_dia,
.admin-data-table .admin-col-fecha,
.admin-data-table .admin-col-fecha_registro,
.admin-data-table .admin-col-hora_inicio,
.admin-data-table .admin-col-hora_fin,
.admin-data-table .admin-col-hora_validacion {
  min-width: 150px;
}

.admin-data-table .admin-col-jefe,
.admin-data-table .admin-col-jefe_area,
.admin-data-table .admin-col-auditor,
.admin-data-table .admin-col-local {
  min-width: 250px;
}

.admin-data-table .admin-col-objetivo,
.admin-data-table .admin-col-como_lograr,
.admin-data-table .admin-col-resumen,
.admin-data-table .admin-col-nota_cumplimiento,
.admin-data-table .admin-col-comentario_final {
  min-width: 300px;
}

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

.access-summary-grid:empty {
  display: none;
}

.access-summary-grid article {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, #fff, #f8fafc);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .06);
}

.access-summary-grid strong {
  display: block;
  color: var(--dark);
  font-size: 1.45rem;
  line-height: 1;
}

.access-summary-grid span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .03em;
}

.access-log-table {
  min-width: 1560px;
}

.access-log-table .admin-col-fecha_hora { min-width: 170px; }
.access-log-table .admin-col-nombre { min-width: 240px; }
.access-log-table .admin-col-cedula { min-width: 130px; }
.access-log-table .admin-col-evento,
.access-log-table .admin-col-resultado { min-width: 115px; }
.access-log-table .admin-col-accion { min-width: 170px; }
.access-log-table .admin-col-detalle { min-width: 280px; }
.access-log-table .admin-col-ip { min-width: 145px; }
.access-log-table .admin-col-navegador,
.access-log-table .admin-col-ruta { min-width: 280px; }

.access-log-table .access-result-ok .admin-data-readonly {
  display: inline-flex;
  max-width: none;
  padding: 5px 9px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
}

.access-log-table .access-result-error .admin-data-readonly {
  display: inline-flex;
  max-width: none;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
}

.admin-data-empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

@media (max-width: 720px) {
  .config-admin-filter {
    width: 100%;
  }

  .admin-data-table th,
  .admin-data-table td {
    padding: 10px 8px;
  }
}
/* Selector futurista Sierra / Costa para Cargar Agendas */
.region-switch-field {
  min-width: 0;
}

.region-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.region-pill-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 6px;
  min-height: 56px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(248,250,252,.72));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.88), 0 14px 34px rgba(15, 23, 42, .08);
  backdrop-filter: blur(12px);
}

.region-pill {
  position: relative;
  overflow: hidden;
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  color: #64748b;
  background: transparent;
  font-weight: 950;
  letter-spacing: .01em;
  cursor: pointer;
  transition: transform .18s ease, color .18s ease, background .18s ease, box-shadow .18s ease;
}

.region-pill::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(135deg, rgba(17,24,39,.96), rgba(55,65,81,.88));
  transition: opacity .18s ease;
}

.region-pill::after {
  content: "";
  position: absolute;
  top: -45%;
  left: -35%;
  width: 70%;
  height: 180%;
  transform: rotate(24deg);
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.30), transparent);
  transition: left .35s ease, opacity .18s ease;
}

.region-pill span {
  position: relative;
  z-index: 1;
}

.region-pill:hover {
  color: #111827;
  transform: translateY(-1px);
}

.region-pill.is-active {
  color: #fff;
  box-shadow: 0 13px 26px rgba(15, 23, 42, .20);
}

.region-pill.is-active::before,
.region-pill.is-active::after {
  opacity: 1;
}

.region-pill.is-active::after {
  left: 72%;
}

.region-pill[data-region-pill="COSTA"].is-active::before {
  background: linear-gradient(135deg, #e5002d, #fb4b67);
}

.region-pill[data-region-pill="COSTA"].is-active {
  box-shadow: 0 13px 28px rgba(229, 0, 45, .22);
}

@media (max-width: 720px) {
  .region-switch-field {
    min-width: 100%;
  }

  .region-pill-switch {
    min-height: 52px;
  }
}
/* Region switch responsive fixes */
.filters > .region-switch-field {
  min-width: 280px;
}

@media (max-width: 900px) {
  .filters > .region-switch-field {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
  }

  .filters > .region-switch-field + div {
    grid-column: 1 / -1;
  }

  .filters > .region-switch-field .region-pill-switch {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .filters > .region-switch-field .region-pill {
    min-width: 0;
    font-size: .9rem;
    white-space: nowrap;
  }

  .filters > .region-switch-field .region-pill-switch {
    gap: 6px;
    padding: 5px;
  }
}
/* Panel de permisos y alcances */
.scope-helper-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.scope-helper-grid article {
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .26);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(248,250,252,.82));
  box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}

.scope-helper-grid b {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #111827, #374151);
  font-size: .78rem;
  font-weight: 950;
}

.scope-helper-grid span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: .88rem;
  line-height: 1.35;
}

.config-scope-table {
  width: max-content;
  min-width: 1680px;
  table-layout: auto;
}

.config-scope-table th,
.config-scope-table td {
  vertical-align: middle;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

.config-scope-table input,
.config-scope-table select {
  min-height: 42px;
  font-size: .82rem;
}

.config-scope-table .cfg-scope-cedula { min-width: 130px; }
.config-scope-table .cfg-scope-nombre { min-width: 210px; }
.config-scope-table .cfg-scope-go,
.config-scope-table .cfg-scope-jefe,
.config-scope-table .cfg-scope-local { min-width: 220px; }

.config-scope-table th:nth-child(1),
.config-scope-table td:nth-child(1) { min-width: 150px; width: 150px; }
.config-scope-table th:nth-child(2),
.config-scope-table td:nth-child(2) { min-width: 270px; width: 270px; }
.config-scope-table th:nth-child(3),
.config-scope-table td:nth-child(3) { min-width: 120px; width: 120px; }
.config-scope-table th:nth-child(4),
.config-scope-table td:nth-child(4) { min-width: 170px; width: 170px; }
.config-scope-table th:nth-child(5),
.config-scope-table td:nth-child(5) { min-width: 140px; width: 140px; }
.config-scope-table th:nth-child(6),
.config-scope-table td:nth-child(6) { min-width: 280px; width: 280px; }
.config-scope-table th:nth-child(7),
.config-scope-table td:nth-child(7) { min-width: 300px; width: 300px; }
.config-scope-table th:nth-child(8),
.config-scope-table td:nth-child(8) { min-width: 280px; width: 280px; }
.config-scope-table th:nth-child(9),
.config-scope-table td:nth-child(9) { min-width: 130px; width: 130px; }
.config-scope-table th:nth-child(10),
.config-scope-table td:nth-child(10) { min-width: 140px; width: 140px; }

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

.config-health-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, #fff, #f8fafc);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .06);
}

.config-health-card span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 6px 9px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: .72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.config-health-card strong {
  display: block;
  min-width: 0;
  color: var(--dark);
  font-size: 1.05rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.config-health-card p {
  margin-top: 6px;
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.35;
}

.config-health-card .cfg-error-note {
  display: block;
  margin-top: 8px;
  color: #be123c;
  font-size: .78rem;
  font-weight: 900;
}

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

/* Ajustes finales de experiencia movil y resumen ejecutivo */
.home-flow-card .home-step,
.home-guide-exec .home-step,
.flow-step {
  min-height: 0 !important;
}

.home-flow-card .home-step,
.home-step {
  padding: 10px 12px !important;
  gap: 10px !important;
}

.home-step-num,
.flow-step b {
  width: 34px !important;
  height: 34px !important;
  border-radius: 12px !important;
  font-size: .9rem !important;
}

.home-step-body h3,
.home-step h3 {
  margin-bottom: 2px !important;
  font-size: .98rem !important;
  line-height: 1.15 !important;
}

.home-step-body p,
.home-step p {
  font-size: .78rem !important;
  line-height: 1.24 !important;
}

.visit-card {
  padding: 10px !important;
  margin: 8px !important;
  border-radius: 14px !important;
}

.visit-top {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.visit-card h3,
.visit-card p,
.visit-time,
.validated-summary,
.validated-summary p {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.visit-card h3 { font-size: .98rem !important; line-height: 1.16 !important; }
.visit-card p { font-size: .8rem !important; line-height: 1.24 !important; }
.visit-time { font-size: .82rem !important; white-space: normal !important; }

.visit-card .pill {
  max-width: 145px;
  justify-content: center;
  padding: 5px 8px;
  font-size: .68rem;
  line-height: 1.15;
}

.validated-summary {
  padding: 8px !important;
  margin-top: 8px !important;
}

.validated-checks {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 3px !important;
}

.validated-checks .check-sep { display: none; }

.steps {
  margin: 8px 0 !important;
  font-size: .68rem !important;
  gap: 4px !important;
}

.step-line { min-width: 18px !important; flex: 0 1 38px !important; }

.audit-photo-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 7px 9px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid #dbe2ea;
  color: #111827;
  font-size: .78rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.audit-photo-chip button {
  width: 24px;
    height: 24px;
  border: 0;
  border-radius: 999px;
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 950;
  cursor: pointer;
}

.audit-photo-empty {
  display: block;
  color: var(--muted);
  font-weight: 750;
  font-size: .82rem;
}

.op-hero-card {
  padding: 14px 16px !important;
  gap: 10px !important;
  border-radius: 14px !important;
}

.op-hero-card h1 {
  font-size: clamp(1.25rem, 2.1vw, 1.75rem) !important;
  line-height: 1.08 !important;
}

.op-hero-card p {
  font-size: .9rem !important;
  line-height: 1.3 !important;
}

.op-score {
  min-width: 118px !important;
  padding: 10px 12px !important;
}

.op-score strong { font-size: 1.65rem !important; }
.op-score span { font-size: .66rem !important; }

.op-intelligence-card {
  padding: 14px !important;
  gap: 12px !important;
}

.op-fold-card {
  min-width: 0;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
  overflow: hidden;
}

.op-fold-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 14px 16px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.op-fold-card > summary::-webkit-details-marker { display: none; }
.op-fold-card > summary::marker { content: ""; }

.op-fold-card > summary span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.op-fold-card > summary b {
  color: var(--dark);
  font-size: 1rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.op-fold-card > summary small {
  color: var(--muted);
  font-weight: 850;
  font-size: .76rem;
}

.op-fold-card > summary em {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 70px;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-style: normal;
  font-weight: 950;
  font-size: .76rem;
}

.op-fold-card[open] > summary {
  border-bottom: 1px solid #eef2f7;
  background: linear-gradient(135deg, #fff, #fff7f8);
}

.op-fold-card[open] > summary em {
  background: var(--red);
}

.op-fold-card[open] > summary em::before {
  content: "Cerrar";
}

.op-fold-card[open] > summary em {
  font-size: 0;
}

.op-fold-card[open] > summary em::before {
  font-size: .76rem;
}

.op-fold-body {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.op-intelligence-card.op-fold-card {
  display: block;
  padding: 0 !important;
}

.op-intel-columns-single {
  grid-template-columns: 1fr !important;
}

.op-intelligence-head h2 {
  font-size: 1.08rem !important;
}

.op-intelligence-head p {
  font-size: .88rem !important;
  line-height: 1.45 !important;
  font-weight: 750 !important;
}

.op-intel-columns {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
}

.op-click-row {
  width: 100%;
  border: 1px solid #e5e7eb;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.op-click-row:hover {
  border-color: rgba(228, 0, 43, .28);
  background: #fff7f8;
  transform: translateY(-1px);
}

.op-click-row em {
  color: var(--red);
  font-size: .7rem;
  font-style: normal;
  font-weight: 950;
  text-transform: uppercase;
}

.op-attention-strip article {
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.op-attention-strip article:hover {
  transform: translateY(-1px);
  background: #fff7f8;
  box-shadow: 0 12px 26px rgba(228,0,43,.10);
}

.op-day-meter {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eef2f7;
}

.op-day-meter h3 {
  margin: 0 0 8px;
  font-size: .9rem;
  font-weight: 950;
  color: #111827;
}

.op-day-row small {
  color: #64748b;
}

.op-modal-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.op-modal-summary strong,
.op-modal-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #111827;
  font-weight: 950;
}

.op-modal-summary strong {
  background: #111827;
  color: #fff;
}

.op-modal-lead {
  margin: -4px 0 14px;
  color: #475569;
  line-height: 1.45;
  font-weight: 750;
}

.op-detail-list {
  display: grid;
  gap: 10px;
}

.op-detail-row {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

.op-detail-row b,
.op-detail-row small,
.op-detail-row p {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.op-detail-row small {
  margin-top: 3px;
  color: #64748b;
  font-size: .78rem;
  font-weight: 800;
}

.op-detail-row p {
  margin: 8px 0 0;
  color: #334155;
  line-height: 1.38;
}

@media (max-width: 720px) {
  .home-hero-inner { padding: 18px 14px !important; }
  .home-flow-card .home-step,
  .home-step {
    grid-template-columns: 42px minmax(0, 1fr) !important;
    padding: 9px 10px !important;
  }
  .home-step-num,
  .flow-step b {
    width: 32px !important;
    height: 32px !important;
  }
  .visit-top {
    grid-template-columns: minmax(0, 1fr);
  }
  .visit-card .pill {
    justify-self: start;
    max-width: 100%;
  }
  .op-hero-card {
    grid-template-columns: 1fr !important;
    padding: 12px !important;
  }
  .op-score {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }
  .op-score strong { font-size: 1.45rem !important; }
  .op-intelligence-card { padding: 12px !important; }
  .op-fold-card > summary {
    min-height: 48px;
    padding: 12px;
  }
  .op-fold-card > summary em {
    min-width: 58px;
    min-height: 30px;
    padding: 6px 10px;
  }
  .op-fold-body {
    padding: 10px;
    gap: 10px;
  }
  .op-attention-strip {
    grid-template-columns: 1fr !important;
  }
}

/* Validador de agendas: escritorio ancho, celular compacto */
@media (min-width: 721px) {
  .validator {
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)) !important;
    overflow: visible !important;
    align-items: start !important;
  }

  .validator .day-panel {
    min-width: 0 !important;
  }

  .validator .day-panel header {
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
  }

  .validator .visit-card {
    margin: 10px !important;
    padding: 12px !important;
  }

  .validator .visit-top {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  .validator .visit-time {
    white-space: normal !important;
    line-height: 1.2 !important;
  }

  .validator .visit-card .pill {
    max-width: 170px !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1.15 !important;
  }
}

@media (min-width: 1180px) {
  .validator {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (min-width: 1580px) {
  .validator {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

/* Validador de agendas: acordeon por dia */
.validator {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
  max-width: 980px;
  margin: 0 auto;
  overflow: visible !important;
}

.validator-day-fold {
  min-width: 0 !important;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .06);
  overflow: hidden;
}

.validator-day-fold.today {
  border-color: rgba(228, 0, 43, .24);
  box-shadow: 0 18px 38px rgba(228, 0, 43, .08);
}

.validator-day-summary {
  min-height: 62px;
  padding: 13px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.validator-day-summary::-webkit-details-marker { display: none; }
.validator-day-summary::marker { content: ""; }

.validator-day-name {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.validator-day-name b {
  color: var(--dark);
  font-size: 1rem;
  line-height: 1.05;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.validator-day-name small {
  color: var(--muted);
  font-weight: 800;
  font-size: .78rem;
}

.validator-day-toggle {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-style: normal;
  font-size: .62rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.validator-day-toggle::before {
  content: "Abrir";
}

.validator-day-fold[open] .validator-day-toggle {
  background: #111827;
  color: #fff;
}

.validator-day-fold[open] .validator-day-toggle::before {
  content: "Cerrar";
}

.validator-day-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 11px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: .72rem;
  font-weight: 950;
  white-space: nowrap;
}

.validator-day-fold[open] .validator-day-summary {
  background: linear-gradient(135deg, #fff, #fff7f8);
  border-bottom: 1px solid #eef2f7;
}

.validator-day-fold[open] .validator-day-count {
  background: #111827;
  color: #fff;
}

.validator-day-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 12px;
  padding: 12px;
}

.validator-day-body .visit-card {
  margin: 0 !important;
}

@media (min-width: 721px) {
  .validator {
    grid-template-columns: 1fr !important;
  }

  .validator-day-body .visit-top {
    grid-template-columns: minmax(0, 1fr) auto !important;
  }

  .validator-day-body .visit-card .pill {
    max-width: 190px !important;
    justify-content: center !important;
    text-align: center !important;
  }
}

@media (max-width: 720px) {
  .validator {
    max-width: 100%;
    gap: 10px !important;
  }

  .validator-day-summary {
    min-height: 56px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px;
  }

  .validator-day-summary .today-badge {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .validator-day-count {
    display: none;
  }

  .validator-day-body {
    grid-template-columns: 1fr;
    padding: 10px;
    gap: 10px;
  }
}

/* Herramientas temporales del login */
.login-quick-tools {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 45;
  display: grid;
  gap: 10px;
}

.quick-tool-btn {
  width: 58px;
  height: 58px;
  min-height: 58px;
  padding: 0;
  border-radius: 18px;
  background: linear-gradient(145deg, #334155, #0f172a);
  color: #fff;
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: 0 16px 38px rgba(15, 23, 42, .28);
  font-size: 1.25rem;
  font-weight: 950;
}

.quick-tool-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 46px rgba(15, 23, 42, .34);
}

.login-quick-tools .admin-gear {
  position: static;
  right: auto;
  bottom: auto;
}

.install-modal-card {
  width: min(560px, 100%);
  max-height: min(86vh, 720px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

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

.install-choice {
  min-height: 112px;
  display: grid;
  align-content: center;
  justify-items: start;
  text-align: left;
  gap: 6px;
  padding: 18px;
  border-radius: 16px;
  background: #f8fafc;
  color: var(--dark);
  border: 1px solid #e2e8f0;
}

.install-choice strong {
  font-size: 1.05rem;
}

.install-choice span {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 750;
}

.install-choice:hover {
  background: #fff7f8;
  border-color: rgba(228,0,43,.28);
}

.install-instructions {
  padding: 14px;
  border-radius: 16px;
  background: #fff7f8;
  border: 1px solid rgba(228,0,43,.18);
  color: #334155;
  font-weight: 750;
  display: grid;
  gap: 10px;
}

.install-modal-card,
.install-modal-card * {
  word-break: normal !important;
  overflow-wrap: normal !important;
  white-space: normal !important;
}

.install-modal-card b,
.install-modal-card strong,
.install-modal-card span,
.install-modal-card p {
  overflow-wrap: normal !important;
  word-break: normal !important;
  white-space: normal !important;
}

.install-instructions b {
  display: block;
  margin-bottom: 6px;
  color: var(--dark);
}

.install-instructions ol {
  margin: 8px 0 0 20px;
  padding: 0;
}

.install-instructions li {
  margin: 5px 0;
}

.install-step-list,
.ios-guide {
  display: grid;
  gap: 10px;
}

.install-step-list article,
.ios-guide article,
.install-ready {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

.install-step-list em,
.ios-guide em {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  font-style: normal;
  font-weight: 950;
  grid-column: 1;
  grid-row: 1 / span 2;
}

.ios-guide strong,
.install-ready strong {
  display: block;
  margin: 0 0 2px;
  color: #111827;
  font-size: .95rem;
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
  grid-column: 2;
  grid-row: 1;
}

.ios-guide span,
.install-step-list span,
.install-ready span {
  display: block;
  color: #475569;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  grid-column: 2;
  grid-row: 2;
}

.install-step-list article > span {
  grid-row: 1 / span 2;
  align-self: center;
}

.install-ready {
  grid-template-columns: 1fr;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.install-ready strong,
.install-ready span {
  grid-column: 1 !important;
  grid-row: auto !important;
}

@media (max-width: 560px) {
  .login-quick-tools {
    right: 14px;
    bottom: 14px;
    gap: 8px;
  }

  .quick-tool-btn {
    width: 52px;
    height: 52px;
    min-height: 52px;
    border-radius: 16px;
  }

  .install-choice-grid {
    grid-template-columns: 1fr;
  }

  .install-modal-card {
    width: min(360px, calc(100vw - 26px));
    padding: 14px !important;
    border-radius: 18px;
  }

  .install-modal-card h2 {
    font-size: 1.35rem !important;
    line-height: 1.12;
  }

  .install-modal-card p {
    font-size: .9rem;
    line-height: 1.35;
  }

  .install-choice {
    min-height: 62px;
    padding: 11px 12px;
  }

  .install-instructions {
    padding: 10px;
  }

  .install-step-list article,
  .ios-guide article {
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 10px;
    gap: 10px;
  }

  .install-step-list em,
  .ios-guide em {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: .86rem;
  }

  .ios-guide strong,
  .install-ready strong {
    font-size: .9rem;
    line-height: 1.2;
  }

  .ios-guide span,
  .install-step-list span,
  .install-ready span {
    font-size: .84rem;
    line-height: 1.32;
  }
}

/* Instalador en pantalla de inicio: scroll seguro en celular */
@media (max-width: 560px) {
  .admin-modal {
    padding: 12px;
    align-items: start;
    overflow-y: auto;
  }

  .install-modal-card {
    max-height: calc(100dvh - 24px);
  }
}

/* Auditoria: envio de informe por correo */
.audit-email-panel {
  grid-column: 1 / -1;
  min-width: 0;
  margin-top: 18px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(228, 0, 43, .18);
  background: linear-gradient(135deg, #fff 0%, #fff7f8 100%);
  box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
}

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

.audit-email-head span {
  display: block;
  color: #e4002b;
  font-weight: 950;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.audit-email-head h3 {
  margin: 3px 0;
  font-size: 1.25rem;
  color: #111827;
}

.audit-email-head p,
.audit-email-actions small {
  margin: 0;
  color: #64748b;
  font-weight: 750;
}

.audit-email-status {
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 950;
  white-space: nowrap;
}

.audit-email-status.is-ok { color: #047857; background: #dcfce7; }
.audit-email-status.is-err { color: #b91c1c; background: #fee2e2; }
.audit-email-status.is-pending { color: #92400e; background: #fef3c7; }

.audit-email-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.audit-email-grid article {
  min-width: 0;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, .88);
}

.audit-email-grid span {
  display: block;
  color: #64748b;
  font-weight: 950;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 5px;
}

.audit-email-grid b {
  display: block;
  min-width: 0;
  color: #111827;
  overflow-wrap: anywhere;
}

.audit-email-warning {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(228, 0, 43, .2);
  background: #fff1f2;
  color: #b91c1c;
  font-weight: 850;
}

.audit-email-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.config-email-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.config-email-summary article {
  padding: 14px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.config-email-summary b {
  display: block;
  color: #111827;
  font-size: 1.55rem;
  line-height: 1;
}

.config-email-summary span {
  color: #64748b;
  font-weight: 900;
  font-size: .78rem;
  text-transform: uppercase;
}

.config-email-table th,
.config-email-table td {
  min-width: 210px;
}

.config-email-table th:first-child,
.config-email-table td:first-child,
.config-email-table th:nth-child(3),
.config-email-table td:nth-child(3) {
  min-width: 260px;
}

.config-email-table th:last-child,
.config-email-table td:last-child {
  min-width: 120px;
}

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

.email-format-grid textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
}


.audit-email-error-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(228, 0, 43, .22);
  background: linear-gradient(135deg, #fff7f8 0%, #ffffff 100%);
  color: var(--dark);
}

.audit-email-error-card strong {
  color: #b91c1c;
  font-size: 1rem;
}

.audit-email-error-card p,
.audit-email-error-card small {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.audit-email-error-card .btn-dark {
  width: fit-content;
}

@media (max-width: 760px) {
  .audit-email-panel {
    padding: 14px;
    border-radius: 16px;
  }

  .audit-email-head {
    display: grid;
  }

  .audit-email-grid,
  .config-email-summary {
    grid-template-columns: 1fr;
  }

  .audit-email-actions .btn-primary,
  .audit-email-actions .btn-dark {
    width: 100%;
  }
}




/* Menu movil compacto tipo acordeon */
.mobile-nav-toggle {
  display: none;
}

@media (max-width: 760px) {
  body.mobile-nav-enabled .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 10px;
    padding: 8px 10px 7px;
    min-height: 64px;
  }

  body.mobile-nav-enabled .topbar .brand {
    min-width: 0;
  }

  body.mobile-nav-enabled .topbar .brand-text {
    flex: 0 0 auto;
    width: max-content;
  }

  body.mobile-nav-enabled .topbar .brand-logo {
    width: 38px;
    height: 38px;
  }

  body.mobile-nav-enabled .topbar .brand-kfc {
    gap: 5px;
  }

  body.mobile-nav-enabled .topbar .brand-core-mark {
    width: 34px;
    height: 34px;
    margin-left: -8px;
  }

  body.mobile-nav-enabled .topbar .brand-title {
    font-size: .98rem;
    line-height: 1.05;
  }

  body.mobile-nav-enabled .topbar .brand-sub {
    max-width: 120px;
    font-size: .68rem;
    line-height: 1.08;
    color: rgba(75, 85, 99, .68);
  }

  body.mobile-nav-enabled .mobile-nav-toggle {
    display: inline-flex;
    width: 112px;
    min-height: 40px;
    padding: 6px 11px 6px 7px;
    border-radius: 999px;
    background: rgba(255,255,255,.96);
    color: #be0028;
    border: 1px solid rgba(228,0,43,.22);
    box-shadow:
      0 8px 18px rgba(15,23,42,.10),
      0 0 0 3px rgba(228,0,43,.045);
    gap: 7px;
    align-items: center;
    justify-content: center;
    justify-self: end;
    text-transform: none;
  }

  body.mobile-nav-enabled .topbar.mobile-nav-open .mobile-nav-toggle {
    background: #fff;
    border-color: rgba(228,0,43,.32);
    box-shadow:
      0 8px 18px rgba(15,23,42,.11),
      0 0 0 3px rgba(228,0,43,.07);
  }

  body.mobile-nav-enabled .mobile-nav-copy {
    display: grid;
    gap: 1px;
    min-width: 0;
    text-align: left;
    line-height: 1;
  }

  body.mobile-nav-enabled .mobile-nav-copy small {
    color: rgba(190,0,40,.68);
    font-size: .52rem;
    font-weight: 900;
    letter-spacing: .08em;
    line-height: 1;
    text-transform: uppercase;
  }

  body.mobile-nav-enabled .mobile-nav-toggle b {
    font-size: .76rem;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
    font-weight: 950;
  }

  body.mobile-nav-enabled .mobile-nav-icon {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 24px;
    background: linear-gradient(135deg, #f43f5e, #e4002b 62%, #b00022);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.28);
    transition: transform .18s var(--ease), background .18s var(--ease);
  }

  body.mobile-nav-enabled .mobile-nav-icon svg {
    width: 15px;
    height: 15px;
    display: block;
  }

  body.mobile-nav-enabled .mobile-nav-icon path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  body.mobile-nav-enabled .topbar.mobile-nav-open .mobile-nav-icon {
    transform: rotate(180deg);
    background: linear-gradient(135deg, #e4002b, #c70028 62%, #90001d);
  }
  body.mobile-nav-enabled .topbar .nav-wide {
    grid-column: 1 / -1;
    width: 100%;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(-4px);
    transition: max-height .24s var(--ease), opacity .18s var(--ease), transform .18s var(--ease), padding .18s var(--ease);
    padding-top: 0;
    margin: 0;
  }

  body.mobile-nav-enabled .topbar.mobile-nav-open .nav-wide {
    max-height: 520px;
    opacity: 1;
    overflow: visible;
    pointer-events: auto;
    transform: translateY(0);
    padding-top: 6px;
  }

  body.mobile-nav-enabled .topbar .nav-wide a {
    min-height: 42px;
  }

  body.mobile-nav-enabled .topbar::after {
    content: "";
    grid-column: 1 / -1;
    justify-self: center;
    width: 46px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(17,24,39,.18), rgba(228,0,43,.45), rgba(17,24,39,.18));
    opacity: .75;
    margin-top: 0;
  }

  body.mobile-nav-enabled .topbar.mobile-nav-open::after {
    opacity: .25;
  }
}


/* Filtros de Ver/Actualizar Objetivos: evita que Sierra/Costa invada Jefe de Área en escritorio */
.obj-status-filters {
  grid-template-columns: minmax(260px, 300px) minmax(320px, 1fr) 150px minmax(130px, auto);
  align-items: end;
}

.obj-status-filters > .region-switch-field {
  min-width: 0;
}

.obj-status-filters .region-pill-switch {
  width: 100%;
}

@media (max-width: 1100px) {
  .obj-status-filters {
    grid-template-columns: minmax(240px, 320px) minmax(260px, 1fr);
  }

  .obj-status-filters > button {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .obj-status-filters {
    grid-template-columns: 1fr;
  }

  .obj-status-filters > .region-switch-field,
  .obj-status-filters > .region-switch-field + div {
    grid-column: 1 / -1;
  }
}
/* Ver Agendas: pendientes vencidas y vacaciones */
.act-chip.st-vencida {
  border-left: 4px solid #dc2626 !important;
  border-color: #fecaca !important;
  background: #fff1f2 !important;
}

.chip-status.st-vencida {
  background: #fee2e2;
  color: #b91c1c;
}

.dot.st-vencida {
  background: #dc2626;
}

.act-chip.st-vencida .chip-local,
.act-chip.st-vencida .chip-time {
  color: #7f1d1d;
}

/* Estado especial para Vacaciones: no requiere validacion ni resumen */
.visit-card.st-vacaciones {
  border-color: #fde68a;
  background: #fffbeb;
}

.act-chip.st-vacaciones {
  border-left: 4px solid #f59e0b !important;
  border-color: #fde68a !important;
  background: #fffbeb !important;
}

.pill.st-vacaciones,
.chip-status.st-vacaciones {
  background: #fef3c7;
  color: #92400e;
}

.dot.st-vacaciones {
  background: #f59e0b;
}

.vacation-card .vacation-note {
  border-top: 1px solid #fecaca;
  margin-top: 10px;
  padding-top: 10px;
}

/* KFC CORE mobile module navigation redesign */
.core-mobile-home {
  background: #f5f6fa;
}

.core-clean-topbar {
  gap: 14px;
}

.core-mobile-shell {
  max-width: 980px;
  margin: 0 auto;
  padding: 22px 18px 96px;
}

.core-screen {
  display: none;
  animation: coreFadeIn .18s var(--ease);
}

.core-screen.is-active {
  display: block;
}

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

.core-home-greeting {
  padding: 8px 2px 16px;
}

.core-eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  color: #e4002b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.core-home-greeting h1,
.core-module-head h1 {
  margin: 0;
  color: #111827;
  font-size: clamp(1.55rem, 4.6vw, 2.35rem);
  line-height: 1.08;
  letter-spacing: 0;
  font-weight: 950;
}

.core-home-greeting p,
.core-module-head p {
  margin: 8px 0 0;
  color: #5f6b7a;
  font-size: 15px;
  line-height: 1.45;
}

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

.core-module-card,
.core-action-row {
  position: relative;
  width: 100%;
  min-height: 78px;
  border: 1px solid #e3e7ee;
  border-radius: 18px;
  background: #fff;
  color: #111827;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px 14px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
  text-align: left;
}

button.core-action-row {
  font: inherit;
  cursor: pointer;
}

.core-module-card:hover,
.core-action-row:hover {
  transform: translateY(-2px);
  border-color: rgba(228, 0, 43, .25);
  box-shadow: 0 16px 36px rgba(15, 23, 42, .1);
}

.core-module-icon {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: #fff1f3;
  color: #e4002b;
  font-size: 25px;
  line-height: 1;
  border: 1px solid rgba(228, 0, 43, .12);
}

.core-module-icon.core-green { background: #ecfdf3; color: #16a34a; border-color: #bbf7d0; }
.core-module-icon.core-blue { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.core-module-icon.core-purple { background: #f5f3ff; color: #7c3aed; border-color: #ddd6fe; }
.core-module-icon.core-orange { background: #fff7ed; color: #f97316; border-color: #fed7aa; }
.core-module-icon.core-teal { background: #ecfeff; color: #0891b2; border-color: #a5f3fc; }
.core-module-icon.core-amber { background: #fffbeb; color: #d97706; border-color: #fde68a; }
.core-module-icon.core-dark { background: #f1f5f9; color: #111827; border-color: #cbd5e1; }

.core-module-copy,
.core-action-row b,
.core-action-row small {
  min-width: 0;
}

.core-module-copy b {
  display: block;
  color: #101827;
  font-size: 17px;
  line-height: 1.18;
  font-weight: 950;
}

.core-module-copy small,
.core-action-row small {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 600;
}

.core-chevron,
.core-action-row i {
  color: #94a3b8;
  font-size: 28px;
  font-style: normal;
  line-height: 1;
}

.core-status-pill,
.core-action-row em {
  justify-self: end;
  border-radius: 999px;
  padding: 5px 9px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.core-back {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  border: 1px solid #e2e8f0;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .05);
  margin-bottom: 14px;
}

.core-module-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.core-primary-action {
  width: 100%;
  min-height: 48px;
  border-radius: 14px;
  border: 0;
  background: linear-gradient(135deg, #e4002b, #c40025);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 14px 26px rgba(228, 0, 43, .22);
  margin-bottom: 12px;
}

.core-green-action { background: linear-gradient(135deg, #16a34a, #15803d); box-shadow: 0 14px 26px rgba(22, 163, 74, .18); }
.core-blue-action { background: linear-gradient(135deg, #2563eb, #1d4ed8); box-shadow: 0 14px 26px rgba(37, 99, 235, .18); }

.core-action-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.core-action-row {
  min-height: 68px;
  grid-template-columns: 34px minmax(0, .7fr) minmax(0, 1fr) auto;
  padding: 12px 14px;
}

.core-action-row span {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #fff1f3;
  color: #e4002b;
  font-size: 18px;
}

.core-action-row b {
  color: #111827;
  font-size: 15px;
  font-weight: 950;
}

.core-module-summary,
.core-coming-card {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .05);
  margin: 12px 0;
}

.core-module-summary h2,
.core-coming-card b {
  margin: 0 0 8px;
  color: #111827;
  font-size: 18px;
  font-weight: 950;
}

.core-module-summary p,
.core-coming-card p {
  margin: 0;
  color: #667085;
  font-size: 14px;
}

.core-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.core-kpi-grid article {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

.core-kpi-grid b,
.core-kpi-grid span {
  display: block;
}

.core-kpi-grid b {
  color: #111827;
  font-size: 18px;
  font-weight: 950;
}

.core-kpi-grid span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.core-bottom-nav,
.core-more-sheet,
.core-modal {
  display: none;
}

.core-modal.is-open {
  display: grid;
  position: fixed;
  inset: 0;
  z-index: 300;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(6px);
}

.core-modal-card {
  width: min(420px, 100%);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
  padding: 24px;
  position: relative;
  text-align: center;
}

.core-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  min-height: 42px;
  border-radius: 14px;
  background: #f3f4f6;
  color: #111827;
  font-size: 24px;
  padding: 0;
}

.core-modal-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #fff7ed;
  font-size: 30px;
}

.core-modal-card h2 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 24px;
  font-weight: 950;
}

.core-modal-card p {
  margin: 0 0 16px;
  color: #667085;
  font-size: 15px;
}

@media (min-width: 760px) {
  .core-mobile-shell {
    padding-top: 34px;
  }

  .core-module-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .core-module-wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  body {
    padding-bottom: calc(76px + env(safe-area-inset-bottom));
  }

  body.mobile-nav-enabled .mobile-nav-toggle,
  body.mobile-nav-enabled .topbar .nav-wide {
    display: none !important;
  }

  .topbar,
  body.mobile-nav-enabled .topbar {
    min-height: 60px;
    padding: 10px 16px;
    flex-direction: row;
    align-items: center;
    border-bottom-color: rgba(228, 0, 43, .08);
  }

  body.mobile-nav-enabled .topbar .brand-title {
    font-size: 20px;
    letter-spacing: 0;
  }

  body.mobile-nav-enabled .topbar .brand-sub {
    font-size: 12px;
    color: #667085;
  }

  .core-mobile-shell {
    padding: 16px 14px 94px;
  }

  .core-module-card {
    min-height: 74px;
  }

  .core-action-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .core-action-row small {
    grid-column: 2 / 3;
    margin-top: -2px;
  }

  .core-action-row em {
    grid-column: 2 / 4;
    justify-self: start;
    margin-top: 2px;
  }

  .core-bottom-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 180;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 3px;
    padding: 8px;
    border: 1px solid rgba(226, 232, 240, .92);
    border-radius: 24px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 48px rgba(15, 23, 42, .16);
    backdrop-filter: blur(18px);
  }

  .core-bottom-link {
    min-height: 50px;
    padding: 5px 2px;
    border-radius: 16px;
    background: transparent;
    color: #64748b;
    display: grid;
    gap: 2px;
    place-items: center;
    font-size: 11px;
    font-weight: 800;
    border: 0;
  }

  .core-bottom-link span {
    font-size: 19px;
    line-height: 1;
  }

  .core-bottom-link b {
    font-size: 10px;
    line-height: 1;
  }

  .core-bottom-link.is-active {
    color: #e4002b;
    background: #fff1f3;
  }

  .core-more-sheet {
    position: fixed;
    inset: 0;
    z-index: 220;
    pointer-events: none;
  }

  body.core-more-open .core-more-sheet {
    display: block;
    pointer-events: auto;
  }

  .core-more-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .4);
    opacity: 0;
    transition: opacity .2s var(--ease);
  }

  body.core-more-open .core-more-backdrop {
    opacity: 1;
  }

  .core-more-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: min(82vh, 680px);
    overflow: auto;
    border-radius: 28px 28px 0 0;
    background: #fff;
    padding: 18px 16px calc(96px + env(safe-area-inset-bottom));
    box-shadow: 0 -18px 60px rgba(15, 23, 42, .25);
    transform: translateY(20px);
    transition: transform .22s var(--ease);
  }

  body.core-more-open .core-more-panel {
    transform: translateY(0);
  }

  .core-more-panel header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
  }

  .core-more-panel header b {
    color: #111827;
    font-size: 22px;
    font-weight: 950;
  }

  .core-more-panel header p {
    margin: 2px 0 0;
    color: #667085;
    font-size: 13px;
  }

  .core-more-panel header button {
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 0;
    border-radius: 14px;
    background: #f3f4f6;
    color: #111827;
    font-size: 24px;
  }

  .core-more-list {
    display: grid;
    gap: 10px;
  }

  .core-more-item {
    min-height: 62px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #111827;
    padding: 10px 12px;
    text-align: left;
  }

  .core-more-item span {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: #f8fafc;
    font-size: 19px;
  }

  .core-more-item strong {
    display: block;
    min-width: 0;
    font-size: 14px;
    font-weight: 950;
  }

  .core-more-item small {
    display: block;
    color: #667085;
    font-size: 12px;
    font-weight: 600;
  }

  .core-more-item em {
    border-radius: 999px;
    padding: 4px 8px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
  }

  .core-more-item i {
    color: #94a3b8;
    font-style: normal;
    font-size: 22px;
  }

  .core-more-item.is-danger span,
  .core-more-item.is-danger strong {
    color: #e4002b;
  }
}

/* KFC CORE mobile overflow hardening */
@media (max-width: 860px) {
  html,
  body.core-mobile-home {
    max-width: 100%;
    overflow-x: hidden;
  }

  .core-mobile-shell,
  .core-screen,
  .core-home-greeting,
  .core-module-list,
  .core-module-card,
  .core-action-list,
  .core-action-row {
    max-width: 100%;
    min-width: 0;
  }

  .core-home-greeting h1,
  .core-module-head h1,
  .core-home-greeting p,
  .core-module-head p,
  .core-module-copy b,
  .core-module-copy small {
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .core-home-greeting h1 {
    max-width: 13ch;
    font-size: 1.62rem;
  }

  .core-status-pill {
    grid-column: 2 / 4;
    justify-self: start;
    margin-top: 2px;
  }

  .core-module-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
}

@media (max-width: 860px) {
  .core-module-summary p,
  .core-coming-card p,
  .home-minidash-title,
  .home-minidash-sub,
  .home-minidash-summary-text,
  .home-minidash-panel,
  .home-minidash-panel-body {
    max-width: 100%;
    min-width: 0;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  .core-embedded-dash .home-minidash-summary {
    align-items: flex-start;
  }
}

/* Bottom navigation: Inicio fijo + módulos deslizables */
@media (max-width: 860px) {
  .core-bottom-nav {
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    gap: 4px;
  }

  .core-bottom-nav::-webkit-scrollbar {
    display: none;
  }

  .core-bottom-link {
    flex: 0 0 76px;
    scroll-snap-align: start;
  }

  .core-bottom-link[data-core-bottom="inicio"] {
    position: sticky;
    left: 0;
    z-index: 2;
    flex-basis: 84px;
    background: #fff;
    box-shadow: 10px 0 16px rgba(255, 255, 255, .96);
  }

  .core-bottom-link[data-core-bottom="inicio"].is-active {
    background: #fff1f3;
  }

  .core-bottom-link[data-core-bottom="entrenamiento"] {
    flex-basis: 104px;
  }

  .core-bottom-link[data-core-bottom="auditorias"] {
    flex-basis: 88px;
  }

  .core-bottom-link[data-core-bottom="dashboard"] {
    flex-basis: 92px;
  }
}

/* KFC CORE professional module icons and compact cards */
.core-svg {
  width: 1em;
  height: 1em;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.core-module-icon .core-svg {
  width: 31px;
  height: 31px;
}

.core-action-row .core-svg {
  width: 19px;
  height: 19px;
}

.core-module-card {
  min-height: 68px;
  border-radius: 16px;
  padding: 10px 12px;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 10px;
}

.core-module-icon {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  font-size: 25px;
}

.core-module-copy b {
  font-size: 16px;
}

.core-module-copy small {
  font-size: 12px;
  line-height: 1.2;
}

.core-status-pill {
  grid-column: auto !important;
  justify-self: end !important;
  align-self: center;
  margin-top: 0 !important;
  padding: 4px 8px;
  font-size: 10px;
}

.core-chevron,
.core-action-row i {
  font-size: 24px;
}

.core-action-row {
  min-height: 58px;
  border-radius: 15px;
  padding: 10px 12px;
}

.core-action-row span {
  width: 32px;
  height: 32px;
  border-radius: 11px;
}

.core-action-row b {
  font-size: 14px;
}

.core-action-row small {
  font-size: 12px;
}

.core-bottom-icon,
.core-more-item > span,
.core-modal-icon {
  color: currentColor;
}

.core-bottom-icon .core-svg {
  width: 21px;
  height: 21px;
  stroke-width: 2.15;
}

.core-more-item .core-svg {
  width: 21px;
  height: 21px;
}

.core-modal-icon .core-svg {
  width: 32px;
  height: 32px;
}

@media (max-width: 860px) {
  .core-module-list {
    gap: 9px;
  }

  .core-module-card {
    min-height: 64px;
    padding: 9px 11px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .055);
  }

  .core-module-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .core-module-icon .core-svg {
    width: 29px;
    height: 29px;
  }

  .core-module-copy b {
    font-size: 15px;
  }

  .core-module-copy small {
    font-size: 12px;
  }

  .core-status-pill {
    max-width: 86px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .core-bottom-nav {
    min-height: 70px;
    padding: 7px;
    border-radius: 22px;
  }

  .core-bottom-link {
    flex: 0 0 74px;
    min-height: 48px;
    border-radius: 15px;
    gap: 3px;
  }

  .core-bottom-link b {
    font-size: 10px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .core-bottom-link[data-core-bottom="inicio"] {
    flex-basis: 82px;
  }

  .core-bottom-link[data-core-bottom="entrenamiento"] {
    flex-basis: 98px;
  }

  .core-bottom-link[data-core-bottom="auditorias"],
  .core-bottom-link[data-core-bottom="dashboard"] {
    flex-basis: 88px;
  }

  .core-bottom-link.is-active {
    box-shadow: inset 0 0 0 1px rgba(228, 0, 43, .08);
  }
}

@media (max-width: 860px) {
  .core-module-card .core-status-pill {
    min-width: 44px;
    max-width: 44px;
    padding: 4px 7px;
    font-size: 0;
    text-align: center;
  }

  .core-module-card .core-status-pill::after {
    content: "Prox.";
    font-size: 10px;
  }
}

/* Compact module action rows */
.core-action-row {
  grid-template-columns: 36px minmax(0, 1fr) 18px !important;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 12px;
  row-gap: 2px;
  min-height: 64px !important;
  padding: 11px 14px !important;
}

.core-action-row > span {
  grid-row: 1 / 3;
  grid-column: 1;
}

.core-action-row > b {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  line-height: 1.1;
}

.core-action-row > small {
  grid-column: 2 !important;
  grid-row: 2;
  align-self: start;
  margin-top: 0 !important;
  line-height: 1.2;
}

.core-action-row > i {
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
  justify-self: end;
}

.core-action-row > em {
  grid-column: 2 / 4 !important;
  grid-row: 3;
  justify-self: start;
}

@media (max-width: 860px) {
  .core-action-list {
    gap: 8px;
  }

  .core-action-row {
    min-height: 62px !important;
    padding: 10px 12px !important;
    border-radius: 14px;
  }

  .core-action-row > b {
    font-size: 14.5px;
  }

  .core-action-row > small {
    font-size: 11.5px;
  }
}

/* Compact dynamic welcome header */
.core-welcome-card {
  margin: 0 0 12px;
  padding: 12px 14px !important;
  border: 1px solid rgba(228, 0, 43, .1);
  border-radius: 18px;
  background: linear-gradient(135deg, #fff, #fff7f8);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .045);
}

.core-welcome-card .core-eyebrow {
  margin-bottom: 4px;
  font-size: 10px;
  letter-spacing: .06em;
}

.core-welcome-card h1 {
  max-width: 100% !important;
  margin: 0;
  font-size: 1.08rem !important;
  line-height: 1.12 !important;
  letter-spacing: 0;
}

.core-welcome-card p {
  margin: 4px 0 0 !important;
  color: #5f6b7a;
  font-size: 12px !important;
  line-height: 1.25 !important;
  font-weight: 700;
  text-transform: capitalize;
}

.core-welcome-card small {
  display: block;
  margin-top: 5px;
  color: #6b7280;
  font-size: 11.5px;
  line-height: 1.25;
  font-weight: 600;
}

@media (max-width: 860px) {
  .core-home-greeting.core-welcome-card {
    padding: 11px 12px !important;
    margin-bottom: 10px;
  }
}

/* Welcome text polish */
.core-welcome-card p {
  text-transform: none !important;
}

.core-welcome-card small {
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: normal;
  word-break: normal;
}

@media (max-width: 860px) {
  .core-welcome-card small {
    font-size: 11px;
    line-height: 1.18;
  }
}

/* Bottom scroll cue and stronger fixed Inicio tile */
@keyframes coreScrollCuePulse {
  0%, 100% { opacity: .28; transform: translateY(0); }
  50% { opacity: .85; transform: translateY(-1px); }
}

@media (max-width: 860px) {
  .core-bottom-nav {
    overflow: visible;
  }

  .core-bottom-nav::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 8px;
    bottom: 8px;
    width: 84px;
    border-radius: 17px;
    background: #fff;
    box-shadow: 10px 0 18px rgba(255,255,255,.96), 0 8px 18px rgba(15,23,42,.06);
    z-index: 1;
    pointer-events: none;
  }

  .core-bottom-nav {
    overflow-x: auto;
    overflow-y: visible;
  }

  .core-bottom-link[data-core-bottom="inicio"] {
    z-index: 3;
    border: 1px solid rgba(228, 0, 43, .16);
    box-shadow: 9px 0 16px rgba(255, 255, 255, .98), 0 8px 18px rgba(15, 23, 42, .08);
  }

  .core-bottom-link[data-core-bottom="inicio"].is-active {
    background: #fff1f3;
    border-color: rgba(228, 0, 43, .24);
  }

  .core-scroll-hint {
    position: sticky;
    left: 96px;
    top: -19px;
    z-index: 4;
    flex: 0 0 0;
    width: 0;
    height: 0;
    pointer-events: none;
    color: rgba(228, 0, 43, .72);
    display: flex;
    gap: 7px;
    align-items: center;
    justify-content: center;
  }

  .core-scroll-hint span {
    display: grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(255, 241, 243, .95);
    border: 1px solid rgba(228, 0, 43, .14);
    font-size: 14px;
    font-weight: 950;
    line-height: 1;
    animation: coreScrollCuePulse 1.35s ease-in-out infinite;
  }

  .core-scroll-hint span:last-child {
    animation-delay: .25s;
  }
}

/* Centered floating scroll cue above bottom navigation */
@media (max-width: 860px) {
  .core-scroll-hint {
    position: fixed !important;
    left: 50% !important;
    right: auto !important;
    bottom: calc(82px + env(safe-area-inset-bottom)) !important;
    top: auto !important;
    z-index: 190 !important;
    width: auto !important;
    height: 18px !important;
    transform: translateX(-50%);
    display: inline-flex !important;
    gap: 8px;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    color: rgba(228, 0, 43, .66);
  }

  .core-scroll-hint span {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .82);
    border: 1px solid rgba(228, 0, 43, .14);
    box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
  }
}

/* RRHH module */
.rrhh-shell { max-width: 1180px; padding-bottom: 120px; }
.rrhh-hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-color: rgba(228,0,43,.16); background: linear-gradient(135deg, #fff 0%, #fff7f9 100%); }
.rrhh-hero h1 { margin: 4px 0 8px; font-size: clamp(2rem, 5vw, 4rem); letter-spacing: 0; }
.rrhh-hero p { max-width: 760px; color: #667085; font-weight: 800; }
.rrhh-filter-panel { padding: 18px; }
.rrhh-filter-grid { display: grid; grid-template-columns: .8fr 1fr 1.4fr 1.4fr auto; gap: 12px; align-items: end; }
.rrhh-filter-grid label { display: grid; gap: 7px; color: #667085; font-weight: 950; text-transform: uppercase; font-size: .78rem; }
.rrhh-filter-grid select { min-height: 50px; border: 1px solid #d9e0ea; border-radius: 14px; padding: 0 14px; font: inherit; font-weight: 850; background: #fff; color: #111827; }
.rrhh-local-grid { display: grid; gap: 18px; }
.rrhh-local-card { background: #fff; border: 1px solid #dde3eb; border-radius: 22px; box-shadow: 0 18px 40px rgba(15,23,42,.08); padding: 18px; }
.rrhh-local-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.rrhh-local-head span { color: #e4002b; font-size: .78rem; font-weight: 950; text-transform: uppercase; letter-spacing: .04em; }
.rrhh-local-head h2 { margin: 4px 0; font-size: clamp(1.1rem, 3vw, 1.55rem); letter-spacing: 0; }
.rrhh-local-head p { margin: 0; color: #667085; font-weight: 850; }
.rrhh-local-head strong { border-radius: 999px; background: #fff1f3; color: #c90027; padding: 9px 13px; font-size: .9rem; }
.rrhh-month-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.rrhh-month-card { border: 1px solid #e3e8ef; background: #f8fafc; border-radius: 16px; padding: 12px; min-width: 0; }
.rrhh-month-card header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.rrhh-month-card header b { color: #111827; font-size: .9rem; }
.rrhh-month-card header span { color: #087443; background: #eafbf2; border-radius: 999px; padding: 4px 8px; font-size: .76rem; font-weight: 950; }
.rrhh-month-card dl { display: grid; gap: 6px; margin: 0; }
.rrhh-month-card dl div { display: flex; justify-content: space-between; gap: 8px; }
.rrhh-month-card dt { color: #667085; font-size: .74rem; font-weight: 900; }
.rrhh-month-card dd { margin: 0; color: #111827; font-weight: 950; }
@media (max-width: 900px) {
  .rrhh-hero { align-items: flex-start; flex-direction: column; }
  .rrhh-filter-grid { grid-template-columns: 1fr 1fr; }
  .rrhh-filter-grid button { grid-column: 1 / -1; }
  .rrhh-month-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .rrhh-shell { padding-left: 12px; padding-right: 12px; }
  .rrhh-filter-grid { grid-template-columns: 1fr; }
  .rrhh-local-card { padding: 14px; border-radius: 18px; }
  .rrhh-month-grid { grid-template-columns: 1fr; }
  .rrhh-month-card { display: grid; grid-template-columns: 64px 1fr; align-items: center; }
  .rrhh-month-card header { margin: 0; display: grid; gap: 6px; }
  .rrhh-month-card dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rrhh-month-card dl div { display: grid; gap: 2px; }
}

/* RRHH compact cards */
.rrhh-back-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(228,0,43,.18); background: #fff; color: #111827; font-weight: 950; text-decoration: none; box-shadow: 0 12px 26px rgba(15,23,42,.08); }
.rrhh-back-btn:hover { transform: translateY(-1px); border-color: rgba(228,0,43,.35); box-shadow: 0 16px 34px rgba(228,0,43,.14); }
.rrhh-local-card { padding: 0; overflow: hidden; }
.rrhh-local-card summary { list-style: none; cursor: pointer; }
.rrhh-local-card summary::-webkit-details-marker { display: none; }
.rrhh-local-summary { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 16px 18px; }
.rrhh-local-card[open] .rrhh-local-summary { border-bottom: 1px solid #edf0f5; }
.rrhh-local-head { margin-bottom: 0; }
.rrhh-accum-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 4px !important; color: #334155 !important; font-size: .88rem; }
.rrhh-accum-line b { color: #e4002b; }
.rrhh-accum-line i { color: #cbd5e1; font-style: normal; }
.rrhh-toggle { align-self: center; border-radius: 999px; background: #fff1f3; color: #c90027; padding: 8px 12px; font-weight: 950; font-size: .78rem; white-space: nowrap; }
.rrhh-local-card[open] .rrhh-toggle { color: #087443; background: #eafbf2; }
.rrhh-local-card[open] .rrhh-toggle::before { content: 'Cerrar'; }
.rrhh-local-card[open] .rrhh-toggle { font-size: 0; }
.rrhh-local-card[open] .rrhh-toggle::before { font-size: .78rem; }
.rrhh-month-grid { padding: 14px 18px 18px; }
.rrhh-month-card header span { min-width: 54px; text-align: center; }
@media (max-width: 520px) {
  .rrhh-hero { padding: 16px; gap: 10px; }
  .rrhh-hero h1 { font-size: 1.7rem; margin-bottom: 4px; }
  .rrhh-hero p { font-size: .88rem; line-height: 1.35; }
  .rrhh-back-btn { width: 100%; min-height: 42px; }
  .rrhh-local-summary { grid-template-columns: 1fr; padding: 14px; }
  .rrhh-toggle { justify-self: start; }
  .rrhh-local-head { display: block; }
  .rrhh-local-head strong { display: inline-flex; margin-top: 8px; }
  .rrhh-local-head h2 { font-size: 1rem; line-height: 1.18; }
  .rrhh-local-head p { font-size: .8rem; }
  .rrhh-accum-line { font-size: .76rem; gap: 4px; }
  .rrhh-month-grid { padding: 10px 12px 14px; }
  .rrhh-month-card header span { min-width: auto; }
}

/* RRHH - resumen de zona y estado nuevo */
.core-new-pill {
  align-self: center;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 132, 76, 0.18);
  background: rgba(232, 250, 240, 0.95);
  color: #087443;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 18px rgba(8, 116, 67, 0.08);
}

.rrhh-zone-summary {
  margin: 14px 0 18px;
}

.rrhh-zone-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 20px;
  border: 1px solid rgba(228, 0, 43, 0.16);
  color: #fff;
  background: linear-gradient(135deg, #111827 0%, #4b0b18 52%, #97001d 100%);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}

.rrhh-zone-card span {
  display: inline-flex;
  margin-bottom: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rrhh-zone-card h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.1;
}

.rrhh-zone-card p {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 700;
}

.rrhh-zone-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.rrhh-zone-kpis b {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  font-size: 0.84rem;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .core-new-pill {
    padding: 5px 9px;
    min-width: 48px;
    font-size: 0.68rem;
  }

  .rrhh-zone-card {
    display: grid;
    padding: 14px;
    border-radius: 18px;
  }

  .rrhh-zone-kpis {
    justify-content: flex-start;
  }

  .rrhh-zone-kpis b {
    flex: 1 1 100%;
    justify-content: space-between;
  }
}


@media (max-width: 640px) {
  .core-module-card .core-status-pill.core-new-pill::after { content: "New"; }
}


/* Resumen Completo executive dashboard v231 */
.opx-dashboard {
  display: grid;
  gap: 18px;
}

.opx-hero,
.opx-panel,
.opx-kpi,
.opx-cco {
  border: 1px solid rgba(210, 218, 230, .9);
  background: #fff;
  box-shadow: 0 16px 38px rgba(15, 23, 42, .075);
}

.opx-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 20px;
  border-color: rgba(228, 0, 43, .14);
  border-radius: 24px;
  background: linear-gradient(135deg, #fff 0%, #fff7f8 46%, #f8fafc 100%);
}

.opx-hero span,
.opx-panel header span {
  display: block;
  color: #e4002b;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.opx-hero h1 {
  margin: 5px 0 8px;
  color: #111827;
  font-size: clamp(1.35rem, 3.2vw, 2.25rem);
  line-height: 1.03;
  letter-spacing: 0;
}

.opx-hero p {
  max-width: 920px;
  margin: 0;
  color: #4b5563;
  font-size: .98rem;
  font-weight: 750;
  line-height: 1.42;
}

.opx-hero small {
  display: block;
  margin-top: 10px;
  color: #778195;
  font-weight: 800;
}

.opx-score {
  display: grid;
  place-items: center;
  min-width: 126px;
  min-height: 104px;
  border-radius: 24px;
  color: #111827;
  background: #f8fafc;
  border: 1px solid #e6ebf2;
  font-size: 2rem;
  line-height: 1;
}

.opx-score small {
  margin: 6px 0 0;
  color: #667085;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.opx-score.opx-good { background: #ecfdf3; color: #087443; border-color: rgba(8, 116, 67, .18); }
.opx-score.opx-warn { background: #fff8eb; color: #a65f00; border-color: rgba(245, 158, 11, .25); }
.opx-score.opx-bad { background: #fff1f3; color: #c90027; border-color: rgba(228, 0, 43, .2); }

.opx-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.opx-kpi {
  min-height: 108px;
  padding: 16px;
  border-radius: 20px;
}

.opx-kpi strong {
  display: block;
  color: #111827;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1;
}

.opx-kpi span {
  display: block;
  margin-top: 8px;
  color: #111827;
  font-weight: 950;
}

.opx-kpi small {
  display: block;
  margin-top: 5px;
  color: #667085;
  font-weight: 750;
  line-height: 1.25;
}

.opx-kpi.opx-good { border-color: rgba(8, 116, 67, .18); background: linear-gradient(180deg, #fff, #f3fff8); }
.opx-kpi.opx-warn { border-color: rgba(245, 158, 11, .22); background: linear-gradient(180deg, #fff, #fff9ef); }
.opx-kpi.opx-bad { border-color: rgba(228, 0, 43, .2); background: linear-gradient(180deg, #fff, #fff5f6); }
.opx-kpi.opx-info { border-color: rgba(32, 91, 212, .16); background: linear-gradient(180deg, #fff, #f5f8ff); }

.opx-layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.opx-span-4 { grid-column: span 4; }
.opx-span-5 { grid-column: span 5; }
.opx-span-6 { grid-column: span 6; }
.opx-span-7 { grid-column: span 7; }
.opx-span-8 { grid-column: span 8; }

.opx-panel {
  min-width: 0;
  padding: 18px;
  border-radius: 22px;
}

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

.opx-panel h2 {
  margin: 4px 0 0;
  color: #111827;
  font-size: 1.05rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.opx-panel header small {
  color: #667085;
  font-weight: 850;
  text-align: right;
}

.opx-day-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 9px;
  min-height: 230px;
  align-items: end;
}

.opx-day {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  min-height: 220px;
  padding: 9px 7px;
  border: 1px solid #e6ebf2;
  border-radius: 16px;
  background: #f8fafc;
  color: #111827;
  cursor: pointer;
}

.opx-day:hover,
.opx-slot:hover,
.opx-topic:hover,
.opx-alert:hover,
.opx-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, .1);
}

.opx-day span,
.opx-day b {
  text-align: center;
  font-weight: 950;
}

.opx-day div {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 4px;
  min-height: 145px;
}

.opx-day i {
  display: block;
  width: 15px;
  min-height: 3px;
  border-radius: 999px 999px 4px 4px;
}

.opx-plan { background: #8aa0bf; }
.opx-done { background: #10b981; }

.opx-panel footer {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  color: #667085;
  font-size: .8rem;
  font-weight: 900;
}

.opx-panel footer span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 3px;
}

.opx-legend-plan::before { background: #8aa0bf; }
.opx-legend-done::before { background: #10b981; }

.opx-alert-grid {
  display: grid;
  gap: 10px;
}

.opx-alert,
.opx-topic,
.opx-slot,
.opx-link {
  border: 1px solid #e6ebf2;
  background: #fff;
  color: #111827;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.opx-alert {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  min-height: 62px;
  padding: 10px 12px;
  border-radius: 16px;
  text-align: left;
}

.opx-alert b {
  color: #111827;
  font-size: 1.45rem;
}

.opx-alert span {
  color: #4b5563;
  font-weight: 900;
}

.opx-alert.opx-good { background: #f2fff8; border-color: rgba(8, 116, 67, .14); }
.opx-alert.opx-warn { background: #fff9ed; border-color: rgba(245, 158, 11, .22); }
.opx-alert.opx-bad { background: #fff4f6; border-color: rgba(228, 0, 43, .22); }

.opx-slot-list {
  display: grid;
  gap: 11px;
}

.opx-slot {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 76px;
  gap: 10px;
  align-items: center;
  min-height: 56px;
  padding: 10px;
  border-radius: 16px;
  text-align: left;
}

.opx-slot b,
.opx-slot small,
.opx-slot em {
  display: block;
}

.opx-slot b { font-size: .88rem; }
.opx-slot small { color: #667085; font-size: .72rem; font-weight: 800; }
.opx-slot em { color: #111827; font-size: .78rem; font-style: normal; font-weight: 950; text-align: right; }

.opx-bar {
  height: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf4;
}

.opx-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width .35s ease;
}

.opx-bar.opx-good i { background: #10b981; }
.opx-bar.opx-warn i { background: #f59e0b; }
.opx-bar.opx-bad i { background: #e4002b; }
.opx-bar.opx-info i { background: #2f6fed; }

.opx-heat-head,
.opx-heat-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(48px, 1fr));
  gap: 7px;
}

.opx-heat-head {
  margin-bottom: 7px;
  color: #667085;
  font-size: .72rem;
  font-weight: 900;
  text-align: center;
}

.opx-heat-grid button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(228, 0, 43, calc(.08 + var(--heat) * .45));
  color: #111827;
  font-weight: 950;
  cursor: pointer;
}

.opx-coverage b {
  display: block;
  margin-bottom: 10px;
  color: #111827;
  font-size: 2.2rem;
  line-height: 1;
}

.opx-coverage p {
  margin: 10px 0 0;
  color: #667085;
  font-weight: 800;
}

.opx-ja-list,
.opx-topic-list,
.opx-cco-list {
  display: grid;
  gap: 10px;
}

.opx-ja {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e6ebf2;
  border-radius: 16px;
  background: #f8fafc;
}

.opx-ja b,
.opx-ja span,
.opx-ja small {
  min-width: 0;
}

.opx-ja b {
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opx-ja span,
.opx-ja small {
  color: #667085;
  font-size: .8rem;
  font-weight: 850;
}

.opx-ja .opx-bar {
  grid-column: 1 / -1;
}

.opx-topic {
  display: grid;
  gap: 4px;
  min-height: 56px;
  padding: 11px 12px;
  border-radius: 16px;
  text-align: left;
}

.opx-topic b { color: #111827; }
.opx-topic small { color: #667085; font-weight: 800; }

.opx-cco {
  overflow: hidden;
  border-radius: 18px;
}

.opx-cco summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 60px;
  gap: 10px;
  align-items: center;
  padding: 13px 14px;
  list-style: none;
  cursor: pointer;
}

.opx-cco summary::-webkit-details-marker { display: none; }
.opx-cco summary b {
  display: block;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opx-cco summary small {
  display: block;
  margin-top: 3px;
  color: #667085;
  font-size: .78rem;
  font-weight: 800;
}

.opx-cco summary em {
  justify-self: end;
  padding: 7px 9px;
  border-radius: 999px;
  background: #fff1f3;
  color: #c90027;
  font-style: normal;
  font-weight: 950;
}

.opx-cco-body {
  display: grid;
  gap: 11px;
  padding: 0 14px 14px;
}

.opx-mini-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.opx-mini-kpis span {
  padding: 9px;
  border-radius: 12px;
  background: #f8fafc;
  color: #667085;
  font-size: .74rem;
  font-weight: 850;
}

.opx-mini-kpis b {
  display: block;
  margin-top: 3px;
  color: #111827;
  font-size: 1rem;
}

.opx-link {
  justify-self: start;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 999px;
  color: #c90027;
  font-weight: 950;
}

.opx-empty {
  margin: 0;
  padding: 14px;
  border: 1px dashed #d9e0ea;
  border-radius: 16px;
  color: #667085;
  font-weight: 800;
}

@media (max-width: 980px) {
  .opx-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .opx-span-4,
  .opx-span-5,
  .opx-span-6,
  .opx-span-7,
  .opx-span-8 { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .shell-op-summary { padding-left: 10px; padding-right: 10px; }
  .op-control-panel { padding: 14px; border-radius: 18px; }
  .op-control-panel h1 { font-size: 1.25rem; }
  .op-control-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .op-summary-filters { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x proximity; }
  .op-summary-filters > div { min-width: 180px; scroll-snap-align: start; }
  .op-summary-filters button { min-width: 150px; }
  .opx-dashboard { gap: 13px; }
  .opx-hero { grid-template-columns: 1fr; padding: 15px; border-radius: 20px; }
  .opx-hero h1 { font-size: 1.28rem; }
  .opx-hero p { font-size: .86rem; line-height: 1.34; }
  .opx-score { min-width: 0; min-height: 72px; grid-auto-flow: column; justify-content: space-between; padding: 0 16px; font-size: 1.7rem; }
  .opx-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .opx-kpi { min-height: 92px; padding: 12px; border-radius: 17px; }
  .opx-kpi strong { font-size: 1.45rem; }
  .opx-kpi span { font-size: .82rem; }
  .opx-kpi small { font-size: .72rem; }
  .opx-layout { gap: 12px; }
  .opx-panel { padding: 14px; border-radius: 18px; }
  .opx-panel h2 { font-size: .98rem; }
  .opx-panel header { margin-bottom: 12px; }
  .opx-day-chart { gap: 5px; min-height: 186px; overflow-x: auto; grid-template-columns: repeat(7, 48px); }
  .opx-day { min-height: 178px; padding: 7px 5px; border-radius: 14px; }
  .opx-day div { min-height: 108px; }
  .opx-day i { width: 11px; }
  .opx-slot { grid-template-columns: 82px minmax(0, 1fr) 56px; padding: 9px; }
  .opx-heat-head,
  .opx-heat-grid { grid-template-columns: repeat(var(--cols, 3), 58px); overflow-x: auto; }
  .opx-mini-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opx-cco summary { grid-template-columns: minmax(0, 1fr) 52px; padding: 12px; }
}

/* Resumen Completo - agenda pulse cards v232 */
.opx-pulse-panel {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(148, 163, 184, .22);
  background:
    radial-gradient(circle at 12% 0%, rgba(47, 111, 237, .2), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(228, 0, 43, .16), transparent 34%),
    linear-gradient(135deg, #0b1220 0%, #111827 50%, #0f172a 100%);
  box-shadow: 0 22px 50px rgba(15, 23, 42, .24);
  color: #fff;
}

.opx-pulse-panel > header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.opx-pulse-panel > header span {
  display: block;
  color: #ffb3bf;
  font-size: .7rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.opx-pulse-panel h2 {
  margin: 5px 0 4px;
  color: #fff;
  font-size: clamp(1.12rem, 2.2vw, 1.5rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.opx-pulse-panel p {
  margin: 0;
  color: rgba(226, 232, 240, .82);
  font-weight: 750;
}

.opx-pulse-panel > header small {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .15);
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .86);
  font-weight: 950;
  white-space: nowrap;
}

.opx-time-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.opx-time-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  grid-template-areas:
    "icon copy pct"
    "progress progress progress"
    "m1 m2 m3"
    "m4 m4 m4";
  gap: 9px 12px;
  align-items: center;
  min-height: 138px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .045);
  color: #fff;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}

.opx-time-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .07);
}

.opx-time-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
}

.opx-time-icon i {
  display: block;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 8px color-mix(in srgb, currentColor 14%, transparent);
}

.opx-time-card.opx-sun { color: #facc15; }
.opx-time-card.opx-orange { color: #fb923c; }
.opx-time-card.opx-moon { color: #8b5cf6; }
.opx-time-card.opx-blue { color: #38bdf8; }
.opx-time-card.opx-red { color: #fb7185; }

.opx-time-copy {
  grid-area: copy;
  min-width: 0;
}

.opx-time-copy b,
.opx-time-copy small {
  display: block;
}

.opx-time-copy b {
  color: #fff;
  font-size: 1rem;
  line-height: 1.1;
}

.opx-time-copy small {
  margin-top: 3px;
  color: rgba(226, 232, 240, .76);
  font-size: .8rem;
  font-weight: 750;
}

.opx-time-card strong {
  grid-area: pct;
  justify-self: end;
  color: currentColor;
  font-size: 1.7rem;
  line-height: 1;
}

.opx-time-progress {
  grid-area: progress;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, .18);
}

.opx-time-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: currentColor;
  box-shadow: 0 0 18px color-mix(in srgb, currentColor 36%, transparent);
}

.opx-time-metric {
  display: grid;
  gap: 2px;
  color: rgba(226, 232, 240, .8);
  font-size: .72rem;
  font-weight: 750;
}

.opx-time-metric b {
  position: relative;
  padding-left: 13px;
  color: #fff;
  font-size: .9rem;
  line-height: 1;
}

.opx-time-metric b::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transform: translateY(-50%);
}

.opx-plan-dot { grid-area: m1; }
.opx-done-dot { grid-area: m2; }
.opx-pending-dot { grid-area: m3; }
.opx-summary-dot { grid-area: m4; grid-template-columns: auto 1fr; align-items: center; }
.opx-plan-dot b::before { background: #2f6fed; }
.opx-done-dot b::before { background: #22c55e; }
.opx-pending-dot b::before { background: #fb923c; }
.opx-summary-dot b::before { background: #8b5cf6; }

.opx-week-panel {
  padding: 14px 14px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(2, 6, 23, .36);
}

.opx-week-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
  color: rgba(226, 232, 240, .86);
  font-size: .82rem;
  font-weight: 800;
}

.opx-week-legend span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 999px;
  vertical-align: -1px;
}

.opx-week-legend .opx-legend-plan::before { background: #2f6fed; }
.opx-week-legend .opx-legend-done::before { background: #22c55e; }
.opx-week-legend .opx-legend-line::before { background: #ff3b3b; }

.opx-week-chart {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  min-height: 214px;
  align-items: end;
  padding-top: 10px;
}

.opx-week-chart::before {
  content: "Meta 90%";
  position: absolute;
  left: 0;
  right: 0;
  top: 67px;
  border-top: 1px dashed rgba(47, 111, 237, .72);
  color: #60a5fa;
  font-size: .72rem;
  font-weight: 850;
  text-align: right;
}

.opx-week-day {
  display: grid;
  grid-template-rows: 22px 128px auto auto;
  gap: 7px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.opx-week-pct {
  color: rgba(255, 255, 255, .92);
  font-size: .9rem;
  font-weight: 950;
  text-align: center;
}

.opx-week-bars {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 5px;
  min-height: 128px;
}

.opx-week-bars i {
  display: block;
  width: 22px;
  min-height: 4px;
  border-radius: 7px 7px 2px 2px;
  box-shadow: 0 8px 14px rgba(0, 0, 0, .22);
}

.opx-week-bars .opx-plan { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.opx-week-bars .opx-done { background: linear-gradient(180deg, #4ade80, #16a34a); }

.opx-week-day b {
  color: rgba(255, 255, 255, .9);
  font-size: .84rem;
  text-align: center;
}

.opx-week-day em {
  justify-self: center;
  min-width: 70px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: .7rem;
  font-style: normal;
  font-weight: 900;
  text-align: center;
}

.opx-week-day.opx-good em { color: #86efac; background: rgba(34, 197, 94, .12); border: 1px solid rgba(34, 197, 94, .25); }
.opx-week-day.opx-warn em { color: #fbbf24; background: rgba(245, 158, 11, .12); border: 1px solid rgba(245, 158, 11, .25); }
.opx-week-day.opx-bad em { color: #fca5a5; background: rgba(239, 68, 68, .13); border: 1px solid rgba(239, 68, 68, .28); }
.opx-week-day.opx-muted em { color: #cbd5e1; background: rgba(148, 163, 184, .12); border: 1px solid rgba(148, 163, 184, .22); }

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

@media (max-width: 640px) {
  .opx-pulse-panel {
    padding: 13px;
    border-radius: 20px;
  }

  .opx-pulse-panel > header {
    display: grid;
    gap: 8px;
  }

  .opx-pulse-panel h2 {
    font-size: 1.05rem;
  }

  .opx-pulse-panel p {
    font-size: .8rem;
  }

  .opx-time-card {
    min-height: 118px;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 7px 10px;
    padding: 12px;
    border-radius: 16px;
  }

  .opx-time-icon {
    width: 38px;
    height: 38px;
  }

  .opx-time-icon i {
    width: 18px;
    height: 18px;
  }

  .opx-time-card strong {
    font-size: 1.32rem;
  }

  .opx-time-copy b {
    font-size: .92rem;
  }

  .opx-time-copy small,
  .opx-time-metric small {
    font-size: .68rem;
  }

  .opx-week-panel {
    padding: 12px 10px 10px;
  }

  .opx-week-chart {
    grid-template-columns: repeat(7, 48px);
    gap: 8px;
    overflow-x: auto;
    min-height: 188px;
  }

  .opx-week-day {
    grid-template-rows: 20px 104px auto auto;
  }

  .opx-week-bars {
    min-height: 104px;
  }

  .opx-week-bars i {
    width: 16px;
  }

  .opx-week-day em {
    min-width: 54px;
    padding: 3px 7px;
    font-size: .62rem;
  }
}

/* Resumen Completo header fix v233 */
.shell-op-summary .op-control-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 16px 20px;
  align-items: start;
}

.shell-op-summary .op-control-panel > div:first-child {
  min-width: 0;
}

.shell-op-summary .op-control-panel h1 {
  max-width: 720px;
  line-height: 1.06;
  letter-spacing: 0;
}

.shell-op-summary .op-control-panel .subtitle {
  max-width: 680px;
  line-height: 1.35;
}

.shell-op-summary .op-control-actions {
  align-self: start;
  justify-content: end;
  flex-wrap: wrap;
  max-width: 860px;
}

.shell-op-summary .op-summary-filters {
  grid-column: 1 / -1;
  min-width: 0;
}

@media (max-width: 900px) {
  .shell-op-summary .op-control-panel {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .shell-op-summary .op-control-actions {
    justify-content: stretch;
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .shell-op-summary .op-control-actions a,
  .shell-op-summary .op-control-actions button {
    width: 100%;
    min-height: 42px;
    padding-inline: 12px;
  }
}

@media (max-width: 640px) {
  .shell-op-summary .op-control-panel h1 {
    font-size: 1.32rem !important;
    max-width: 100%;
  }

  .shell-op-summary .op-control-panel .subtitle {
    font-size: .9rem !important;
    max-width: 100%;
  }
}

/* Resumen Completo - compact time volume cards v236 */
.opx-time-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.opx-time-card {
  min-height: 104px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  grid-template-areas:
    "icon copy pct"
    "progress progress progress"
    "m1 m2 m3"
    "m4 m4 m4";
  gap: 7px 10px;
  padding: 11px 12px;
  border-radius: 16px;
}

.opx-time-icon {
  width: 36px;
  height: 36px;
}

.opx-time-icon i {
  width: 18px;
  height: 18px;
  box-shadow: 0 0 0 7px color-mix(in srgb, currentColor 13%, transparent);
}

.opx-time-copy b {
  font-size: .92rem;
}

.opx-time-copy small {
  font-size: .73rem;
}

.opx-time-card strong {
  display: grid;
  justify-items: end;
  gap: 1px;
  font-size: 1.34rem;
}

.opx-time-card strong small {
  color: rgba(226, 232, 240, .72);
  font-size: .58rem;
  font-weight: 900;
  text-transform: uppercase;
}

.opx-time-progress {
  height: 8px;
}

.opx-time-metric {
  font-size: .66rem;
}

.opx-time-metric b {
  padding-left: 11px;
  font-size: .82rem;
}

.opx-time-metric b::before {
  width: 7px;
  height: 7px;
}

@media (max-width: 980px) {
  .opx-time-grid {
    grid-template-columns: repeat(3, minmax(210px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
  }

  .opx-time-card {
    scroll-snap-align: start;
  }
}

@media (max-width: 640px) {
  .opx-time-grid {
    grid-template-columns: repeat(3, 224px);
    gap: 9px;
  }

  .opx-time-card {
    min-height: 100px;
    padding: 10px;
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .opx-time-icon {
    width: 32px;
    height: 32px;
  }

  .opx-time-icon i {
    width: 15px;
    height: 15px;
  }

  .opx-time-card strong {
    font-size: 1.12rem;
  }

  .opx-time-copy b {
    font-size: .86rem;
  }

  .opx-time-copy small,
  .opx-time-metric small {
    font-size: .62rem;
  }

  .opx-time-metric b {
    font-size: .75rem;
  }
}

/* Resumen Completo - visit distribution cleanup v237 */
.opx-pulse-panel {
  padding: 14px;
}

.opx-pulse-panel > header {
  margin-bottom: 10px;
}

.opx-time-card {
  grid-template-areas:
    "icon copy pct"
    "progress progress progress"
    "stats stats stats";
  min-height: 92px;
}

.opx-time-stats {
  grid-area: stats;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.opx-time-metric {
  min-width: 0;
  padding: 6px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .055);
  color: rgba(226, 232, 240, .78);
  font-size: .62rem;
  line-height: 1.05;
}

.opx-time-metric b {
  padding-left: 0 !important;
  color: #fff;
  font-size: .78rem;
}

.opx-time-metric b::before {
  display: none !important;
}

.opx-time-metric small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opx-section-minihead {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 10px;
}

.opx-section-minihead b {
  color: #fff;
  font-size: .95rem;
}

.opx-section-minihead small {
  color: rgba(226, 232, 240, .68);
  font-weight: 750;
  text-align: right;
}

.opx-day-list {
  display: grid;
  gap: 8px;
}

.opx-day-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) 62px 78px;
  gap: 9px;
  align-items: center;
  min-height: 42px;
  padding: 8px 9px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 13px;
  background: rgba(255,255,255,.045);
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.opx-day-row:hover {
  background: rgba(255,255,255,.07);
  transform: translateY(-1px);
}

.opx-day-row span b,
.opx-day-row span small,
.opx-day-row strong,
.opx-day-row em {
  display: block;
}

.opx-day-row span b {
  color: #fff;
  font-size: .86rem;
  line-height: 1.05;
}

.opx-day-row span small {
  margin-top: 2px;
  color: rgba(226,232,240,.66);
  font-size: .65rem;
  font-weight: 750;
  white-space: nowrap;
}

.opx-day-row-bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, .18);
}

.opx-day-row-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #22c55e);
}

.opx-day-row strong {
  color: #fff;
  font-size: .9rem;
  text-align: right;
}

.opx-day-row strong small {
  color: rgba(226,232,240,.58);
  font-size: .54rem;
  font-weight: 900;
  text-transform: uppercase;
}

.opx-day-row em {
  justify-self: end;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: .68rem;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.opx-day-row.opx-good em { color: #86efac; background: rgba(34,197,94,.13); }
.opx-day-row.opx-warn em { color: #fbbf24; background: rgba(245,158,11,.13); }
.opx-day-row.opx-bad em { color: #fca5a5; background: rgba(239,68,68,.13); }
.opx-day-row.opx-muted em { color: #cbd5e1; background: rgba(148,163,184,.13); }

@media (max-width: 640px) {
  .opx-time-grid {
    grid-template-columns: repeat(3, 236px);
  }

  .opx-time-card {
    min-height: 92px;
  }

  .opx-time-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .opx-time-metric {
    padding: 5px;
    font-size: .56rem;
  }

  .opx-time-metric b {
    font-size: .7rem;
  }

  .opx-section-minihead {
    display: grid;
    gap: 2px;
  }

  .opx-section-minihead small {
    text-align: left;
    font-size: .68rem;
  }

  .opx-day-row {
    grid-template-columns: 72px minmax(86px, 1fr) 50px;
    grid-template-areas:
      "label bar share"
      "label bar status";
    min-height: 48px;
    gap: 4px 8px;
  }

  .opx-day-row > span { grid-area: label; }
  .opx-day-row-bar { grid-area: bar; }
  .opx-day-row > strong { grid-area: share; }
  .opx-day-row > em { grid-area: status; font-size: .58rem; padding: 3px 6px; }

  .opx-day-row span small {
    white-space: normal;
    line-height: 1.05;
  }
}

/* Resumen Completo - compact vertical day columns v238 */
.opx-day-columns {
  display: grid;
  grid-template-columns: repeat(7, minmax(58px, 1fr));
  gap: 8px;
  min-height: 154px;
  align-items: end;
}

.opx-day-column {
  display: grid;
  grid-template-rows: 20px 74px auto auto auto;
  gap: 4px;
  min-width: 0;
  min-height: 144px;
  padding: 7px 5px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 13px;
  background: rgba(255,255,255,.045);
  color: #fff;
  text-align: center;
  cursor: pointer;
}

.opx-day-column:hover {
  background: rgba(255,255,255,.07);
  transform: translateY(-1px);
}

.opx-day-column strong {
  color: #fff;
  font-size: .86rem;
  line-height: 1;
}

.opx-day-columns-bars {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 4px;
  min-height: 74px;
}

.opx-day-columns-bars i {
  display: block;
  width: 13px;
  min-height: 3px;
  border-radius: 7px 7px 2px 2px;
}

.opx-day-columns-bars .opx-plan { background: linear-gradient(180deg, #60a5fa, #2563eb); }
.opx-day-columns-bars .opx-done { background: linear-gradient(180deg, #4ade80, #16a34a); }

.opx-day-column b {
  color: rgba(255,255,255,.94);
  font-size: .78rem;
  line-height: 1;
}

.opx-day-column small {
  color: rgba(226,232,240,.68);
  font-size: .57rem;
  font-weight: 800;
  line-height: 1.05;
}

.opx-day-column em {
  justify-self: center;
  min-width: 46px;
  padding: 3px 6px;
  border-radius: 999px;
  font-size: .58rem;
  font-style: normal;
  font-weight: 900;
}

.opx-day-column.opx-good em { color: #86efac; background: rgba(34,197,94,.13); }
.opx-day-column.opx-warn em { color: #fbbf24; background: rgba(245,158,11,.13); }
.opx-day-column.opx-bad em { color: #fca5a5; background: rgba(239,68,68,.13); }
.opx-day-column.opx-muted em { color: #cbd5e1; background: rgba(148,163,184,.13); }

@media (max-width: 640px) {
  .opx-day-columns {
    grid-template-columns: repeat(7, 54px);
    overflow-x: auto;
    min-height: 146px;
    padding-bottom: 2px;
  }

  .opx-day-column {
    min-height: 136px;
    grid-template-rows: 18px 68px auto auto auto;
    padding: 6px 4px;
  }

  .opx-day-columns-bars {
    min-height: 68px;
  }

  .opx-day-columns-bars i {
    width: 11px;
  }

  .opx-day-column small {
    font-size: .52rem;
  }

  .opx-day-column em {
    min-width: 40px;
    font-size: .53rem;
  }
}

/* Resumen Completo - fix visible day bars v239 */
.opx-day-columns-bars {
  height: 76px !important;
  min-height: 76px !important;
}

.opx-day-column {
  grid-template-rows: 20px 76px auto auto auto !important;
}

.opx-day-columns-bars i {
  height: auto;
  min-height: 4px;
  align-self: end;
}

@media (max-width: 640px) {
  .opx-day-columns-bars {
    height: 70px !important;
    min-height: 70px !important;
  }

  .opx-day-column {
    grid-template-rows: 18px 70px auto auto auto !important;
  }
}

/* Resumen Completo - alert states and compact metric chips v240 */
.opx-time-stats {
  gap: 5px;
}

.opx-time-metric {
  padding: 5px 4px;
  text-align: center;
}

.opx-time-metric b {
  font-size: .82rem;
  line-height: 1;
}

.opx-time-metric small {
  font-size: .58rem;
  line-height: 1;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.opx-day-column.opx-bad {
  border-color: rgba(248, 113, 113, .34);
  background: linear-gradient(180deg, rgba(127, 29, 29, .28), rgba(255, 255, 255, .045));
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, .08);
}

.opx-day-column.opx-bad strong {
  color: #fecaca;
}

.opx-day-column.opx-bad .opx-day-columns-bars .opx-done {
  background: linear-gradient(180deg, #fca5a5, #ef4444);
}

.opx-day-column.opx-bad em {
  color: #fff;
  background: rgba(228, 0, 43, .72);
  box-shadow: 0 0 0 1px rgba(248, 113, 113, .35), 0 8px 18px rgba(228, 0, 43, .18);
}

.opx-day-column.opx-muted em {
  color: #fecaca;
  background: rgba(228, 0, 43, .28);
}

@media (max-width: 640px) {
  .opx-time-metric {
    padding: 4px 3px;
  }

  .opx-time-metric b {
    font-size: .72rem;
  }

  .opx-time-metric small {
    font-size: .52rem;
  }
}

/* Resumen Completo - executive summary card v242 */
.opx-executive-card {
  overflow: hidden;
  border: 1px solid #dfe5ee;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, .08);
  animation: opxFadeUp .28s ease both;
}

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

.opx-exec-head {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 22px 24px 14px;
}

.opx-exec-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 22px;
  background: linear-gradient(135deg, #fff1f3, #fff);
  color: #e4002b;
  box-shadow: inset 0 0 0 1px rgba(228,0,43,.06);
}

.opx-exec-icon svg,
.opx-exec-body svg,
.opx-exec-more svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.opx-exec-title span {
  display: block;
  color: #e4002b;
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.opx-exec-title h1 {
  margin: 5px 0 8px;
  color: #111827;
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.opx-exec-title small {
  color: #667085;
  font-weight: 850;
}

.opx-exec-kpi {
  display: grid;
  place-items: center;
  min-width: 132px;
  min-height: 84px;
  padding: 12px 18px;
  border-radius: 22px;
  background: linear-gradient(135deg, #fff1f3, #fff7f8);
  color: #e4002b;
}

.opx-exec-kpi span {
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 950;
}

.opx-exec-kpi small {
  margin-top: 5px;
  color: #4b5563;
  font-weight: 800;
}

.opx-exec-kpi.opx-good { color: #087443; background: linear-gradient(135deg, #ecfdf3, #fff); }
.opx-exec-kpi.opx-warn { color: #a65f00; background: linear-gradient(135deg, #fff8eb, #fff); }
.opx-exec-kpi.opx-bad { color: #e4002b; background: linear-gradient(135deg, #fff1f3, #fff); }

.opx-exec-body {
  margin: 0 24px 14px;
  padding: 18px 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, #fff, #fff8f9);
}

.opx-exec-body p {
  margin: 0 0 12px;
  color: #263244;
  font-size: 1rem;
  line-height: 1.38;
  font-weight: 700;
}

.opx-exec-body b,
.opx-red {
  color: #e4002b;
  font-weight: 950;
}

.opx-exec-body ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.opx-exec-body li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  color: #334155;
  font-weight: 750;
  line-height: 1.3;
}

.opx-exec-body li > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #fff1f3;
  color: #e4002b;
}

.opx-exec-body li svg {
  width: 18px;
  height: 18px;
}

.opx-exec-mix {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 24px 16px;
}

.opx-exec-mix > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #edf0f5;
  border-radius: 16px;
  background: #f8fafc;
}

.opx-exec-mix span {
  color: #111827;
  font-weight: 950;
}

.opx-exec-mix b {
  color: #111827;
  font-size: 1.15rem;
}

.opx-exec-mix i {
  grid-column: 1 / -1;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6ebf2;
}

.opx-exec-mix em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f6fed, #22c55e);
}

.opx-exec-mix div:nth-child(2) em {
  background: linear-gradient(90deg, #f59e0b, #e4002b);
}

.opx-exec-mix small {
  grid-column: 1 / -1;
  color: #667085;
  font-weight: 800;
}

.opx-exec-foot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 24px 18px;
  border-top: 1px solid #edf0f5;
  border-bottom: 1px solid #edf0f5;
}

.opx-exec-foot span {
  display: grid;
  gap: 2px;
  padding: 13px 14px;
  border-right: 1px solid #edf0f5;
}

.opx-exec-foot span:last-child {
  border-right: 0;
}

.opx-exec-foot b {
  color: #2f6fed;
  font-size: 1.45rem;
  line-height: 1;
}

.opx-exec-foot small {
  color: #4b5563;
  font-weight: 800;
  line-height: 1.15;
}

.opx-exec-more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 54px;
  padding: 0 24px;
  border: 0;
  border-top: 1px solid #fee2e7;
  background: linear-gradient(90deg, #fff7f8, #fff);
  color: #e4002b;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.opx-exec-more svg {
  width: 22px;
  height: 22px;
}

@media (max-width: 640px) {
  .opx-executive-card {
    border-radius: 20px;
  }

  .opx-exec-head {
    grid-template-columns: 50px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 14px 14px 10px;
  }

  .opx-exec-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }

  .opx-exec-icon svg {
    width: 22px;
    height: 22px;
  }

  .opx-exec-title span {
    font-size: .66rem;
  }

  .opx-exec-title h1 {
    font-size: 1.18rem;
    margin: 3px 0 5px;
  }

  .opx-exec-title small {
    font-size: .68rem;
  }

  .opx-exec-kpi {
    min-width: 76px;
    min-height: 58px;
    padding: 8px 9px;
    border-radius: 16px;
  }

  .opx-exec-kpi span {
    font-size: 1.16rem;
  }

  .opx-exec-kpi small {
    font-size: .62rem;
  }

  .opx-exec-body {
    margin: 0 12px 10px;
    padding: 12px;
    border-radius: 16px;
  }

  .opx-exec-body p {
    font-size: .86rem;
  }

  .opx-exec-body ul {
    gap: 8px;
  }

  .opx-exec-body li {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
    font-size: .8rem;
  }

  .opx-exec-body li > span {
    width: 26px;
    height: 26px;
  }

  .opx-exec-mix {
    grid-template-columns: 1fr;
    margin: 0 12px 10px;
    gap: 8px;
  }

  .opx-exec-mix > div {
    padding: 9px 10px;
  }

  .opx-exec-foot {
    margin: 0 12px 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .opx-exec-foot span {
    padding: 9px 6px;
    text-align: center;
  }

  .opx-exec-foot b {
    font-size: 1.05rem;
  }

  .opx-exec-foot small {
    font-size: .62rem;
  }

  .opx-exec-more {
    min-height: 46px;
    padding: 0 14px;
  }
}

/* Resumen Completo - compact executive card v243 */
.opx-executive-card {
  border-radius: 18px;
}

.opx-exec-head {
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px 14px 8px;
}

.opx-exec-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.opx-exec-icon svg {
  width: 21px;
  height: 21px;
}

.opx-exec-title span {
  font-size: .66rem;
}

.opx-exec-title h1 {
  margin: 2px 0 3px;
  font-size: clamp(1.08rem, 2.4vw, 1.45rem);
  line-height: 1.05;
}

.opx-exec-title small {
  font-size: .72rem;
  line-height: 1.1;
}

.opx-exec-kpi {
  min-width: 74px;
  min-height: 52px;
  padding: 7px 9px;
  border-radius: 15px;
}

.opx-exec-kpi span {
  font-size: 1.08rem;
}

.opx-exec-kpi small {
  font-size: .6rem;
  margin-top: 2px;
}

.opx-exec-body.opx-exec-body-compact {
  margin: 0 12px 8px;
  padding: 10px 12px;
  border-radius: 14px;
}

.opx-exec-body.opx-exec-body-compact p {
  margin: 0;
  font-size: .84rem;
  line-height: 1.28;
}

.opx-exec-mix {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 12px 8px;
}

.opx-exec-mix > div {
  padding: 8px 10px;
  border-radius: 13px;
  gap: 4px 8px;
}

.opx-exec-mix span {
  font-size: .8rem;
}

.opx-exec-mix b {
  font-size: .95rem;
}

.opx-exec-mix i {
  height: 6px;
}

.opx-exec-mix small {
  font-size: .66rem;
}

.opx-exec-foot {
  margin: 0 12px 8px;
}

.opx-exec-foot span {
  padding: 8px 5px;
}

.opx-exec-foot b {
  font-size: 1rem;
}

.opx-exec-foot small {
  font-size: .58rem;
}

.opx-exec-more {
  min-height: 38px;
  padding: 0 14px;
  font-size: .86rem;
}

@media (max-width: 640px) {
  .opx-exec-head {
    grid-template-columns: 40px minmax(0, 1fr) 68px;
    gap: 8px;
    padding: 11px 12px 7px;
  }

  .opx-exec-icon {
    width: 36px;
    height: 36px;
  }

  .opx-exec-title h1 {
    font-size: 1rem;
  }

  .opx-exec-title small {
    font-size: .62rem;
  }

  .opx-exec-kpi {
    min-width: 62px;
    min-height: 48px;
    padding: 6px;
  }

  .opx-exec-kpi span {
    font-size: .98rem;
  }

  .opx-exec-body.opx-exec-body-compact p {
    font-size: .76rem;
  }

  .opx-exec-mix {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Tiempos de Servicio */
.tiempos-shell {
  max-width: 1120px;
  padding-bottom: 120px;
}

.tiempos-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-color: rgba(228, 0, 43, .12);
  background: linear-gradient(135deg, #fff 0%, #fff 58%, rgba(228, 0, 43, .035) 100%);
}

.tiempos-hero h1 {
  margin: 4px 0 6px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: 0;
}

.tiempos-hero p,
.tiempos-hero small {
  color: #667085;
  font-weight: 800;
}

.tiempos-form-card {
  display: grid;
  grid-template-columns: minmax(210px, .75fr) minmax(0, 2fr);
  gap: 16px;
  align-items: stretch;
}

.tiempos-now-card {
  border: 1px solid rgba(228, 0, 43, .14);
  border-radius: 18px;
  padding: 18px;
  background: #fff7f9;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.tiempos-now-card span,
.tiempos-form-grid label > span {
  color: #6b7280;
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.tiempos-now-card input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #e4002b;
  font-size: 1.75rem;
  font-weight: 1000;
  padding: 0;
}

.tiempos-now-card small {
  color: #667085;
  font-weight: 800;
}

.tiempos-form-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(220px, 1fr) minmax(110px, .45fr) auto;
  gap: 12px;
  align-items: end;
}

.tiempos-form-grid label {
  display: grid;
  gap: 7px;
}

.tiempos-form-grid select,
.tiempos-form-grid input {
  min-height: 56px;
  border: 1px solid #d8dee8;
  border-radius: 14px;
  padding: 0 16px;
  color: #111827;
  font-weight: 900;
  background: #fff;
}

.tiempos-live-panel {
  display: grid;
  gap: 16px;
}

.tiempos-live-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.tiempos-live-head h2 {
  margin: 4px 0 4px;
  font-size: 1.7rem;
}

.tiempos-live-head p {
  color: #667085;
  font-weight: 750;
}

.tiempos-live-summary {
  min-width: 220px;
  min-height: 64px;
  border-radius: 18px;
  background: #101827;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  box-shadow: 0 16px 32px rgba(16, 24, 39, .14);
}

.tiempos-live-summary b {
  color: #fff;
  font-size: 1.5rem;
}

.tiempos-live-summary span {
  color: rgba(255, 255, 255, .76);
  font-weight: 850;
}

.tiempos-builder {
  display: grid;
  gap: 14px;
}

.tiempos-toma-card {
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .07);
}

.tiempos-toma-card.is-locked {
  opacity: .56;
}

.tiempos-toma-card.is-done {
  border-color: rgba(22, 163, 74, .28);
  background: linear-gradient(135deg, #fff 0%, #f1fff6 100%);
}

.tiempos-toma-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 12px;
}

.tiempos-toma-head span {
  color: #e4002b;
  font-size: .78rem;
  font-weight: 1000;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.tiempos-toma-head strong,
.tiempos-toma-head b {
  color: #111827;
  font-size: 1.2rem;
  font-weight: 1000;
}

.tiempos-segments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tiempos-segment {
  border: 1px solid #e5eaf2;
  border-radius: 16px;
  padding: 12px;
  background: #f8fafc;
  display: grid;
  gap: 10px;
}

.tiempos-segment.is-current {
  border-color: rgba(228, 0, 43, .35);
  background: #fff7f9;
  box-shadow: inset 0 0 0 1px rgba(228, 0, 43, .08);
}

.tiempos-segment.is-done {
  border-color: rgba(22, 163, 74, .25);
  background: #f3fff7;
}

.tiempos-segment strong {
  display: block;
  color: #374151;
  font-size: .88rem;
  font-weight: 950;
}

.tiempos-value {
  display: block;
  margin-top: 4px;
  color: #111827;
  font-size: 1.45rem;
  font-weight: 1000;
}

.tiempos-segment-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tiempos-segment-actions button {
  border: 0;
  border-radius: 999px;
  min-height: 34px;
  padding: 0 12px;
  font-weight: 950;
  cursor: pointer;
}

.tiempos-start { background: #e4002b; color: #fff; }
.tiempos-stop { background: #101827; color: #fff; }
.tiempos-na { background: #fff; color: #6b7280; border: 1px solid #d8dee8 !important; }
.tiempos-segment-actions button:disabled { opacity: .42; cursor: not-allowed; }

.tiempos-save-row {
  display: flex;
  justify-content: flex-end;
}

.tiempos-success {
  border: 1px solid rgba(22, 163, 74, .22);
  border-radius: 18px;
  background: #f0fdf4;
  padding: 22px;
  color: #14532d;
  font-weight: 900;
}

.config-muted {
  color: #667085;
  font-weight: 800;
  margin: 10px 0 0;
}

@media (max-width: 760px) {
  .tiempos-shell { padding: 14px 14px 110px; }
  .tiempos-hero { align-items: flex-start; flex-direction: column; border-radius: 18px; }
  .tiempos-hero h1 { font-size: 2.1rem; }
  .tiempos-form-card { grid-template-columns: 1fr; }
  .tiempos-form-grid { grid-template-columns: 1fr; }
  .tiempos-live-head { flex-direction: column; }
  .tiempos-live-summary { width: 100%; min-width: 0; justify-content: flex-start; }
  .tiempos-segments { grid-template-columns: 1fr; }
  .tiempos-toma-card { padding: 13px; border-radius: 18px; }
  .tiempos-value { font-size: 1.25rem; }
  .tiempos-save-row .btn-red { width: 100%; }
}
/* Tiempos de Servicio - dashboard y comentario */
.tiempos-comment-box {
  display: grid;
  gap: 8px;
  border: 1px solid #e5eaf2;
  border-radius: 18px;
  padding: 14px;
  background: #fff;
}
.tiempos-comment-box span {
  color: #6b7280;
  font-size: .78rem;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.tiempos-comment-box textarea {
  width: 100%;
  border: 0;
  resize: vertical;
  min-height: 92px;
  color: #111827;
  font-weight: 800;
  outline: none;
  font-family: inherit;
}
.tiempos-summary-shell { max-width: 1240px; padding-bottom: 120px; }
.tiempos-summary-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}
.tiempos-summary-filters label { display: grid; gap: 7px; }
.tiempos-summary-filters span {
  color: #6b7280;
  font-size: .76rem;
  font-weight: 950;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.tiempos-summary-filters select {
  min-height: 52px;
  border: 1px solid #d8dee8;
  border-radius: 14px;
  padding: 0 14px;
  background: #fff;
  color: #111827;
  font-weight: 900;
}
.tiempos-summary-grid { display: grid; gap: 18px; }
.tiempos-dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.tiempos-dash-kpis article {
  border: 1px solid #e5eaf2;
  border-radius: 20px;
  background: #fff;
  padding: 18px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .08);
}
.tiempos-dash-kpis span,
.tiempos-dash-kpis small { color: #667085; font-weight: 900; }
.tiempos-dash-kpis b { display: block; margin: 6px 0; color: #111827; font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 1000; }
.tiempos-chart-panel { display: grid; gap: 14px; }
.tiempos-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.tiempos-section-head h2 { margin: 3px 0 0; font-size: 1.5rem; }
.tiempos-section-head > b {
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff1f4;
  color: #e4002b;
  font-weight: 1000;
}
.tiempos-local-bars,
.tiempos-turno-bars,
.tiempos-recent-list { display: grid; gap: 10px; }
.tiempos-local-bars article,
.tiempos-turno-bars article,
.tiempos-recent-list article {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(140px, 2fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #edf0f5;
  border-radius: 16px;
  background: #f8fafc;
  padding: 12px;
}
.tiempos-local-bars strong,
.tiempos-recent-list strong { color: #111827; font-weight: 1000; }
.tiempos-local-bars small,
.tiempos-turno-bars small,
.tiempos-recent-list small { color: #667085; font-weight: 850; }
.tiempos-bar { height: 12px; border-radius: 999px; background: #e5e7eb; overflow: hidden; }
.tiempos-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #22c55e); }
.tiempos-local-bars b,
.tiempos-turno-bars b { color: #e4002b; font-weight: 1000; }
.tiempos-two-col { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 18px; }
.tiempos-turno-bars article { grid-template-columns: 90px minmax(100px, 1fr) auto auto; }
.tiempos-recent-list article { grid-template-columns: minmax(0, 1fr) auto; }
.tiempos-recent-list p { grid-column: 1 / -1; margin: 0; color: #475467; font-weight: 750; }
@media (max-width: 820px) {
  .tiempos-summary-filters { grid-template-columns: 1fr 1fr; }
  .tiempos-summary-filters .btn-red { grid-column: 1 / -1; }
  .tiempos-dash-kpis { grid-template-columns: 1fr 1fr; }
  .tiempos-two-col { grid-template-columns: 1fr; }
  .tiempos-local-bars article,
  .tiempos-turno-bars article { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .tiempos-summary-filters { grid-template-columns: 1fr; }
  .tiempos-dash-kpis { grid-template-columns: 1fr; }
}
/* Tiempos de Servicio - botones y correo configurable */
.tiempos-hero a.btn-red,
.tiempos-hero a.btn-ghost,
.config-actions a.btn-red,
.config-actions a.btn-ghost,
.config-actions a.btn-dark {
  min-height: 46px;
  padding: 0 18px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none !important;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 14px 28px rgba(15, 23, 42, .08);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}

.tiempos-hero a.btn-red,
.config-actions a.btn-red {
  background: var(--red) !important;
  border: 1px solid var(--red) !important;
  color: #fff !important;
}

.tiempos-hero a.btn-ghost,
.config-actions a.btn-ghost {
  background: #fff !important;
  border: 1px solid #d8dee8 !important;
  color: #111827 !important;
}

.tiempos-hero a.btn-red:hover,
.tiempos-hero a.btn-ghost:hover,
.config-actions a.btn-red:hover,
.config-actions a.btn-ghost:hover,
.config-actions a.btn-dark:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, .13);
  text-decoration: none !important;
}

.tiempos-top-action {
  letter-spacing: .02em;
}

#tiemposGerente {
  text-transform: uppercase;
}

.tiempos-email-format-card {
  margin-top: 18px;
  align-items: center;
}

.tiempos-email-format-grid {
  margin-top: 14px;
}

.tiempos-email-format-grid .config-field textarea {
  min-height: 86px;
}

@media (max-width: 760px) {
  .tiempos-hero a.btn-red,
  .tiempos-hero a.btn-ghost {
    width: 100%;
  }
  .tiempos-email-format-card .config-actions {
    width: 100%;
  }
}
/* Configuracion - visibilidad de menus */
.menu-visibility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.menu-visibility-card {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .07);
  display: grid;
  gap: 12px;
}

.menu-visibility-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.menu-visibility-card h3 {
  margin: 0;
  color: #111827;
  font-size: 1.05rem;
  font-weight: 1000;
}

.menu-visibility-card small {
  color: #667085;
  font-weight: 800;
}

.menu-visibility-pill {
  border-radius: 999px;
  padding: 7px 10px;
  background: #eef8f1;
  color: #08783b;
  font-size: .74rem;
  font-weight: 1000;
}

.menu-visibility-card.is-hidden-module .menu-visibility-pill {
  background: #fff1f3;
  color: #d0042c;
}

.menu-visibility-checks {
  display: grid;
  gap: 8px;
}

.menu-visibility-checks label {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #edf0f5;
  border-radius: 14px;
  background: #f8fafc;
  padding: 10px 12px;
  color: #1f2937;
  font-weight: 900;
}

.menu-visibility-checks input {
  width: 20px;
  height: 20px;
  accent-color: var(--red);
}

.core-menu-hidden {
  display: none !important;
}


/* Tiempos de Servicio - resumen compacto v249 */
.tiempos-dash-strip {
  display: grid;
  grid-template-columns: minmax(160px, .55fr) minmax(0, 2.4fr);
  gap: 12px;
  align-items: stretch;
}
.tiempos-dash-strip > .is-main,
.tiempos-stage-card,
.tiempos-local-card,
.tiempos-turno-compact article {
  border: 1px solid #e5eaf2;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}
.tiempos-dash-strip > .is-main {
  padding: 14px 16px;
  display: grid;
  align-content: center;
  gap: 2px;
}
.tiempos-dash-strip > .is-main span,
.tiempos-dash-strip > .is-main small,
.tiempos-stage-card span,
.tiempos-stage-card small,
.tiempos-local-card small,
.tiempos-local-card summary > span,
.tiempos-turno-compact small { color: #667085; font-weight: 900; }
.tiempos-dash-strip > .is-main b { color: #111827; font-size: clamp(1.75rem, 3vw, 2.45rem); font-weight: 1000; line-height: 1; }
.tiempos-stage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tiempos-stage-card { padding: 12px; display: grid; gap: 8px; }
.tiempos-stage-card header,
.tiempos-stage-card footer,
.tiempos-local-card summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tiempos-stage-card header b { color: #111827; font-size: 1.3rem; font-weight: 1000; }
.tiempos-stage-card footer strong { color: #111827; font-size: 1.05rem; font-weight: 1000; }
.tiempos-stage-bar,
.tiempos-local-detail i { height: 8px; border-radius: 999px; background: #e9edf3; overflow: hidden; }
.tiempos-stage-bar i,
.tiempos-local-detail em { display: block; height: 100%; border-radius: inherit; }
.tiempos-stage-card.is-blue i { background: #2563eb; }
.tiempos-stage-card.is-amber i { background: #f59e0b; }
.tiempos-stage-card.is-green i { background: #22c55e; }
.tiempos-locals-panel { padding: 16px; gap: 12px; }
.tiempos-local-list { display: grid; gap: 9px; }
.tiempos-local-card { overflow: hidden; }
.tiempos-local-card summary { min-height: 62px; padding: 12px 14px; cursor: pointer; list-style: none; }
.tiempos-local-card summary::-webkit-details-marker { display: none; }
.tiempos-local-card summary strong { display: block; color: #111827; font-size: 1rem; font-weight: 1000; line-height: 1.12; }
.tiempos-local-card summary b { color: #e4002b; font-size: 1.05rem; font-weight: 1000; white-space: nowrap; }
.tiempos-local-card summary > span { font-size: .76rem; white-space: nowrap; }
.tiempos-local-detail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 0 14px 14px; }
.tiempos-local-detail > div { display: grid; gap: 5px; border: 1px solid #eef2f7; border-radius: 12px; padding: 10px; background: #f8fafc; }
.tiempos-local-detail span { color: #667085; font-size: .72rem; font-weight: 950; text-transform: uppercase; }
.tiempos-local-detail b { color: #111827; font-size: 1.08rem; font-weight: 1000; }
.tiempos-local-detail small { color: #667085; font-weight: 850; }
.tiempos-local-detail em { background: linear-gradient(90deg, #2563eb, #22c55e); }
.tiempos-summary-compact { gap: 12px; }
.tiempos-turno-compact { display: grid; gap: 8px; }
.tiempos-turno-compact article { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 12px; }
.tiempos-turno-compact span { color: #111827; font-weight: 1000; }
.tiempos-turno-compact b { color: #e4002b; font-weight: 1000; }
.tiempos-recent-list article { padding: 10px 12px; }
@media (max-width: 820px) {
  .tiempos-dash-strip { grid-template-columns: 1fr; }
  .tiempos-stage-grid { grid-template-columns: 1fr; }
  .tiempos-local-card summary { grid-template-columns: 1fr auto; }
  .tiempos-local-card summary > span { display: none; }
  .tiempos-local-detail { grid-template-columns: 1fr; }
}


.tiempos-success-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.tiempos-success-actions .btn-red, .tiempos-success-actions .btn-ghost { min-height: 44px; padding: 12px 18px; text-decoration: none; }
.tiempos-admin-records { margin: 18px 0 22px; }
.tiempos-admin-table-wrap { box-shadow: 0 18px 40px rgba(15, 23, 42, .08); }
.tiempos-admin-table th, .tiempos-admin-table td { white-space: nowrap; vertical-align: middle; }
.tiempos-admin-table small { color: #6b7280; font-weight: 800; }
.tiempos-email-state { display: inline-flex; align-items: center; min-height: 24px; padding: 4px 9px; border-radius: 999px; background: #f1f5f9; color: #475569; font-size: 11px; font-weight: 950; text-transform: uppercase; }
.tiempos-email-state.enviado { background: #dcfce7; color: #166534; }
.tiempos-email-state.error { background: #fee2e2; color: #b91c1c; }
.btn-mini-danger { border: 1px solid #fecdd3; background: #fff1f3; color: #d0042c; border-radius: 999px; padding: 8px 12px; font-weight: 950; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.btn-mini-danger:hover { background: #ffe4e8; box-shadow: 0 10px 22px rgba(228, 0, 43, .14); transform: translateY(-1px); }
@media (max-width: 720px) { .tiempos-success-actions .btn-red, .tiempos-success-actions .btn-ghost { width: 100%; justify-content: center; } }


/* Tiempos de Servicio: busqueda rapida y cierre moderno */
.tiempos-local-search-field input[type="search"] { border-color: #fecdd3; background: linear-gradient(180deg, #fff, #fff8fa); box-shadow: 0 12px 24px rgba(228, 0, 43, .06); }
.tiempos-local-search-field input[type="search"]::placeholder { color: #9aa3b2; font-weight: 850; text-transform: none; }
.tiempos-success-modern { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 20px; border-color: rgba(22, 163, 74, .20); background: linear-gradient(135deg, rgba(240, 253, 244, .98), rgba(255, 255, 255, .96)); box-shadow: 0 18px 44px rgba(15, 23, 42, .08); }
.tiempos-success-modern strong { display: block; margin: 2px 0 7px; color: #102033; font-size: 1.15rem; }
.tiempos-success-modern p { margin: 4px 0; color: #436052; }
.tiempos-success-kicker { display: inline-flex; width: fit-content; padding: 5px 10px; border-radius: 999px; background: #dcfce7; color: #166534; font-size: .72rem; font-weight: 950; letter-spacing: .05em; text-transform: uppercase; }
.tiempos-success-modern .tiempos-success-actions { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 10px; }
.tiempos-action { display: grid; gap: 3px; align-content: center; min-height: 58px; padding: 12px 15px; border-radius: 16px; text-decoration: none; border: 1px solid #dce3ed; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.tiempos-action span { color: inherit; font-weight: 950; line-height: 1.1; }
.tiempos-action small { color: inherit; opacity: .72; font-size: .78rem; font-weight: 850; }
.tiempos-action-primary { background: linear-gradient(135deg, #e4002b, #b80024); color: #fff; border-color: rgba(228, 0, 43, .45); box-shadow: 0 14px 30px rgba(228, 0, 43, .22); }
.tiempos-action-secondary { background: #fff; color: #111827; }
.tiempos-action:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(15, 23, 42, .12); }
@media (min-width: 981px) { .tiempos-form-grid { grid-template-columns: minmax(220px, .95fr) minmax(250px, 1.15fr) minmax(220px, .95fr) minmax(110px, .38fr) auto; } }
@media (max-width: 780px) { .tiempos-success-modern { grid-template-columns: 1fr; padding: 16px; } .tiempos-success-modern .tiempos-success-actions { grid-template-columns: 1fr; } .tiempos-action { min-height: 54px; } }


/* tiempos-search-fix-layout */
.tiempos-form-grid #btnTiemposComenzar {
  min-width: 142px;
  white-space: nowrap;
  padding-inline: 20px;
  align-self: end;
}

.tiempos-form-grid select:disabled,
.tiempos-form-grid input:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: wait;
}

@media (max-width: 980px) {
  .tiempos-form-grid #btnTiemposComenzar {
    width: 100%;
    min-width: 0;
  }
}


/* tiempos-compact-national-search */
.tiempos-form-card {
  grid-template-columns: minmax(170px, .42fr) minmax(0, 2.8fr);
  align-items: center;
}

.tiempos-now-card {
  min-height: 0;
  padding: 14px 16px;
  gap: 5px;
}

.tiempos-now-card input {
  font-size: 1.45rem;
  line-height: 1;
}

.tiempos-now-card small {
  font-size: .9rem;
  line-height: 1.25;
}

.tiempos-form-grid {
  grid-template-columns: minmax(260px, 1.35fr) minmax(220px, 1fr) minmax(92px, .34fr) minmax(136px, auto);
  align-items: end;
}

.tiempos-form-card.has-local-search .tiempos-form-grid {
  grid-template-columns: minmax(220px, .95fr) minmax(260px, 1.12fr) minmax(220px, .95fr) minmax(92px, .34fr) minmax(136px, auto);
}

.tiempos-form-grid select,
.tiempos-form-grid input {
  min-height: 50px;
  font-size: 16px;
}

.tiempos-form-grid #btnTiemposComenzar {
  min-height: 50px;
  min-width: 136px;
  white-space: nowrap;
  padding-inline: 18px;
  overflow: visible;
}

.tiempos-local-search-field.is-hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .tiempos-form-card,
  .tiempos-form-card.has-local-search {
    grid-template-columns: 1fr;
  }
  .tiempos-now-card {
    max-width: none;
  }
  .tiempos-form-grid,
  .tiempos-form-card.has-local-search .tiempos-form-grid {
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) minmax(96px, .35fr) minmax(136px, auto);
  }
  .tiempos-form-card.has-local-search .tiempos-form-grid {
    grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr);
  }
  .tiempos-form-card.has-local-search #btnTiemposComenzar {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .tiempos-form-card {
    gap: 12px;
  }
  .tiempos-now-card {
    padding: 12px 14px;
    border-radius: 16px;
  }
  .tiempos-now-card input {
    font-size: 1.25rem;
  }
  .tiempos-now-card small {
    font-size: .82rem;
  }
  .tiempos-form-grid,
  .tiempos-form-card.has-local-search .tiempos-form-grid {
    grid-template-columns: 1fr;
  }
  .tiempos-form-card.has-local-search #btnTiemposComenzar {
    grid-column: auto;
  }
  .tiempos-form-grid #btnTiemposComenzar {
    width: 100%;
    min-width: 0;
  }
}


/* tiempos-no-mobile-zoom-final */
.tiempos-comment-box textarea,
.tiempos-form-grid input,
.tiempos-form-grid select {
  font-size: 16px;
}

.tiempos-comment-box textarea {
  line-height: 1.45;
}

/* Resumen Completo - pulso de tiempos de servicio */
.opx-service-pulse {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(14, 165, 233, .22);
  background:
    radial-gradient(circle at 15% 0%, rgba(14, 165, 233, .22), transparent 34%),
    radial-gradient(circle at 84% 14%, rgba(34, 197, 94, .18), transparent 34%),
    linear-gradient(135deg, #07111f 0%, #0f172a 48%, #082f49 100%);
  color: #fff;
  box-shadow: 0 22px 50px rgba(15, 23, 42, .22);
}
.opx-service-pulse header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.opx-service-pulse header span { display: block; color: #7dd3fc; font-size: .7rem; font-weight: 950; letter-spacing: .08em; text-transform: uppercase; }
.opx-service-pulse header h2 { margin: 5px 0 4px; color: #fff; font-size: clamp(1.12rem, 2.1vw, 1.45rem); line-height: 1.05; }
.opx-service-pulse header p { margin: 0; color: rgba(226, 232, 240, .82); font-weight: 800; }
.opx-service-pulse header > strong { min-width: 136px; padding: 12px 14px; border-radius: 18px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14); text-align: right; }
.opx-service-pulse header > strong b { display: block; color: #67e8f9; font-size: 1.55rem; line-height: 1; }
.opx-service-pulse header > strong small { color: rgba(226, 232, 240, .8); font-weight: 900; }
.opx-service-top { display: grid; grid-template-columns: .7fr 1.7fr; gap: 12px; }
.opx-service-sources, .opx-service-stages { display: grid; gap: 10px; }
.opx-service-sources { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opx-service-stages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opx-service-source, .opx-service-stage { border: 1px solid rgba(255,255,255,.12); border-radius: 17px; background: rgba(255,255,255,.06); padding: 12px; box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
.opx-service-source span, .opx-service-source small, .opx-service-stage span, .opx-service-stage small { color: rgba(226,232,240,.78); font-weight: 900; }
.opx-service-source b { display: block; margin: 4px 0; color: #fff; font-size: 1.55rem; line-height: 1; }
.opx-service-source.opx-service b { color: #38bdf8; }
.opx-service-source.opx-audit b { color: #a7f3d0; }
.opx-service-stage { display: grid; gap: 8px; }
.opx-service-stage header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.opx-service-stage header b { font-size: 1.22rem; color: #fff; }
.opx-service-stage i, .opx-service-turnos article i { display: block; height: 8px; overflow: hidden; border-radius: 999px; background: rgba(148, 163, 184, .2); }
.opx-service-stage em, .opx-service-turnos article em { display: block; height: 100%; border-radius: inherit; }
.opx-service-stage.opx-blue em { background: linear-gradient(90deg, #2563eb, #38bdf8); }
.opx-service-stage.opx-amber em { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.opx-service-stage.opx-green em { background: linear-gradient(90deg, #16a34a, #4ade80); }
.opx-service-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(220px, .75fr) minmax(260px, .95fr); gap: 12px; }
.opx-service-body > article { border: 1px solid rgba(255,255,255,.11); border-radius: 18px; background: rgba(2, 6, 23, .28); padding: 12px; }
.opx-service-weeks { display: grid; grid-template-columns: repeat(auto-fit, minmax(62px, 1fr)); gap: 8px; min-height: 142px; align-items: end; }
.opx-service-weeks article { display: grid; grid-template-rows: auto 84px auto; gap: 7px; text-align: center; color: rgba(226,232,240,.85); font-weight: 900; }
.opx-service-weeks article div { display: flex; align-items: end; justify-content: center; gap: 5px; }
.opx-service-weeks i { width: 16px; min-height: 5px; border-radius: 8px 8px 2px 2px; }
.opx-service-bar-new { background: linear-gradient(180deg, #67e8f9, #0284c7); }
.opx-service-bar-audit { background: linear-gradient(180deg, #86efac, #16a34a); }
.opx-service-weeks small, .opx-service-turnos small, .opx-service-locals small { color: rgba(226,232,240,.72); font-weight: 850; }
.opx-service-turnos { display: grid; gap: 8px; }
.opx-service-turnos article { display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; align-items: center; }
.opx-service-turnos article span { color: #fff; font-weight: 950; }
.opx-service-turnos article b { color: #67e8f9; font-weight: 1000; }
.opx-service-turnos article i { grid-column: 1 / -1; }
.opx-service-turnos article em { background: linear-gradient(90deg, #38bdf8, #22c55e); }
.opx-service-locals { display: grid; gap: 8px; }
.opx-service-locals article { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.opx-service-locals article:last-child { border-bottom: 0; }
.opx-service-locals b { color: #fff; font-size: .88rem; line-height: 1.08; }
.opx-service-locals span { color: rgba(125,211,252,.9); font-size: .72rem; font-weight: 950; text-transform: uppercase; }
.opx-service-locals strong { color: #a7f3d0; font-weight: 1000; white-space: nowrap; }
.opx-service-locals small { grid-column: 1 / -1; }
@media (max-width: 980px) { .opx-service-top, .opx-service-body { grid-template-columns: 1fr; } .opx-service-stages { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 640px) {
  .opx-service-pulse { padding: 13px; border-radius: 20px; gap: 11px; }
  .opx-service-pulse header { display: grid; gap: 9px; }
  .opx-service-pulse header > strong { width: 100%; min-width: 0; display: flex; align-items: center; justify-content: space-between; text-align: left; padding: 10px 12px; }
  .opx-service-sources, .opx-service-stages { grid-template-columns: 1fr; }
  .opx-service-source, .opx-service-stage, .opx-service-body > article { padding: 10px; border-radius: 15px; }
  .opx-service-weeks { grid-template-columns: repeat(4, 58px); overflow-x: auto; min-height: 124px; }
  .opx-service-weeks article { grid-template-rows: auto 70px auto; }
}

/* Resumen Completo - pulso tiempos compacto v256 */
.opx-service-pulse {
  gap: 10px;
  padding: 14px;
}
.opx-service-pulse header h2 { font-size: clamp(1.02rem, 1.8vw, 1.3rem); }
.opx-service-pulse header p { font-size: .86rem; line-height: 1.28; }
.opx-service-pulse header > strong { padding: 9px 12px; border-radius: 15px; }
.opx-service-pulse header > strong b { font-size: 1.35rem; }
.opx-service-top { grid-template-columns: .72fr 1.9fr; gap: 9px; }
.opx-service-sources { gap: 8px; }
.opx-service-stages { gap: 8px; }
.opx-service-source,
.opx-service-stage { padding: 9px 10px; border-radius: 14px; }
.opx-service-source b { margin: 2px 0; font-size: 1.28rem; }
.opx-service-source small,
.opx-service-stage small { font-size: .72rem; line-height: 1.18; }
.opx-service-stage { gap: 6px; }
.opx-service-stage header b { font-size: 1rem; }
.opx-service-stage i,
.opx-service-turnos article i { height: 6px; }
.opx-service-body { grid-template-columns: minmax(0, 1.25fr) minmax(220px, .78fr); gap: 9px; }
.opx-service-body > article,
.opx-service-body > details { border: 1px solid rgba(255,255,255,.11); border-radius: 16px; background: rgba(2, 6, 23, .28); padding: 10px; }
.opx-service-weeks { min-height: 108px; }
.opx-service-weeks article { grid-template-rows: auto 58px auto; gap: 5px; }
.opx-service-turnos article { gap: 4px 9px; }
.opx-service-locals { grid-column: 1 / -1; }
.opx-service-locals summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.opx-service-locals summary::-webkit-details-marker { display: none; }
.opx-service-locals summary div { display: grid; gap: 2px; }
.opx-service-locals summary b { color: #fff; font-size: .98rem; }
.opx-service-locals summary small { color: rgba(226,232,240,.72); font-weight: 850; }
.opx-service-locals summary strong { padding: 6px 10px; border-radius: 999px; background: rgba(103,232,249,.12); color: #67e8f9; font-size: .78rem; white-space: nowrap; }
.opx-service-local-pages { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 10px; overflow-x: auto; padding-top: 10px; scroll-snap-type: x mandatory; }
.opx-service-local-page { display: grid; gap: 4px; scroll-snap-align: start; }
.opx-service-local-page > small { width: fit-content; margin-bottom: 2px; padding: 4px 8px; border-radius: 999px; background: rgba(255,255,255,.08); color: rgba(226,232,240,.76); font-weight: 950; }
.opx-service-local-page article { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 10px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.opx-service-local-page article:last-child { border-bottom: 0; }
.opx-service-local-page b { color: #fff; font-size: .82rem; line-height: 1.08; }
.opx-service-local-page span { color: rgba(125,211,252,.9); font-size: .68rem; font-weight: 950; text-transform: uppercase; }
.opx-service-local-page strong { color: #a7f3d0; font-size: .85rem; font-weight: 1000; white-space: nowrap; }
.opx-service-local-page small:not(:first-child) { grid-column: 1 / -1; color: rgba(226,232,240,.68); font-size: .72rem; font-weight: 850; }
@media (max-width: 980px) {
  .opx-service-top { grid-template-columns: 1fr; }
  .opx-service-body { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .opx-service-pulse { padding: 11px; gap: 9px; }
  .opx-service-pulse header { gap: 7px; }
  .opx-service-pulse header p { display: none; }
  .opx-service-pulse header > strong { padding: 8px 10px; }
  .opx-service-sources { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opx-service-stages { grid-template-columns: repeat(3, minmax(82px, 1fr)); overflow-x: auto; }
  .opx-service-source,
  .opx-service-stage,
  .opx-service-body > article,
  .opx-service-body > details { padding: 8px; border-radius: 13px; }
  .opx-service-source b { font-size: 1.2rem; }
  .opx-service-stage header { display: grid; gap: 2px; }
  .opx-service-stage header b { font-size: .95rem; }
  .opx-service-weeks { grid-template-columns: repeat(4, 48px); min-height: 92px; }
  .opx-service-weeks article { grid-template-rows: auto 48px auto; font-size: .74rem; }
  .opx-service-local-pages { grid-auto-columns: minmax(250px, 86%); }
}

/* Auditoria - medicion segmentada de tiempos v257 */
.audit-tiempos-box {
  border-color: #e5eaf2;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}
.audit-tiempos-help {
  margin: -2px 0 4px;
  color: #64748b;
  font-size: .86rem;
  font-weight: 800;
  line-height: 1.35;
}
.audit-tiempos-builder {
  display: grid;
  gap: 12px;
}
.audit-tiempos-box .audit-toma-card {
  border-radius: 16px;
  padding: 12px;
  box-shadow: none;
}
.audit-tiempos-box .tiempos-toma-head span {
  color: #e4002b;
}
.audit-tiempos-box .tiempos-toma-head strong,
.audit-tiempos-box .tiempos-toma-head b {
  font-size: 1rem;
}
.audit-tiempos-box .tiempos-segment {
  padding: 10px;
  border-radius: 14px;
}
.audit-tiempos-box .tiempos-segment strong {
  font-size: .8rem;
}
.audit-tiempos-box .tiempos-value {
  font-size: 1.15rem;
}
.audit-tiempos-box .tiempos-segment-actions button {
  min-height: 32px;
  padding: 7px 10px;
  font-size: .78rem;
}
@media (max-width: 760px) {
  .audit-tiempos-box .tiempos-segments {
    grid-template-columns: 1fr;
  }
  .audit-tiempos-box .audit-toma-card {
    padding: 11px;
  }
}


/* Pulso tiempos - paginacion compacta top locales v261 */
.opx-service-local-pages { display: block; overflow: hidden; padding-top: 8px; }
.opx-service-local-stage { min-width: 0; }
.opx-service-local-page { display: none; }
.opx-service-local-page.is-active { display: grid; }
.opx-service-local-controls { display: flex; align-items: center; justify-content: center; gap: 8px; padding-top: 8px; }
.opx-service-local-controls button { border: 1px solid rgba(125, 211, 252, .22); background: rgba(255,255,255,.08); color: #e0f2fe; border-radius: 999px; padding: 7px 11px; font-weight: 950; cursor: pointer; }
.opx-service-local-controls button:disabled { opacity: .42; cursor: default; }
.opx-service-local-controls span { min-width: 44px; text-align: center; color: rgba(226,232,240,.78); font-size: .76rem; font-weight: 950; }
.opx-service-locals[open] { max-height: none; }
@media (max-width: 640px) {
  .opx-service-pulse { overflow: visible; }
  .opx-service-locals summary { align-items: flex-start; }
  .opx-service-local-page article { padding: 6px 0; }
  .opx-service-local-controls button { flex: 1; padding: 8px 9px; }
}


/* Pulso tiempos - fuerza una sola pagina visible v262 */
.opx-service-locals .opx-service-local-pages { display: block !important; overflow: hidden; padding-top: 8px; }
.opx-service-locals .opx-service-local-stage { min-width: 0; }
.opx-service-locals .opx-service-local-page { display: none !important; }
.opx-service-locals .opx-service-local-page.is-active { display: grid !important; }
.opx-service-locals summary:focus,
.opx-service-locals summary:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(125, 211, 252, .18); border-radius: 12px; }
@media (max-width: 640px) {
  .opx-service-locals .opx-service-local-pages { width: 100%; max-width: 100%; }
  .opx-service-locals .opx-service-local-page article { grid-template-columns: minmax(0, 1fr) auto; }
  .opx-service-locals .opx-service-local-page b { overflow-wrap: anywhere; }
}


/* Resumen Completo - temas operativos ejecutivo v263 */
.opx-topic-pulse { display: grid; gap: 12px; padding: 16px; border-radius: 24px; border: 1px solid rgba(99, 102, 241, .18); background: linear-gradient(135deg, #ffffff 0%, #f8fbff 48%, #eef6ff 100%); box-shadow: 0 20px 44px rgba(15, 23, 42, .10); }
.opx-topic-pulse > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.opx-topic-pulse > header span { display: block; color: #e4002b; font-size: .72rem; font-weight: 1000; letter-spacing: .08em; text-transform: uppercase; }
.opx-topic-pulse > header h2 { margin: 4px 0 3px; color: #101827; font-size: clamp(1.14rem, 2vw, 1.55rem); line-height: 1.05; }
.opx-topic-pulse > header p { margin: 0; color: #667085; font-weight: 850; }
.opx-topic-pulse > header strong { padding: 7px 11px; border-radius: 999px; background: #fff1f3; color: #c40026; font-size: .8rem; white-space: nowrap; }
.opx-topic-pulse-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.opx-topic-card { border: 1px solid #e2e8f0; border-radius: 18px; background: rgba(255,255,255,.92); padding: 11px; }
.opx-topic-card summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; cursor: pointer; list-style: none; }
.opx-topic-card summary::-webkit-details-marker { display: none; }
.opx-topic-card summary span { display: block; color: #94a3b8; font-size: .66rem; font-weight: 1000; text-transform: uppercase; letter-spacing: .06em; }
.opx-topic-card summary b { display: block; margin-top: 2px; color: #111827; font-size: .98rem; line-height: 1.1; }
.opx-topic-card summary small { display: block; margin-top: 2px; color: #667085; font-weight: 850; }
.opx-topic-card summary strong { color: #0f172a; font-size: 1.05rem; }
.opx-topic-card > i { display: block; height: 7px; margin-top: 9px; overflow: hidden; border-radius: 999px; background: #e5e7eb; }
.opx-topic-card > i em { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #22c55e); }
.opx-topic-card ul { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.opx-topic-card li { border-top: 1px solid #edf2f7; padding-top: 8px; }
.opx-topic-card li b { display: block; color: #111827; font-size: .82rem; }
.opx-topic-card li span { display: block; color: #64748b; font-size: .72rem; font-weight: 850; }
.opx-topic-card li p { margin: 3px 0 0; color: #334155; font-size: .8rem; line-height: 1.35; }
@media (max-width: 760px) { .opx-topic-pulse { padding: 13px; border-radius: 20px; } .opx-topic-pulse > header { display: grid; gap: 7px; } .opx-topic-pulse > header p { display: none; } .opx-topic-pulse-list { grid-template-columns: 1fr; } .opx-topic-card { padding: 10px; border-radius: 15px; } }

/* v264 - Resumen completo: pulso de tendencias y limpieza de ayuda inferior */
.core-scroll-hint,
.core-scroll-dot {
  display: none !important;
}

.opx-topic-pulse {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 26px;
  border: 1px solid rgba(125, 211, 252, .22);
  background:
    radial-gradient(circle at 8% 0%, rgba(56, 189, 248, .20), transparent 34%),
    radial-gradient(circle at 100% 16%, rgba(34, 197, 94, .16), transparent 30%),
    linear-gradient(135deg, #111827 0%, #082f49 54%, #063b3f 100%);
  color: #f8fafc;
  box-shadow: 0 24px 50px rgba(15, 23, 42, .22);
  overflow: hidden;
}
.opx-topic-pulse > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.opx-topic-pulse > header span {
  display: block;
  color: #7dd3fc;
  font-size: .72rem;
  font-weight: 1000;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.opx-topic-pulse > header h2 {
  margin: 4px 0 3px;
  color: #fff;
  font-size: clamp(1.18rem, 2vw, 1.65rem);
  line-height: 1.05;
}
.opx-topic-pulse > header p {
  margin: 0;
  color: rgba(226, 232, 240, .86);
  font-weight: 850;
}
.opx-topic-pulse > header strong {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(103, 232, 249, .14);
  border: 1px solid rgba(125, 211, 252, .22);
  color: #67e8f9;
  font-size: .82rem;
  white-space: nowrap;
}
.opx-topic-pulse-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: min(72vh, 690px);
  overflow-y: auto;
  padding: 1px 4px 2px 0;
}
.opx-topic-card {
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 18px;
  background: rgba(15, 23, 42, .48);
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  color: #f8fafc;
}
.opx-topic-card[open] {
  background: rgba(15, 23, 42, .62);
  border-color: rgba(103, 232, 249, .30);
}
.opx-topic-card summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  list-style: none;
}
.opx-topic-card summary::-webkit-details-marker { display: none; }
.opx-topic-head-copy span,
.opx-topic-card summary span {
  display: block;
  color: #93c5fd;
  font-size: .66rem;
  font-weight: 1000;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.opx-topic-head-copy b,
.opx-topic-card summary b {
  display: block;
  margin-top: 2px;
  color: #fff;
  font-size: 1rem;
  line-height: 1.12;
  white-space: normal;
  overflow-wrap: anywhere;
}
.opx-topic-head-copy small,
.opx-topic-card summary small {
  display: block;
  margin-top: 3px;
  color: rgba(203, 213, 225, .86);
  font-weight: 850;
}
.opx-topic-card summary strong {
  display: grid;
  place-items: center;
  min-width: 58px;
  padding: 7px 8px;
  border-radius: 16px;
  background: rgba(34, 211, 238, .12);
  border: 1px solid rgba(125, 211, 252, .18);
  color: #67e8f9;
  text-align: center;
}
.opx-topic-card summary strong b {
  color: #67e8f9;
  font-size: 1.08rem;
  line-height: 1;
}
.opx-topic-card summary strong small {
  margin-top: 2px;
  color: rgba(226, 232, 240, .72);
  font-size: .58rem;
  text-transform: uppercase;
}
.opx-topic-meter,
.opx-topic-card > i {
  display: block;
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, .22);
}
.opx-topic-meter i,
.opx-topic-card > i em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #22c55e);
}
.opx-topic-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.opx-topic-stats span {
  min-width: 0;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255,255,255,.07);
}
.opx-topic-stats b { color: #fff; font-size: 1rem; line-height: 1; }
.opx-topic-stats small { display: block; margin-top: 2px; color: rgba(203,213,225,.80); font-size: .66rem; font-weight: 850; }
.opx-topic-card ul {
  display: grid;
  gap: 9px;
  max-height: 280px;
  overflow-y: auto;
  margin: 10px 0 0;
  padding: 0 4px 0 0;
  list-style: none;
}
.opx-topic-card li {
  border-top: 1px solid rgba(148, 163, 184, .18);
  padding-top: 9px;
}
.opx-topic-card li b {
  display: block;
  color: #fff;
  font-size: .84rem;
  white-space: normal;
  overflow-wrap: anywhere;
}
.opx-topic-card li span {
  display: block;
  color: #93c5fd;
  font-size: .72rem;
  font-weight: 850;
}
.opx-topic-card li p {
  display: block !important;
  margin: 4px 0 0;
  color: rgba(241, 245, 249, .92);
  font-size: .82rem;
  line-height: 1.38;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  -webkit-line-clamp: unset !important;
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  .opx-topic-pulse { padding: 14px; border-radius: 22px; }
  .opx-topic-pulse > header { display: grid; gap: 7px; }
  .opx-topic-pulse > header p { display: block; font-size: .82rem; line-height: 1.25; }
  .opx-topic-pulse-list { grid-template-columns: 1fr; max-height: 560px; }
  .opx-topic-card { padding: 11px; border-radius: 16px; }
  .opx-topic-card ul { max-height: 220px; }
}
/* v265 - Tendencias: permitir lectura completa de cada detalle */
.opx-topic-card[open] ul {
  max-height: min(52vh, 430px) !important;
  overflow-y: auto !important;
}
.opx-topic-card[open] li p {
  max-height: none !important;
  height: auto !important;
  white-space: normal !important;
  word-break: normal;
  overflow-wrap: break-word;
}
@media (max-width: 760px) {
  .opx-topic-card[open] ul {
    max-height: 360px !important;
  }
}