@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Orbitron:wght@600;700;800&display=swap");

:root {
    --bg-primary: #070a11;
    --bg-secondary: #0d121d;
    --bg-card: rgba(15, 21, 34, 0.94);

    --border: rgba(146, 168, 207, 0.16);
    --border-hover: rgba(127, 97, 255, 0.55);

    --text-primary: #f7f9ff;
    --text-secondary: #94a0b5;
    --text-muted: #657086;

    --purple: #7957ff;
    --purple-light: #9c83ff;
    --blue: #23b5ff;
    --cyan: #32f0ce;

    --danger: #ff6077;
    --success: #36d391;

    --radius-large: 28px;
    --radius-medium: 16px;
    --radius-small: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    color-scheme: dark;
}

body {
    min-width: 320px;
    min-height: 100vh;
    overflow-x: hidden;

    color: var(--text-primary);
    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(75, 64, 193, 0.14),
            transparent 32%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(20, 150, 199, 0.1),
            transparent 35%
        ),
        var(--bg-primary);

    font-family: "Inter", sans-serif;
}

button,
input {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

.login-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;
}

.background-grid {
    position: absolute;
    inset: 0;

    opacity: 0.17;

    background-image:
        linear-gradient(
            rgba(138, 154, 188, 0.12) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(138, 154, 188, 0.12) 1px,
            transparent 1px
        );

    background-size: 44px 44px;

    mask-image:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, 0.9),
            transparent
        );

    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
}

.orb-one {
    width: 380px;
    height: 380px;

    top: -170px;
    left: -110px;

    background: rgba(109, 74, 255, 0.2);
}

.orb-two {
    width: 340px;
    height: 340px;

    right: -120px;
    bottom: -150px;

    background: rgba(35, 181, 255, 0.14);
}

.login-shell {
    position: relative;
    z-index: 2;

    width: min(1240px, 100%);
    min-height: 720px;

    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(410px, 0.88fr);

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: var(--radius-large);

    background: rgba(9, 13, 22, 0.88);

    box-shadow:
        0 34px 90px rgba(0, 0, 0, 0.46),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);

    backdrop-filter: blur(18px);
}

.brand-panel {
    position: relative;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    padding: 45px;

    border-right: 1px solid var(--border);

    background:
        linear-gradient(
            140deg,
            rgba(112, 76, 255, 0.12),
            transparent 46%
        ),
        linear-gradient(
            315deg,
            rgba(31, 185, 255, 0.08),
            transparent 45%
        ),
        #0c111c;
}

.brand-panel::before {
    content: "";
    position: absolute;

    width: 430px;
    height: 430px;

    right: -180px;
    top: 100px;

    border: 1px solid rgba(126, 102, 255, 0.12);
    border-radius: 50%;

    box-shadow:
        0 0 0 50px rgba(126, 102, 255, 0.025),
        0 0 0 100px rgba(126, 102, 255, 0.018);

    pointer-events: none;
}

.brand-top,
.brand-bottom,
.brand-content {
    position: relative;
    z-index: 2;
}

.brand-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand-logo,
.mobile-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    text-decoration: none;
}

.logo-mark {
    width: 46px;
    height: 46px;

    display: grid;
    place-items: center;

    border: 1px solid rgba(145, 122, 255, 0.65);
    border-radius: 14px;

    color: #fff;

    background:
        linear-gradient(
            145deg,
            var(--purple),
            #4430ad
        );

    box-shadow:
        0 12px 30px rgba(88, 60, 220, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);

    font-family: "Orbitron", sans-serif;
    font-size: 24px;
    font-weight: 800;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo-text strong {
    letter-spacing: 0.14em;

    font-family: "Orbitron", sans-serif;
    font-size: 16px;
}

.logo-text small {
    color: var(--text-muted);
    letter-spacing: 0.19em;
    font-size: 9px;
}

.secure-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 8px 11px;

    border: 1px solid var(--border);
    border-radius: 999px;

    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.025);

    font-size: 11px;
    font-weight: 600;
}

.secure-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--cyan);
    box-shadow: 0 0 13px var(--cyan);
}

.brand-content {
    max-width: 630px;
    padding: 45px 0;
}

.eyebrow,
.form-kicker {
    display: inline-block;

    color: var(--purple-light);
    letter-spacing: 0.19em;

    font-size: 11px;
    font-weight: 700;
}

