/* ==========================================================================
   Variables de diseño UNCUYO + reset básico
   ========================================================================== */

:root {
  /* Paleta institucional basada en manual de marca UNCUYO */
  --color-primary: #004073;      /* Pantone 2955 C aproximado */
  --color-primary-soft: #e4edf6;
  --color-accent: #980000;       /* Pantone 7427 C aproximado */
  --color-gold: #bfa666;         /* Pantone 465 C aproximado */

  --color-bg: #f4f5f7;
  --color-surface: #ffffff;
  --color-surface-alt: #f9fafb;
  --color-border-subtle: #e1e5ec;
  --color-border-strong: #c2c7d0;

  --color-text-main: #1f2933;
  --color-text-soft: #6b7280;
  --color-text-muted: #9ca3af;
  --color-text-on-primary: #ffffff;

  --shadow-soft: 0 14px 30px rgba(15, 23, 42, 0.08);
  --shadow-elevated: 0 18px 45px rgba(15, 23, 42, 0.12);

  --radius-sm: 0.375rem;        /* 6px */
  --radius-md: 0.75rem;         /* 12px */
  --radius-lg: 1.5rem;          /* 24px */
  --radius-pill: 999px;

  --font-sans: "Frutiger", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;

  --transition-fast: 150ms ease-out;
  --transition-normal: 220ms ease-out;

  --nav-height: 64px;
  --dashboard-width: 380px;
}

/* Reset tipográfico y de caja */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--color-text-main);
  background: radial-gradient(circle at top left, #f1f5f9 0, #e5eaef 30%, #f4f5f7 70%);
  min-height: 100vh;
}

/* Links y tipografía básica */

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: #002f54;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #111827;
}

p {
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

strong {
  font-weight: 600;
}

/* Utilidades de accesibilidad */

.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;
}

/* ==========================================================================
   Layout general compartido (form.html & index.html)
   ========================================================================== */

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-shell__header {
  height: var(--nav-height);
  background: linear-gradient(90deg, var(--color-primary) 0%, #002f54 55%, #001a32 100%);
  color: var(--color-text-on-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.4);
  position: sticky;
  top: 0;
  z-index: 40;
}

.app-shell__brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.app-shell__brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  overflow: hidden;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-shell__brand-logo img {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

.app-shell__brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.app-shell__brand-line1 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  opacity: 0.9;
}

.app-shell__brand-line2 {
  font-size: 0.95rem;
  font-weight: 600;
}

.app-shell__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  opacity: 0.92;
}

.app-shell__badge {
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(15, 23, 42, 0.35);
}

.app-shell__main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 1.75rem 1.25rem 2.25rem;
}

.app-shell__content {
  width: 100%;
  max-width: 1120px;
}

/* Contenedores principales */

.surface-card {
  background: var(--color-surface);
  border-radius: 1.75rem;
  padding: 1.75rem 1.75rem 1.5rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(15, 23, 42, 0.04);
  position: relative;
}

.surface-card--flush {
  padding: 0;
  overflow: hidden;
}

.surface-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.surface-card__title-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.surface-card__eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-text-muted);
}

.surface-card__title {
  font-size: 1.5rem;
}

.surface-card__subtitle {
  font-size: 0.9rem;
  color: var(--color-text-soft);
  max-width: 560px;
}

.surface-card__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Chips y etiquetas */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  background: var(--color-primary-soft);
  color: #0b1f36;
}

.chip--neutral {
  background: #eef1f5;
  color: var(--color-text-soft);
}

.chip__dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--color-accent);
}

/* ==========================================================================
   Botones y controles
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: var(--color-text-main);
  transition:
    background-color var(--transition-normal),
    color var(--transition-normal),
    box-shadow var(--transition-normal),
    border-color var(--transition-normal),
    transform 80ms ease-out;
}

.btn:focus-visible {
  outline: 2px solid rgba(59, 130, 246, 0.9);
  outline-offset: 2px;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: linear-gradient(120deg, var(--color-primary) 0%, #002f54 55%, #001a32 100%);
  color: var(--color-text-on-primary);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
}

.btn--primary:hover {
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.4);
}

.btn--secondary {
  background: var(--color-surface-alt);
  color: var(--color-text-main);
  border-color: var(--color-border-subtle);
}

.btn--secondary:hover {
  background: #edf1f7;
  border-color: var(--color-border-strong);
}

.btn--ghost {
  padding-inline: 0.35rem;
  background: transparent;
  border-color: transparent;
  color: var(--color-text-soft);
}

.btn--ghost:hover {
  background: rgba(15, 23, 42, 0.04);
  color: var(--color-text-main);
}

.btn--pill {
  padding-block: 0.4rem;
  padding-inline: 0.9rem;
  font-size: 0.8rem;
}

.btn--danger {
  background: linear-gradient(120deg, #b91c1c, #7f1d1d);
  color: #fef2f2;
  box-shadow: 0 10px 28px rgba(127, 29, 29, 0.4);
}

/* Iconos dentro de botones (usados con SVG) */

