@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy:        #0b2545;
  --blue:        #1464a5;
  --blue-mid:    #1f7bc8;
  --blue-light:  #dbeeff;
  --blue-pale:   #f0f7ff;
  --accent:      #e8a020;
  --accent-pale: #fef3dc;
  --success:     #16a34a;
  --success-pale:#dcfce7;
  --danger:      #dc2626;
  --danger-pale: #fee2e2;
  --warn:        #d97706;
  --warn-pale:   #fef3c7;
  --neutral-50:  #f8fafc;
  --neutral-100: #f1f5f9;
  --neutral-200: #e2e8f0;
  --neutral-400: #94a3b8;
  --neutral-600: #475569;
  --neutral-700: #334155;
  --neutral-900: #0f172a;
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   18px;
  --shadow-card: 0 4px 24px rgba(11,37,69,0.09), 0 1px 4px rgba(11,37,69,0.05);
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--neutral-100);
  color: var(--neutral-900);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
  max-width: 100%;
  overflow-x: hidden;
}

button,
input,
select,
textarea,
a {
  -webkit-tap-highlight-color: rgba(20, 100, 165, 0.18);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(48, 111, 178, 0.36);
  outline-offset: 2px;
}

/* ── HEADER ─────────────────────────────────── */


/* ── PAGE WRAP ───────────────────────────────── */
.page-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 24px 60px;
}

/* ── LOGIN ───────────────────────────────────── */
.login-card {
  max-width: 420px;
  margin: 48px auto 0;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 44px 40px 40px;
  text-align: center;
}

.login-icon {
  width: 140px;        /* Ampliamos el ancho para logos rectangulares */
  height: auto;        /* Dejamos que el alto se adapte solo */
  background: none;    /* Quitamos el fondo azul pálido anterior */
  border-radius: 0;    /* Quitamos el círculo */
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px; /* Centrado y con margen hacia abajo */
}

.login-icon svg {
  width: 28px;
  height: 28px;
}

.login-card h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.login-sub {
  color: var(--neutral-600);
  font-size: 13px;
  margin-bottom: 28px;
}

.login-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-form label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--neutral-600);
}

.login-form input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--neutral-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--neutral-900);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.login-form input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(20,100,165,0.12);
}

.btn-full {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s;
  margin-top: 4px;
}

.btn-full:hover {
  background: var(--navy);
  transform: translateY(-1px);
}

.login-msg{
    margin-top:12px;
    min-height:20px;

    font-size:14px;
    font-weight:600;

    transition:.30s;
    opacity:1;
}

/* ── DASHBOARD WELCOME ───────────────────────── */
.welcome-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.page-tag {
  display: inline-block;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 50px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.welcome-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.02em;
}

.welcome-sub {
  color: var(--neutral-600);
  font-size: 13px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.role-badge {
  background: var(--accent-pale);
  color: var(--warn);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.btn-primary-lg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: white;
  border: none;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s, box-shadow 0.18s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-primary-lg:hover {
  background: var(--navy);
  box-shadow: 0 6px 18px rgba(11,37,69,0.22);
  transform: translateY(-1px);
}

/* ── DASHBOARD GRID ──────────────────────────── */
.dashboard-grid {
  display: block;
  width: 100%;
}

/* ── DASH CARD ───────────────────────────────── */
.dash-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border: 1px solid var(--neutral-200);
}

.dash-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--neutral-100);
  background: var(--neutral-50);
}

.dash-card-header h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.dash-card-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-card-icon svg {
  width: 18px;
  height: 18px;
}

.icon-blue {
  background: var(--blue-pale);
  color: var(--blue);
}

.icon-amber {
  background: var(--accent-pale);
  color: var(--warn);
}

.dash-card-body {
  padding: 20px 22px;
}

