/* ============================================================
   PORTAL ICIA — STYLES.CSS
   Paleta: #353535 · #3C6E71 · #FFFFFF · #D9D9D9 · #284B63
   Tipografía: Syne (display) + Inter (cuerpo)
   ============================================================ */

/* ── VARIABLES ─────────────────────────────────────────────── */
:root {
  --c-dark:     #353535;
  --c-teal:     #3C6E71;
  --c-navy:     #284B63;
  --c-white:    #FFFFFF;
  --c-grey:     #D9D9D9;

  --c-bg:       #F7F8F9;
  --c-surface:  #FFFFFF;
  --c-border:   #E4E8EC;
  --c-border-2: #CDD4DC;
  --c-text:     #1C2B35;
  --c-text-mid: #3D5060;
  --c-text-soft:#6B7E8E;
  --c-muted:    #9BAEBB;

  --c-teal-light: rgba(60,110,113,0.08);
  --c-teal-mid:   rgba(60,110,113,0.15);
  --c-navy-light: rgba(40,75,99,0.08);

  --c-error:    #C0392B;
  --c-success:  #27AE60;
  --c-warn:     #E67E22;

  /* Status colors */
  --status-empty:    #CDD4DC;
  --status-partial:  #E67E22;
  --status-complete: #27AE60;

  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   16px;
  --r-xl:   20px;
  --r-pill: 100px;

  --shadow-xs: 0 1px 3px rgba(28,43,53,0.06);
  --shadow-sm: 0 2px 8px rgba(28,43,53,0.08);
  --shadow-md: 0 6px 24px rgba(28,43,53,0.10);
  --shadow-lg: 0 16px 48px rgba(28,43,53,0.14);

  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t:    all 0.2s var(--ease);

  --sidebar-w: 240px;
  --header-h:  60px;
}

/* ── RESET ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--font-body); }
input, select, textarea { font-family: var(--font-body); }

/* ── UTILITIES ─────────────────────────────────────────────── */
.hidden { display: none !important; }
.view { min-height: 100vh; }
.view.hidden { display: none !important; }
.view.active { display: block; }

/* ── SCROLLBAR ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--c-border-2); border-radius: 4px; }


/* ============================================================
   LOGIN VIEW
   ============================================================ */
#view-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  position: relative;
  background: var(--c-dark);
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
}

/* Grid background pattern */
.login-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.login-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}
.login-bg-glow {
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(60,110,113,0.25) 0%, transparent 70%);
}

.login-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}

.login-brand {
  width: 100%;
  display: flex;
  justify-content: center;
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--c-white);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.brand-tag {
  font-size: 11px;
  font-weight: 500;
  color: var(--c-teal);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-card {
  width: 100%;
  max-width: 340px;
  margin: 0 auto;
  background: var(--c-white);
  border-radius: var(--r-xl);
  padding: 28px 28px;
  box-shadow: var(--shadow-lg);
  animation: fadeUp 0.5s var(--ease) both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-card-top { margin-bottom: 16px; text-align: center; }
.login-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: var(--c-teal-light);
  color: var(--c-teal);
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.login-card-top .login-eyebrow {
  display: block;
  text-align: center;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}
.login-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  color: var(--c-text);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-transform: none;
  margin-bottom: 8px;
}
.login-subtitle {
  font-size: 13.5px;
  color: var(--c-text-soft);
  line-height: 1.5;
}

.login-form { display: flex; flex-direction: column; gap: 13px; }

/* ── Inputs generales ── */
.field-wrap { display: flex; flex-direction: column; gap: 5px; }
.field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--c-text-mid);
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 6px;
}
.field-desc {
  font-size: 12px;
  color: var(--c-text-soft);
  line-height: 1.5;
  margin-bottom: 4px;
}
.req { color: var(--c-teal); }