.btn__icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

/* ==========================================================================
   Formularios (inputs, layout de campos)
   ========================================================================== */

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); //
  gap: 1.75rem;
}

.form-layout--single {
  grid-template-columns: minmax(0, 1fr);
}


/* px para pasar a móvil */
@media (max-width: 900px) {
  .form-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Columna de secciones del formulario */

.form-steps {
  border-radius: 1.25rem;
  background: linear-gradient(150deg, #f9fafb 0, #f3f4f6 40%, #eef1f7 100%);
  border: 1px solid rgba(15, 23, 42, 0.04);
  padding: 1.1rem 1.1rem;
  max-height: 580px;
  overflow: auto;
}

.form-steps__title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.form-steps__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.form-steps__item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.55rem 0.35rem;
  border-radius: 0.8rem;
  font-size: 0.85rem;
  color: var(--color-text-soft);
}

.form-steps__item--active {
  background: rgba(0, 64, 115, 0.06);
  color: var(--color-primary);
  font-weight: 500;
}

.form-steps__item-index {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  background: #e5edf7;
  color: #002f54;
}

.form-steps__item--active .form-steps__item-index {
  background: var(--color-primary);
  color: #ffffff;
}

/* Columna principal del formulario */

.form-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Bloques de sección de formulario */

.form-section {
  border-radius: 1.2rem;
  padding: 1.25rem 1.35rem 1.15rem;
  background: radial-gradient(circle at top left, #f9fafb 0, #ffffff 48%, #f7fafc 100%);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.form-section__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.form-section__title-group {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.form-section__eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--color-text-muted);
}

.form-section__title {
  font-size: 1.05rem;
}

.form-section__helper {
  font-size: 0.85rem;
  color: var(--color-text-soft);
  max-width: 440px;
}

.form-section__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

/* Grilla de campos */

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem 1.1rem;
}

.field-grid--single {
  grid-template-columns: minmax(0, 1fr);
}

.field-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .field-grid,
  .field-grid--three {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Field base */

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field--inline {
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

.field__label-row {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.field__label {
  font-size: 0.9rem;
  font-weight: 500;
}

.field__required {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.1rem 0.4rem;
  border-radius: 0.4rem;
  background: rgba(20, 83, 45, 0.06);
  color: #14532d; /* Green 900 */
  border: 1px solid rgba(22, 101, 52, 0.35); /* Green 800 con 35% de opacidad */
}

.field__optional {
  font-size: 0.75rem;
  padding: 0.1rem 0.4rem;
  border-radius: 0.4rem;
  background: rgba(148, 163, 184, 0.18);
  color: var(--color-text-muted);
  border: 1px dashed rgba(148, 163, 184, 0.7);
}

.field__hint {
  font-size: 0.8rem;
  color: var(--color-text-soft);
}

.field__definition {
  margin-top: 0.1rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  background: #f9fafb;
  border-radius: 0.6rem;
  padding: 0.4rem 0.6rem;
  border: 1px dashed rgba(209, 213, 219, 0.9);
}

/* Inputs base */

.input,
.textarea,
.select {
  width: 100%;
  border-radius: 0.7rem;
  border: 1px solid var(--color-border-subtle);
  padding: 0.55rem 0.7rem;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--color-text-main);
  background-color: #f9fafb;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast),
    transform 80ms ease-out;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--color-text-muted);
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.9);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.6);
  background-color: #ffffff;
}

