* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #f8fafc;
    background: #0f172a;
}

.login-background-image {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.42;
    z-index: -2;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.42), transparent 34%),
        linear-gradient(135deg, rgba(2, 6, 23, 0.88), rgba(15, 23, 42, 0.76));
    z-index: -1;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.72;
}

.login-shell {
    width: min(1180px, calc(100% - 32px));
    min-height: calc(100vh - 74px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.04fr 0.96fr;
    gap: 28px;
    align-items: center;
    padding: 42px 0 26px;
}

.login-brand-panel {
    display: flex;
    align-items: stretch;
}

.brand-card,
.login-card {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(22px);
}

.brand-card {
    padding: 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 560px;
}

.eyebrow {
    margin: 0 0 10px;
    color: #93c5fd;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

.brand-card h1,
.login-card h2,
.panel-heading h3 {
    margin: 0;
    color: #ffffff;
    letter-spacing: -0.04em;
}

.brand-card h1 {
    max-width: 520px;
    font-size: clamp(2.7rem, 6vw, 5.7rem);
    line-height: 0.9;
}

.brand-copy {
    max-width: 520px;
    margin: 24px 0 0;
    color: #cbd5e1;
    font-size: 1.07rem;
    line-height: 1.7;
}

.brand-points {
    display: grid;
    gap: 14px;
    margin-top: 34px;
}

.brand-point {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.46);
    color: #e2e8f0;
}

.brand-point-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    background: rgba(59, 130, 246, 0.18);
}

.login-card {
    padding: 26px;
}

.login-card-header {
    margin-bottom: 18px;
}

.login-card h2 {
    font-size: clamp(1.7rem, 3vw, 2.35rem);
}

.login-alert {
    margin-bottom: 16px;
    padding: 13px 14px;
    border-radius: 16px;
    font-weight: 700;
    line-height: 1.45;
}

.login-alert-error {
    border: 1px solid rgba(248, 113, 113, 0.32);
    background: rgba(127, 29, 29, 0.38);
    color: #fecaca;
}

.login-alert-success {
    border: 1px solid rgba(74, 222, 128, 0.32);
    background: rgba(20, 83, 45, 0.38);
    color: #bbf7d0;
}

.login-method-picker {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.login-method {
    display: flex;
    min-height: 78px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.58);
    color: #e2e8f0;
    text-align: left;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.login-method:hover {
    transform: translateY(-1px);
    border-color: rgba(147, 197, 253, 0.5);
    background: rgba(30, 41, 59, 0.78);
}

.login-method.is-active {
    border-color: rgba(96, 165, 250, 0.95);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.92), rgba(14, 165, 233, 0.72));
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.24);
}

.login-method span {
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 800;
}

.login-method small {
    color: rgba(226, 232, 240, 0.82);
    font-size: 0.78rem;
    line-height: 1.25;
}

.login-panels {
    min-height: 410px;
}

.login-panel {
    display: block;
    animation: panelFadeIn 0.2s ease;
}

.login-panel.hidden {
    display: none;
}

@keyframes panelFadeIn {
    from {
        transform: translateY(6px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.panel-heading {
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 20px;
    background: rgba(2, 6, 23, 0.28);
    margin-bottom: 16px;
}

.panel-heading h3 {
    font-size: 1.28rem;
}

.panel-heading p {
    margin: 7px 0 0;
    color: #cbd5e1;
    line-height: 1.5;
}

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

.login-form + .login-form {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.login-form label {
    color: #cbd5e1;
    font-size: 0.92rem;
    font-weight: 750;
}

.login-form input[type="email"],
.login-form input[type="password"],
.login-form input[type="text"] {
    width: 100%;
    min-height: 50px;
    padding: 0 15px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 15px;
    outline: none;
    background: rgba(15, 23, 42, 0.74);
    color: #ffffff;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.login-form input::placeholder {
    color: #94a3b8;
}

.login-form input:focus {
    border-color: rgba(96, 165, 250, 0.96);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
    background: rgba(15, 23, 42, 0.92);
}

.remember-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 2px 0 4px;
    color: #cbd5e1;
    line-height: 1.4;
}

.remember-row input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #3b82f6;
}

.primary-login-button,
.secondary-login-button {
    width: 100%;
    min-height: 52px;
    margin-top: 4px;
    border: 0;
    border-radius: 16px;
    color: #ffffff;
    font-weight: 850;
    letter-spacing: -0.01em;
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.22);
    transition: transform 0.16s ease, filter 0.16s ease;
}

.primary-login-button {
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
}

.secondary-login-button {
    border: 1px solid rgba(96, 165, 250, 0.44);
    background: rgba(37, 99, 235, 0.42);
}

.primary-login-button:hover,
.secondary-login-button:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

.method-note {
    margin: 6px 0 0;
    color: #cbd5e1;
    font-size: 0.9rem;
    line-height: 1.5;
}

.login-status {
    min-height: 24px;
    color: #cbd5e1;
    font-size: 0.92rem;
    line-height: 1.45;
}

.login-status.is-error {
    color: #fecaca;
}

.login-status.is-success {
    color: #bbf7d0;
}

.login-footer {
    display: grid;
    min-height: 74px;
    place-items: center;
    padding: 16px;
    color: #cbd5e1;
    background: rgba(2, 6, 23, 0.58);
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

@media (max-width: 920px) {
    .login-shell {
        grid-template-columns: 1fr;
        padding-top: 24px;
    }

    .brand-card {
        min-height: auto;
        padding: 28px;
    }

    .brand-card h1 {
        font-size: clamp(2.4rem, 10vw, 4rem);
    }
}

@media (max-width: 620px) {
    .login-shell {
        width: min(100% - 20px, 520px);
        min-height: calc(100vh - 66px);
        gap: 12px;
        padding: 10px 0 18px;
    }

    .brand-card {
        display: none;
    }

    .login-card {
        padding: 18px;
        border-radius: 24px;
    }

    .login-method-picker {
        grid-template-columns: 1fr;
    }

    .login-method {
        min-height: 64px;
    }

    .login-panels {
        min-height: 0;
    }

    .login-footer {
        min-height: 66px;
        font-size: 0.86rem;
        text-align: center;
    }
}

.otp-verify-form.is-hidden {
    display: none;
}

.otp-code-step {
    display: grid;
    gap: 10px;
}

.otp-code-hint {
    margin: 4px 0 0;
    color: #94a3b8;
    font-size: 0.86rem;
    line-height: 1.45;
}
