:root {
  --ink: #10233b;
  --ink-soft: #52657b;
  --navy: #0b1528;
  --navy-soft: #12233a;
  --paper: #f5f8fc;
  --white: #ffffff;
  --line: #dfe7f0;
  --red: #e4494f;
  --red-dark: #c9343d;
  --red-soft: #fff0f0;
  --blue: #2378d8;
  --blue-soft: #eaf3ff;
  --green: #279a72;
  --green-soft: #eaf8f3;
  --shadow: 0 20px 50px rgba(16, 35, 59, .12);
  --radius: 18px;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); color: var(--ink); font-family: "DM Sans", sans-serif; line-height: 1.5; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(35, 120, 216, .35); outline-offset: 3px; }

.container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: fixed; left: 18px; top: -80px; z-index: 1000; padding: 10px 14px; border-radius: 8px; color: var(--white); background: var(--navy); transition: top .2s; }
.skip-link:focus { top: 18px; }

.site-header { position: sticky; top: 0; z-index: 100; border-bottom: 1px solid rgba(223, 231, 240, .8); background: rgba(255,255,255,.9); backdrop-filter: blur(18px); }
.header-inner { display: flex; min-height: 74px; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); font-family: Manrope, sans-serif; font-size: 1.28rem; font-weight: 800; letter-spacing: -.04em; text-decoration: none; }
.brand > span:last-child > span { color: var(--red); }
.brand-mark { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 10px; color: var(--white); background: var(--red); font-size: 1rem; box-shadow: 0 7px 15px rgba(228, 73, 79, .25); }
.site-nav { display: flex; align-items: center; gap: 26px; color: var(--ink-soft); font-size: .88rem; font-weight: 600; }
.site-nav a { text-decoration: none; transition: color .18s ease; }
.site-nav a:hover { color: var(--red); }
.nav-login { padding: 10px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink) !important; background: var(--white); }
.menu-toggle { display: none; width: 42px; height: 42px; padding: 9px; border: 1px solid var(--line); border-radius: 11px; background: var(--white); }
.menu-toggle span { display: block; width: 22px; height: 2px; margin: 4px auto; border-radius: 2px; background: var(--ink); transition: transform .2s ease; }

