* {
    box-sizing: border-box;
}

:root {
    --background: #080b10;
    --surface: #0e1218;
    --surface-2: #121820;
    --surface-3: #171e27;

    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.13);

    --text: #f2f5f8;
    --text-secondary: #98a3b3;
    --text-muted: #687384;

    --accent: #7ea7ff;
    --accent-light: #a8c3ff;
    --accent-soft: rgba(126, 167, 255, 0.10);

    --success: #79d9a5;
    --success-soft: rgba(121, 217, 165, 0.09);

    --danger: #ff8585;
    --danger-soft: rgba(255, 133, 133, 0.09);

    --radius-large: 22px;
    --radius-medium: 13px;
    --radius-small: 9px;

    font-family:
        Inter,
        "Segoe UI",
        "Microsoft YaHei UI",
        "Microsoft YaHei",
        Arial,
        sans-serif;
}

html {
    min-height: 100%;
    background: var(--background);
}

body {
    margin: 0;
    min-height: 100vh;

    color: var(--text);
    background:
        radial-gradient(
            circle at 15% 0%,
            rgba(78, 112, 180, 0.12),
            transparent 34%
        ),
        radial-gradient(
            circle at 90% 90%,
            rgba(67, 91, 135, 0.09),
            transparent 30%
        ),
        var(--background);

    overflow-x: hidden;
}

button,
input {
    font: inherit;
}

button {
    border: 0;
}

[hidden] {
    display: none !important;
}


/* =========================================================
   Background
========================================================= */

.background-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;

    opacity: 0.15;

    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px
        );

    background-size: 44px 44px;

    mask-image:
        linear-gradient(
            to bottom,
            black,
            transparent 78%
        );
}

.background-glow {
    position: fixed;
    width: 420px;
    height: 420px;

    border-radius: 50%;
    filter: blur(110px);

    opacity: 0.07;
    pointer-events: none;
}

.glow-one {
    top: -220px;
    left: -150px;
    background: #6997ff;
}

.glow-two {
    right: -180px;
    bottom: -230px;
    background: #8ea8df;
}


/* =========================================================
   Layout
========================================================= */

.page-shell {
    position: relative;
    z-index: 1;

    width: min(1120px, calc(100% - 40px));
    min-height: 100vh;

    margin: 0 auto;

    display: flex;
    flex-direction: column;
}


/* =========================================================
   Topbar
========================================================= */

.topbar {
    min-height: 92px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 13px;
}

.brand-logo {
    width: 39px;
    height: 39px;

    display: grid;
    place-items: center;

    border: 1px solid var(--border-strong);
    border-radius: 11px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.08),
            rgba(255, 255, 255, 0.02)
        );

    color: var(--text);

    font-size: 18px;
    font-weight: 800;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-text strong {
    font-size: 14px;
    letter-spacing: 0.02em;
}

.brand-text span {
    color: var(--text-muted);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.secure-badge {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 8px 11px;

    border: 1px solid var(--border);
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.025);

    color: var(--text-secondary);

    font-size: 11px;
    font-weight: 600;

    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.status-dot {
    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: var(--success);

    box-shadow:
        0 0 12px rgba(121, 217, 165, 0.6);
}


/* =========================================================
   Registration Card
========================================================= */

.registration-card {
    flex: 1;

    margin: 56px 0 42px;

    display: grid;
    grid-template-columns: 1.05fr 0.95fr;

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: var(--radius-large);

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.018),
            transparent 38%
        ),
        var(--surface);

    box-shadow:
        0 35px 90px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
}


/* =========================================================
   Left Panel
========================================================= */

.info-panel {
    position: relative;

    padding: 64px 60px;

    border-right: 1px solid var(--border);

    background:
        linear-gradient(
            135deg,
            rgba(126, 167, 255, 0.045),
            transparent 50%
        );
}

.info-panel::after {
    content: "";

    position: absolute;
    right: 0;
    bottom: 0;

    width: 180px;
    height: 180px;

    background:
        linear-gradient(
            135deg,
            transparent 50%,
            rgba(255, 255, 255, 0.018) 50%
        );

    pointer-events: none;
}

.eyebrow,
.form-kicker,
.state-kicker {
    color: var(--accent-light);

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.18em;
}

.info-panel h1 {
    max-width: 440px;

    margin: 18px 0 18px;

    font-size: clamp(34px, 4vw, 49px);
    line-height: 1.12;

    letter-spacing: -0.04em;
}

