:root {
  --color-primario: #1c3f60;
  --color-primario-osc: #142c44;
  --color-acento: #2f6f4e;
  --color-fondo: #f4f6f8;
  --sidebar-ancho: 250px;
}

body {
  background-color: var(--color-fondo);
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-ancho);
  min-width: var(--sidebar-ancho);
  background-color: var(--color-primario);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 1.1rem 1.1rem;
  font-weight: 600;
  font-size: 1rem;
  border-bottom: 1px solid rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.sidebar-nav {
  padding: .5rem 0;
}

.sidebar-nav .nav-link {
  color: rgba(255,255,255,.85);
  padding: .55rem 1.1rem;
  border-left: 3px solid transparent;
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .92rem;
}

.sidebar-nav .nav-link:hover {
  background-color: rgba(255,255,255,.08);
  color: #fff;
}

.sidebar-nav .nav-link.active {
  background-color: rgba(255,255,255,.14);
  border-left-color: var(--color-acento);
  color: #fff;
  font-weight: 600;
}

.sidebar-section {
  padding: 1rem 1.1rem .3rem;
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .05em;
  color: rgba(255,255,255,.55);
}

.main-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid #dee2e6;
  padding: .65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}

.content {
  padding: 1.5rem;
  flex: 1;
}

.flash-container {
  margin-bottom: 1rem;
}

.card-panel {
  background: #fff;
  border: 1px solid #e3e6ea;
  border-radius: .5rem;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.badge-estado {
  font-size: .78rem;
  padding: .4em .7em;
}

.circuito-visual {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}

.circuito-paso {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem .8rem;
  border-radius: 999px;
  border: 1px solid #dee2e6;
  font-size: .85rem;
  background: #fff;
}

.circuito-paso.completado {
  background: #eaf5ee;
  border-color: #bfe3cc;
  color: #1f6b3b;
}

.circuito-paso.en-curso {
  background: #1c3f60;
  border-color: #1c3f60;
  color: #fff;
  font-weight: 600;
}

.circuito-paso.observado {
  background: #fff3cd;
  border-color: #ffe08a;
  color: #7a5b00;
}

.circuito-paso.rechazado {
  background: #f8d7da;
  border-color: #f1aeb5;
  color: #842029;
}

.circuito-paso.pendiente {
  color: #6c757d;
}

.circuito-flecha {
  color: #adb5bd;
}

.timeline-item {
  border-left: 2px solid #dee2e6;
  padding-left: 1rem;
  padding-bottom: 1.1rem;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primario);
}

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primario) 0%, var(--color-primario-osc) 100%);
  padding: 1rem;
}

.login-card {
  background: #fff;
  border-radius: .6rem;
  padding: 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -260px;
    transition: left .2s ease;
    z-index: 1050;
  }
  .sidebar.abierto {
    left: 0;
  }
}

/* ------------------------------------------------------------ */
/* Notificaciones flotantes (abajo a la derecha)                 */
/* ------------------------------------------------------------ */

.toast-notif-container {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1080;
  width: 300px;
  max-width: calc(100vw - 2rem);
  max-height: 70vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.toast-notif {
  background: #fff;
  border: 1px solid #dee2e6;
  border-left: 4px solid var(--color-primario);
  border-radius: .5rem;
  box-shadow: 0 6px 18px rgba(20,44,68,.15);
  overflow: hidden;
}

.toast-notif-mensaje {
  border-left-color: var(--color-primario);
}

.toast-notif-por-vencer {
  border-left-color: #d9a441;
}

.toast-notif-vencido {
  border-left-color: #c0392b;
}

.toast-notif summary {
  list-style: none;
  cursor: pointer;
  padding: .7rem .9rem;
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .88rem;
  font-weight: 600;
  color: #2b2f33;
}

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

.toast-notif-mensaje summary i {
  color: var(--color-primario);
}

.toast-notif-por-vencer summary i {
  color: #a9720c;
}

.toast-notif-vencido summary i {
  color: #c0392b;
}

.toast-notif-titulo {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast-notif[open] .toast-notif-titulo {
  white-space: normal;
}

.toast-notif-body {
  padding: 0 .9rem .9rem;
  font-size: .85rem;
  color: #495057;
  border-top: 1px solid #f1f3f5;
  padding-top: .6rem;
}

.toast-notif-meta {
  font-size: .76rem;
  color: #868e96;
}

@media (max-width: 480px) {
  .toast-notif-container {
    right: .75rem;
    left: .75rem;
    bottom: .75rem;
    width: auto;
  }
}

/* ------------------------------------------------------------ */
/* Landing pública                                               */
/* ------------------------------------------------------------ */

.landing-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primario) 0%, var(--color-primario-osc) 100%);
  padding: 2rem 1rem;
}