.input--sm {
  padding-block: 0.4rem;
  font-size: 0.85rem;
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

/* Inputs compuestos (con ícono o prefijo) */

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper .input {
  padding-left: 2.05rem;
}

.input-wrapper__icon {
  position: absolute;
  left: 0.65rem;
  width: 1rem;
  height: 1rem;
  opacity: 0.55;
}

/* Select estilizado */

.select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.1rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--color-text-muted) 50%),
    linear-gradient(135deg, var(--color-text-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 1rem) 50%,
    calc(100% - 0.75rem) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

/* Radios y checkboxes */

.option-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.option-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-pill);
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  font-size: 0.85rem;
  cursor: pointer;
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.option-pill input {
  accent-color: var(--color-primary);
}

.option-pill:hover {
  background: #e5edf7;
  border-color: #cbd5f5;
}

.option-pill--selected {
  background: rgba(0, 64, 115, 0.06);
  border-color: var(--color-primary);
}

/* Mensajes de estado del campo */

.field__error {
  font-size: 0.75rem;
  color: #b91c1c;
}

.input--error,
.select--error,
.textarea--error {
  border-color: rgba(220, 38, 38, 0.9);
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.6);
}

/* Barra de progreso del formulario */

.form-progress {
  margin-top: 0.2rem;
  height: 0.35rem;
  border-radius: var(--radius-pill);
  background: #e5e7eb;
  overflow: hidden;
}

.form-progress__bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--color-primary) 0%, #26a69a 50%, #bfa666 100%);
  transition: width 260ms ease-out;
}

/* Pie del formulario */

.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed #e5e7eb;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.form-footer__note {
  font-size: 0.8rem;
  color: var(--color-text-soft);
}

/* ==========================================================================
   Index.html: listado de demandas + buscador + tabla
   ========================================================================== */

.layout-index {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Barra superior de filtros/buscador */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
}

.toolbar__left,
.toolbar__right {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

/* Buscador principal */

.search {
  position: relative;
  min-width: 260px;
}

.search__input {
  width: 100%;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-subtle);
  background: #f9fafb;
  padding: 0.6rem 2.2rem 0.6rem 2.3rem;
  font-size: 0.9rem;
  color: var(--color-text-main);
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}

.search__input::placeholder {
  color: var(--color-text-muted);
}

.search__input:focus {
  outline: none;
  border-color: rgba(59, 130, 246, 0.9);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.6);
  background: #ffffff;
}

.search__icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  opacity: 0.5;
}

.search__counter {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* Tabla de demandas */

.table-wrapper {
  border-radius: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.25);
  overflow: hidden;
  background: linear-gradient(180deg, #f9fafb 0, #ffffff 10%, #ffffff 100%);
  box-shadow: var(--shadow-soft);
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.86rem;
}

.table thead {
  background: #f3f4f6;
}

.table th,
.table td {
  padding: 0.6rem 0.9rem;
  text-align: left;
}

.table th {
  font-weight: 600;
  color: #374151;
  border-bottom: 1px solid var(--color-border-subtle);
  position: sticky;
  top: 0;
  z-index: 1;
}

.table tbody tr:nth-child(even) {
  background: #f9fafb;
}

.table tbody tr:hover {
  background: rgba(59, 130, 246, 0.05);
}

.table__cell--small {
  width: 6%;
  white-space: nowrap;
}

.table__cell--nowrap {
  white-space: nowrap;
}

.table__cell--muted {
  color: var(--color-text-soft);
}

/* Estado / prioridad de la demanda */

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.status-pill--alta {
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.45);
  color: #7f1d1d;
}

.status-pill--media {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(217, 119, 6, 0.55);
  color: #92400e;
}

.status-pill--baja {
  background: rgba(22, 163, 74, 0.06);
  border-color: rgba(21, 128, 61, 0.45);
  color: #166534;
}

/* Paginación (si se usa) */

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-top: 1px solid var(--color-border-subtle);
  background: #f9fafb;
  font-size: 0.8rem;
  color: var(--color-text-soft);
}

.pagination__pages {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* ==========================================================================
   Dashboard lateral (index.html)
   ========================================================================== */

.dashboard-toggle {
  position: fixed;
  right: 1.1rem;
  bottom: 1.3rem;
  z-index: 45;
}

.dashboard-toggle__btn {
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.35);
}