.info-panel h1 span {
    color: var(--text-secondary);
}

.description {
    max-width: 480px;

    margin: 0;

    color: var(--text-secondary);

    font-size: 14px;
    line-height: 1.9;
}


/* =========================================================
   Notice
========================================================= */

.notice {
    margin-top: 35px;
    padding: 17px;

    display: flex;
    gap: 13px;

    border: 1px solid rgba(126, 167, 255, 0.15);
    border-radius: var(--radius-medium);

    background: var(--accent-soft);
}

.notice-icon {
    flex: 0 0 auto;

    width: 25px;
    height: 25px;

    display: grid;
    place-items: center;

    border: 1px solid rgba(126, 167, 255, 0.28);
    border-radius: 50%;

    color: var(--accent-light);

    font-size: 12px;
    font-weight: 800;
}

.notice strong {
    display: block;

    margin: 1px 0 5px;

    font-size: 12px;
}

.notice p {
    margin: 0;

    color: var(--text-secondary);

    font-size: 12px;
    line-height: 1.7;
}


/* =========================================================
   Steps
========================================================= */

.steps {
    margin-top: 38px;

    display: flex;
    flex-direction: column;
}

.step {
    position: relative;

    display: flex;
    gap: 17px;

    padding: 14px 0;
}

.step:not(:last-child)::after {
    content: "";

    position: absolute;
    top: 43px;
    bottom: -5px;
    left: 15px;

    width: 1px;

    background: var(--border);
}

.step-number {
    position: relative;
    z-index: 1;

    flex: 0 0 auto;

    width: 31px;
    height: 31px;

    display: grid;
    place-items: center;

    border: 1px solid var(--border);
    border-radius: 9px;

    background: var(--surface-2);

    color: var(--text-muted);

    font-size: 9px;
    font-weight: 700;
}

.step-content {
    padding-top: 1px;

    display: flex;
    flex-direction: column;
    gap: 5px;
}

.step-content strong {
    font-size: 12px;
}

.step-content span {
    color: var(--text-muted);

    font-size: 11px;
    line-height: 1.6;
}


/* =========================================================
   Form Panel
========================================================= */

.form-panel {
    min-height: 620px;

    padding: 64px 56px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    background: rgba(5, 7, 10, 0.18);
}

.form-header {
    margin-bottom: 31px;
}

.form-header h2,
.state-view h2 {
    margin: 10px 0 8px;

    font-size: 25px;
    letter-spacing: -0.025em;
}

.form-header p,
.state-view > p {
    margin: 0;

    color: var(--text-secondary);

    font-size: 12px;
    line-height: 1.7;
}


/* =========================================================
   Form Fields
========================================================= */

.field-group {
    margin-bottom: 19px;
}

.field-group label {
    display: block;

    margin-bottom: 8px;

    color: #cbd2dc;

    font-size: 11px;
    font-weight: 600;
}

.input-shell {
    position: relative;

    display: flex;
    align-items: center;
}

.input-shell input {
    width: 100%;
    height: 48px;

    padding:
        0
        47px
        0
        43px;

    outline: none;

    border: 1px solid var(--border);
    border-radius: var(--radius-small);

    background: #0a0e13;

    color: var(--text);

    font-size: 13px;

    transition:
        border-color 160ms ease,
        background 160ms ease,
        box-shadow 160ms ease;
}

.input-shell input::placeholder {
    color: #4e5866;
}

.input-shell input:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.input-shell input:focus {
    border-color: rgba(126, 167, 255, 0.55);

    background: #0b1016;

    box-shadow:
        0 0 0 3px rgba(126, 167, 255, 0.07);
}

.input-icon {
    position: absolute;
    left: 15px;

    width: 16px;
    height: 16px;

    color: #647083;

    pointer-events: none;
}

.input-icon svg,
.password-toggle svg,
.button-arrow,
.state-icon svg {
    width: 100%;
    height: 100%;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-toggle {
    position: absolute;
    right: 8px;

    width: 34px;
    height: 34px;

    padding: 9px;

    border-radius: 7px;

    background: transparent;

    color: #657183;

    cursor: pointer;

    transition:
        color 150ms ease,
        background 150ms ease;
}

.password-toggle:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
}

.field-hint {
    margin-top: 6px;

    color: var(--text-muted);

    font-size: 10px;
}


/* =========================================================
   Error
========================================================= */

