:root {
    --bg-page: #eef2f7;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --border-color: #e5eaf2;
    --primary: #3b82f6;
    --primary-dark: #2f77d6;
    --error-color: #dc2626;
    --success-color: #059669;
    --shadow-card: 0 24px 50px rgba(15, 23, 42, 0.08);
    --shadow-btn: 0 10px 24px rgba(59, 130, 246, 0.28);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--text-primary);
    background:
        radial-gradient(900px 600px at 10% 12%, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0) 70%),
        radial-gradient(900px 600px at 90% 85%, rgba(15, 23, 42, 0.07) 0%, rgba(15, 23, 42, 0) 72%),
        var(--bg-page);
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-box {
    background: var(--card-bg);
    border-radius: 6px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
    animation: fadeUp .35s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    padding: 30px 28px 16px;
}

.login-header .logo {
    width: 120px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.login-header .logo-img {
    max-width: 110px;
    max-height: 58px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.login-header h1 {
    font-weight: 500;
    font-size: 25px;
    letter-spacing: -0.02em;
    color: #0b1f4d;
    line-height: 1.15;
}

.login-header p {
    margin-top: 6px;
    font-size: 12px;
    color: #7b90ae;
    font-weight: 500;
}

.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 28px 14px;
    padding: 11px 12px;
    border-radius: 10px;
    font-size: 13px;
}

.alert-error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.alert-success {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.alert .material-icons {
    font-size: 18px;
}

.login-form {
    padding: 0 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.input-shell {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    background: #f9fbff;
    border-radius: 6px;
    min-height: 46px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.input-shell:focus-within {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
    background: #ffffff;
}

.input-icon {
    width: 42px;
    text-align: center;
    font-size: 18px;
    color: #9aa9bf;
    flex-shrink: 0;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    border: none;
    background: transparent;
    color: #1e293b;
    font-size: 15px;
    font-family: inherit;
    height: 44px;
    padding: 0 14px 0 0;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
    outline: none;
}

.form-group input::placeholder {
    color: #a8b7cd;
}

.password-input-wrapper input {
    padding-right: 46px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #9aa9bf;
    cursor: pointer;
}

.toggle-password:hover {
    background: #eff6ff;
    color: #5b6f8d;
}

.toggle-password .material-icons {
    font-size: 18px;
}

.error-message {
    font-size: 12px;
    color: var(--error-color);
    margin-left: 4px;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

.form-group.error .input-shell {
    border-color: #fca5a5;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.08);
}

.btn-login {
    margin-top: 4px;
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(180deg, #4a91ea 0%, #3d82da 100%);
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: transform .16s ease, filter .16s ease;
}

.btn-login:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: .7;
    cursor: not-allowed;
}

.btn-login .material-icons {
    font-size: 19px;
}

.login-footer {
    text-align: center;
    padding: 14px 18px 16px;
}

.login-footer p {
    font-size: 11px;
    color: #9fb0c7;
}

.is-hidden {
    display: none !important;
}

.btn-login.loading {
    pointer-events: none;
}

@media (max-width: 520px) {
    .login-box {
        border-radius: 6px;
    }

    .login-header {
        padding: 24px 20px 14px;
    }

    .login-header h1 {
        font-size: 31px;
    }

    .login-form {
        padding: 0 20px 20px;
    }
}

/* Utilities distributed from utilities.css */
.is-hidden {
    display: none !important;
}

.position-relative {
    position: relative;
}

.spin {
    animation: spin 1s linear infinite;
}

.input--readonly {
    background-color: #e5e7eb;
    cursor: not-allowed;
}

.help-text--small {
    color: #6b7280;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.help-text-icon {
    font-size: 16px;
    vertical-align: middle;
}

#alert-snackbar {
    display: none;
    position: fixed;
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%);
    z-index: 2000;
}

.snackbar-content {
    display: flex;
    align-items: center;
    background: #232323;
    color: #fff;
    padding: 10px 22px 10px 16px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    font-size: 13px;
    min-width: 220px;
    gap: 10px;
}

.snackbar-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 6px;
    margin-right: 8px;
}

.snackbar-dot--error {
    background: #ff3b3b;
}

.snackbar-dot--success {
    background: #10b981;
}

.snackbar-message {
    flex: 1;
}

.snackbar-close {
    cursor: pointer;
    font-size: 18px;
    color: #aaa;
    background: transparent;
    border: none;
}