/* ── INFO GRID (empresa) ─────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.info-item--full {
  grid-column: 1 / -1;
}

.info-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--neutral-400);
}

.info-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--neutral-900);
}

/* ── SOLICITUDES ─────────────────────────────── */
.solicitud-activa-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--blue-pale);
  border: 1px solid var(--blue-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
}

.sol-activa-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--blue);
}

.sol-activa-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

.solicitudes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Cards de cada solicitud — el JS las genera con clase .solicitud */
.solicitud {
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: var(--neutral-50);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: box-shadow 0.15s;
}

.solicitud:hover {
  box-shadow: 0 4px 14px rgba(11,37,69,0.09);
}

.solicitud .estado {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-block;
  padding: 2px 10px;
  border-radius: 50px;
}

.solicitud .pendiente {
  background: var(--warn-pale);
  color: var(--warn);
}

.solicitud .aprobado {
  background: var(--success-pale);
  color: var(--success);
}

.solicitud .rechazado {
  background: var(--danger-pale);
  color: var(--danger);
}

/* ── EMPTY STATE ─────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 20px;
  color: var(--neutral-400);
  text-align: center;
}

.empty-state p {
  font-size: 13px;
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 780px) {
  .portal-header { padding: 0 16px; }
  .page-wrap { padding: 20px 12px 48px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .welcome-bar { flex-direction: column; align-items: flex-start; }
  .info-grid { grid-template-columns: 1fr; }
  .login-card { padding: 32px 24px 28px; }
}

.toast-container {
  position: fixed;
  top: 86px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  min-width: 300px;
  max-width: 420px;
  background: white;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(11,37,69,0.18);
  padding: 16px 18px;
  border-left: 5px solid var(--blue);
  animation: slideIn .25s ease;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warn); }

.toast-title {
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 3px;
}

.toast-msg {
  font-size: 13px;
  color: var(--neutral-600);
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

.loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.42);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-card {
  background: white;
  padding: 28px 34px;
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(11,37,69,0.25);
  text-align: center;
  min-width: 300px;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid var(--neutral-200);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto 14px;
}

.overlay-carga {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(11, 37, 69, 0.42);
  backdrop-filter: blur(3px);
}

.caja-carga {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid rgba(18, 52, 86, 0.12);
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(11, 37, 69, 0.22);
  padding: 28px;
  text-align: center;
}

.caja-carga.logo-loader-card {
  width: 240px;
  height: 240px;
  padding: 28px;
  display: grid;
  place-items: center;
}

.caja-carga h3 {
  margin: 10px 0 6px;
  color: var(--navy);
  font-size: 20px;
}

.caja-carga p {
  margin: 0;
  color: var(--neutral-600);
  line-height: 1.45;
}

.logo-spinner {
  width: 170px;
  height: 170px;
  border: 0;
  border-radius: 50%;
  animation: spin .95s linear infinite;
  margin: 0;
  display: grid;
  place-items: center;
  background: #fff;
  box-shadow: 0 14px 36px rgba(18, 52, 86, 0.16);
}

.logo-spinner img {
  width: 138px;
  height: 138px;
  object-fit: contain;
  display: block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.mini-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: white;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
  animation: spin .8s linear infinite;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.kpi-grid-bottom {
  width: 100%;
  max-width: 1280px;
  margin: 22px auto 0;
}

.kpi-card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(11,37,69,.08);
}

.kpi-card span {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.kpi-card strong {
  display: block;
  font-size: 30px;
  margin-top: 8px;
  color: #08213f;
}

.portal-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  width: 100%;
  max-width: 1280px;
  margin: 24px auto 0;
  background: white;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(11,37,69,.10);
  overflow: hidden;
}

.panel-mis-solicitudes {
  grid-column: 1 / -1;
  padding: 24px;
  border-bottom: 1px solid #e5e7eb;
  background: #ffffff;
}

.panel-mis-solicitudes-page {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(11,37,69,.10);
}

.mis-solicitudes-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.panel-establecimientos-solicitudes {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: white;
  box-shadow: 0 12px 40px rgba(11,37,69,.08);
  border-right: 1px solid #e5e7eb;
}

.panel-establecimientos-solicitudes h3,
.panel-establecimientos-solicitudes p {
  max-width: 760px;
}

#listaEstablecimientosSolicitudes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

#listaEstablecimientosSolicitudes .establecimiento-item {
  margin-bottom: 0;
  min-height: 92px;
}

.mis-solicitudes-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.mis-solicitudes-head h2 {
  margin: 0 0 4px;
  color: #08213f;
}

.mis-solicitudes-head p {
  color: #64748b;
  margin: 0;
}

.solicitudes-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.solicitudes-tabs button {
  min-height: 36px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
  padding: 0 14px;
  cursor: pointer;
}

.solicitudes-tabs button.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.solicitudes-filtros {
  display: grid;
  grid-template-columns: 150px 220px minmax(260px, 1fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.solicitudes-filtros label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.solicitudes-filtros select,
.solicitudes-filtros input {
  width: 100%;
  min-height: 40px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: white;
  color: #0f172a;
  padding: 0 12px;
  font: inherit;
}

.solicitudes-table-wrap,
.detalle-tabla-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.tabla-mis-solicitudes table,
.detalle-tabla {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.tabla-mis-solicitudes th,
.tabla-mis-solicitudes td,
.detalle-tabla th,
.detalle-tabla td {
  padding: 13px 14px;
  border-bottom: 1px solid #edf2f7;
  text-align: left;
  vertical-align: top;
}

.tabla-mis-solicitudes th,
.detalle-tabla th {
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.tabla-mis-solicitudes tr:last-child td,
.detalle-tabla tr:last-child td {
  border-bottom: 0;
}

.tipo-solicitud-chip,
.estado-chip,
.respuesta-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  padding: 0 9px;
  white-space: nowrap;
}

.tipo-inspeccion {
  background: #eff6ff;
  color: #1d4ed8;
}

.tipo-notificacion {
  background: #f0fdf4;
  color: #15803d;
}

.tipo-inclusion {
  background: #fefce8;
  color: #a16207;
}

.estado-chip.muted {
  background: #f1f5f9;
  color: #64748b;
}

.estado-chip.success,
.respuesta-chip.si {
  background: #dcfce7;
  color: #15803d;
}

.estado-chip.warning {
  background: #fef3c7;
  color: #b45309;
}

.estado-chip.info,
.respuesta-chip.no {
  background: #eff6ff;
  color: #1d4ed8;
}

.estado-chip.danger {
  background: #fee2e2;
  color: #b91c1c;
}

.btn-table-action {
  min-height: 34px;
  border: 1px solid #2563eb;
  border-radius: 8px;
  background: white;
  color: #2563eb;
  font-weight: 800;
  padding: 0 12px;
  cursor: pointer;
  white-space: nowrap;
}

.acciones-solicitud-tabla {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 220px;
}

.btn-draft-action {
  border-color: #0f766e;
  color: #0f766e;
}

.draft-countdown {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #fff7ed;
  color: #9a3412;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 900;
}

.draft-countdown.expired {
  border-color: var(--neutral-200);
  background: var(--neutral-100);
  color: var(--neutral-500);
}

.detalle-bloque {
  margin-top: 18px;
}

.detalle-bloque h3 {
  color: #08213f;
  margin: 0 0 10px;
}

.muted-text {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}

.panel-establecimientos {
  border-right: 1px solid #e5e7eb;
  padding: 22px;
}

.establecimiento-item {
  padding: 16px;
  border-radius: 14px;
  background: #f8fafc;
  margin-bottom: 12px;
  cursor: pointer;
  border: 1px solid #e5e7eb;
}

.establecimiento-item:hover {
  background: #eff6ff;
  border-color: #60a5fa;
}

.establecimiento-item strong,
.establecimiento-item span,
.establecimiento-item small {
  display: block;
}

.panel-detalle {
  padding: 28px;
  min-width: 0;
}

.detalle-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.detalle-head--simple {
  margin-top: 22px;
}

.tipo-solicitud-flow-section {
  border: 1px solid #dbe7f3;
  border-radius: 14px;
  background: #fff;
  padding: 18px;
  margin: 0 0 18px;
  box-shadow: 0 12px 30px rgba(11,37,69,.07);
}

.tipo-solicitud-title-row {
  margin-bottom: 14px;
}

.tipo-solicitud-title-row h3 {
  margin: 0 0 4px;
  color: #0b2545;
  font-size: 18px;
}

.tipo-solicitud-title-row p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.tipo-solicitud-dropdown {
  display: block;
  width: 100%;
}

.tipo-solicitud-select-btn {
  width: 100%;
  min-height: 52px;
  justify-content: space-between;
  text-align: left;
  border-radius: 10px;
  padding: 0 18px;
}

.tipo-solicitud-menu {
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  min-width: 100%;
  max-width: 100%;
}

.detalle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.detalle-grid span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.detalle-grid strong {
  display: block;
  margin-top: 5px;
  color: #0f172a;
}

.estado-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: #fef3c7;
  color: #b45309;
  font-size: 12px;
  font-weight: 800;
}

.estado-pill.activo {
  background: #dcfce7;
  color: #15803d;
}

.solicitud-pro-card {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 1fr) 210px;
  gap: 18px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 18px;
  margin-top: 14px;
  background: #fff;
}

.acciones-solicitud {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.acciones-solicitud button {
  height: 36px;
  border-radius: 9px;
  border: 1px solid #2563eb;
  background: white;
  color: #2563eb;
  font-weight: 700;
  cursor: pointer;
}

.acciones-solicitud button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.sol-action-summary {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.sol-action-note {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 9px 10px;
}

.sol-action-note span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 4px;
}

.sol-action-note strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.25;
}

.sol-action-timer {
  border-color: #fed7aa;
  background: #fff7ed;
}

.sol-action-timer strong {
  color: #9a3412;
  font-variant-numeric: tabular-nums;
  letter-spacing: .03em;
}

.sol-draft-timer.expired {
  color: #64748b;
}

.btn-danger-outline {
  border-color: #dc2626 !important;
  color: #dc2626 !important;
}

.btn-purple-outline {
  border-color: #7c3aed !important;
  color: #7c3aed !important;
}

.empty-solicitudes,
.new-request-box {
  border: 2px dashed #93c5fd;
  border-radius: 16px;
  text-align: center;
  padding: 24px;
  margin-top: 22px;
  background: #f8fbff;
}

@media (max-width: 900px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .portal-layout {
    grid-template-columns: 1fr;
  }

  .mis-solicitudes-layout {
    grid-template-columns: 1fr;
  }

  .solicitudes-filtros {
    grid-template-columns: 1fr;
  }

  .detalle-grid,
  .solicitud-pro-card {
    grid-template-columns: 1fr;
  }
}

.establecimiento-item.active {
  background: #eff6ff;
  border-color: #2563eb;
  box-shadow: inset 0 3px 0 #2563eb;
}

.establecimiento-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  position: relative;
}

.est-icon {
  width: 38px;
  height: 38px;
  background: #eff6ff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.est-info strong,
.est-info span,
.est-info small {
  display: block;
}

.est-status {
  grid-column: 2;
  margin-top: 8px;
}

.mini-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 999px;
}

.mini-badge.warning {
  background: #fef3c7;
  color: #b45309;
}

.mini-badge.success {
  background: #dcfce7;
  color: #15803d;
}

.mini-badge.muted {
  background: #f1f5f9;
  color: #64748b;
}

.detalle-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-primary-lg:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: white;
  color: #7c3aed;
  border: 1px solid #7c3aed;
  padding: 12px 18px;
  border-radius: 8px;
  font-weight: 800;
  cursor: pointer;
}

.alert-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-weight: 700;
}

.detalle-info-card {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
}

.alcance-card {
  margin: 0 0 18px;
}

.alcance-card small {
  display: block;
  color: #64748b;
  margin-top: 8px;
  line-height: 1.45;
}

.alcance-selector {
  width: min(260px, 100%);
  margin-top: 8px;
  font-weight: 800;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 18px 0 10px;
}

.section-title-row span {
  color: #64748b;
  font-weight: 700;
  font-size: 12px;
}

.sol-main {
  display: flex;
  gap: 12px;
}

.sol-icon {
  width: 38px;
  height: 38px;
  background: #eff6ff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sol-metrics {
  display: grid;
  gap: 12px;
}

.sol-metrics span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.sol-metrics strong {
  font-size: 18px;
  color: #0f172a;
}

.empty-icon {
  font-size: 34px;
  margin-bottom: 8px;
}

.acciones-dropdown {
  position: relative;
  display: inline-block;
}

.acciones-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 48px;
  min-width: 260px;
  max-width: min(360px, calc(100vw - 24px));
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(11,37,69,.18);
  padding: 8px;
  z-index: 50;
}

.acciones-menu.show {
  display: block;
}

.acciones-menu button {
  width: 100%;
  text-align: left;
  border: none;
  background: white;
  padding: 12px 14px;
  min-height: 44px;
  border-radius: 10px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
}

.acciones-menu button:hover {
  background: #eff6ff;
  color: #1464a5;
}

.acciones-menu button:disabled {
  opacity: .45;
  cursor: not-allowed;
  background: #f8fafc;
  color: #64748b;
}


/* ── TOPBAR BLANCA (logo) ─────────────────────────── */
.topbar-white{
    background:#fff;
    height:120px;
    display:flex;
    align-items:center;
    border-top:35px solid var(--navy);   /* ← esta será la nueva franja superior */
    box-shadow:0 2px 10px rgba(0,0,0,.08);
}