.message {
    display: none;

    margin-bottom: 17px;
    padding: 11px 13px;

    border-radius: 8px;

    font-size: 11px;
    line-height: 1.6;
}

.error-message.visible {
    display: block;

    border: 1px solid rgba(255, 133, 133, 0.17);

    background: var(--danger-soft);

    color: #ffaaaa;
}


/* =========================================================
   Button
========================================================= */

.primary-button {
    width: 100%;
    height: 49px;

    margin-top: 3px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    border-radius: var(--radius-small);

    background: #e7ebf1;

    color: #11151b;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform 150ms ease,
        background 150ms ease,
        opacity 150ms ease;
}

.primary-button:hover:not(:disabled) {
    transform: translateY(-1px);
    background: #ffffff;
}

.primary-button:active:not(:disabled) {
    transform: translateY(0);
}

.primary-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.button-arrow {
    width: 15px;
    height: 15px;
}

.loader {
    width: 15px;
    height: 15px;

    border: 2px solid rgba(0, 0, 0, 0.22);
    border-top-color: #11151b;
    border-radius: 50%;

    animation: spin 700ms linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   Form Footer
========================================================= */

.form-footer {
    margin-top: 19px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    color: var(--text-muted);

    font-size: 10px;
}

.footer-dot {
    width: 5px;
    height: 5px;

    border-radius: 50%;

    background: var(--success);
}


/* =========================================================
   State Views
========================================================= */

.state-view {
    text-align: center;
}

.state-icon {
    width: 58px;
    height: 58px;

    margin: 0 auto 24px;
    padding: 16px;

    display: grid;
    place-items: center;

    border-radius: 17px;
}

.success-icon {
    border: 1px solid rgba(121, 217, 165, 0.2);

    background: var(--success-soft);

    color: var(--success);
}

.invalid-icon {
    border: 1px solid rgba(255, 133, 133, 0.2);

    background: var(--danger-soft);

    color: var(--danger);
}

.state-view h2 {
    margin-top: 12px;
}

.state-view > p {
    max-width: 350px;

    margin-left: auto;
    margin-right: auto;
}

.state-view > p strong {
    color: var(--text);
}

.success-box {
    margin: 28px 0 20px;
    padding: 16px;

    display: flex;
    align-items: flex-start;
    gap: 12px;

    text-align: left;

    border: 1px solid rgba(121, 217, 165, 0.16);
    border-radius: var(--radius-medium);

    background: var(--success-soft);
}

.success-box-dot {
    flex: 0 0 auto;

    width: 7px;
    height: 7px;

    margin-top: 5px;

    border-radius: 50%;

    background: var(--success);

    box-shadow:
        0 0 12px rgba(121, 217, 165, 0.45);
}

.success-box div {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.success-box strong {
    font-size: 11px;
}

.success-box span {
    color: var(--text-secondary);

    font-size: 10px;
    line-height: 1.6;
}

.state-description {
    color: var(--text-muted) !important;
}

.invalid-box {
    margin-top: 26px;
    padding: 14px;

    border: 1px solid rgba(255, 133, 133, 0.14);
    border-radius: var(--radius-medium);

    background: var(--danger-soft);

    color: #e8a4a4;

    font-size: 11px;
    line-height: 1.6;
}


/* =========================================================
   Footer
========================================================= */

.footer {
    min-height: 67px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;

    color: #4f5967;

    font-size: 9px;

    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-separator {
    width: 3px;
    height: 3px;

    border-radius: 50%;

    background: #3b434f;
}


/* =========================================================
   Responsive
========================================================= */

@media (max-width: 900px) {

    .registration-card {
        grid-template-columns: 1fr;
    }

    .info-panel {
        padding: 45px 42px;

        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .form-panel {
        min-height: auto;
        padding: 48px 42px;
    }

    .steps {
        display: none;
    }
}


@media (max-width: 560px) {

    .page-shell {
        width: min(100% - 24px, 1120px);
    }

    .topbar {
        min-height: 75px;
    }

    .brand-text span {
        display: none;
    }

    .secure-badge {
        padding: 7px 9px;
        font-size: 9px;
    }

    .registration-card {
        margin-top: 25px;
        margin-bottom: 20px;

        border-radius: 16px;
    }

    .info-panel,
    .form-panel {
        padding: 34px 24px;
    }

    .info-panel h1 {
        font-size: 31px;
    }

    .description {
        font-size: 12px;
    }

    .notice {
        margin-top: 25px;
    }

    .footer {
        min-height: 55px;
    }
}