@import url("https://fonts.googleapis.com/css2?family=Inter+Tight:wght@500;600;700&family=Roboto+Flex:opsz,wght@8..144,400;8..144,500&display=swap");

:root {
    --login-bg: #f5f7fa;
    --login-card-bg: #ffffff;
    --login-text: #212529;
    --login-muted: #5f6b77;
    --login-border: #d9e0e7;
    --login-focus: #4076ff;
    --login-error: #d64545;
    --login-primary: #4076ff;
    --login-primary-hover: #3669e3;
    --login-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

.login-page {
    background: var(--login-bg);
    color: var(--login-text);
}

.login-layout {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: min(100%, 460px);
    padding: 32px;
    border-radius: 12px;
    background: var(--login-card-bg);
    box-shadow: var(--login-shadow);
}

.login-system-title {
    margin: 0 0 8px;
    font-family: "Inter Tight", "Segoe UI", Arial, sans-serif;
    font-size: clamp(1.25rem, 1.8vw, 1.5rem);
    font-weight: 600;
    line-height: 1.2;
    color: var(--login-text);
}

.login-title {
    margin: 0 0 24px;
    font-family: "Inter Tight", "Segoe UI", Arial, sans-serif;
    font-size: clamp(1.5rem, 2vw, 1.75rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--login-text);
}

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

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

.login-label {
    font-family: "Inter Tight", "Segoe UI", Arial, sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--login-text);
}

.login-input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--login-border);
    border-radius: 6px;
    background: #fff;
    color: #212529;
    font-family: "Inter Tight", "Segoe UI", Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.2;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.login-input::placeholder {
    color: #7b8793;
    font-family: "Inter Tight", "Segoe UI", Arial, sans-serif;
}

.login-input:focus {
    outline: none;
    border-color: var(--login-focus);
    box-shadow: 0 0 0 2px rgba(64, 118, 255, 0.15);
}

.login-input.is-error {
    border-color: var(--login-error);
}

.login-input.is-error:focus {
    box-shadow: 0 0 0 2px rgba(214, 69, 69, 0.15);
}

.login-field-error {
    margin: 0;
    font-family: "Roboto Flex", "Segoe UI", Arial, sans-serif;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--login-error);
}

.login-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 24px;
    user-select: none;
}

.login-checkbox {
    width: 16px;
    height: 16px;
    margin: 0;
}

.login-remember-text {
    font-family: "Roboto Flex", "Segoe UI", Arial, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.4;
    color: #35424f;
}

.login-submit {
    width: 100%;
    min-height: 48px;
    border: none;
    border-radius: 6px;
    background: var(--login-primary);
    color: #fff;
    font-family: "Inter Tight", "Segoe UI", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: filter 0.2s ease-in-out;
}

.login-submit:hover {
    filter: brightness(0.9);
}

.login-submit:disabled {
    cursor: not-allowed;
    opacity: 0.85;
}

.login-submit__spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #ffffff;
    border-radius: 50%;
    display: none;
    animation: login-spin 0.8s linear infinite;
}

.login-submit.is-loading .login-submit__spinner {
    display: inline-block;
}

.login-form-error {
    margin: 0;
    font-family: "Roboto Flex", "Segoe UI", Arial, sans-serif;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--login-error);
}

@keyframes login-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 640px) {
    .login-layout {
        padding: 16px;
    }

    .login-card {
        padding: 24px 20px;
    }
}
