﻿/* Login Reportes AKD — estilos para /login */
:root {
            --rojo: #ef1728;
            --rojo-oscuro: #b90f1c;
            --azul: #0867e8;
            --azul-oscuro: #063d9b;
            --negro: #111827;
            --gris: #6b7280;
            --gris-claro: #d9dee7;
            --blanco: #ffffff;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        html {
            height: 100%;
        }

        body {
            min-height: 100%;
            min-height: 100dvh;
            margin: 0;
            padding: 0;
            display: flex;
            align-items: stretch;
            justify-content: stretch;

            font-family:
                Inter,
                Segoe UI,
                Arial,
                sans-serif;

            color: var(--negro);

            background: #070b13;
        }

        button,
        input {
            font: inherit;
        }

        .login-container {
            position: relative;
            width: 100%;
            min-height: 100vh;
            min-height: 100dvh;
            flex: 1;

            display: grid;
            grid-template-columns: 1.08fr 0.92fr;
            align-items: stretch;

            overflow: hidden;
            border: 0;
            border-radius: 0;

            background-color: #0a1018;
            background-image:
                linear-gradient(
                    160deg,
                    rgba(8, 12, 22, 0.78) 0%,
                    rgba(10, 16, 28, 0.72) 45%,
                    rgba(6, 10, 18, 0.82) 100%
                ),
                url("../img/fondo-login.png");
            background-position: center;
            background-size: cover;
            background-repeat: no-repeat;

            box-shadow: none;
        }

        /* Esquinas CSS desactivadas: ya vienen en el fondo */

        .corner {
            display: none;
        }

        /* Panel izquierdo */

        .art-panel {
            position: relative;
            min-height: 100%;
            padding: clamp(24px, 4vw, 55px) clamp(16px, 3vw, 35px);

            display: flex;
            align-items: center;
            justify-content: center;

            overflow: hidden;
            background: transparent;
            -webkit-user-select: none;
            user-select: none;
        }

        .art-panel::before {
            display: none;
        }

        .paint-red,
        .paint-blue,
        .paint-black {
            display: none;
        }

        /* Arte como fondo CSS (mÃ¡s difÃ­cil de â€œGuardar imagen comoâ€¦â€) */
        .artwork {
            position: relative;
            z-index: 3;

            width: min(720px, 92%);
            height: min(78vh, 760px);
            max-height: none;

            background-image: url("../img/logo-akd.png");
            background-position: center bottom;
            background-size: contain;
            background-repeat: no-repeat;

            filter:
                drop-shadow(0 22px 18px rgba(0, 0, 0, 0.2))
                saturate(1.06);

            -webkit-user-select: none;
            user-select: none;
            -webkit-user-drag: none;
            pointer-events: none;
        }

        .protect-assets {
            -webkit-user-select: none;
            user-select: none;
            -webkit-touch-callout: none;
        }

        .login-card,
        .login-card input,
        .login-card textarea,
        .login-card label,
        .login-card button,
        .login-card a {
            -webkit-user-select: text;
            user-select: text;
            -webkit-touch-callout: default;
        }

        .login-card button,
        .login-card a,
        .role-icon {
            -webkit-user-select: none;
            user-select: none;
        }

        .role-icons {
            position: absolute;
            z-index: 7;
            bottom: 28px;
            left: 32px;

            display: flex;
            gap: 14px;
        }

        .role-icon {
            position: relative;
            width: 48px;
            height: 48px;

            display: grid;
            place-items: center;

            border: 1.5px solid rgba(255, 255, 255, 0.45);
            border-radius: 50%;
            text-decoration: none;
            color: rgba(255, 255, 255, 0.95);
            font-size: 20px;
            isolation: isolate;
            overflow: hidden;

            backdrop-filter: blur(2px);
            -webkit-backdrop-filter: blur(2px);

            transition: transform 0.25s cubic-bezier(0.34, 1.4, 0.64, 1);
            animation: jelly-wobble 3.2s ease-in-out infinite;
        }

        .role-icon i {
            position: relative;
            z-index: 3;
            filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
        }

        .role-icon::before {
            content: "";
            position: absolute;
            inset: 3px 8px auto 8px;
            height: 14px;
            border-radius: 50%;
            background: linear-gradient(
                180deg,
                rgba(255, 255, 255, 0.85),
                rgba(255, 255, 255, 0.15)
            );
            z-index: 2;
            pointer-events: none;
            opacity: 0.9;
        }

        .role-icon:hover {
            transform: scale(1.08) translateY(-2px);
        }

        .role-icon--fb {
            animation-delay: 0s;
            background:
                radial-gradient(
                    circle at 30% 25%,
                    rgba(255, 255, 255, 0.55),
                    transparent 42%
                ),
                linear-gradient(
                    160deg,
                    rgba(110, 180, 255, 0.95),
                    rgba(24, 119, 242, 0.88) 45%,
                    rgba(10, 70, 180, 0.95)
                );
            box-shadow:
                0 8px 16px rgba(24, 119, 242, 0.35),
                inset 0 -6px 12px rgba(8, 40, 120, 0.35),
                inset 0 4px 10px rgba(255, 255, 255, 0.35);
        }

        .role-icon--ig {
            animation-delay: 0.25s;
            background:
                radial-gradient(
                    circle at 30% 25%,
                    rgba(255, 255, 255, 0.55),
                    transparent 42%
                ),
                linear-gradient(
                    145deg,
                    rgba(255, 200, 120, 0.95),
                    rgba(228, 64, 95, 0.92) 40%,
                    rgba(131, 58, 180, 0.95) 75%,
                    rgba(80, 40, 160, 0.95)
                );
            box-shadow:
                0 8px 16px rgba(228, 64, 95, 0.35),
                inset 0 -6px 12px rgba(90, 30, 120, 0.35),
                inset 0 4px 10px rgba(255, 255, 255, 0.35);
        }

        .role-icon--li {
            animation-delay: 0.5s;
            background:
                radial-gradient(
                    circle at 30% 25%,
                    rgba(255, 255, 255, 0.55),
                    transparent 42%
                ),
                linear-gradient(
                    160deg,
                    rgba(120, 200, 255, 0.95),
                    rgba(10, 102, 194, 0.9) 50%,
                    rgba(5, 60, 130, 0.95)
                );
            box-shadow:
                0 8px 16px rgba(10, 102, 194, 0.35),
                inset 0 -6px 12px rgba(5, 40, 100, 0.35),
                inset 0 4px 10px rgba(255, 255, 255, 0.35);
        }

        @keyframes jelly-wobble {
            0%,
            100% {
                border-radius: 50%;
                transform: scale(1, 1);
            }
            30% {
                border-radius: 48% 52% 47% 53% / 52% 48% 52% 48%;
                transform: scale(1.03, 0.97);
            }
            60% {
                border-radius: 52% 48% 53% 47% / 48% 52% 48% 52%;
                transform: scale(0.98, 1.02);
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .role-icon,
            .login-card {
                animation: none;
            }
        }

        /* Panel derecho */

        .form-panel {
            position: relative;
            min-height: 100%;
            padding: clamp(24px, 4vw, 65px);

            display: flex;
            align-items: center;
            justify-content: center;
            background: transparent;
        }

        .login-card {
            position: relative;
            width: min(535px, 100%);
            padding: 48px 48px 44px;

            border: 2px solid rgba(90, 140, 180, 0.45);
            border-radius: 32px;

            background-color: transparent !important;
            background-image:
                linear-gradient(
                    165deg,
                    rgba(40, 70, 100, 0.55),
                    rgba(20, 40, 65, 0.62) 48%,
                    rgba(25, 50, 80, 0.58)
                ) !important;

            backdrop-filter: blur(16px) saturate(1.2);
            -webkit-backdrop-filter: blur(16px) saturate(1.2);

            box-shadow:
                0 24px 50px rgba(0, 0, 0, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.18),
                inset 0 -14px 30px rgba(20, 60, 100, 0.25);

            animation: card-jelly 5s ease-in-out infinite;
            color: #e8eef6;
        }

        .login-card::before {
            content: "";
            position: absolute;
            inset: 8px 16px auto 16px;
            height: 42px;
            border-radius: 50%;
            background: linear-gradient(
                180deg,
                rgba(255, 255, 255, 0.18),
                rgba(120, 180, 230, 0.08),
                transparent
            );
            pointer-events: none;
            opacity: 0.85;
            z-index: 0;
        }

        .login-card > * {
            position: relative;
            z-index: 1;
        }

        @keyframes card-jelly {
            0%,
            100% {
                border-radius: 32px;
            }
            50% {
                border-radius: 34px 30px 33px 31px;
            }
        }

        .brand-shield {
            position: relative;

            width: 78px;
            height: 82px;
            margin: 0 auto 20px;

            display: grid;
            place-items: center;

            color: var(--rojo);
            font-size: 32px;

            background: var(--negro);

            clip-path: polygon(
                50% 0,
                92% 18%,
                84% 71%,
                50% 100%,
                16% 71%,
                8% 18%
            );

            filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.18));
        }

        .brand-shield::before {
            content: "";
            position: absolute;
            inset: 7px;

            clip-path: inherit;
            background: rgba(237, 240, 245, 0.92);
        }

        .brand-shield i {
            position: relative;
            z-index: 2;
        }

        .login-card h1 {
            margin-bottom: 10px;

            text-align: center;
            font-size: clamp(2rem, 4vw, 3rem);
            line-height: 1.1;
            font-weight: 800;
            color: #f3f6fb;
        }

        .subtitle {
            margin-bottom: 38px;

            text-align: center;
            color: #a8b4c6;
            font-size: 18px;
        }

        .text-red {
            color: var(--rojo);
            font-weight: 700;
        }

        .text-blue {
            color: var(--azul);
            font-weight: 700;
        }

        .form-group {
            position: relative;
            margin-bottom: 28px;
        }

        .form-group > i.field-icon {
            position: absolute;
            top: 50%;
            left: 18px;
            transform: translateY(-50%);
            z-index: 2;

            color: #9aa8bc;
            font-size: 20px;
            transition: color 0.25s ease, top 0.25s ease, transform 0.25s ease;
        }

        .form-input {
            width: 100%;
            height: 58px;
            padding: 18px 52px 8px 52px;

            border: 0;
            border-bottom: 2px solid rgba(140, 160, 185, 0.35);
            border-radius: 14px 14px 0 0;
            outline: none;

            color: #f0f4fa;
            background: rgba(12, 22, 36, 0.45);

            font-size: 17px;

            transition:
                background 0.25s ease,
                border-color 0.25s ease,
                box-shadow 0.25s ease;
        }

        .form-input::placeholder {
            color: transparent;
        }

        .float-label {
            position: absolute;
            left: 52px;
            top: 50%;
            transform: translateY(-50%);
            z-index: 1;

            color: #9aa8bc;
            font-size: 16px;
            font-weight: 500;
            pointer-events: none;
            white-space: nowrap;

            transition:
                top 0.25s ease,
                transform 0.25s ease,
                font-size 0.25s ease,
                color 0.25s ease;
        }

        .input-line {
            position: absolute;
            left: 0;
            bottom: 0;
            width: 100%;
            height: 2px;
            background: linear-gradient(90deg, var(--rojo), var(--azul));
            transform: scaleX(0);
            transform-origin: left center;
            transition: transform 0.35s ease;
            pointer-events: none;
        }

        .form-input:focus,
        .form-input:not(:placeholder-shown) {
            background: rgba(8, 18, 32, 0.55);
            border-bottom-color: transparent;
        }

        .form-input:focus ~ .float-label,
        .form-input:not(:placeholder-shown) ~ .float-label {
            top: 8px;
            transform: translateY(0);
            font-size: 12px;
            color: #7eb6ff;
            font-weight: 700;
        }

        .form-input:focus ~ .input-line,
        .form-input:not(:placeholder-shown) ~ .input-line {
            transform: scaleX(1);
        }

        .form-input:focus ~ i.field-icon,
        .form-input:not(:placeholder-shown) ~ i.field-icon {
            color: #7eb6ff;
        }

        .password-button {
            position: absolute;
            top: 50%;
            right: 10px;
            transform: translateY(-50%);
            z-index: 2;

            width: 38px;
            height: 38px;

            display: grid;
            place-items: center;

            border: 0;
            border-radius: 50%;

            color: #9aa8bc;
            background: transparent;
            cursor: pointer;
        }

        .password-button:hover {
            color: #7eb6ff;
            background: rgba(126, 182, 255, 0.12);
        }

        .options-row {
            margin: 6px 0 30px;

            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 20px;
        }

        .remember {
            display: flex;
            align-items: center;
            gap: 10px;

            color: #b0bac8;
            cursor: pointer;
            user-select: none;
        }

        .remember input {
            width: 20px;
            height: 20px;
            accent-color: var(--azul);
        }

        .login-button {
            position: relative;
            width: 100%;
            height: 68px;

            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;

            overflow: hidden;
            border: 0;
            border-radius: 12px;

            color: white;
            background:
                linear-gradient(
                    100deg,
                    var(--rojo) 0%,
                    #d91f36 40%,
                    var(--azul) 100%
                );

            box-shadow:
                0 14px 25px rgba(16, 65, 153, 0.25);

            font-size: 19px;
            font-weight: 800;
            cursor: pointer;

            transition:
                transform 0.2s ease,
                box-shadow 0.2s ease;
        }

        .login-button::before {
            content: "";
            position: absolute;
            inset: 0;
            transform: translateX(-110%);

            background:
                linear-gradient(
                    100deg,
                    transparent,
                    rgba(255, 255, 255, 0.25),
                    transparent
                );

            transition: transform 0.55s ease;
        }

        .login-button:hover {
            transform: translateY(-2px);

            box-shadow:
                0 18px 32px rgba(16, 65, 153, 0.32);
        }

        .login-button:hover::before {
            transform: translateX(110%);
        }

        .login-button:active {
            transform: scale(0.99);
        }

        .login-button:disabled {
            cursor: not-allowed;
            opacity: 0.75;
        }

        .secure-access {
            margin-top: 34px;

            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;

            color: #8b97a8;
            text-align: center;
            font-size: 15px;
        }

        .login-hint {
            margin: -12px 0 22px;
            color: #8b97a8;
            font-size: 13px;
            text-align: center;
            line-height: 1.35;
        }

        .secure-access i {
            color: #8b97a8;
        }

        .message {
            display: none;
            margin-top: 20px;
            padding: 13px 15px;

            border-radius: 10px;

            text-align: center;
            font-size: 14px;
            font-weight: 600;
        }

        .message.error {
            display: block;
            color: #a80f1a;
            background: #ffe8eb;
            border: 1px solid #ffc3ca;
        }

        .form-input.is-invalid {
            border-bottom-color: #ef1728;
            box-shadow: inset 0 -1px 0 rgba(239, 23, 40, 0.35);
        }

        .message.success {
            display: block;
            color: #075f35;
            background: #e2f8ed;
            border: 1px solid #a8e4c6;
        }

        /* Responsive */

        @media (max-width: 1100px) {
            .login-container {
                grid-template-columns: 1fr 1fr;
            }

            .form-panel {
                padding: 28px;
            }

            .login-card {
                padding: 36px 28px;
            }
        }

        @media (max-width: 860px) {
            body {
                overflow-x: hidden;
            }

            .login-container {
                grid-template-columns: 1fr;
                grid-template-rows: auto 1fr;
                min-height: 100vh;
                min-height: 100dvh;
                overflow: auto;
            }

            .art-panel {
                min-height: clamp(220px, 38vh, 360px);
                padding: 28px 16px 8px;
                overflow: visible;
            }

            .artwork {
                width: min(420px, 88%);
                height: clamp(200px, 34vh, 340px);
            }

            .form-panel {
                min-height: auto;
                padding: 12px 16px calc(28px + env(safe-area-inset-bottom, 0px));
                align-items: flex-start;
            }

            .login-card {
                width: 100%;
                margin-top: -18px;
                padding: 28px 20px 24px;
                border-radius: 22px;
                z-index: 10;
            }

            .role-icons {
                bottom: 12px;
                left: 50%;
                transform: translateX(-50%);
                gap: 12px;
            }

            .role-icon {
                width: 42px;
                height: 42px;
                font-size: 18px;
            }

            .corner-bottom-right {
                display: none;
            }
        }

        @media (max-width: 520px) {
            .art-panel {
                min-height: clamp(180px, 32vh, 280px);
                padding: 20px 10px 4px;
            }

            .artwork {
                width: min(340px, 92%);
                height: clamp(170px, 30vh, 260px);
            }

            .login-card h1 {
                font-size: 1.9rem;
            }

            .subtitle {
                margin-bottom: 22px;
                font-size: 14px;
            }

            .form-input {
                height: 54px;
                font-size: 16px; /* evita zoom automÃ¡tico en iOS */
            }

            .login-button {
                height: 56px;
                font-size: 17px;
            }

            .login-card {
                padding: 24px 16px 20px;
                border-radius: 18px;
            }

            .brand-shield {
                width: 64px;
                height: 68px;
                font-size: 26px;
                margin-bottom: 12px;
            }

            .secure-access {
                font-size: 13px;
                margin-top: 22px;
            }
        }

        @media (max-width: 380px) {
            .role-icons {
                display: none;
            }
        }
