/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html,
body {
    height: 100%;
    scroll-behavior: smooth;
}

body {
    /* 🔥 Estructura general: header arriba, contenido en medio, footer abajo */
    min-height: 100vh;
    display: flex;
    flex-direction: column;

    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #111827 0, #020617 45%, #000000 100%);
    color: #e5e7eb;
}


.top-bar-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.4rem 0.85rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 2.25rem;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    border-radius: 14px;
    background: radial-gradient(circle at top left, #1f2937, #020617);
    padding: 4px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.85);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #f9fafb;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Navegación */
.nav {
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.nav-link {
    font-size: 0.9rem;
    text-decoration: none;
    color: #9ca3af;
    position: relative;
    padding-bottom: 2px;
    transition: color 0.18s ease, opacity 0.18s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #4f46e5, #06b6d4);
    transition: width 0.18s ease;
}

.nav-link:hover {
    color: #e5e7eb;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: #f9fafb;
}

/* Botón de login */
.top-bar-right {
    display: flex;
    align-items: center;
}

.btn-login {
    padding: 0.5rem 1.2rem;
    border-radius: 999px;
    border: 1px solid rgba(129, 140, 248, 0.7);
    background: radial-gradient(circle at top left, #4f46e5, #7c3aed);
    color: #f9fafb;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.75);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 40px rgba(79, 70, 229, 0.9);
    opacity: 0.96;
}

/* Contenedor principal */
.page-wrapper {
    flex: 1; /* 🔥 ocupa todo el espacio que queda debajo del header */
    max-width: 1400px;
    margin: 0.4rem auto;
    padding: 0.7rem 0.4rem 0.9rem;
    border-radius: 12px;
    background: radial-gradient(circle at top left, #111827 0, #020617 45%, #020617 100%);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(31, 41, 55, 0.8);
}
/* 🧩 Ajuste específico para la página de login (auth-page) */
/* 🔥 Login: baja TODO el contenedor (bloque grande) respecto a la barra */
.page-wrapper.auth-page {
    margin-top: 2rem;      /* <— AQUÍ bajas el bloque completo */
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

/* Footer dentro de la página de login: un poco menos de aire para que todo quepa sin scroll */
.page-wrapper.auth-page .footer {
    margin-top: 0.1rem;
}

.main-shell {
    padding-top: 0.6rem;
}

/* HERO =================================================== */
.hero-section {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr);
    gap: 1.4rem;
    align-items: center;
    margin-bottom: 2rem;
    scroll-margin-top: 90px;
}

.hero-left {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    animation: fadeSlideLeft 0.8s ease-out 0.05s both;
}

.hero-tag {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #a5b4fc;
}

.hero-title {
    font-size: 2rem;
    line-height: 1.24;
    color: #f9fafb;
}

.hero-title span {
    color: #60a5fa;
}

.hero-description {
    font-size: 0.95rem;
    color: #d1d5db;
    max-width: 34rem;
}

/* Botones hero */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.4rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #f9fafb;
    border: none;
    box-shadow: 0 14px 40px rgba(22, 163, 74, 0.7);
    animation: btnGlow 3s ease-in-out infinite;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 50px rgba(22, 163, 74, 0.9);
}

.btn-ghost {
    border: 1px solid rgba(148, 163, 184, 0.7);
    color: #e5e7eb;
    background: transparent;
}

.btn-ghost:hover {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(156, 163, 175, 0.9);
}

/* Estadísticas */
.hero-highlight {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.6rem;
}

.highlight-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.6rem;
}

.highlight-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(55, 65, 81, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.9);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.highlight-icon svg {
    width: 18px;
    height: 18px;
    stroke: #e5e7eb;
    fill: none;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.highlight-item:hover .highlight-icon {
    transform: translateY(-1px) scale(1.06);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.9);
}

.highlight-text {
    display: flex;
    flex-direction: column;
}

.highlight-number {
    font-size: 1.15rem;
    font-weight: 600;
    color: #f9fafb;
}

.highlight-label {
    font-size: 0.78rem;
    color: #9ca3af;
}

/* Columna derecha: tarjeta PC */
.hero-right {
    display: flex;
    justify-content: center;
    animation: fadeSlideRight 0.9s ease-out 0.15s both;
}

.hero-card {
    width: 100%;
    max-width: 430px;
    border-radius: 22px;
    background: radial-gradient(circle at top left, rgba(31, 41, 55, 0.85), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(75, 85, 99, 0.9);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(15, 23, 42, 0.9);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 36px 100px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(15, 23, 42, 1);
}

.hero-card-header {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(90deg, #020617, #111827);
    border-bottom: 1px solid rgba(55, 65, 81, 0.9);
}

.card-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 30%, #f97316, #b45309);
    box-shadow: 0 0 8px rgba(248, 113, 113, 0.7);
}

.card-dot:nth-child(2) {
    background: radial-gradient(circle at 30% 30%, #22c55e, #15803d);
}

.card-dot:nth-child(3) {
    background: radial-gradient(circle at 30% 30%, #38bdf8, #0369a1);
}

.hero-card-body {
    padding: 1.3rem 1.2rem 1.2rem;
}

.hero-monitor {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.monitor-screen {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 18px;
    overflow: hidden;
    background-image: radial-gradient(circle at top left, rgba(59, 130, 246, 0.65), transparent 55%), radial-gradient(circle at bottom, rgba(45, 212, 191, 0.45), transparent 60%), linear-gradient(135deg, #020617, #020617 40%, #111827 100%);
}

.monitor-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.2), transparent 55%);
}

.monitor-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0.9rem 1rem;
    backdrop-filter: blur(1px);
}

.monitor-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: #e5e7eb;
}

.monitor-subtitle {
    font-size: 0.75rem;
    color: #cbd5f5;
}

.monitor-base {
    width: 55%;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, #020617, #1f2937, #020617);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.9);
}

.hero-card-footer {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-ok {
    background: rgba(34, 197, 94, 0.1);
    color: #bbf7d0;
    border: 1px solid rgba(34, 197, 94, 0.6);
}

.status-text {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* SECCIONES INFERIORES =================================== */
.section {
    margin-top: 2.4rem;
    padding-top: 1.4rem;
    border-top: 1px solid rgba(31, 41, 55, 0.8);
    scroll-margin-top: 90px;
}

.section-header {
    margin-bottom: 1.6rem;
}

.section-header h2 {
    font-size: 1.3rem;
    color: #f9fafb;
    margin-bottom: 0.35rem;
}

.section-header p {
    font-size: 0.9rem;
    color: #d1d5db;
    max-width: 40rem;
}

/* Cards generales */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;
}

.info-card {
    background: radial-gradient(circle at top left, rgba(30, 64, 175, 0.35), rgba(15, 23, 42, 0.98));
    border-radius: 18px;
    padding: 1.2rem 1.1rem;
    border: 1px solid rgba(55, 65, 81, 0.9);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.9);
}

.info-card h3 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
    color: #e5e7eb;
}