.topbar-inner{
    width:100%;
    max-width:1400px;
    margin:auto;
    padding:0 40px;
}

/* ── PORTAL HEADER ───────────────────────────────── */
.portal-header {
  background: var(--navy);
  border-bottom: 3px solid var(--accent);
  padding: 0 40px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 56px;
  position: relative !important;
  top: auto !important;
  z-index: 100;
}

.header-logo-img img{
    height:80px;      /* antes seguramente está entre 40 y 60 */
    width:auto;
    display:block;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.70);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
  color: white;
  background: rgba(255,255,255,0.08);
}

.nav-link--active {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  border-radius: 0;
}

.nav-link--active:hover {
  background: none;
}

.header-user-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid rgba(255,255,255,0.15);
}

.header-avatar {
  width: 30px;
  height: 30px;
  background: var(--blue-mid);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.header-username {
  color: white;
  font-size: 13px;
  font-weight: 500;
}

.btn-logout {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.75);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-logout:hover {
  background: rgba(220,38,38,0.25);
  color: #fca5a5;
  border-color: rgba(220,38,38,0.4);
  box-shadow: none;
  transform: none;
}

/* ── PORTAL FOOTER ───────────────────────────────── */
.portal-footer {
  background: var(--navy);
  border-top: 3px solid var(--accent);
  margin-top: 48px;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
  opacity: 0.95;
}

.footer-tagline {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: white;
  letter-spacing: 0.02em;
}

.footer-info {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-info span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.60);
  font-size: 12px;
  font-weight: 500;
}

