* {

            margin: 0;

            padding: 0;

            box-sizing: border-box;

            font-family: 'Inter', system-ui, -apple-system, sans-serif;

        }



        html {

            scroll-behavior: smooth;

        }



        body {

            min-height: 100dvh;

            min-height: 100vh;

            background: transparent;

            color: var(--text-primary);

            display: flex;

            align-items: center;

            justify-content: center;

            position: relative;

            padding: 20px;

            transition: color 0.3s ease;

        }



        .background {

            position: fixed;

            inset: 0;

            width: 100%;
            height: 100dvh;
            height: 100vh;


            z-index: -2;

            background: linear-gradient(135deg, #0B1E36 0%, #172A46 50%, #0d2240 100%);

            overflow: hidden;

            transition: background 0.3s ease;

        }



        body.light-theme .background {

            background: linear-gradient(135deg, #e8edf5 0%, #f1f5f9 50%, #dde5f0 100%);

        }



        .background::before,

        .background::after {

            content: '';

            position: absolute;

            width: 100%;

            height: 100%;

            aspect-ratio: 1 / 1;

            max-width: 85vmax;

            border-radius: 50%;

            filter: blur(120px);

            opacity: 0.12;

            will-change: transform;

        }



        .background::before {

            background: var(--iutepal-gold);

            top: -10%;

            left: -10%;

            animation: floatBlob1 25s ease infinite alternate;

        }



        .background::after {

            background: #00d2ff;

            bottom: -10%;

            right: -10%;

            animation: floatBlob2 30s ease infinite alternate;

        }



        @keyframes floatBlob1 {

            0% { transform: translate3d(0, 0, 0) rotate(0deg); }

            100% { transform: translate3d(150px, 80px, 0) rotate(120deg); }

        }



        @keyframes floatBlob2 {

            0% { transform: translate3d(0, 0, 0) rotate(0deg); }

            100% { transform: translate3d(-120px, -150px, 0) rotate(-180deg); }

        }



        /* Contenedor principal - diseño fluido adaptativo */

        .container {

            width: min(92vw, 960px);

            max-width: 960px;

            min-height: clamp(500px, 58vh, 560px);

            background: var(--glass-bg);

            -webkit-backdrop-filter: blur(25px);

            backdrop-filter: blur(25px);

            border-radius: 36px;

            border: 1px solid var(--glass-border);

            box-shadow: var(--glass-shadow);

            overflow: hidden;

            animation: containerAppear 0.65s cubic-bezier(0.22, 1, 0.36, 1);

            display: flex;

            flex-direction: row;

            transition: box-shadow 0.3s ease, transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;

            margin: auto;

        }



        @keyframes containerAppear {

            0% {

                opacity: 0;

                transform: scale(0.96) translate3d(0, 20px, 0);

            }



            100% {

                opacity: 1;

                transform: scale(1) translate3d(0, 0, 0);

            }

        }



        /* Panel izquierdo - Imagen institucional */

        .image-panel {

            flex: 1.15;

            position: relative;

            overflow: hidden;

            display: flex;

            align-items: center;

            justify-content: center;

            min-height: 420px;

            background: url('../img/iutepal_sede_pc.png') center/cover no-repeat;

            transition: all 0.3s ease;

        }



        .image-panel::before {

            content: '';

            position: absolute;

            top: 0;

            left: 0;

            right: 0;

            bottom: 0;

            background: linear-gradient(135deg, rgba(30, 60, 114, 0.7), rgba(42, 82, 152, 0.8));

            z-index: 1;

        }



        .institution-image {

            position: relative;

            z-index: 2;

            text-align: center;

            padding: 40px;

            animation: fadeInScale 1s ease-out;

        }



        @keyframes fadeInScale {

            0% {

                opacity: 0;

                transform: scale(0.9);

            }



            100% {

                opacity: 1;

                transform: scale(1);

            }

        }



        .institution-image img {

            width: 200px;

            height: auto;

            border-radius: 30px;

            box-shadow: 0 25px 50px -10px rgba(0, 0, 0, 0.4);

            border: 4px solid rgba(255, 255, 255, 0.3);

            transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),

                        box-shadow 0.4s ease,

                        border-color 0.4s ease;

            will-change: transform;

            animation: floatImage 7s ease-in-out infinite;

        }



        @keyframes floatImage {



            0%,

            100% {

                transform: translateY(0) scale(1);

            }



            50% {

                transform: translateY(-10px) scale(1.02);

            }

        }



        .institution-image img:hover {

            transform: scale(1.05) translateY(-5px);

            border-color: rgba(255, 215, 0, 0.6);

        }



        .image-caption {

            margin-top: 25px;

            color: white;

        }



        .image-caption h3 {

            font-size: 22px;

            font-weight: 700;

            margin: 8px 0;

            text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);

        }



        .image-caption h4 {

            font-size: 16px;

            font-weight: 500;

            margin: 5px 0;

            background: rgba(0, 0, 0, 0.4);

            display: inline-block;

            padding: 6px 18px;

            border-radius: 30px;

            -webkit-backdrop-filter: blur(4px);

            backdrop-filter: blur(4px);

        }



        .image-subcaption {

            color: rgba(255, 255, 255, 0.95);

            font-size: 14px;

            margin-top: 12px;

            letter-spacing: 1px;

            text-transform: uppercase;

            font-weight: 300;

        }



        /* Panel derecho - Formulario */

        .login-panel {

            flex: 1;

            padding: clamp(26px, 3.5vw, 38px);

            background: rgba(255, 255, 255, 0.96);

            position: relative;

            display: flex;

            flex-direction: column;

            justify-content: center;

        }



        .login-panel::before {

            content: '';

            position: absolute;

            top: 0;

            left: 0;

            width: 100%;

            height: 5px;

            background: linear-gradient(90deg, #ffd700, #ffed4a, #00d2ff, #ffd700);

            background-size: 300% 100%;

            animation: dynamicLine 5s linear infinite;

            z-index: 10;

            will-change: background-position;

        }



        @keyframes dynamicLine {

            0% { background-position: 0% 0%; }

            100% { background-position: 100% 0%; }

        }



        .welcome-text {

            margin-bottom: clamp(16px, 2.5vh, 24px);

        }



        .welcome-title {

            font-family: 'Outfit', 'Inter', sans-serif;

            font-size: 36px;

            font-weight: 800;

            color: #0B1E36;

            margin-bottom: 10px;

            line-height: 1.2;

            letter-spacing: -0.5px;

        }



        .welcome-subtitle {

            color: #4a5568;

            font-size: 15px;

            line-height: 1.6;

        }



        .decorative-line {

            width: 70px;

            height: 4px;

            background: linear-gradient(90deg, #ffd700, #ffed4a);

            border-radius: 2px;

            margin: 20px 0 15px;

            animation: linePulse 2.5s ease-in-out infinite;

            will-change: width, opacity;

        }



        @keyframes linePulse {



            0%,

            100% {

                width: 70px;

                opacity: 1;

            }



            50% {

                width: 90px;

                opacity: 0.8;

            }

        }



        /* Formulario */

        .login-form {

            margin-bottom: 30px;

        }



        .input-group {

            margin-bottom: 30px;

            position: relative;

        }



        .input-label {

            display: block;

            font-size: 13px;

            font-weight: 600;

            text-transform: uppercase;

            letter-spacing: 0.8px;

            color: #2d3748;

            margin-bottom: 8px;

        }



        .input-wrapper {

            position: relative;

        }



        .input-wrapper input {

            width: 100%;

            padding: 16px 20px;

            padding-right: 50px;

            border: 2px solid #e2e8f0;

            border-radius: 16px;

            font-size: 16px;

            transition: border-color 0.25s ease,

                        box-shadow 0.25s ease,

                        background 0.25s ease;

            background: #f8fafc;

            color: #1e2a3a;

            font-weight: 500;

        }



        .input-wrapper input:focus {

            outline: none;

            border-color: #1e6190;

            box-shadow: 0 0 0 4px rgba(30, 97, 144, 0.12);

            background: white;

        }



        .input-wrapper input:hover:not(:focus) {

            border-color: #cbd5e0;

        }



        .input-icon {

            position: absolute;

            right: 20px;

            top: 50%;

            transform: translateY(-50%);

            color: #a0aec0;

            font-size: 20px;

            pointer-events: none;

        }



        .form-options {

            display: flex;

            justify-content: space-between;

            align-items: center;

            margin-bottom: 30px;

            flex-wrap: wrap;

            gap: 15px;

        }



        .remember-me {

            display: flex;

            align-items: center;

            gap: 10px;

        }



        .remember-me input[type="checkbox"] {

            width: 18px;

            height: 18px;

            accent-color: #1e6190;

            cursor: pointer;

        }



        .remember-me label {

            font-size: 14px;

            color: #4a5568;

            cursor: pointer;

        }



        .forgot-link {

            font-size: 14px;

            color: #1e6190;

            text-decoration: none;

            font-weight: 500;

            transition: all 0.3s ease;

            cursor: pointer;

            position: relative;

            padding-bottom: 2px;

        }



        .forgot-link::after {

            content: '';

            position: absolute;

            bottom: 0;

            left: 0;

            width: 0;

            height: 2px;

            background: #1e6190;

            transition: width 0.3s ease;

        }



        .forgot-link:hover::after {

            width: 100%;

        }



        .login-button {

            width: 100%;

            padding: 16px;

            background: linear-gradient(135deg, #F59E0B, #FBBF24);

            background-size: 200% 200%;

            border: none;

            border-radius: 16px;

            color: #0B1E36;

            font-size: 17px;

            font-weight: 700;

            letter-spacing: 0.8px;

            cursor: pointer;

            transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),

                        box-shadow 0.28s ease,

                        background-position 0.4s ease;

            box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35);

            will-change: transform;

            position: relative;

            overflow: hidden;

        }



        .login-button::after {

            content: '';

            position: absolute;

            top: 50%;

            left: 50%;

            width: 0;

            height: 0;

            background: rgba(255, 255, 255, 0.2);

            border-radius: 50%;

            transform: translate(-50%, -50%);

            transition: width 0.5s ease, height 0.5s ease, opacity 0.5s ease;

            opacity: 0;

            pointer-events: none;

        }



        .login-button:hover {

            transform: translateY(-3px);

            box-shadow: 0 14px 28px -5px rgba(245, 158, 11, 0.55);

        }



        .login-button:active {

            transform: translateY(1px) scale(0.99);

            box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);

        }



        .login-button:active::after {

            width: 300px;

            height: 300px;

            opacity: 0;

        }



        /* Mensajes */

        .message-container {

            min-height: 0;

            margin-top: 10px;

            transition: all 0.25s ease;

        }



        .message-container:empty {

            display: none;

            margin: 0;

            min-height: 0;

        }



        .message {

            padding: 14px 18px;

            border-radius: 14px;

            font-size: 14px;

            display: flex;

            align-items: center;

            gap: 12px;

            animation: messagePop 0.3s ease;

        }



        @keyframes messagePop {

            from {

                opacity: 0;

                transform: scale(0.95) translateY(-5px);

            }



            to {

                opacity: 1;

                transform: scale(1) translateY(0);

            }

        }



        .message.success {

            background: #c6f6d5;

            color: #22543d;

            border-left: 4px solid #38a169;

        }



        .message.error {

            background: #fed7d7;

            color: #742a2a;

            border-left: 4px solid #e53e3e;

        }



        .message.info {

            background: #e6f0ff;

            color: #1e3a8a;

            border-left: 4px solid #1e6190;

        }



        /* Loading Overlay mejorado con manejo de errores de navegación */

        .loading-overlay {

            position: fixed;

            top: 0;

            left: 0;

            width: 100%;

            height: 100%;

            background: rgba(255, 255, 255, 0.98);

            -webkit-backdrop-filter: blur(8px);

            backdrop-filter: blur(8px);

            display: none;

            justify-content: center;

            align-items: center;

            z-index: 1000;

            flex-direction: column;

        }



        .loading-overlay.active {

            display: flex;

        }



        .loading-spinner {

            width: 55px;

            height: 55px;

            border: 4px solid #e2e8f0;

            border-top-color: #1e6190;

            border-right-color: #1e6190;

            border-radius: 50%;

            animation: spin 0.75s linear infinite;

            margin-bottom: 20px;

            will-change: transform;

        }



        .loading-text {

            color: #0b3d62;

            font-size: 16px;

            font-weight: 500;

            text-align: center;

            animation: fadeInUp 0.5s ease 0.1s both;

        }



        .loading-subtext {

            color: #5a7184;

            font-size: 13px;

            margin-top: 8px;

            animation: fadeInUp 0.5s ease 0.2s both;

        }



        @keyframes fadeInUp {

            from { opacity: 0; transform: translateY(8px); }

            to   { opacity: 1; transform: translateY(0); }

        }



        @keyframes spin {

            to { transform: rotate(360deg); }

        }



        /* === Preferencia de movimiento reducido === */

        @media (prefers-reduced-motion: reduce) {

            *, *::before, *::after {

                animation-duration: 0.01ms !important;

                animation-iteration-count: 1 !important;

                transition-duration: 0.01ms !important;

            }

        }



        .login-footer {

            margin-top: clamp(14px, 2vh, 22px);

            text-align: center;

            font-size: 11px;

            color: #64748b;

            border-top: 1px solid rgba(226, 232, 240, 0.85);

            padding-top: clamp(10px, 1.5vh, 14px);

        }



        .login-footer p {

            margin: 2px 0;

            line-height: 1.35;

        }



        .login-prereg {

            margin-top: 10px;

            padding: 10px 12px;

            text-align: center;

            background: rgba(16, 185, 129, 0.08);

            border: 1px solid rgba(16, 185, 129, 0.25);

            border-radius: 12px;

        }



        .login-prereg p {

            margin-bottom: 5px;

            color: #475569;

            font-size: 13px;

        }



        .login-prereg a {

            color: #047857;

            font-size: 14px;

            font-weight: 700;

            text-decoration: none;

        }



        .login-prereg a:hover {

            text-decoration: underline;

        }



        /* ========================================================= */

        /* RESPONSIVE ENGINE UNIVERSAL - ADAPTADO A TODA PANTALLA    */

        /* ========================================================= */



        /* 1. Monitores Grandes y Pantallas Ultra-Anchas (> 1400px) */

        @media (min-width: 1400px) {

            .container {

                max-width: 960px;

                min-height: clamp(520px, 58vh, 580px);

            }

            .institution-image img {

                width: 210px;

            }

            .welcome-title {

                font-size: 34px;

            }

        }



        /* 2. Pantallas de Escritorio y Laptops Estándar (1025px - 1399px) */

        @media (min-width: 1025px) and (max-width: 1399px) {

            .container {

                max-width: 920px;

                min-height: clamp(500px, 58vh, 560px);

                max-height: calc(100dvh - 36px);

            }

            .institution-image img {

                width: 180px;

            }

            .welcome-title {

                font-size: 30px;

            }

            .login-panel {

                padding: 34px 38px;

            }

        }



        /* 3. Laptops con altura reducida o zoom activado (min-width: 769px y max-height: 740px) */

        @media (min-width: 769px) and (max-height: 740px) {

            body {

                padding: 10px 16px;

            }

            .container {

                max-height: calc(100dvh - 20px);

                border-radius: 28px;

            }

            .image-panel {

                min-height: 0;

            }

            .institution-image {

                padding: 18px;

            }

            .institution-image img {

                width: 130px;

            }

            .image-caption h3 {

                font-size: 16px;

            }

            .login-panel {

                padding: 20px 30px 14px;

            }

            .welcome-title {

                font-size: 24px;

                margin-bottom: 4px;

            }

            .welcome-subtitle {

                font-size: 12px;

                line-height: 1.3;

            }

            .welcome-text {

                margin-bottom: 10px;

            }

            .decorative-line {

                margin: 6px 0;

            }

            .input-group {

                margin-bottom: 10px;

            }

            .input-label {

                font-size: 11px;

                margin-bottom: 3px;

            }

            .input-wrapper input {

                padding: 9px 14px;

                font-size: 13px;

            }

            .form-options {

                margin-bottom: 10px;

                font-size: 12px;

                gap: 8px;

            }

            .login-button {

                padding: 11px;

                font-size: 14px;

            }

            .login-footer {

                margin-top: 8px;

                padding-top: 6px;

                font-size: 10px;

            }

            .login-footer p {

                margin: 1px 0;

            }

        }



        /* 4. Tablets (769px - 1024px) */

        @media (min-width: 769px) and (max-width: 1024px) {

            body {

                padding: 18px;

            }

            .container {

                max-width: 860px;

                border-radius: 30px;

            }

            .image-panel {

                min-height: 420px;

            }

            .institution-image {

                padding: 24px;

            }

            .institution-image img {

                width: 140px;

            }

            .image-caption h3 {

                font-size: 17px;

            }

            .login-panel {

                padding: 30px 28px;

            }

            .welcome-title {

                font-size: 26px;

            }

        }



        /* 5. Móviles y Phablets (max-width: 768px) */

        @media (max-width: 768px) {

            body {

                padding: 12px;

                min-height: 100vh;

                min-height: 100dvh;

                display: flex;

                align-items: center;

                justify-content: center;

            }



            .container {

                flex-direction: column;

                width: 100%;

                max-width: 480px;

                border-radius: 24px;

                margin: auto;

                box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);

            }



            /* Cabecera compacta que NO empuja el formulario abajo */

            .image-panel {

                flex: none;

                min-height: auto;

                height: auto;

                padding: 14px 16px;

                border-radius: 24px 24px 0 0;

                background-position: center top;

            }



            .institution-image {

                padding: 0;

                display: flex;

                align-items: center;

                justify-content: center;

                gap: 12px;

                text-align: left;

            }



            .institution-image img {

                width: 54px;

                height: 54px;

                border-radius: 14px;

                box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);

                border: 2px solid rgba(255, 255, 255, 0.4);

                animation: none;

                flex-shrink: 0;

            }



            .image-caption {

                margin-top: 0;

            }



            .image-caption h3 {

                font-size: 13px;

                font-weight: 800;

                line-height: 1.25;

                margin: 0;

                text-shadow: 0 2px 4px rgba(0,0,0,0.5);

            }



            .image-caption h4,

            .image-subcaption {

                display: none;

            }



            .login-panel {

                padding: 22px 20px 16px;

                border-radius: 0 0 24px 24px;

            }



            .welcome-title {

                font-size: 24px;

                margin-bottom: 4px;

            }



            .welcome-subtitle {

                font-size: 13px;

                line-height: 1.35;

            }



            .welcome-text {

                margin-bottom: 14px;

            }



            .decorative-line {

                margin: 8px 0 6px;

            }



            .input-group {

                margin-bottom: 14px;

            }



            .input-label {

                font-size: 11.5px;

                margin-bottom: 4px;

            }



            .input-wrapper input {

                padding: 12px 14px;

                font-size: 16px; /* Evita auto-zoom en iOS */

                border-radius: 12px;

            }



            .form-options {

                flex-direction: row;

                justify-content: space-between;

                align-items: center;

                flex-wrap: wrap;

                gap: 8px;

                margin-bottom: 16px;

                font-size: 12.5px;

            }



            .login-button {

                padding: 13px;

                font-size: 15px;

                border-radius: 12px;

            }



            .login-footer {

                margin-top: 14px;

                padding-top: 10px;

                font-size: 10px;

            }



            .login-footer p {

                margin: 2px 0;

            }

        }



        /* 6. Móviles Pequeños (max-width: 400px) */

        @media (max-width: 400px) {

            body {

                padding: 8px;

            }



            .container {

                border-radius: 18px;

            }



            .image-panel {

                padding: 10px 12px;

                border-radius: 18px 18px 0 0;

            }



            .institution-image img {

                width: 44px;

                height: 44px;

                border-radius: 10px;

            }



            .image-caption h3 {

                font-size: 11.5px;

            }



            .login-panel {

                padding: 18px 15px 14px;

                border-radius: 0 0 18px 18px;

            }



            .welcome-title {

                font-size: 21px;

            }



            .welcome-subtitle {

                font-size: 12px;

            }



            .form-options {

                font-size: 11.5px;

            }



            .login-button {

                padding: 12px;

                font-size: 14.5px;

            }



            .login-footer {

                margin-top: 10px;

                padding-top: 8px;

                font-size: 9.5px;

            }

        }



        /* 7. Móviles en orientación Horizontal (Landscape) */

        @media (max-width: 900px) and (orientation: landscape) and (max-height: 520px) {

            body {

                padding: 8px 12px;

                height: 100vh;

                height: 100dvh;

            }



            .container {

                flex-direction: row;

                max-width: 660px;

                max-height: calc(100dvh - 16px);

                border-radius: 20px;

            }



            .image-panel {

                flex: 0.9;

                min-height: 0;

                padding: 14px;

                border-radius: 20px 0 0 20px;

            }



            .institution-image {

                flex-direction: column;

                text-align: center;

                gap: 8px;

            }



            .institution-image img {

                width: 50px;

                height: 50px;

            }



            .image-caption h3 {

                font-size: 12px;

            }



            .login-panel {

                flex: 1.1;

                padding: 14px 18px 10px;

                border-radius: 0 20px 20px 0;

                overflow-y: auto;

            }



            .welcome-title {

                font-size: 19px;

                margin-bottom: 2px;

            }



            .welcome-subtitle {

                font-size: 11px;

                line-height: 1.25;

            }



            .welcome-text {

                margin-bottom: 8px;

            }



            .decorative-line {

                margin: 4px 0;

            }



            .input-group {

                margin-bottom: 8px;

            }



            .input-label {

                font-size: 10.5px;

                margin-bottom: 2px;

            }



            .input-wrapper input {

                padding: 7px 12px;

                font-size: 13px;

            }



            .form-options {

                margin-bottom: 8px;

                font-size: 11px;

                gap: 6px;

            }



            .login-button {

                padding: 9px;

                font-size: 13px;

            }



            .login-footer {

                margin-top: 6px;

                padding-top: 5px;

                font-size: 9px;

            }

        }
        /* 8. Soporte de Safe Areas para Dispositivos con Notch */
        @supports (padding: max(0px)) {


            body {

                padding-left: max(10px, env(safe-area-inset-left));

                padding-right: max(10px, env(safe-area-inset-right));

                padding-top: max(10px, env(safe-area-inset-top));

                padding-bottom: max(10px, env(safe-area-inset-bottom));

            }

        }



        /* 9. La tarjeta del login crece junto con el monitor.

              Antes, global-responsive.css forzaba un salto brusco de 1200px

              a 1800px justo al llegar a 2000px de ancho (.container con

              !important). Ahora el ancho crece de forma progresiva:

                1080p  -> 1200px

                2K     -> ~1430px

                4K     -> hasta 1800px

              Se excluye el modo compacto (ventanas de poca altura) para no

              alterar ese diseño. */

        @media (min-width: 1400px) and (min-height: 741px) {

            .container.login-container {

                width: min(92vw, 960px) !important;

                max-width: 960px !important;

                min-height: clamp(520px, 58vh, 580px) !important;

            }

            /* La tipografía y el logo acompañan el crecimiento de la tarjeta */

            .welcome-title {

                font-size: clamp(34px, 1.75vw, 44px);

            }

            .welcome-subtitle {

                font-size: clamp(15px, 0.8vw, 18px);

            }

            .input-label {

                font-size: clamp(13px, 0.68vw, 15px);

            }

            .input-wrapper input {

                font-size: clamp(16px, 0.85vw, 19px);

            }

            .login-button {

                font-size: clamp(17px, 0.9vw, 20px);

            }

            .remember-me label,

            .forgot-link {

                font-size: clamp(14px, 0.72vw, 16px);

            }

            .login-footer {

                font-size: clamp(11px, 0.58vw, 13px);

            }

            .institution-image img {

                width: clamp(210px, 9.5vw, 250px);

            }

        }