.info-card p {
    font-size: 0.9rem;
    color: #d1d5db;
}

/* Sección seguridad */
.section-security .security-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.4rem;
}

.security-card {
    background: radial-gradient(circle at top, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.95));
    border-radius: 18px;
    padding: 1.2rem 1.1rem;
    border: 1px solid rgba(55, 65, 81, 0.9);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.9);
}

.security-card h3 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
    color: #e5e7eb;
}

.security-card p {
    font-size: 0.9rem;
    color: #d1d5db;
}

/* Secciones divididas (pacientes/profesionales) */
.section-split {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.1fr);
    gap: 1.6rem;
    align-items: stretch;
}

.section-split.reverse {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr);
}

.section-content h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #f9fafb;
}

.section-content p {
    font-size: 0.9rem;
    color: #d1d5db;
    margin-bottom: 0.6rem;
}

.section-list {
    list-style: none;
    font-size: 0.9rem;
    color: #d1d5db;
}

.section-list li {
    margin-bottom: 0.3rem;
}

.section-panel {
    border-radius: 18px;
    padding: 1.2rem 1.1rem;
    border: 1px solid rgba(55, 65, 81, 0.9);
    background: radial-gradient(circle at top, rgba(17, 24, 39, 0.95), rgba(15, 23, 42, 0.98));
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.9);
}

.panel-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #9ca3af;
}

.panel-text {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #e5e7eb;
}

/* Pasos paciente */
.steps-section .steps-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
}

.step-item {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: radial-gradient(circle at top left, #4f46e5, #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: #f9fafb;
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.7);
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
    color: #f9fafb;
}

.step-content p {
    font-size: 0.85rem;
    color: #d1d5db;
}

/* Footer */
.footer {
    margin-top: 2.4rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(31, 41, 55, 0.9);
    font-size: 0.8rem;
    color: #9ca3af;
    text-align: center;
}

.footer-main {
    margin-bottom: 0.3rem;
}

.footer-contact a {
    color: #a5b4fc;
    text-decoration: none;
}

.footer-contact a:hover {
    text-decoration: underline;
}

.footer-bottom {
    font-size: 0.78rem;
}

/* Badge de estado del sistema */
.system-status-badge {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.98);
    border: 1px solid rgba(55, 65, 81, 0.9);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.95);
    font-size: 0.78rem;
    color: #e5e7eb;
    pointer-events: none;
}

.system-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.9);
    animation: statusPulse 2.4s ease-in-out infinite;
}

.system-status-text {
    display: flex;
    flex-direction: column;
}

.system-status-label {
    font-size: 0.75rem;
    color: #9ca3af;
}

.system-status-value {
    font-size: 0.8rem;
    font-weight: 500;
    color: #bbf7d0;
}

/* ANIMACIONES ============================================ */
@keyframes fadeSlideLeft {
    from {
        opacity: 0;
        transform: translateY(10px) translateX(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(0);
    }
}

@keyframes fadeSlideRight {
    from {
        opacity: 0;
        transform: translateY(10px) translateX(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(0);
    }
}

@keyframes btnGlow {
    0% {
        box-shadow: 0 14px 40px rgba(22, 163, 74, 0.65);
    }
    50% {
        box-shadow: 0 20px 55px rgba(22, 163, 74, 0.9);
        transform: translateY(-1px);
    }
    100% {
        box-shadow: 0 14px 40px rgba(22, 163, 74, 0.65);
        transform: translateY(0);
    }
}

@keyframes statusPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.75;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* RESPONSIVE ============================================= */
@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
    }

    .hero-right {
        justify-content: flex-start;
        margin-top: 1.4rem;
    }

    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .section-split,
    .section-split.reverse {
        grid-template-columns: 1fr;
    }

    .section-security .security-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .steps-section .steps-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .top-bar-inner {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .page-wrapper {
        margin: 0.3rem;
        padding: 0.7rem 0.4rem 0.9rem;
        border-radius: 10px;
    }

    .nav {
        display: none;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .section-security .security-grid {
        grid-template-columns: 1fr;
    }

    .system-status-badge {
        right: 0.9rem;
        bottom: 0.9rem;
    }
}

/* Ajustes para pantallas muy grandes (monitores > 1600px de ancho) */
@media (min-width: 1600px) {
    .top-bar-inner {
        max-width: 1500px;
    }

    .page-wrapper {
        max-width: 1500px;
        padding: 1rem 1.2rem 1.4rem;
    }
}

