:root {
    --login-bg: #0f1424;
    --login-card-top: #263541;
    --login-card-bottom: #171a29;
    --login-text: #f8fafc;
    --login-muted: #b7c0cf;
    --login-input: #33404f;
    --login-input-border: #435266;
    --login-placeholder: #9aa6b8;
    --login-accent: #00c782;
    --login-accent-hover: #08d990;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background: var(--login-bg);
    color: var(--login-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-page {
    min-height: 100svh;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    justify-items: center;
    padding: 32px 16px;
}

.login-card {
    width: min(100%, 440px);
    min-width: 0;
    padding: clamp(28px, 5vw, 40px);
    background: linear-gradient(165deg, var(--login-card-top) 0%, var(--login-card-bottom) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: clamp(14px, 4vw, 20px);
    margin-bottom: 22px;
}

.login-brand span {
    color: var(--login-accent);
    font-size: clamp(24px, 7vw, 34px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: 0;
    text-shadow: 0 8px 22px rgba(0, 199, 130, 0.22);
    white-space: nowrap;
}

.login-logo {
    width: clamp(118px, 34vw, 150px);
    aspect-ratio: 1;
    display: block;
    overflow: hidden;
    border-radius: 22px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
    flex: 0 0 auto;
}

.login-logo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.login-header {
    margin-bottom: 32px;
}

.login-header h1 {
    margin: 0 0 8px;
    font-size: clamp(30px, 8vw, 37px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: 0;
}

.login-header p {
    width: 325px;
    max-width: 100%;
    margin: 0;
    color: var(--login-muted);
    font-size: clamp(16px, 4vw, 19px);
    font-weight: 500;
    line-height: 1.38;
}

.login-alert {
    overflow-wrap: anywhere;
    margin: -18px 0 22px;
    padding: 12px 14px;
    border: 1px solid rgba(248, 113, 113, 0.45);
    border-radius: 12px;
    background: rgba(127, 29, 29, 0.22);
    color: #fecaca;
    font-size: 14px;
    font-weight: 600;
}

.login-alert-success {
    border-color: rgba(0, 199, 130, 0.45);
    background: rgba(0, 199, 130, 0.14);
    color: #bbf7d0;
}

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

.login-field {
    display: grid;
    gap: 10px;
}

.login-field label {
    color: #d6dbe5;
    font-size: clamp(15px, 3.8vw, 17px);
    font-weight: 800;
}

.login-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.login-field input,
.login-field select {
    width: 100%;
    min-height: 56px;
    padding: 0 18px;
    border: 1px solid var(--login-input-border);
    border-radius: 16px;
    outline: none;
    background: var(--login-input);
    color: #eef3fb;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.login-field select {
    appearance: auto;
    cursor: pointer;
}

.login-field input::placeholder {
    color: var(--login-placeholder);
    opacity: 1;
}

.login-field input:focus,
.login-field select:focus {
    border-color: rgba(0, 199, 130, 0.9);
    box-shadow: 0 0 0 4px rgba(0, 199, 130, 0.16);
}

.login-phone-row {
    display: grid;
    grid-template-columns: minmax(138px, 0.42fr) minmax(0, 1fr);
    gap: 0;
}

.login-phone-row .login-phone-code {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.login-phone-row .login-phone-number {
    border-left: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.login-phone-row .login-phone-code:focus {
    position: relative;
    z-index: 1;
}

.login-field ul {
    margin: 0;
    padding: 0;
    list-style: none;
    color: #fecaca;
    font-size: 13px;
    font-weight: 700;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: -1px;
    flex-wrap: wrap;
}

.remember-me {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    color: var(--login-muted);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    cursor: pointer;
}

.remember-me input {
    width: 14px;
    height: 14px;
    margin: 0 12px 0 0;
    accent-color: var(--login-accent);
    flex: 0 0 auto;
}

.login-consent {
    display: grid;
    gap: 8px;
}

.login-consent .remember-me {
    color: #d6dbe5;
    font-size: 17px;
    font-weight: 400;
}

.login-consent .remember-me input {
    width: 26px;
    height: 26px;
}

.login-consent ul {
    margin: 0;
    padding: 0;
    list-style: none;
    color: #fecaca;
    font-size: 13px;
    font-weight: 700;
}

.login-link,
.login-footer a {
    color: var(--login-accent);
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
}

.login-link:hover,
.login-footer a:hover {
    color: var(--login-accent-hover);
}

.login-button {
    width: 100%;
    min-height: 56px;
    margin-top: 1px;
    border: 0;
    border-radius: 16px;
    background: var(--login-accent);
    color: #ffffff;
    font: inherit;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0;
    cursor: pointer;
    transition: background-color 160ms ease, transform 160ms ease, opacity 160ms ease;
}

.login-button:hover {
    background: var(--login-accent-hover);
}

.login-button:active {
    transform: translateY(1px);
}

.login-button:disabled {
    cursor: wait;
    opacity: 0.82;
}

.login-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    padding-top: 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--login-muted);
    font-size: 15px;
    font-weight: 700;
    flex-wrap: wrap;
}

@media (max-width: 520px) {
    .login-page {
        align-items: stretch;
        padding: 0;
    }

    .login-card {
        width: 100%;
        min-height: 100svh;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }
}

@media (max-width: 380px) {
    .login-card {
        padding: 24px 18px 30px;
    }

    .login-brand {
        gap: 12px;
    }

    .login-brand span {
        font-size: 22px;
    }

    .login-options,
    .login-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .login-field input,
    .login-field select,
    .login-button {
        min-height: 52px;
    }

    .login-phone-row {
        grid-template-columns: minmax(118px, 0.45fr) minmax(0, 1fr);
    }
}