.hero-section { overflow: hidden; padding: clamp(72px, 10vw, 124px) 0 96px; background: radial-gradient(circle at 82% 24%, rgba(91, 170, 255, .23), transparent 34%), linear-gradient(135deg, #0a172a 0%, #102b4b 57%, #163c5b 100%); color: var(--white); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(370px, .95fr); align-items: center; gap: 80px; }
.eyebrow { display: flex; align-items: center; gap: 9px; margin: 0 0 18px; color: #ff9a9d; font-size: .72rem; font-weight: 800; letter-spacing: .14em; }
.eyebrow-dark { color: var(--red-dark); }
.eyebrow-dot { width: 8px; height: 8px; border-radius: 50%; background: #ff898f; box-shadow: 0 0 0 5px rgba(255,137,143,.15); }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: Manrope, sans-serif; letter-spacing: -.05em; }
h1 { max-width: 650px; margin-bottom: 24px; font-size: clamp(2.8rem, 6vw, 5.25rem); line-height: .98; }
h2 { margin-bottom: 16px; font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.03; }
h3 { margin-bottom: 10px; font-size: 1.12rem; line-height: 1.25; }
.hero-description { max-width: 550px; margin-bottom: 32px; color: #c8d6e7; font-size: clamp(1rem, 1.7vw, 1.18rem); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.button { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; gap: 10px; padding: 0 20px; border: 0; border-radius: 12px; font-weight: 800; text-decoration: none; transition: transform .18s var(--ease-out), box-shadow .18s ease, background .18s ease; }
.button:hover { transform: translateY(-2px); }
.button:active { transform: scale(.97); }
.button-emergency { color: var(--white); background: var(--red); box-shadow: 0 12px 24px rgba(228, 73, 79, .28); }
.button-emergency:hover { background: var(--red-dark); box-shadow: 0 15px 30px rgba(228, 73, 79, .35); }
.button-icon { display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; font-weight: 800; }
.text-link { color: #e5effa; font-weight: 700; text-decoration: none; }
.text-link span { margin-left: 6px; color: #8bd0ff; }
.hero-disclaimer { max-width: 480px; margin: 25px 0 0; color: #91a9c2; font-size: .77rem; }
.hero-disclaimer span { color: #9bd5ff; margin-right: 5px; }

.hero-visual { position: relative; min-height: 390px; }
.hero-emblem { position: absolute; top: 50%; left: 50%; display: grid; width: 230px; height: 230px; place-items: center; transform: translate(-50%, -50%); border: 1px solid rgba(141, 206, 255, .45); border-radius: 40% 60% 60% 40%; background: linear-gradient(135deg, rgba(107, 197, 255, .23), rgba(49, 104, 157, .18)); box-shadow: 0 0 0 18px rgba(111, 193, 255, .05), 0 0 0 40px rgba(111, 193, 255, .04), inset 0 1px 0 rgba(255,255,255,.16); transform: translate(-50%, -50%) rotate(-10deg); }
.hero-emblem span { display: grid; width: 96px; height: 96px; place-items: center; transform: rotate(10deg); border-radius: 28px; color: var(--white); background: linear-gradient(145deg, #f15b61, #ba2639); font-size: 4rem; font-weight: 400; box-shadow: 0 18px 30px rgba(228, 73, 79, .28); }
.visual-orbit { position: absolute; border: 1px dashed rgba(139, 208, 255, .28); border-radius: 50%; }
.orbit-one { inset: 30px 5px 30px 5px; transform: rotate(26deg); }
.orbit-two { inset: 70px 25px 70px 25px; transform: rotate(-34deg); }
.support-card { position: absolute; display: flex; min-width: 190px; align-items: center; gap: 11px; padding: 13px 15px; border: 1px solid rgba(255,255,255,.18); border-radius: 15px; background: rgba(18, 44, 75, .78); box-shadow: 0 16px 32px rgba(0,0,0,.2); backdrop-filter: blur(12px); }
.support-card strong, .support-card small { display: block; }
.support-card strong { color: var(--white); font-size: .78rem; }
.support-card small { margin-top: 2px; color: #a9c4dc; font-size: .68rem; }
.card-primary { top: 34px; right: 4px; }
.card-secondary { bottom: 42px; left: 8px; }
.support-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 11px; font-weight: 800; }
.support-icon-red { color: #ffb8bb; background: rgba(228, 73, 79, .2); }
.support-icon-green { color: #9ce2c4; background: rgba(39, 154, 114, .2); }

.section { padding: clamp(70px, 9vw, 112px) 0; }
.section-light { background: var(--white); }
.section-dark { background: var(--navy); color: var(--white); }
.section-heading { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(250px, .75fr); align-items: end; gap: 50px; margin-bottom: 42px; }
.section-heading > p { max-width: 360px; margin: 0 0 4px; color: var(--ink-soft); font-size: .94rem; }
.section-heading-dark > p { color: #a9bbcf; }
.section-lead { max-width: 520px; margin-bottom: 28px; color: var(--ink-soft); font-size: 1.02rem; }

.action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.action-card { min-height: 285px; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 9px 30px rgba(16,35,59,.04); transition: transform .22s var(--ease-out), box-shadow .22s ease; }
.action-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.action-card-alert { border-color: #ffd4d5; background: linear-gradient(145deg, #fff8f8, #fff); }
.card-topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.round-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 13px; font-size: 1.15rem; font-weight: 800; }
.icon-red { color: var(--red); background: var(--red-soft); }
.icon-blue { color: var(--blue); background: var(--blue-soft); }
.icon-green { color: var(--green); background: var(--green-soft); }
.card-label, .panel-kicker { color: #7c8da1; font-size: .64rem; font-weight: 800; letter-spacing: .12em; }
.action-card h3 { color: var(--ink); font-size: 1.28rem; }
.action-card p { min-height: 72px; color: var(--ink-soft); font-size: .88rem; }
.card-link { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; background: transparent; font-size: .83rem; font-weight: 800; text-decoration: none; }
.card-link span { transition: transform .18s ease; }
.card-link:hover span { transform: translateX(4px); }
.card-link-red { color: var(--red-dark); }
.card-link-blue { color: var(--blue); }
.card-link-green { color: var(--green); }

.breathing-section { background: #eaf3f6; }
.breathing-layout { display: grid; grid-template-columns: minmax(0, .95fr) minmax(320px, 1.05fr); align-items: center; gap: 80px; }
.button-green { color: var(--white); background: var(--green); box-shadow: 0 10px 20px rgba(39,154,114,.2); }
.button-green:hover { background: #1d805e; }
.button-blue { color: var(--white); background: var(--blue); box-shadow: 0 10px 20px rgba(35,120,216,.2); }
.button-blue:hover { background: #175fae; }
.breathing-visual { display: grid; min-height: 330px; place-items: center; border-radius: 24px; background: rgba(255,255,255,.52); }
.breathing-circle { display: grid; width: 210px; height: 210px; place-content: center; border: 1px solid rgba(39,154,114,.3); border-radius: 50%; color: var(--green); background: radial-gradient(circle, #fff 0 42%, #d9f1e8 43% 100%); box-shadow: 0 0 0 18px rgba(39,154,114,.08), 0 0 0 38px rgba(39,154,114,.04); text-align: center; transition: transform 1s var(--ease-out), background 1s ease; }
.breathing-circle span { display: block; font-family: Manrope, sans-serif; font-size: 1.55rem; }
.breathing-circle small { display: block; margin-top: 5px; color: #699986; font-size: .7rem; }
.breathing-circle.phase-0 { transform: scale(1.16); }
.breathing-circle.phase-1 { transform: scale(1.16); background: radial-gradient(circle, #fff 0 42%, #d5edff 43% 100%); }
.breathing-circle.phase-2 { transform: scale(.86); background: radial-gradient(circle, #fff 0 42%, #e7e1ff 43% 100%); }
.breathing-circle.phase-3 { transform: scale(.86); background: radial-gradient(circle, #fff 0 42%, #f5efe1 43% 100%); }

.wellness-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.wellness-card { position: relative; padding: 28px; border: 1px solid rgba(161, 184, 208, .2); border-radius: var(--radius); background: rgba(255,255,255,.055); }
.wellness-number { display: block; margin-bottom: 34px; color: #6f87a2; font-size: .72rem; font-weight: 800; letter-spacing: .12em; }
.wellness-card h3 { color: var(--white); font-size: 1.35rem; }
.wellness-card p { min-height: 90px; color: #a8bbce; font-size: .89rem; }
.wellness-card a { color: #8fd9bb; font-size: .82rem; font-weight: 800; text-decoration: none; }
.wellness-card a span { margin-left: 5px; }
.care-note { display: flex; align-items: flex-start; gap: 12px; margin-top: 28px; padding: 16px 18px; border: 1px solid rgba(255,255,255,.1); border-radius: 13px; background: rgba(255,255,255,.04); }
.care-note > span { color: #8fd9bb; font-size: 1rem; }
.care-note p { margin: 0; color: #94a9be; font-size: .78rem; }

.professional-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(380px, 1.2fr); align-items: center; gap: 80px; }
.alerts-panel { padding: 25px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.panel-heading { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.panel-heading h3 { margin: 4px 0 0; color: var(--ink); font-family: Manrope, sans-serif; font-size: 1.4rem; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; color: var(--green); background: var(--green-soft); font-size: .68rem; font-weight: 700; }
.status-pill span { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.historial { display: grid; gap: 9px; padding: 0; margin: 0; list-style: none; }
.historial li { padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink-soft); background: var(--white); font-size: .8rem; }
.historial li i { margin-right: 6px; color: var(--red); }
.empty-msg { color: #8294a8 !important; text-align: center; }
.clear-alerts { margin-top: 15px; padding: 0; border: 0; color: var(--ink-soft); background: transparent; font-size: .76rem; text-decoration: underline; }

.auth-section { background: #edf2f7; }
.auth-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(360px, .8fr); align-items: start; gap: 80px; }
.auth-intro { padding-top: 18px; }
.auth-intro h2 { max-width: 460px; }
.auth-intro > p:not(.eyebrow) { max-width: 450px; color: var(--ink-soft); }
.auth-points { display: grid; gap: 10px; margin-top: 26px; color: var(--green); font-size: .86rem; font-weight: 700; }
.auth-card { padding: 8px; border: 1px solid var(--line); border-radius: 22px; background: var(--white); box-shadow: var(--shadow); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 5px; border-radius: 13px; background: var(--paper); }
.auth-tabs a { padding: 11px; border-radius: 9px; color: var(--ink-soft); font-size: .8rem; font-weight: 700; text-align: center; text-decoration: none; }
.auth-tabs a.active, .auth-tabs a:hover { color: var(--ink); background: var(--white); box-shadow: 0 2px 8px rgba(16,35,59,.06); }
.auth-form-wrap { padding: 28px 24px 22px; }
.auth-form-wrap h3 { margin-bottom: 5px; color: var(--ink); font-family: Manrope, sans-serif; font-size: 1.35rem; }
.auth-form-wrap > p { margin-bottom: 22px; color: var(--ink-soft); font-size: .84rem; }
.register-wrap { margin-top: 12px; padding-top: 24px; border-top: 1px solid var(--line); }
.formulario { display: grid; gap: 8px; }
.formulario label { margin-top: 7px; color: var(--ink); font-size: .76rem; font-weight: 700; }
.formulario input, .formulario select { width: 100%; min-height: 46px; padding: 0 13px; border: 1px solid #ccd7e3; border-radius: 10px; outline: 0; color: var(--ink); background: var(--white); font-size: .84rem; }
.formulario input::placeholder { color: #94a4b5; }
.formulario input:focus, .formulario select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(35,120,216,.12); }
.full-width { width: 100%; margin-top: 15px; }

.site-footer { padding: 28px 0; color: #9daec1; background: var(--navy); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.footer-brand { color: var(--white); font-size: 1.02rem; }
.footer-brand .brand-mark { width: 24px; height: 24px; border-radius: 7px; font-size: .75rem; }
.footer-inner p { margin: 0; font-size: .72rem; }
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: grid; gap: 10px; max-width: min(360px, calc(100% - 40px)); }
.toast { padding: 13px 16px; border: 1px solid rgba(255,255,255,.1); border-left: 4px solid var(--blue); border-radius: 12px; color: var(--white); background: #152a43; box-shadow: var(--shadow); font-size: .82rem; animation: toast-in .25s var(--ease-out); }
.toast-success { border-left-color: var(--green); }
.toast-error { border-left-color: var(--red); }
.toast-warning { border-left-color: #e4a53e; }
.toast.fade-out { animation: toast-out .25s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }
@keyframes fade-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fade-in .7s var(--ease-out) both; }

@media (max-width: 860px) {
  .hero-grid, .breathing-layout, .professional-layout, .auth-layout { grid-template-columns: 1fr; gap: 48px; }
  .hero-content { max-width: 680px; }
  .hero-visual { width: min(580px, 100%); margin-inline: auto; }
  .section-heading { grid-template-columns: 1fr; gap: 8px; margin-bottom: 28px; }
  .section-heading > p { max-width: 600px; }
  .auth-layout { gap: 35px; }
}

@media (max-width: 650px) {
  .container { width: min(100% - 28px, 500px); }
  .header-inner { min-height: 66px; }
  .menu-toggle { display: block; }
  .site-nav { position: absolute; top: calc(100% + 1px); right: 14px; left: 14px; display: none; flex-direction: column; align-items: stretch; gap: 4px; padding: 9px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); box-shadow: var(--shadow); }
  .site-nav.active { display: flex; }
  .site-nav a { padding: 11px 12px; }
  .nav-login { text-align: center; }
  .hero-section { padding: 70px 0 70px; }
  h1 { font-size: clamp(2.55rem, 14vw, 4rem); }
  h2 { font-size: 2.15rem; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-actions .button { width: 100%; }
  .text-link { text-align: center; }
  .hero-visual { min-height: 300px; transform: scale(.88); transform-origin: top center; margin-bottom: -30px; }
  .hero-emblem { width: 190px; height: 190px; }
  .hero-emblem span { width: 78px; height: 78px; font-size: 3rem; }
  .support-card { min-width: 160px; padding: 10px; }
  .card-primary { right: 0; }
  .card-secondary { left: 0; }
  .action-grid, .wellness-grid { grid-template-columns: 1fr; }
  .action-card { min-height: auto; }
  .action-card p, .wellness-card p { min-height: 0; }
  .breathing-visual { min-height: 270px; }
  .breathing-circle { width: 180px; height: 180px; }
  .professional-layout, .auth-layout { gap: 32px; }
  .alerts-panel { padding: 18px; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