.brand-content h1 {
    max-width: 600px;

    margin: 18px 0;

    font-family: "Orbitron", sans-serif;
    font-size: clamp(38px, 4.3vw, 66px);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.brand-content h1 span {
    color: transparent;

    background:
        linear-gradient(
            90deg,
            var(--purple-light),
            var(--blue)
        );

    -webkit-background-clip: text;
    background-clip: text;
}

.brand-content > p {
    max-width: 590px;

    color: var(--text-secondary);

    font-size: 15px;
    line-height: 1.8;
}

.role-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;

    margin-top: 34px;
}

.role-card {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 11px;

    padding: 15px;

    border: 1px solid var(--border);
    border-radius: 15px;

    background: rgba(255, 255, 255, 0.026);

    transition:
        border-color 0.25s ease,
        transform 0.25s ease,
        background 0.25s ease;
}

.role-card:hover {
    transform: translateY(-3px);

    border-color: rgba(134, 103, 255, 0.45);
    background: rgba(116, 80, 255, 0.07);
}

.role-card-icon {
    width: 38px;
    height: 38px;

    flex: 0 0 38px;

    display: grid;
    place-items: center;

    border-radius: 11px;

    color: var(--purple-light);
    background: rgba(121, 87, 255, 0.12);
}

.role-card-icon svg {
    width: 20px;
    height: 20px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.role-card div:last-child {
    min-width: 0;
}

.role-card strong,
.role-card span {
    display: block;
}

.role-card strong {
    margin-bottom: 4px;
    font-size: 13px;
}

.role-card span {
    overflow: hidden;

    color: var(--text-muted);

    font-size: 10px;
    line-height: 1.4;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.brand-bottom {
    display: flex;
    gap: 38px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature span {
    color: var(--purple-light);
    font-family: "Orbitron", sans-serif;
    font-size: 11px;
}

.feature p {
    color: var(--text-muted);
    font-size: 11px;
}

.form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 50px;

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.016),
            transparent
        ),
        rgba(8, 12, 20, 0.92);
}

.mobile-logo {
    display: none;
    margin-bottom: 32px;
}

.form-card {
    width: min(430px, 100%);
    margin: auto;
}

.form-heading {
    margin-bottom: 28px;
}

.form-heading h2 {
    margin: 9px 0 9px;

    font-family: "Orbitron", sans-serif;
    font-size: clamp(25px, 3vw, 34px);
    letter-spacing: -0.03em;
}

.form-heading p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.65;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    margin-bottom: 20px;
    padding: 12px 14px;

    border: 1px solid;
    border-radius: 12px;

    font-size: 12px;
    line-height: 1.55;
}

.alert-icon {
    width: 20px;
    height: 20px;

    flex: 0 0 20px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    font-weight: 800;
}

.alert-error {
    color: #ffc2cc;
    border-color: rgba(255, 96, 119, 0.28);
    background: rgba(255, 96, 119, 0.08);
}

.alert-error .alert-icon {
    color: #160307;
    background: var(--danger);
}

.alert-success {
    color: #adf1d2;
    border-color: rgba(54, 211, 145, 0.28);
    background: rgba(54, 211, 145, 0.08);
}

.alert-success .alert-icon {
    color: #04130c;
    background: var(--success);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 19px;
}

.form-group label,
.label-row label {
    display: block;

    margin-bottom: 9px;

    color: #dbe1ec;
    font-size: 12px;
    font-weight: 600;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.forgot-link {
    margin-bottom: 9px;

    color: var(--purple-light);
    text-decoration: none;

    font-size: 11px;
    font-weight: 600;
}

.forgot-link:hover {
    text-decoration: underline;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    height: 54px;

    padding: 0 48px;

    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    outline: none;

    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.025);

    font-size: 13px;

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease;
}

.input-wrapper input::placeholder {
    color: #566176;
}

.input-wrapper input:hover {
    border-color: rgba(149, 164, 196, 0.28);
}

.input-wrapper input:focus {
    border-color: var(--border-hover);

    background: rgba(121, 87, 255, 0.035);

    box-shadow:
        0 0 0 4px rgba(121, 87, 255, 0.09);
}

.input-wrapper input:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;

    z-index: 2;

    display: grid;
    place-items: center;

    color: #657087;

    transform: translateY(-50%);
    pointer-events: none;
}

.input-icon svg,
.password-toggle svg,
.button-arrow {
    width: 19px;
    height: 19px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;

    width: 36px;
    height: 36px;

    display: grid;
    place-items: center;

    border: 0;
    border-radius: 9px;

    color: #69758a;
    background: transparent;

    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.045);
}

.eye-closed {
    display: none;
}

.password-toggle.visible .eye-open {
    display: none;
}