.dashboard {
  position: fixed;
  top: 0;
  right: 0;
  width: min(100%, var(--dashboard-width));
  max-width: 100%;
  height: 100vh;
  background: radial-gradient(circle at top left, #f9fafb 0, #ffffff 32%, #f3f4f6 100%);
  box-shadow: -18px 0 40px rgba(15, 23, 42, 0.4);
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  z-index: 60;
  display: flex;
  flex-direction: column;
}

.dashboard--open {
  transform: translateX(0);
}

.dashboard__header {
  padding: 1rem 1.2rem 0.75rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.dashboard__title-group {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.dashboard__title {
  font-size: 1rem;
}

.dashboard__subtitle {
  font-size: 0.8rem;
  color: var(--color-text-soft);
}

.dashboard__body {
  padding: 0.9rem 1.1rem 1.2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

/* KPI cards */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.kpi-card {
  border-radius: 0.9rem;
  padding: 0.6rem 0.7rem;
  background: #ffffff;
  border: 1px solid rgba(209, 213, 219, 0.9);
}

.kpi-card__label {
  font-size: 0.75rem;
  color: var(--color-text-soft);
}

.kpi-card__value {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 0.2rem;
}

.kpi-card__meta {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* Tarjetas de gráficos */

.chart-card {
  border-radius: 1rem;
  padding: 0.7rem 0.75rem 0.75rem;
  background: #ffffff;
  border: 1px solid rgba(209, 213, 219, 0.9);
}

.chart-card__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.chart-card__title {
  font-size: 0.85rem;
}

.chart-card__meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.chart-card__legend {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.2rem;
}

.chart-card__legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

.chart-card__legend-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--color-primary);
}

.chart-card__canvas {
  margin-top: 0.4rem;
  height: 160px;
}

/* Overlay cuando el dashboard está abierto */

.dashboard-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--transition-normal),
    visibility var(--transition-normal);
  z-index: 55;
}

.dashboard-overlay--visible {
  opacity: 1;
  visibility: visible;
}

/* ==========================================================================
   Avisos y etiquetas informativas
   ========================================================================== */

.banner {
  border-radius: 1rem;
  padding: 0.65rem 0.9rem;
  font-size: 0.8rem;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.banner--info {
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #1d4ed8;
}

.banner--success {
  background: rgba(22, 163, 74, 0.06);
  border: 1px solid rgba(22, 163, 74, 0.45);
  color: #166534;
}

.banner--warning {
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(217, 119, 6, 0.45);
  color: #92400e;
}

.banner__icon {
  width: 1rem;
  height: 1rem;
  margin-top: 0.1rem;
}

/* ==========================================================================
   Elementos de ayuda para el vinculador
   ========================================================================== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border-subtle);
  background: #f9fafb;
  color: var(--color-text-soft);
}

.badge--primary {
  border-color: rgba(0, 64, 115, 0.4);
  background: rgba(0, 64, 115, 0.06);
  color: #002f54;
}

.badge__dot {
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: var(--color-primary);
}

/* Tooltip simple para definiciones cortas */

.tooltip {
  position: relative;
  cursor: help;
}

.tooltip__bubble {
  position: absolute;
  bottom: calc(100% + 0.4rem);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.4rem 0.6rem;
  max-width: 220px;
  background: #111827;
  color: #f9fafb;
  font-size: 0.75rem;
  border-radius: 0.45rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--transition-fast),
    visibility var(--transition-fast),
    transform var(--transition-fast);
  z-index: 80;
}

.tooltip:hover .tooltip__bubble {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -2px);
}

/* ==========================================================================
   Toast / notificaciones breves
   ========================================================================== */

.toast-container {
  position: fixed;
  right: 1.3rem;
  top: calc(var(--nav-height) + 0.75rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 80;
}

.toast {
  min-width: 220px;
  max-width: 340px;
  background: #111827;
  color: #f9fafb;
  border-radius: 0.9rem;
  padding: 0.65rem 0.8rem;
  font-size: 0.8rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.65);
}

.toast__icon {
  width: 1rem;
  height: 1rem;
  margin-top: 0.15rem;
}

.toast__content {
  flex: 1;
}

.toast__title {
  font-weight: 500;
  margin-bottom: 0.1rem;
}

.toast__body {
  color: #d1d5db;
}

/* ==========================================================================
   Responsivo general
   ========================================================================== */

@media (max-width: 768px) {
  .app-shell__header {
    padding-inline: 0.9rem;
  }

  .app-shell__meta {
    display: none;
  }

  .surface-card {
    padding: 1.25rem 1.1rem;
    border-radius: 1.25rem;
  }

  .surface-card__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search {
    width: 100%;
  }

  .dashboard {
    width: 100%;
  }

  .dashboard-toggle {
    right: 0.9rem;
    bottom: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