.input-box {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 13px;
  color: var(--c-muted);
  pointer-events: none;
  z-index: 1;
}
.field-input {
  width: 100%;
  height: 46px;
  padding: 0 44px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 14.5px;
  color: var(--c-text);
  background: var(--c-white);
  transition: var(--t);
  outline: none;
}
.field-input::placeholder { color: var(--c-muted); }
.field-input:focus {
  border-color: var(--c-teal);
  box-shadow: 0 0 0 3px rgba(60,110,113,0.12);
}
.field-input.error {
  border-color: var(--c-error);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.10);
}

/* Input sin icono (secciones del formulario) */
.sec-card .field-input {
  padding: 0 14px;
}

.toggle-pass {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: var(--c-muted);
  display: flex;
  align-items: center;
  padding: 4px;
  transition: var(--t);
}
.toggle-pass:hover { color: var(--c-teal); }

.login-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  background: rgba(192,57,43,0.07);
  border: 1px solid rgba(192,57,43,0.18);
  border-radius: var(--r-md);
  color: var(--c-error);
  font-size: 13px;
  animation: shake 0.4s ease;
}
@keyframes shake {
  0%,100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

.btn-login {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--c-teal);
  color: white;
  border: none;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: var(--t);
  margin-top: 4px;
}
.btn-login:hover {
  background: #2d5658;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(60,110,113,0.35);
}
.btn-login:active { transform: none; }
.btn-arrow { transition: var(--t); }
.btn-login:hover .btn-arrow { transform: translateX(3px); }

.btn-spinner, .btn-spinner-dark {
  width: 16px; height: 16px;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-spinner {
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
}
.btn-spinner-dark {
  border: 2px solid rgba(40,75,99,0.2);
  border-top-color: var(--c-navy);
}
@keyframes spin { to { transform: rotate(360deg); } }

.login-note {
  font-size: 11.5px;
  color: var(--c-muted);
  text-align: center;
  margin-top: 12px;
}
.login-legal {
  font-size: 11px;
  color: var(--c-muted) !important;
  text-align: center !important;
  letter-spacing: 0.04em;
  width: 100% !important;
  display: block !important;
  margin-top: 16px !important;
  padding-top: 14px !important;
  border-top: 1px solid var(--c-border) !important;
  position: static !important;
  float: none !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
}


/* ============================================================
   PORTAL HEADER
   ============================================================ */
.portal-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--c-dark);
  height: var(--header-h);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ph-inner {
  height: 100%;
  max-width: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.ph-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.ph-brand svg { flex-shrink: 0; }
.ph-brand-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: white;
  display: block;
  line-height: 1.2;
}
.ph-brand-tag {
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.06em;
  display: block;
}
.ph-progress-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.ph-progress-bar {
  flex: 1;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
}
.ph-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--c-teal), #4DA0A4);
  border-radius: 3px;
  transition: width 0.5s var(--ease);
}
.ph-progress-label {
  font-size: 11.5px;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
  font-weight: 500;
}
.ph-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.ph-user {
  font-size: 12.5px;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
  white-space: nowrap;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.btn-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-sm);
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  font-weight: 500;
  transition: var(--t);
}
.btn-logout:hover {
  background: rgba(192,57,43,0.15);
  border-color: rgba(192,57,43,0.3);
  color: #E74C3C;
}


/* ============================================================
   PORTAL LAYOUT
   ============================================================ */
.portal-layout {
  display: flex;
  min-height: calc(100vh - var(--header-h));
}


/* ── SIDEBAR ── */
.portal-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--c-white);
  border-right: 1px solid var(--c-border);
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  scrollbar-width: thin;
}
.sidebar-inner {
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.sidebar-header {
  padding: 0 20px 16px;
  border-bottom: 1px solid var(--c-border);
  margin-bottom: 8px;
}
.sidebar-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text-mid);
  display: block;
}
.sidebar-subtitle {
  font-size: 11px;
  color: var(--c-muted);
  display: block;
  margin-top: 2px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px 10px;
  flex: 1;
}
.snav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  color: var(--c-text-soft);
  font-size: 13px;
  transition: var(--t);
  cursor: pointer;
}
.snav-item:hover {
  background: var(--c-teal-light);
  color: var(--c-teal);
}
.snav-item.active {
  background: var(--c-teal-light);
  color: var(--c-teal);
  font-weight: 600;
}
.snav-num {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--c-muted);
  min-width: 20px;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
}
.snav-item.active .snav-num,
.snav-item:hover .snav-num { color: var(--c-teal); }
.snav-label { flex: 1; line-height: 1.3; }

