:root {
    --optep-violet-950: #2e1065;
    --optep-violet-900: #4c1d95;
    --optep-violet-800: #5b21b6;
    --optep-violet-700: #6d28d9;
    --optep-violet-600: #7c3aed;
    --optep-violet-500: #8b5cf6;
    --optep-violet-200: #ddd6fe;
    --optep-violet-100: #ede9fe;
    --optep-violet-50: #f5f3ff;
    --optep-text: #1f1633;
    --optep-muted: #6f6780;
    --optep-border: #e7e1ef;
    --optep-background: #f7f4fb;
    --optep-white: #ffffff;
    --optep-danger: #b42336;
    --optep-danger-bg: #fff1f3;
    --optep-danger-border: #fecdd3;
    --optep-shadow: 0 28px 70px rgba(76, 29, 149, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--optep-background);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--optep-text);
    background:
        radial-gradient(circle at top left, rgba(139, 92, 246, 0.10), transparent 34%),
        linear-gradient(135deg, #faf8ff 0%, #f3eefb 100%);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input {
    font: inherit;
}

button {
    border: 0;
}

.optep-login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.optep-login-shell {
    width: min(1180px, 100%);
    min-height: 680px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
    overflow: hidden;
    background: var(--optep-white);
    border: 1px solid rgba(109, 40, 217, 0.12);
    border-radius: 30px;
    box-shadow: var(--optep-shadow);
}

.optep-login-brand {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 72px;
    color: var(--optep-white);
    background:
        linear-gradient(145deg, rgba(46, 16, 101, 0.98), rgba(109, 40, 217, 0.97)),
        var(--optep-violet-900);
}

.optep-brand-content {
    position: relative;
    z-index: 2;
    max-width: 520px;
}

.optep-brand-logo-wrap {
    width: fit-content;
    margin-bottom: 42px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 18px;
    box-shadow: 0 12px 30px rgba(35, 10, 75, 0.24);
}

.optep-brand-logo {
    display: block;
    width: auto;
    max-width: 210px;
    height: 52px;
    object-fit: contain;
}

.optep-brand-badge,
.optep-form-kicker,
.optep-enrollment-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.optep-brand-badge {
    margin-bottom: 20px;
    padding: 8px 12px;
    color: #f5f3ff;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
}

.optep-brand-title {
    max-width: 520px;
    margin: 0;
    font-size: clamp(2.15rem, 4vw, 3.7rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.optep-brand-description {
    max-width: 510px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
    line-height: 1.75;
}

.optep-brand-features {
    display: grid;
    gap: 15px;
    margin-top: 38px;
}

.optep-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.93);
    font-size: 0.94rem;
    font-weight: 650;
}

.optep-feature-icon {
    display: inline-grid;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    place-items: center;
    color: var(--optep-violet-900);
    background: var(--optep-white);
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 900;
}

.optep-brand-decoration {
    position: absolute;
    z-index: 1;
    border-radius: 50%;
    pointer-events: none;
}

.optep-brand-decoration-one {
    width: 340px;
    height: 340px;
    right: -150px;
    top: -120px;
    background: rgba(255, 255, 255, 0.08);
}

.optep-brand-decoration-two {
    width: 230px;
    height: 230px;
    left: -100px;
    bottom: -100px;
    border: 42px solid rgba(255, 255, 255, 0.07);
}

.optep-login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background: var(--optep-white);
}

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

.optep-mobile-logo {
    display: none;
    margin-bottom: 30px;
    text-align: center;
}

.optep-mobile-logo-image {
    width: auto;
    max-width: 190px;
    height: 48px;
    object-fit: contain;
}

.optep-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 24px;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1.55;
}

.optep-alert-error {
    color: var(--optep-danger);
    background: var(--optep-danger-bg);
    border: 1px solid var(--optep-danger-border);
}

.optep-alert-icon {
    display: inline-grid;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    place-items: center;
    color: var(--optep-white);
    background: var(--optep-danger);
    border-radius: 50%;
    font-weight: 900;
}

.optep-form-header {
    margin-bottom: 30px;
}

.optep-form-kicker {
    margin-bottom: 11px;
    color: var(--optep-violet-700);
}

.optep-form-header h2 {
    margin: 0;
    color: var(--optep-text);
    font-size: clamp(1.9rem, 3vw, 2.55rem);
    line-height: 1.14;
    letter-spacing: -0.04em;
}