.landing-hero {
  max-width: 640px;
  color: #fff;
}

.landing-hero-icon {
  font-size: 2.6rem;
  opacity: .9;
}

.landing-hero-badge {
  display: inline-block;
  margin-top: 1rem;
  padding: .3rem .9rem;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: rgba(255,255,255,.85);
}

.landing-hero-title {
  margin-top: 1.1rem;
  font-weight: 700;
  font-size: 2.1rem;
}

.landing-hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255,255,255,.85);
  margin-bottom: 1rem;
}

.landing-hero-desc {
  color: rgba(255,255,255,.8);
  font-size: 1rem;
  margin-bottom: 2rem;
}

.landing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  justify-content: center;
}

.landing-btn {
  min-width: 220px;
  font-weight: 600;
}

/* ------------------------------------------------------------ */
/* Propuesta comercial                                           */
/* ------------------------------------------------------------ */

.propuesta-topbar {
  background: #fff;
  border-bottom: 1px solid #dee2e6;
  padding: .75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.propuesta-wrapper {
  background: var(--color-fondo);
  min-height: 100vh;
  padding: 2rem 1rem 4rem;
}

.propuesta-doc {
  max-width: 860px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #e3e6ea;
  border-radius: .75rem;
  padding: 0 0 2.5rem;
  box-shadow: 0 10px 30px rgba(20,44,68,.09);
  overflow: hidden;
}

.propuesta-doc-body {
  padding: 0 2.5rem;
}

.propuesta-doc-header {
  text-align: center;
  padding: 2.75rem 2.5rem 2.25rem;
  margin-bottom: 2.25rem;
  background:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,.10) 0, transparent 45%),
    linear-gradient(135deg, var(--color-primario) 0%, var(--color-primario-osc) 55%, #123322 100%);
  color: #fff;
  position: relative;
}

.propuesta-doc-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 6px;
  background: linear-gradient(90deg, var(--color-acento), #d9a441, var(--color-primario));
}

.propuesta-doc-header .eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .76rem;
  color: #fff;
  font-weight: 600;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  padding: .3rem 1rem;
}

.propuesta-doc-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  margin: 1rem 0 .35rem;
  letter-spacing: -.01em;
}

.propuesta-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .6rem;
  font-size: .84rem;
  color: rgba(255,255,255,.9);
  margin-top: 1.25rem;
}

.propuesta-meta div {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  padding: .3rem .9rem;
}

.propuesta-meta strong {
  color: #fff;
  font-weight: 600;
}

.propuesta-seccion {
  margin-bottom: 2.4rem;
}

.propuesta-seccion h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primario-osc);
  display: flex;
  align-items: center;
  gap: .7rem;
  border-bottom: 1px solid #e3e6ea;
  padding-bottom: .65rem;
  margin-bottom: 1.15rem;
}

.propuesta-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  flex-shrink: 0;
  border-radius: .55rem;
  color: #fff;
  font-size: 1rem;
  background: linear-gradient(135deg, var(--color-primario), var(--color-primario-osc));
  box-shadow: 0 3px 8px rgba(20,44,68,.25);
}