/* Status dot */
.snav-status {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: var(--t);
}
.snav-status[data-status="empty"]    { background: var(--status-empty); }
.snav-status[data-status="partial"]  { background: var(--status-partial); }
.snav-status[data-status="complete"] { background: var(--status-complete); }

.sidebar-save-note {
  margin: 8px 10px 0;
  padding: 10px 12px;
  background: var(--c-bg);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--c-text-soft);
}
.sidebar-save-note svg { color: var(--c-teal); flex-shrink: 0; }


/* ── PORTAL MAIN ── */
.portal-main {
  flex: 1;
  min-width: 0;
  padding-bottom: 80px;
}


/* ============================================================
   FORM HERO
   ============================================================ */
.form-hero {
  background: var(--c-navy);
  padding: 52px 40px 64px;
  position: relative;
  overflow: hidden;
}
.form-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.form-hero::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 48px;
  background: var(--c-bg);
  clip-path: ellipse(52% 100% at 50% 100%);
}
.fh-inner {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.fh-eyebrow { margin-bottom: 16px; }
.fh-phase {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: rgba(60,110,113,0.3);
  border: 1px solid rgba(60,110,113,0.5);
  border-radius: var(--r-pill);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7FC8CB;
}
.fh-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 400;
  color: white;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-transform: none;
  margin-bottom: 14px;
}
.fh-subtitle {
  font-size: 14.5px;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  max-width: 620px;
  margin-bottom: 32px;
}
.fh-info-block {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
}
.fh-info-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #7FC8CB;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}
.fh-info-intro {
  font-size: 13.5px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 16px;
  line-height: 1.6;
}
.fh-info-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 32px;
}
.fh-info-cols ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.fh-info-cols li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  color: rgba(255,255,255,0.75);
}
.fh-info-cols li span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--c-teal);
  flex-shrink: 0;
  margin-top: 5px;
}
.fh-nav-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.4);
  font-style: italic;
}
.fh-nav-hint svg { color: var(--c-teal); flex-shrink: 0; }


/* ============================================================
   FORM SECTIONS
   ============================================================ */
.form-section {
  padding: 32px 40px 0;
  max-width: 900px;
  margin: 0 auto;
  scroll-margin-top: calc(var(--header-h) + 20px);
  animation: fadeUp 0.3s var(--ease) both;
}
.form-section + .form-section { padding-top: 28px; }

.sec-card {
  background: var(--c-surface);
  border-radius: var(--r-xl);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow-xs);
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}
.sec-card--final {
  border-color: var(--c-teal);
  box-shadow: 0 0 0 1px rgba(60,110,113,0.15), var(--shadow-sm);
}

.sec-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--c-border);
}
.sec-num-badge {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--c-grey);
  min-width: 48px;
  line-height: 1;
  padding-top: 3px;
  letter-spacing: -0.03em;
}
.sec-num-badge--final {
  font-size: 22px;
  color: var(--c-teal);
  display: flex;
  align-items: center;
}
.sec-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 400;
  color: var(--c-text);
  letter-spacing: -0.01em;
  text-transform: none;
  line-height: 1.25;
  margin-bottom: 5px;
}
.sec-subtitle {
  font-size: 13px;
  color: var(--c-text-soft);
  line-height: 1.5;
}