.footer-info svg {
  color: var(--accent);
  flex-shrink: 0;
}

/* ajuste: el dashboard-content no necesita padding-top porque el header ya es sticky */
.dashboard-content {
  padding-top: 32px;
}

@media (max-width: 720px) {
  .topbar-white { padding: 0 16px; height: 64px; }
  .portal-header { padding: 0 16px; height: 52px; top: 64px; }
  .header-nav { width: 100%; justify-content: space-between; gap: 8px; }
  .header-user-wrap { margin-left: 8px; padding-left: 8px; gap: 8px; }
  .btn-logout { min-height: 40px; padding: 7px 10px; }
  .acciones-dropdown { width: 100%; }
  .acciones-dropdown > .btn-primary-lg { width: 100%; }
  .acciones-menu {
    left: 0;
    right: auto;
    width: min(100%, calc(100vw - 32px));
    min-width: 0;
  }
  .header-username { display: none; }
  .nav-link span { display: none; }
  .footer-inner { padding: 20px 16px; flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer-info { gap: 12px; }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 37, 69, 0.58);
  backdrop-filter: blur(4px);
  padding: 18px;
}

.modal-card {
  width: min(560px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  padding: 22px;
  overscroll-behavior: contain;
}

.modal-card-lg {
  width: min(860px, 100%);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-head button {
  min-width: 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 0;
  background: var(--neutral-100);
  color: var(--navy);
}

.detalle-readonly-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.detalle-readonly-grid div {
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  background: var(--neutral-50);
  padding: 12px;
}

.detalle-readonly-grid span {
  display: block;
  color: var(--neutral-600);
  font-size: 12px;
  margin-bottom: 4px;
}

.detalle-readonly-grid strong {
  color: var(--navy);
  font-size: 14px;
}

.modal-card textarea {
  width: 100%;
  resize: vertical;
}

.detalle-solicitud-readonly {
  display: grid;
  gap: 18px;
}

.detalle-form-section {
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-md);
  background: white;
  padding: 16px;
}

.detalle-form-section h3 {
  margin-bottom: 14px;
  color: var(--navy);
  font-size: 15px;
}

.detalle-form-grid {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 12px 16px;
}

.detalle-field {
  display: contents;
}

.detalle-field span {
  align-self: center;
  color: var(--neutral-700);
  font-size: 13px;
  font-weight: 800;
}

.detalle-field input,
.detalle-field textarea {
  width: 100%;
  border: 1px solid var(--neutral-200);
  border-radius: var(--radius-sm);
  background: var(--neutral-50);
  color: var(--navy);
  padding: 10px 12px;
  font: inherit;
}

.detalle-field textarea {
  resize: none;
  line-height: 1.45;
  white-space: pre-wrap;
}

.detalle-field-full span,
.detalle-field-full textarea {
  grid-column: 1 / -1;
}

.detalle-field-full {
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
}

.btn-inline {
  width: auto;
  margin: 8px 0 14px;
}

.acciones .btn-primary-lg,
.acciones .btn-secondary-lg {
  justify-content: center;
  min-width: 150px;
}

.btn-secondary-lg:hover {
  background: #f5f3ff;
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.14);
  transform: translateY(-1px);
}

.draft-status-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 2200;
  max-width: min(360px, calc(100vw - 32px));
  border: 1px solid #bbf7d0;
  border-left: 5px solid var(--success);
  border-radius: var(--radius-md);
  background: #f0fdf4;
  color: #14532d;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 800;
}

.draft-status-toast.warning {
  border-color: #fde68a;
  border-left-color: var(--warn);
  background: #fffbeb;
  color: #78350f;
}

.draft-status-toast[hidden] {
  display: none;
}

@media (max-width: 720px) {
  .modal-overlay {
    align-items: flex-start;
    padding: 12px;
    overflow-y: auto;
  }

  .modal-card,
  .modal-card-lg {
    width: 100%;
    max-height: none;
    padding: 18px;
  }

  .mis-solicitudes-head {
    flex-direction: column;
    align-items: stretch;
  }

  .solicitudes-filtros {
    grid-template-columns: 1fr;
  }

  .detalle-form-grid {
    grid-template-columns: 1fr;
  }

  .detalle-field {
    display: grid;
    gap: 6px;
  }
}