.password-toggle.visible .eye-closed {
    display: block;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.remember-option {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;

    font-size: 11px;
}

.remember-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.custom-checkbox {
    width: 17px;
    height: 17px;

    position: relative;

    border: 1px solid rgba(151, 168, 202, 0.3);
    border-radius: 5px;

    background: rgba(255, 255, 255, 0.025);
}

.remember-option input:checked + .custom-checkbox {
    border-color: var(--purple);
    background: var(--purple);
}

.remember-option input:checked + .custom-checkbox::after {
    content: "";

    position: absolute;

    left: 5px;
    top: 2px;

    width: 4px;
    height: 8px;

    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;

    transform: rotate(45deg);
}

.role-auto {
    color: var(--text-muted);
    font-size: 10px;
}

.role-auto::before {
    content: "";

    display: inline-block;

    width: 5px;
    height: 5px;

    margin-right: 6px;

    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan);
}

.login-button {
    width: 100%;
    min-height: 55px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    margin-top: 2px;
    padding: 0 20px;

    border: 0;
    border-radius: 13px;

    color: #fff;

    background:
        linear-gradient(
            105deg,
            #6f4dff,
            #4e38cf
        );

    box-shadow:
        0 16px 38px rgba(85, 57, 211, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);

    cursor: pointer;

    font-family: "Orbitron", sans-serif;
    font-size: 11px;
    letter-spacing: 0.08em;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        opacity 0.25s ease;
}

.login-button:hover:not(:disabled) {
    transform: translateY(-2px);

    box-shadow:
        0 20px 45px rgba(85, 57, 211, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.login-button:active:not(:disabled) {
    transform: translateY(0);
}

.login-button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.button-arrow {
    width: 17px;
    height: 17px;
}

.button-loader {
    display: none;

    width: 18px;
    height: 18px;

    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;

    animation: spin 0.8s linear infinite;
}

.login-button.loading .button-loader {
    display: block;
}

.login-button.loading .button-arrow {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.divider {
    display: flex;
    align-items: center;
    gap: 12px;

    margin: 26px 0 17px;

    color: #536076;
    font-size: 9px;
    letter-spacing: 0.17em;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.register-text {
    color: var(--text-secondary);
    text-align: center;
    font-size: 12px;
}

.register-text a {
    color: var(--purple-light);
    text-decoration: none;
    font-weight: 700;
}

.register-text a:hover {
    text-decoration: underline;
}

.seller-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    margin-top: 24px;
    padding: 14px;

    border: 1px solid var(--border);
    border-radius: 13px;

    background: rgba(255, 255, 255, 0.02);
}

.seller-info-icon {
    width: 35px;
    height: 35px;

    flex: 0 0 35px;

    display: grid;
    place-items: center;

    border-radius: 10px;

    color: var(--cyan);
    background: rgba(50, 240, 206, 0.09);

    font-family: "Orbitron", sans-serif;
    font-size: 13px;
}

.seller-info strong {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
}

.seller-info p {
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.55;
}

.form-footer {
    width: min(430px, 100%);

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    margin: 30px auto 0;

    color: #4f5b70;
    font-size: 9px;
}

.form-footer div {
    display: flex;
    gap: 14px;
}

.form-footer a {
    text-decoration: none;
}

.form-footer a:hover {
    color: var(--text-secondary);
}

@media (max-width: 1050px) {
    .login-shell {
        grid-template-columns: 1fr 460px;
    }

    .brand-panel {
        padding: 38px;
    }

    .role-cards {
        grid-template-columns: 1fr;
    }

    .role-card span {
        white-space: normal;
    }

    .brand-bottom {
        flex-wrap: wrap;
        gap: 18px;
    }

    .form-panel {
        padding: 42px;
    }
}

@media (max-width: 820px) {
    .login-page {
        align-items: flex-start;
        padding: 18px;
    }

    .login-shell {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .brand-panel {
        display: none;
    }

    .form-panel {
        min-height: calc(100vh - 36px);
        padding: 38px 30px;
    }

    .mobile-logo {
        display: inline-flex;
    }
}

@media (max-width: 480px) {
    .login-page {
        padding: 0;
    }

    .login-shell {
        min-height: 100vh;

        border: 0;
        border-radius: 0;

        background: var(--bg-primary);
        box-shadow: none;
    }

    .form-panel {
        min-height: 100vh;
        padding: 28px 20px;
    }

    .mobile-logo {
        margin-bottom: 40px;
    }

    .logo-mark {
        width: 41px;
        height: 41px;
        font-size: 20px;
    }

    .form-heading {
        margin-bottom: 24px;
    }

    .form-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 11px;
    }

    .form-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}