/* Info block */
.info-block {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  background: var(--c-teal-light);
  border: 1px solid rgba(60,110,113,0.15);
  border-radius: var(--r-md);
  font-size: 13.5px;
  color: var(--c-text-mid);
  line-height: 1.6;
}
.info-block svg { color: var(--c-teal); flex-shrink: 0; margin-top: 2px; }
.info-block--accent {
  background: rgba(40,75,99,0.06);
  border-color: rgba(40,75,99,0.15);
}
.info-block strong { font-weight: 600; color: var(--c-navy); }

/* Field fixed value */
.badge-fixed {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 7px;
  background: var(--c-navy-light);
  color: var(--c-navy);
  border-radius: var(--r-pill);
  text-transform: uppercase;
}
.field-fixed-value {
  height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  background: var(--c-bg);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  color: var(--c-navy);
}

/* Grids */
.fields-row { display: grid; gap: 20px; }
.fields-row.two-cols { grid-template-columns: 1fr 1fr; }

/* Textarea */
.field-textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 13.5px;
  color: var(--c-text);
  background: var(--c-white);
  resize: vertical;
  min-height: 96px;
  line-height: 1.6;
  transition: var(--t);
  outline: none;
}
.field-textarea::placeholder { color: var(--c-muted); }
.field-textarea:focus {
  border-color: var(--c-teal);
  box-shadow: 0 0 0 3px rgba(60,110,113,0.10);
}
.field-textarea.error {
  border-color: var(--c-error);
}

/* Select */
.select-wrap { position: relative; }
.field-select {
  width: 100%;
  height: 46px;
  padding: 0 36px 0 13px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--c-text);
  background: var(--c-white);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: var(--t);
  outline: none;
}
.field-select:focus {
  border-color: var(--c-teal);
  box-shadow: 0 0 0 3px rgba(60,110,113,0.10);
}
.sel-arrow {
  position: absolute;
  right: 11px; top: 50%;
  transform: translateY(-50%);
  color: var(--c-muted);
  pointer-events: none;
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.kpi-box {
  background: var(--c-bg);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--t);
}
.kpi-box:focus-within {
  border-color: var(--c-teal);
  box-shadow: 0 0 0 3px rgba(60,110,113,0.08);
  background: white;
}
.kpi-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-text-soft);
  display: block;
}
.kpi-input {
  height: 40px !important;
  padding: 0 10px !important;
  font-size: 22px !important;
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  color: var(--c-navy) !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}
.kpi-input:focus { border: none !important; box-shadow: none !important; }
.kpi-input::placeholder { font-size: 14px !important; color: var(--c-muted) !important; }


/* ============================================================
   CHECKBOX CARDS
   ============================================================ */
.check-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.check-cards--compact {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.check-card { cursor: pointer; user-select: none; }
.check-card input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }

.cc-inner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-white);
  transition: var(--t);
  height: 100%;
}
.check-card:hover .cc-inner {
  border-color: var(--c-teal);
  background: var(--c-teal-light);
}
.check-card input:checked + .cc-inner {
  border-color: var(--c-teal);
  background: var(--c-teal-light);
  box-shadow: inset 0 0 0 1px var(--c-teal);
}
.cc-icon { font-size: 18px; margin-bottom: 4px; }
.cc-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
  line-height: 1.3;
}
.check-card input:checked + .cc-inner .cc-title { color: var(--c-teal); }
.cc-desc {
  font-size: 11.5px;
  color: var(--c-text-soft);
  line-height: 1.4;
}


/* ============================================================
   RADIO CARDS
   ============================================================ */
.radio-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.radio-card { cursor: pointer; user-select: none; }
.radio-card input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.rc-inner {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-white);
  font-size: 13.5px;
  color: var(--c-text-mid);
  white-space: nowrap;
  transition: var(--t);
}
.radio-card:hover .rc-inner {
  border-color: var(--c-teal);
  background: var(--c-teal-light);
}
.radio-card input:checked + .rc-inner {
  border-color: var(--c-teal);
  background: var(--c-teal-light);
  color: var(--c-teal);
  font-weight: 600;
}
.rc-check {
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 1.5px solid var(--c-border-2);
  background: white;
  flex-shrink: 0;
  position: relative;
  transition: var(--t);
}
.rc-check::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--c-teal);
  opacity: 0;
  transition: var(--t);
}
.radio-card input:checked + .rc-inner .rc-check {
  border-color: var(--c-teal);
}
.radio-card input:checked + .rc-inner .rc-check::after { opacity: 1; }


