* { box-sizing: border-box; margin: 0; padding: 0; }
:root { font-family: Arial, Helvetica, sans-serif; color: #080808; color-scheme: light; }
body { min-height: 100vh; overflow-x: hidden; background: #000; }
button, input { font: inherit; }

.login-shell { position: relative; min-height: 100vh; overflow: hidden; background: #000; }
.login-card { position: relative; display: flex; align-items: center; width: 100%; min-height: 100vh; min-height: 100svh; padding: clamp(24px, 8vh, 96px) 15.8vw; }
.login-visual { position: absolute; z-index: 0; inset: 0; isolation: isolate; overflow: hidden; background: #000 url('/media/login-abstract-poster.png?v=1') center / cover no-repeat; }
.login-video { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: 0; pointer-events: none; transition: opacity .35s ease; }
.login-video.is-playing { opacity: 1; }
.visual-shade { position: absolute; z-index: 1; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.22), transparent 62%, rgba(0,0,0,.12)); }

.visual-brand { position: absolute; z-index: 2; top: 4.5vh; left: 4.5vw; color: #fff; }
.visual-mark { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.visual-mark i, .brand-badge i { width: 8px; height: 8px; border-radius: 50%; background: #2563eb; }
.visual-brand p { margin-top: 7px; color: rgba(255,255,255,.58); font-size: 11px; }

.visual-copy { position: absolute; z-index: 2; left: 18.2vw; top: 50%; width: min(34vw, calc(66vw - max(380px, min(430px, 29vw)) - 48px)); color: #fff; transform: translateY(-48%); }
.visual-kicker { display: none; }
.visual-copy h2 { font-size: clamp(46px, 5.05vw, 94px); font-weight: 400; line-height: 1.01; letter-spacing: -.055em; }
.visual-copy p { max-width: 440px; margin-top: 28px; color: rgba(255,255,255,.66); font-size: 14px; line-height: 1.6; }

.login-panel {
    position: relative;
    z-index: 20;
    width: min(430px, 29vw);
    min-width: 380px;
    height: auto;
    min-height: clamp(560px, 80svh, 820px);
    margin-left: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(32px, 5vh, 56px) 42px;
    color: #090909;
    background: #fff;
    box-shadow: 0 35px 90px rgba(0,0,0,.32);
    animation: panel-enter .55s cubic-bezier(.2,.8,.2,1) both;
}

.brand { margin-bottom: 34px; }
.brand-badge { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; color: #2563eb; font-size: 11px; font-weight: 700; }
.brand-badge i { display: none; }
.brand h1 { font-size: 40px; font-weight: 600; line-height: .9; letter-spacing: -.055em; }
.brand p { margin-top: 16px; color: #666; font-size: 13px; line-height: 1.6; }

.login-alert { display: flex; gap: 9px; align-items: flex-start; margin-bottom: 16px; padding: 11px 12px; border: 1px solid #fecaca; color: #b91c1c; background: #fff1f2; font-size: 12px; font-weight: 700; }
.login-alert.hidden { display: none; }
.login-alert svg, .input-icon svg, .password-toggle svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login-alert svg { width: 18px; height: 18px; flex: 0 0 auto; }
.login-alert span { min-width: 0; overflow-wrap: anywhere; line-height: 1.5; }

.input-group { position: relative; display: grid; grid-template-columns: 28px 1fr auto; align-items: end; margin-bottom: 25px; padding-top: 13px; border-bottom: 1px solid #dedede; color: #aaa; transition: border-color .2s, color .2s; }
.input-label { position: absolute; top: 0; left: 0; color: #666; font-size: 12px; font-weight: 500; }
.input-group:focus-within { color: #2563eb; border-color: #2563eb; box-shadow: 0 1px 0 #2563eb; }
.input-group:focus-within .input-label { color: #1d4ed8; }
.input-icon { width: 22px; height: 46px; display: grid; place-items: center; }
.input-icon svg, .password-toggle svg { width: 17px; }
.input-group input { min-width: 0; width: 100%; height: 46px; border: 0; outline: 0; border-radius: 0; color: #111; background: transparent; font-size: 16px; }
.input-group input::placeholder { color: #767676; font-size: 14px; }
.input-group input[aria-invalid=true] { color: #b91c1c; }
.password-toggle { width: 44px; height: 46px; display: grid; place-items: center; border: 0; border-radius: 8px; color: #737373; background: transparent; cursor: pointer; touch-action: manipulation; }
.password-toggle:hover { color: #111; }
.password-toggle[aria-pressed=true] { color: #2563eb; background: #eff6ff; }
.password-toggle .eye-slash { display: none; }
.password-toggle[aria-pressed=true] .eye-slash { display: block; }
.password-toggle:focus-visible, .login-button:focus-visible { outline: 3px solid #2563eb; outline-offset: 4px; }
.caps-lock-hint { margin: -12px 0 18px; color: #92400e; font-size: 12px; line-height: 1.5; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.login-captcha{margin:8px 0 18px;padding:16px;border-radius:14px;background:#f5f6f8;color:#151a25}
.login-captcha header{display:flex;align-items:flex-start;gap:10px;margin-bottom:13px}
.login-captcha header>svg{width:23px;height:23px;flex-shrink:0}
.login-captcha h2{font-size:14px;font-weight:700;line-height:1.4}
.login-captcha header p,.login-captcha>p,.login-captcha noscript p{font-size:11px;color:#758094;line-height:1.6;margin-top:3px}
.login-captcha-imagen{display:flex;align-items:center;gap:12px;margin-bottom:12px;min-width:0}
.login-captcha-imagen img{display:block;min-width:0;width:calc(100% - 56px);height:auto;aspect-ratio:260/72;border:1px solid #dbe0e8;border-radius:9px;background:#f8f8f8}
.login-captcha-imagen button{display:grid;place-items:center;flex-shrink:0;width:44px;height:44px;border:1px solid #dbe0e8;border-radius:9px;background:#fff;color:#41516b;cursor:pointer}
.login-captcha-imagen button>svg{width:21px;height:21px}
.login-captcha-imagen button:disabled{opacity:.5;cursor:wait}
.login-captcha #captcha{width:100%;min-width:0;min-height:44px;padding:10px 12px;border:1px solid #d2d9e5;border-radius:9px;background:#fff;color:#1e293b;font-size:16px;letter-spacing:.08em;text-transform:uppercase;outline:0}
.login-captcha #captcha::placeholder{text-transform:none;letter-spacing:0;color:#8390a4;font-size:13px}
.login-captcha #captcha:focus{border-color:#7ba7ff;box-shadow:0 0 0 3px #e7f0ff}
.login-captcha #captcha[aria-invalid=true]{border-color:#dc6b75}
.login-captcha button:focus-visible{outline:3px solid #80aaff;outline-offset:3px}

.login-button { position: relative; width: 100%; height: 54px; margin-top: 12px; overflow: hidden; border: 0; border-radius: 999px; color: #fff; background: #050505; font-size: 14px; font-weight: 700; cursor: pointer; touch-action: manipulation; transition: transform .2s, background .2s; }
.login-button:hover:not(:disabled) { transform: translateY(-2px); background: #2563eb; }
.login-button:disabled { opacity: .72; cursor: wait; }
.button-loader { position: absolute; top: 50%; left: 50%; display: none; width: 20px; height: 20px; margin: -10px; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.login-button.is-loading .button-text { opacity: 0; }
.login-button.is-loading .button-loader { display: block; }

.security-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 20px; color: #9a9a9a; font-size: 10px; line-height: 1.5; }
.security-dot { width: 7px; height: 7px; flex: 0 0 auto; margin-top: 3px; border-radius: 50%; background: #22c55e; }
.login-footer { display: flex; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 22px; color: #777; font-size: 10px; }

@keyframes panel-enter { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

@media (max-width: 1280px) {
    .login-card { padding-inline: 6vw; }
    .visual-copy { left: 8vw; width: min(42vw, calc(86vw - 448px)); }
    .visual-copy h2 { font-size: clamp(34px, 4.8vw, 64px); }
    .login-panel { width: 400px; min-width: 0; }
}

@media (max-width: 820px) {
    .login-shell, .login-card { width: 100%; min-height: 100vh; min-height: 100svh; }
    .login-card { align-items: center; justify-content: center; padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }
    .login-visual { background-position: center 35%; }
    .login-video { height: 100%; object-position: center 35%; }
    .visual-shade { background: rgba(0,0,0,.2); }
    .visual-brand { top: 20px; left: 22px; }
    .visual-brand p, .visual-copy { display: none; }
    .login-panel {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        max-width: 470px;
        min-height: 0;
        height: auto;
        margin: 0;
        padding: 30px 28px 24px;
        border-radius: 24px;
    }
    .brand { margin-bottom: 25px; }
    .brand-badge { margin-bottom: 14px; }
    .brand h1 { font-size: 36px; line-height: .94; }
    .brand p { margin-top: 10px; }
    .input-group { margin-bottom: 20px; }
    .input-group input, .input-icon, .password-toggle { height: 48px; }
    .login-button { height: 52px; margin-top: 4px; }
    .security-note { margin-top: 15px; }
    .login-footer { margin-top: 18px; padding-top: 0; }
}

@media (max-width: 480px) {
    .login-card { padding: max(18px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
    .login-visual { background-position: center 30%; }
    .login-video { object-position: center 30%; }
    .login-panel { width: 100%; margin: 0; padding: 32px 24px 28px; border-radius: 22px; }
    .brand h1 { font-size: 34px; }
    .login-footer { display: none; }
}

@media (max-height: 500px) and (max-width: 820px) {
    .login-card { padding-block: 16px; }
    .login-panel { padding-block: 24px; }
    .brand { margin-bottom: 20px; }
    .brand h1 { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