.optep-form-header p {
    margin: 12px 0 0;
    color: var(--optep-muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

.optep-form {
    display: grid;
    gap: 21px;
}

.optep-field {
    display: grid;
    gap: 8px;
}

.optep-field label {
    color: #3d324d;
    font-size: 0.82rem;
    font-weight: 800;
}

.optep-input-wrap {
    position: relative;
}

.optep-input-icon {
    position: absolute;
    top: 50%;
    left: 17px;
    display: inline-grid;
    width: 22px;
    height: 22px;
    place-items: center;
    color: var(--optep-violet-700);
    background: var(--optep-violet-100);
    border-radius: 7px;
    font-size: 0.75rem;
    font-weight: 900;
    transform: translateY(-50%);
    pointer-events: none;
}

.optep-field input {
    width: 100%;
    min-height: 54px;
    padding: 0 16px;
    color: var(--optep-text);
    background: #fcfbfe;
    border: 1px solid var(--optep-border);
    border-radius: 14px;
    outline: none;
    box-shadow: 0 1px 0 rgba(46, 16, 101, 0.02);
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background 160ms ease;
}

.optep-input-wrap input {
    padding-left: 52px;
}

.optep-field input::placeholder {
    color: #a49caf;
}

.optep-field input:hover {
    border-color: #d4c8e4;
}

.optep-field input:focus {
    background: var(--optep-white);
    border-color: var(--optep-violet-600);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.optep-code-input {
    height: 64px;
    padding-left: 22px !important;
    text-align: center;
    font-size: 1.55rem;
    font-weight: 850;
    letter-spacing: 0.42em;
}

.optep-button {
    display: inline-flex;
    min-height: 54px;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    padding: 0 20px;
    border-radius: 14px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 850;
    letter-spacing: 0.015em;
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        background 160ms ease;
}

.optep-button-primary {
    margin-top: 5px;
    color: var(--optep-white);
    background: linear-gradient(135deg, var(--optep-violet-700), var(--optep-violet-600));
    box-shadow: 0 14px 26px rgba(109, 40, 217, 0.25);
}

.optep-button-primary:hover {
    background: linear-gradient(135deg, var(--optep-violet-800), var(--optep-violet-700));
    box-shadow: 0 17px 32px rgba(109, 40, 217, 0.31);
    transform: translateY(-1px);
}

.optep-button-primary:active {
    transform: translateY(0);
}

.optep-button:focus-visible,
.optep-button-link:focus-visible {
    outline: 3px solid rgba(139, 92, 246, 0.35);
    outline-offset: 3px;
}

.optep-button-arrow {
    font-size: 1.15rem;
    line-height: 1;
}

.optep-back-form {
    margin-top: 17px;
    text-align: center;
}

.optep-button-link {
    padding: 8px 10px;
    color: var(--optep-violet-700);
    background: transparent;
    cursor: pointer;
    font-size: 0.84rem;
    font-weight: 750;
}

.optep-button-link:hover {
    color: var(--optep-violet-900);
    text-decoration: underline;
}

.optep-security-icon {
    display: grid;
    width: 76px;
    height: 76px;
    margin: 0 auto 4px;
    place-items: center;
    color: var(--optep-white);
    background:
        radial-gradient(circle at 30% 25%, #a78bfa, transparent 38%),
        linear-gradient(145deg, var(--optep-violet-700), var(--optep-violet-900));
    border: 8px solid var(--optep-violet-50);
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(109, 40, 217, 0.22);
    font-size: 1.55rem;
    font-weight: 900;
}

.optep-enrollment {
    display: grid;
    justify-items: center;
    gap: 15px;
    padding: 19px;
    background: linear-gradient(180deg, var(--optep-violet-50), #fff);
    border: 1px solid var(--optep-violet-200);
    border-radius: 18px;
}

.optep-enrollment-badge {
    padding: 7px 10px;
    color: var(--optep-violet-800);
    background: var(--optep-violet-100);
    border-radius: 999px;
}

.optep-qr-wrap {
    display: grid;
    padding: 11px;
    place-items: center;
    background: var(--optep-white);
    border: 1px solid var(--optep-violet-200);
    border-radius: 15px;
    box-shadow: 0 12px 25px rgba(76, 29, 149, 0.10);
}

.optep-qr-image {
    display: block;
    width: 168px;
    height: 168px;
    object-fit: contain;
}

.optep-enrollment-help {
    margin: 0;
    color: var(--optep-muted);
    font-size: 0.82rem;
    line-height: 1.55;
    text-align: center;
}

.optep-secret-box {
    width: 100%;
    padding: 12px;
    text-align: center;
    background: var(--optep-white);
    border: 1px solid var(--optep-violet-200);
    border-radius: 12px;
}

.optep-secret-box span {
    display: block;
    margin-bottom: 7px;
    color: var(--optep-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.optep-secret-box code {
    color: var(--optep-violet-800);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.8rem;
    font-weight: 850;
    letter-spacing: 0.07em;
    overflow-wrap: anywhere;
}

.optep-login-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 34px;
    color: #948b9f;
    font-size: 0.74rem;
    font-weight: 650;
    text-align: center;
}

.optep-footer-dot {
    color: var(--optep-violet-500);
}

@media (max-width: 980px) {
    .optep-login-page {
        padding: 20px;
    }

    .optep-login-shell {
        min-height: auto;
        grid-template-columns: 1fr;
        max-width: 600px;
    }

    .optep-login-brand {
        display: none;
    }

    .optep-login-panel {
        padding: 52px 42px;
    }

    .optep-mobile-logo {
        display: block;
    }
}

@media (max-width: 580px) {
    .optep-login-page {
        align-items: stretch;
        padding: 0;
        background: var(--optep-white);
    }

    .optep-login-shell {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .optep-login-panel {
        align-items: flex-start;
        padding: 34px 22px;
    }

    .optep-login-card {
        margin: auto 0;
    }

    .optep-mobile-logo {
        margin-bottom: 34px;
    }

    .optep-form-header h2 {
        font-size: 2rem;
    }

    .optep-login-footer {
        flex-wrap: wrap;
        margin-top: 30px;
    }
}

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