/* ============================================================
   CONDITIONAL BLOCK
   ============================================================ */
.conditional-block {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 20px;
  animation: fadeUp 0.25s var(--ease) both;
}


/* ============================================================
   SUBMIT
   ============================================================ */
.submit-notice {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  background: rgba(39,174,96,0.06);
  border: 1px solid rgba(39,174,96,0.2);
  border-radius: var(--r-md);
  font-size: 13.5px;
  color: var(--c-text-mid);
}
.submit-notice svg { color: var(--c-success); flex-shrink: 0; margin-top: 1px; }
.submit-notice strong { font-weight: 600; color: var(--c-text); display: block; margin-bottom: 2px; }

.form-error {
  padding: 12px 16px;
  background: rgba(192,57,43,0.07);
  border: 1px solid rgba(192,57,43,0.2);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--c-error);
}

.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 32px;
  background: var(--c-navy);
  color: white;
  border: none;
  border-radius: var(--r-md);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: var(--t);
  align-self: flex-start;
}
.btn-submit:hover {
  background: var(--c-teal);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(60,110,113,0.3);
}
.btn-submit:active { transform: none; }
.btn-submit-arrow { transition: var(--t); }
.btn-submit:hover .btn-submit-arrow { transform: translateX(3px); }


/* ============================================================
   MOBILE NAV
   ============================================================ */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 300;
  flex-direction: column;
}
.mobile-nav-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  background: var(--c-dark);
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: white;
  font-size: 13px;
  font-weight: 600;
  width: 100%;
}
.mobile-nav-progress {
  margin-left: auto;
  font-size: 12px;
  color: var(--c-teal);
  font-weight: 700;
}
.mobile-nav-panel {
  background: var(--c-white);
  border-top: 1px solid var(--c-border);
  max-height: 50vh;
  overflow-y: auto;
  padding: 8px 10px 20px;
}
.mobile-nav-panel .snav-item {
  padding: 11px 10px;
}


/* ============================================================
   SUCCESS VIEW
   ============================================================ */
#view-success {
  background: var(--c-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  min-height: 100vh;
}
.success-wrap { width: 100%; max-width: 560px; }
.success-card {
  background: var(--c-white);
  border-radius: var(--r-xl);
  padding: 52px 44px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--c-border);
  text-align: center;
  animation: fadeUp 0.5s var(--ease) both;
}
.success-anim { display: flex; justify-content: center; margin-bottom: 20px; }
.success-circle {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-teal), var(--c-navy));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 32px rgba(60,110,113,0.35);
  animation: popIn 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.2s both;
}
@keyframes popIn {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.success-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--c-text-soft);
}
.success-title {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 400;
  color: var(--c-text);
  letter-spacing: -0.01em;
  text-transform: none;
  margin-bottom: 14px;
}
.success-text {
  font-size: 14.5px;
  color: var(--c-text-soft);
  line-height: 1.65;
  margin-bottom: 32px;
}
.success-steps {
  background: var(--c-bg);
  border-radius: var(--r-lg);
  padding: 22px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 32px;
}
.success-step { display: flex; gap: 14px; align-items: flex-start; }
.ss-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--c-teal);
  color: white;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.success-step > div { display: flex; flex-direction: column; gap: 2px; }
