:root {
  --ink: #2a1468;
  --ink-soft: #4b2d86;
  --purple: #5424c8;
  --orange: #ff7a18;
  --green: #1c8a4b;
  --muted: #6d6484;
  --line: #ece4f8;
  --paper: #f7f4fc;
  --shadow: 0 24px 50px rgba(48, 18, 110, 0.12);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { min-height: 100vh; background: #fff; }
a { color: var(--purple); }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(34px, 4vw, 58px); line-height: 1.05; letter-spacing: -0.04em; margin-bottom: 12px; }
h2 { font-size: 22px; margin-bottom: 8px; }
h3 { font-size: 16px; margin: 22px 0 10px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand img { width: 54px; height: 54px; }
.brand span { display: grid; }
.brand strong { font-size: 13px; letter-spacing: 0.12em; line-height: 1.15; }

.text-link { color: var(--ink); font-weight: 800; text-decoration: none; }
.text-link:hover { color: var(--purple); }
.kicker { color: var(--ink-soft); font-weight: 800; font-size: 22px; margin-bottom: 8px; }
.lead { color: var(--green); font-size: 18px; line-height: 1.45; font-weight: 600; }
.muted, .empty { color: var(--muted); }
.eyebrow { color: var(--purple); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; font-size: 12px; }
.eyebrow a { color: inherit; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 14px 22px; font-weight: 800;
  text-decoration: none; cursor: pointer; line-height: 1;
}
.btn-orange { background: var(--orange); color: #fff; box-shadow: 0 10px 20px rgba(255, 122, 24, 0.28); }
.btn-orange:hover { background: #ff8c32; }
.btn-purple { background: var(--ink); color: #fff; }
.btn-danger { background: transparent; color: #9f1239; padding-left: 0; margin-top: 12px; }
.btn-block { width: 100%; }

.flash { border-radius: 14px; padding: 12px 14px; margin: 12px 0; font-weight: 700; }
.flash-ok { background: #e8f8ee; color: #146c36; }
.flash-error { background: #fee8ea; color: #9f1239; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.landing-wave { position: absolute; inset: 0 auto 0 0; width: min(180px, 16vw); pointer-events: none; }
.landing-wave svg { width: 100%; height: 100%; }
.landing-wrap { position: relative; padding: 28px 7vw 40px 11vw; }
.landing-top { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.hero-copy { max-width: 820px; margin: 54px auto 10px; text-align: center; }
.hero-copy h1 span { position: relative; display: inline-block; }
.hero-copy h1 span::after {
  content: ""; position: absolute; left: 8%; right: 8%; bottom: -8px; height: 7px;
  border-radius: 999px; background: var(--orange);
}

.stage { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 28px; margin: 54px auto 10px; max-width: 980px; }
.orb { position: absolute; border-radius: 50%; z-index: 0; filter: blur(2px); }
.orb-pink { width: 280px; height: 180px; background: #ffd0ea; right: 8%; bottom: 40px; }
.orb-orange { width: 220px; height: 140px; background: #ffd7b0; left: 12%; bottom: 70px; }
.device-laptop, .device-phone { position: relative; z-index: 1; }
.device-laptop { width: min(680px, 68%); background: linear-gradient(#ececf1, #d5d5dc); border-radius: 16px 16px 10px 10px; padding: 12px 12px 0; box-shadow: var(--shadow); }
.device-base { height: 16px; margin: 0 -40px; background: linear-gradient(#d8d8df, #b7b7c0); border-radius: 0 0 12px 12px; display: grid; }
.device-base span { width: 92px; height: 7px; margin: 0 auto; background: #9d9da6; border-radius: 0 0 8px 8px; }
.device-phone { width: 196px; background: #161616; border-radius: 28px; padding: 8px; box-shadow: var(--shadow); }
.device-screen { overflow: hidden; background: #fff; border-radius: 8px; }
.device-phone .device-screen { border-radius: 22px; }
.device-screen iframe { border: 0; transform-origin: 0 0; pointer-events: none; background: #fff; }

.feature-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 860px; margin: 36px auto 10px; text-align: center; }
.feature-row h2 { font-size: 18px; font-weight: 800; line-height: 1.3; }
.feature-icon { width: 74px; height: 74px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; color: var(--purple); background: #f4efff; }
.feature-icon svg { width: 34px; height: 34px; }
.cta-row { max-width: 980px; margin: 28px auto 0; display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.cta-row p { font-weight: 800; color: var(--ink-soft); }
.landing-foot { margin-top: 48px; text-align: center; letter-spacing: 0.16em; font-size: 13px; }

.portal-wrap { min-height: 100vh; padding: 22px clamp(16px, 3vw, 40px) 32px; background: linear-gradient(#fff, var(--paper)); }
.portal-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.portal-label { color: var(--ink-soft); font-weight: 800; }
.portal-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 22px; align-items: stretch; max-width: 1180px; margin: 0 auto; }
.hero-panel {
  position: relative; overflow: hidden; border-radius: 28px; min-height: 560px; padding: 42px 36px 28px;
  background: linear-gradient(165deg, #6a35e6 0%, #4d22c4 58%, #3c179e 100%); color: #fff;
  display: flex; flex-direction: column; justify-content: space-between;
}
.panel-blob { position: absolute; border-radius: 50%; }
.panel-blob-a { width: 190px; height: 150px; background: #ff8a3d; right: -40px; top: 150px; opacity: 0.95; }
.panel-blob-b { width: 150px; height: 180px; background: #ff7eb6; right: 48px; top: 250px; opacity: 0.9; }
.panel-copy, .panel-points { position: relative; z-index: 1; }
.panel-kicker { font-weight: 800; letter-spacing: 0.04em; font-size: 28px; text-transform: uppercase; margin-bottom: 12px; }
.panel-kicker span { color: #ffb15a; display: block; font-size: 34px; }
.hero-panel h1 { font-size: clamp(32px, 3vw, 46px); max-width: 460px; }
.hero-panel p { max-width: 280px; font-weight: 600; }
.panel-points { display: flex; gap: 14px; list-style: none; padding: 0; margin: 0; }
.panel-points li { width: 108px; text-align: center; font-size: 12px; font-weight: 700; line-height: 1.3; }
.panel-points span { width: 54px; height: 54px; margin: 0 auto 8px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,0.16); }
.panel-points svg { width: 26px; height: 26px; }

.login-card { background: #fff; border-radius: 28px; padding: 32px 28px; box-shadow: var(--shadow); }
.login-eyebrow { color: var(--purple); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; font-size: 12px; }
.login-card h2 { font-size: 30px; letter-spacing: -0.03em; }
.login-help { color: var(--muted); font-weight: 600; }
.login-form { display: grid; gap: 14px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tabs button, .password-field button {
  border: 0; background: #f6f3fb; border-radius: 12px; padding: 12px; font-weight: 800; cursor: pointer; color: var(--ink-soft);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.tabs button svg, .password-field button svg { width: 18px; height: 18px; }
.tabs button.is-active { background: #efe8ff; color: var(--purple); }
.login-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 800; }
.login-form input, .stack input, .stack select, .stack textarea, .inline-form input {
  width: 100%; border: 1px solid #e4dcf4; background: #fbfaff; border-radius: 12px; padding: 13px 14px; font-weight: 600;
}
.login-form input:focus, .stack input:focus, .stack select:focus, .stack textarea:focus { outline: 3px solid #efe6ff; border-color: #b89af0; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 48px; }
.password-field button { position: absolute; right: 6px; top: 6px; bottom: 6px; width: 40px; padding: 0; background: transparent; }
.login-extra { text-align: center; font-weight: 700; }
.login-note { display: flex; gap: 10px; align-items: center; background: #f6f1ff; border-radius: 16px; padding: 12px 14px; }
.login-note strong, .login-note span { display: block; }
.login-note span { color: var(--muted); font-weight: 600; font-size: 13px; }
.is-marco { background: #fff; overflow: hidden; }
.is-marco .portal-wrap { padding: 14px; min-height: 100vh; background: #fff; }
.is-marco .hero-panel { min-height: 0; }

.form-page { min-height: 100vh; padding: 28px 18px 48px; background: linear-gradient(#fff, var(--paper)); }
.form-top { max-width: 860px; margin: 0 auto 24px; display: flex; justify-content: space-between; align-items: center; }
.form-card { max-width: 860px; margin: 0 auto; background: #fff; border-radius: 28px; padding: 32px; box-shadow: var(--shadow); }
.form-card.narrow { max-width: 520px; margin-top: 8vh; }
.stack { display: grid; gap: 14px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stack label, .check { display: grid; gap: 6px; font-weight: 800; font-size: 14px; }
.check { grid-template-columns: auto 1fr; align-items: center; }

.shell-bar {
  display: flex; align-items: center; gap: 22px; padding: 14px 22px; background: #fff;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5;
}
.shell-nav { display: flex; gap: 16px; flex: 1; }
.shell-nav a, .who a { color: var(--ink); font-weight: 800; text-decoration: none; }
.who { display: flex; gap: 14px; align-items: center; color: var(--muted); font-weight: 700; }
.page-shell { background: var(--paper); }
.shell-main { width: min(1100px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 60px; }
.card { background: #fff; border-radius: 20px; padding: 18px; box-shadow: 0 10px 30px rgba(42, 20, 104, 0.05); }
.layout-2 { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 18px; }
.section-gap { margin-top: 18px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { text-decoration: none; color: inherit; }
.stat strong { display: block; font-size: 36px; letter-spacing: -0.04em; }
.inline-form { display: flex; gap: 8px; margin-bottom: 14px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
td, th { padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.badge { display: inline-flex; border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 800; background: #f3f0f8; color: var(--muted); }
.badge-programada, .badge-nueva { background: #efe8ff; color: #4c2f91; }
.badge-en_proceso, .badge-en_revision, .badge-apto_con_restriccion { background: #fff1df; color: #b45309; }
.badge-observada, .badge-no_apto { background: #fee8ea; color: #9f1239; }
.badge-completada, .badge-apto, .badge-atendida { background: #e7f8ee; color: #157a3d; }
.eval-card { display: grid; gap: 8px; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; }
.doc-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.doc-list li { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: var(--paper); border-radius: 12px; padding: 10px 12px; }
.doc-list button { border: 0; background: transparent; color: #9f1239; font-weight: 800; cursor: pointer; }
.doc-list form { margin: 0; }
.request-card { display: grid; grid-template-columns: 1fr 220px; gap: 18px; align-items: start; }
.page-head { display: flex; justify-content: space-between; gap: 12px; }

@media (max-width: 980px) {
  .landing-wrap { padding: 20px 18px 40px; }
  .landing-wave { display: none; }
  .stage, .feature-row, .portal-grid, .layout-2, .stat-grid, .request-card, .split { grid-template-columns: 1fr; display: grid; }
  .stage { display: none; }
  .cta-row, .landing-top, .form-top, .shell-bar { flex-wrap: wrap; }
  .hero-panel { min-height: 0; }
  .panel-points { justify-content: space-between; }
  .device-laptop { width: 100%; }
}
