:root {
    --login-ink: #0f172a;
    --login-muted: #64748b;
    --login-line: #e2e8f0;
    --login-blue: #0d6efd;
    --login-blue-dark: #0b4fc4;
    --login-green: #16a34a;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #edf3f8;
    color: var(--login-ink);
}

.login-page {
    min-height: 100vh;
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(120deg, rgba(239, 246, 255, .94), rgba(240, 253, 244, .88)),
        #edf3f8;
}

.login-shell {
    width: min(1180px, 100%);
    min-height: 680px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(420px, .9fr);
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .26);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .14);
}

.login-media {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: #111827;
}

.login-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.login-media-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(145deg, rgba(15, 23, 42, .92), rgba(15, 23, 42, .45) 54%, rgba(13, 110, 253, .34)),
        linear-gradient(0deg, rgba(15, 23, 42, .5), transparent 46%);
}

.login-brand-panel {
    position: relative;
    z-index: 2;
    min-height: 100%;
    padding: 54px 54px 172px;
    display: flex;
    flex-direction: column;
    color: #fff;
}

.login-logo {
    width: min(270px, 68%);
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 12px 28px rgba(0, 0, 0, .3));
}

.login-brand-copy {
    max-width: 560px;
    margin-top: auto;
}

.login-eyebrow {
    margin: 0;
    font-size: 12px;
    line-height: 1.2;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 800;
}

.login-brand-panel h1 {
    max-width: 520px;
    margin: 0 0 18px;
    font-size: clamp(32px, 3.35vw, 48px);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: 0;
}

.login-media-text {
    max-width: 500px;
    color: rgba(255, 255, 255, .78);
    font-size: 16px;
    line-height: 1.7;
}

.login-media-stats {
    position: absolute;
    z-index: 3;
    left: 54px;
    right: 54px;
    bottom: 40px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.login-media-stats div {
    min-width: 0;
    padding: 15px 16px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 14px;
    background: rgba(15, 23, 42, .38);
    backdrop-filter: blur(18px);
    color: #fff;
}

.login-media-stats span {
    display: block;
    margin-bottom: 5px;
    color: rgba(255, 255, 255, .62);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.login-media-stats strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 15px;
}

.login-form-wrap {
    min-width: 0;
    padding: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.login-form-card {
    width: min(440px, 100%);
}

.login-form-head {
    margin-bottom: 30px;
}

.login-icon {
    width: 54px;
    height: 54px;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: #eff6ff;
    color: var(--login-blue);
    font-size: 24px;
    box-shadow: inset 0 0 0 1px #bfdbfe;
}

.login-form-head h2 {
    margin: 0 0 10px;
    color: var(--login-ink);
    font-size: 32px;
    line-height: 1.15;
    font-weight: 800;
}

.login-form-head p {
    max-width: 380px;
    margin: 0;
    color: var(--login-muted);
    line-height: 1.65;
}

.login-form {
    display: grid;
    gap: 18px;
}

.login-field .form-label {
    margin-bottom: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.login-input-group {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid var(--login-line);
    border-radius: 15px;
    background: #f8fafc;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.login-input-group:focus-within {
    border-color: rgba(13, 110, 253, .72);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, .1);
}

.login-input-group > i {
    color: #94a3b8;
    font-size: 18px;
}

.login-input-group .form-control {
    min-width: 0;
    height: 52px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: var(--login-ink);
    font-weight: 700;
}

.login-input-group .form-control::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

.password-toggle {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    background: #fff;
    color: #64748b;
    transition: background .18s ease, color .18s ease;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    background: #e0edff;
    color: var(--login-blue);
    outline: none;
}

.invalid-note {
    margin-top: 7px;
    color: #dc2626;
    font-size: 12px;
    font-weight: 700;
}

.login-submit {
    height: 56px;
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--login-blue), var(--login-blue-dark));
    color: #fff;
    font-weight: 800;
    box-shadow: 0 14px 24px rgba(13, 110, 253, .24);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.login-submit:hover,
.login-submit:focus-visible {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 18px 30px rgba(13, 110, 253, .32);
    filter: saturate(1.05);
}

.login-submit:disabled {
    opacity: .78;
    transform: none;
    box-shadow: none;
}

.login-submit i {
    font-size: 24px;
    line-height: 1;
}

.login-footer-note {
    margin-top: 22px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #dcfce7;
    border-radius: 14px;
    background: #f0fdf4;
    color: #166534;
    font-size: 13px;
    font-weight: 700;
}

.alert {
    font-size: 14px;
    font-weight: 700;
}

@media (max-width: 991.98px) {
    .login-page { padding: 18px; align-items: flex-start; }
    .login-shell { min-height: auto; grid-template-columns: 1fr; border-radius: 22px; }
    .login-media { min-height: 300px; }
    .login-brand-panel { padding: 30px 30px 112px; }
    .login-logo { width: 220px; }
    .login-brand-panel h1 { max-width: 720px; font-size: 32px; }
    .login-brand-copy { max-width: 680px; }
    .login-media-text { max-width: 650px; }
    .login-media-stats { left: 30px; right: 30px; bottom: 24px; }
    .login-form-wrap { padding: 34px 26px 38px; }
}

@media (max-width: 575.98px) {
    .login-page { padding: 0; }
    .login-shell { width: 100%; min-height: 100vh; border: 0; border-radius: 0; }
    .login-media { min-height: 230px; }
    .login-brand-panel { padding: 24px; justify-content: flex-end; }
    .login-logo { width: 178px; }
    .login-brand-panel h1 { font-size: 26px; }
    .login-media-text { display: none; }
    .login-media-stats { display: none; }
    .login-form-wrap { padding: 28px 20px 34px; align-items: flex-start; }
    .login-form-head { margin-bottom: 24px; }
    .login-form-head h2 { font-size: 27px; }
}

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