.success-step strong { font-size: 13.5px; font-weight: 600; color: var(--c-text); }
.success-step span { font-size: 12.5px; color: var(--c-text-soft); line-height: 1.45; }
.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  background: var(--c-bg);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--c-text-mid);
  transition: var(--t);
}
.btn-back:hover {
  border-color: var(--c-teal);
  color: var(--c-teal);
  background: var(--c-teal-light);
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .portal-sidebar { display: none; }
  .mobile-nav { display: flex; }
  .portal-main { padding-bottom: 70px; }
  .form-section { padding: 20px 20px 0; }
  .sec-card { padding: 24px 20px; gap: 20px; }
  .form-hero { padding: 36px 20px 50px; }
  .fh-info-cols { grid-template-columns: 1fr; gap: 8px; }
  .fields-row.two-cols { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr; }
  .ph-inner { padding: 0 16px; }
  .ph-user { display: none; }
  .btn-logout span { display: none; }
  .btn-logout { padding: 7px 10px; }
  .check-cards { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .login-card { padding: 28px 22px; }
  .check-cards, .check-cards--compact { grid-template-columns: 1fr; }
  .radio-cards { flex-direction: column; }
  .rc-inner { white-space: normal; }
  .success-card { padding: 36px 22px; }
  .ph-progress-label { display: none; }
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--c-teal);
  outline-offset: 2px;
}


/* ============================================================
   LOGO ICIA — ESTILOS ESPECÍFICOS
   Icono de grafo + texto "ICIA" con gradiente
   ============================================================ */

/* --- Logo completo sobre fondo oscuro (encima de la tarjeta login) --- */
.icia-logo-full {
  width: 155px;
  height: auto;
  display: block;
}

/* Subtexto "Impulsa Con IA" debajo del logo externo */
.brand-text--sub {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.brand-name-full {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Contenedor del logo externo (encima de la card) */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* --- Logo dentro de la tarjeta de login --- */
.login-card-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--c-border);
}
.icia-logo-card {
  width: 110px !important;
  height: auto !important;
  max-width: 110px !important;
  display: block;
  opacity: 0.88;
}
.login-card-tagline {
  display: none;
}

/* --- Logo en header sticky (fondo oscuro, compacto) --- */
.icia-logo-header {
  width: 110px;
  height: auto;
  display: block;
  flex-shrink: 0;
}

/* --- Logo en pantalla de éxito --- */
.success-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.icia-logo-success {
  width: 120px;
  height: auto;
  display: block;
}

/* Ocultar el ph-brand-name/tag cuando hay logo header (mantenerlo para SEO/accesibilidad) */
.ph-brand .ph-brand-name {
  display: none;
}
.ph-brand .ph-brand-tag {
  display: none;
}

/* En desktop mostramos solo el logo SVG en header */
@media (min-width: 901px) {
  .ph-brand {
    gap: 0;
  }
  .ph-brand > div {
    display: none;
  }
}

/* En móvil ocultamos el tagline del logo header para ganar espacio */
@media (max-width: 600px) {
  .icia-logo-full  { width: 120px; }
  .icia-logo-card  { width: 90px; }
  .icia-logo-header { width: 80px; }
  .login-card-logo { margin-bottom: 16px; padding-bottom: 16px; }
}


/* ============================================================
   AJUSTES LOGO v2 — eliminar logos del header y login exterior
   ============================================================ */

/* Wordmark en header: mostrar siempre el texto */
.ph-brand-wordmark {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.ph-brand .ph-brand-name {
  display: block !important;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.01em;
  color: white;
  line-height: 1.1;
}
.ph-brand .ph-brand-tag {
  display: block !important;
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Ocultar SVG del logo en header (ya eliminado del HTML, por si acaso) */
.icia-logo-header { display: none !important; }

/* Ocultar SVG del logo encima de la tarjeta login (ya eliminado) */
.login-brand { display: none !important; }
.icia-logo-full { display: none !important; }

/* El logo de la card interior sí se mantiene */
.login-card-logo { display: block !important; }
.icia-logo-card { display: block !important; }

/* Secciones: el número badge sigue con Barlow */
.sec-num-badge {
  font-family: var(--font-body);
}

/* Sidebar nav: ajustar para no usar Syne */
.sidebar-title {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.12em;
}
.snav-num {
  font-family: var(--font-body);
}