/* ============================================================
   10. LOGIN EN MOVIL VERTICAL: tarjeta a pantalla completa.
   Se declara al final del archivo a proposito, para que gane a
   los bloques de 768px y 400px anteriores. La tarjeta toma el
   alto disponible y el contenido se reparte en vertical: el
   saludo arriba, el formulario al centro y el pie al fondo, con
   tamanos que crecen junto con la pantalla para no dejar franjas
   blancas grandes.
   ============================================================ */
@media (max-width: 768px) and (orientation: portrait) {

    body {
        align-items: flex-start;
        padding: 12px;
    }

    .container.login-container {
        min-height: calc(100dvh - 24px);
        max-height: none;
        margin: 0 auto;
    }

    /* space-around deja el saludo cerca de la cabecera, el bloque del
       formulario al centro y el pie cerca del borde inferior: los
       huecos exteriores son la mitad que los interiores, asi que no
       quedan franjas blancas grandes ni arriba ni abajo. */
    .login-panel {
        flex: 1 1 auto;
        justify-content: space-around;
        padding: clamp(20px, 3vh, 34px) clamp(18px, 4.6vw, 26px) clamp(14px, 2vh, 20px);
    }

    /* !important porque global-responsive.css fuerza h2 { font-size:
       1.5rem !important } y dejaba el saludo en 21px. */
    .welcome-title {
        font-size: clamp(27px, 3.6vh, 33px) !important;
        line-height: 1.15;
        margin-bottom: 6px;
    }

    .welcome-subtitle {
        font-size: clamp(14px, 1.9vh, 16.5px);
        line-height: 1.45;
    }

    .welcome-text {
        margin-bottom: clamp(8px, 1.3vh, 14px);
    }

    .decorative-line {
        margin: clamp(8px, 1.3vh, 14px) 0 0;
    }

    .input-group {
        margin-bottom: clamp(16px, 2.4vh, 26px);
    }

    .input-label {
        font-size: clamp(12px, 1.6vh, 14px);
        margin-bottom: clamp(5px, 0.9vh, 8px);
    }

    .input-wrapper input {
        padding: clamp(15px, 2.5vh, 22px) 16px;
    }

    .form-options {
        margin-bottom: clamp(17px, 2.4vh, 26px);
        font-size: clamp(13px, 1.7vh, 15px);
    }

    .login-button {
        padding: clamp(16px, 2.5vh, 22px);
        font-size: clamp(16px, 2.2vh, 19px);
    }

    .login-footer {
        margin-top: 0 !important;
        padding-top: clamp(12px, 1.9vh, 18px);
        font-size: clamp(10.5px, 1.45vh, 12.5px);
    }

}

@media (max-width: 400px) and (orientation: portrait) {

    body {
        padding: 8px;
    }

    .container.login-container {
        min-height: calc(100dvh - 16px);
        margin: 0 auto;
    }

}