.propuesta-icon-badge.acento {
  background: linear-gradient(135deg, var(--color-acento), #1f6b3b);
  box-shadow: 0 3px 8px rgba(47,111,78,.28);
}

.propuesta-icon-badge.oro {
  background: linear-gradient(135deg, #d9a441, #a9720c);
  box-shadow: 0 3px 8px rgba(169,114,12,.3);
}

.propuesta-icon-badge.slate {
  background: linear-gradient(135deg, #4a6178, #2b3a49);
  box-shadow: 0 3px 8px rgba(43,58,73,.28);
}

.propuesta-subseccion {
  margin-bottom: 1.5rem;
  padding-left: 1rem;
  border-left: 3px solid #eef1f4;
}

.propuesta-subseccion:hover {
  border-left-color: var(--color-acento);
}

.propuesta-subseccion h3 {
  font-size: .98rem;
  font-weight: 600;
  color: #2b2f33;
  margin-bottom: .5rem;
}

.propuesta-subseccion ul {
  margin-bottom: .5rem;
}

.propuesta-subseccion li {
  margin-bottom: .3rem;
}

.propuesta-subseccion li::marker {
  color: var(--color-acento);
}

.propuesta-flujo {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--color-primario-osc);
  background: linear-gradient(135deg, #eef4f0 0%, #eef2f6 100%);
  border: 1px solid #e3e6ea;
  border-radius: .6rem;
  padding: 1.1rem;
  margin: 1rem 0;
  text-align: center;
}

.propuesta-flujo span:not(.separador) {
  background: #fff;
  border: 1px solid #dfe6ea;
  border-radius: 999px;
  padding: .3rem .85rem;
  font-size: .92rem;
}

.propuesta-flujo .separador {
  color: var(--color-acento);
  font-weight: 700;
}

.propuesta-seccion-inversion {
  background: linear-gradient(160deg, #fdf8ee 0%, #fff 55%);
  border: 1px solid #f0e2bd;
  border-radius: .75rem;
  padding: 2rem;
  margin: 0 -1px 2.4rem;
}

.propuesta-inversion {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 1.25rem 0;
}

@media (max-width: 640px) {
  .propuesta-inversion {
    grid-template-columns: 1fr;
  }
}

.propuesta-precio-card {
  border: 1px solid #e3e6ea;
  border-radius: .65rem;
  padding: 1.6rem;
  background: #fff;
  position: relative;
}

.propuesta-precio-card .icono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: rgba(47,111,78,.12);
  color: var(--color-acento);
  font-size: 1.05rem;
  margin-bottom: .75rem;
}

.propuesta-precio-card.destacado {
  background: linear-gradient(160deg, #d9a441 0%, #a9720c 100%);
  color: #fff;
  border-color: #a9720c;
  box-shadow: 0 8px 22px rgba(169,114,12,.25);
}

.propuesta-precio-card.destacado .icono {
  background: rgba(255,255,255,.2);
  color: #fff;
}

.propuesta-precio-card .label {
  text-transform: uppercase;
  font-size: .75rem;
  letter-spacing: .05em;
  opacity: .85;
  font-weight: 600;
}

.propuesta-precio-card .monto {
  font-size: 2rem;
  font-weight: 700;
  margin: .35rem 0 .15rem;
}

.propuesta-precio-card .monto-detalle {
  font-size: .85rem;
  opacity: .85;
}

.propuesta-precio-card .monto-iva {
  font-size: .74rem;
  opacity: .7;
  font-style: italic;
  margin-top: .15rem;
}

.propuesta-precio-card .monto-nota {
  display: flex;
  align-items: flex-start;
  gap: .4rem;
  font-size: .8rem;
  color: var(--color-acento);
  background: rgba(47,111,78,.08);
  border: 1px solid rgba(47,111,78,.18);
  border-radius: .4rem;
  padding: .5rem .65rem;
  margin-top: .9rem;
}

.propuesta-precio-card.destacado .monto-nota {
  color: #fff;
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.3);
}

.propuesta-firma {
  text-align: center;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px dashed #dfe3e7;
}

.propuesta-firma strong {
  display: block;
  color: var(--color-primario-osc);
  font-size: 1.05rem;
}

.propuesta-cta {
  max-width: 860px;
  margin: 2rem auto 0;
  text-align: center;
}

@media print {
  .propuesta-topbar, .propuesta-cta, .no-print {
    display: none !important;
  }
  .propuesta-wrapper {
    background: #fff;
    padding: 0;
  }
  .propuesta-doc {
    box-shadow: none;
    border: none;
    max-width: 100%;
  }
  .propuesta-doc-header, .propuesta-precio-card.destacado, .propuesta-icon-badge {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
