/* ── Login page ── */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eef2f8 0%, #f0f3f9 50%, #e8eef8 100%);
    padding: 20px;
    position: relative;
}

.login-bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(31,74,149,.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(29,185,195,.04) 0%, transparent 50%),
        radial-gradient(circle at 50% 80%, rgba(31,56,100,.02) 0%, transparent 50%);
    pointer-events: none;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f4;
    box-shadow: 0 2px 8px rgba(16,24,40,.04), 0 8px 32px rgba(16,24,40,.06);
    padding: 40px 36px 32px;
    position: relative;
    z-index: 1;
}

.login-brand {
    text-align: center;
    margin-bottom: 24px;
}

.login-brand-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1db9c3 0%, #1599a3 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    box-shadow: 0 4px 12px rgba(29,185,195,.25);
}

.login-brand-icon i {
    font-size: 26px;
    color: #fff;
}

.login-title {
    font-size: 20px;
    font-weight: 700;
    color: #1b2440;
    margin: 0 0 4px;
}

.login-desc {
    font-size: 14px;
    color: #6f7d9c;
    margin: 0;
    line-height: 1.5;
}

.login-error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    background: #fef0f0;
    border: 1px solid #fcd5d5;
    color: #c92a2a;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
}

.login-error i {
    font-size: 16px;
    flex-shrink: 0;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.login-field label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    letter-spacing: .01em;
}

.login-input-wrap {
    position: relative;
}

.login-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1dce8;
    border-radius: 10px;
    font-size: 14px;
    font-family: "Inter", "Segoe UI", sans-serif;
    color: #0f172a;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
    outline: none;
}

.login-input:focus {
    border-color: #1f4a95;
    box-shadow: 0 0 0 3px rgba(31,74,149,.1);
}

.login-input::placeholder {
    color: #b0bfd4;
}

.login-input.input-error {
    border-color: #c92a2a;
}

.login-input.input-error:focus {
    box-shadow: 0 0 0 3px rgba(201,42,42,.1);
}

.login-pw-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #6f7d9c;
    font-size: 16px;
    padding: 4px;
    border-radius: 4px;
    transition: color .15s, background .15s;
}

.login-pw-toggle:hover {
    color: #1b2440;
    background: #f0f3f9;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    color: #475569;
    user-select: none;
}

.login-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #1f4a95;
    border-radius: 4px;
    cursor: pointer;
}

.login-forgot {
    color: #1f4a95;
    font-weight: 500;
    font-size: 12px;
    cursor: pointer;
    transition: color .15s;
    text-decoration: none;
}

.login-forgot:hover {
    color: #162b50;
    text-decoration: underline;
}

.login-footer-links {
    text-align: center;
    margin-top: 1rem;
}

.login-footer-links a {
    color: #1f4a95;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: color .15s;
}

.login-footer-links a:hover {
    color: #162b50;
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 0;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: "Inter", "Segoe UI", sans-serif;
    cursor: pointer;
    transition: background .15s, transform .1s, box-shadow .15s;
    border: none;
    background: #1f3864;
    color: #fff;
}

.login-btn:hover {
    background: #162b50;
    box-shadow: 0 4px 14px rgba(31,56,100,.25);
}

.login-btn:active {
    transform: scale(.98);
}

.login-btn:disabled {
    background: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
}

.login-btn i {
    font-size: 18px;
}

.login-btn.loading .btn-text {
    visibility: hidden;
}

.login-btn.loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: login-spin .6s linear infinite;
}

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

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #edf1f8;
}

.login-lang {
    display: inline-flex;
    border: 1px solid #e1e8f5;
    border-radius: 8px;
    overflow: hidden;
}

.login-lang-btn {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 500;
    font-family: "Inter", "Segoe UI", sans-serif;
    background: transparent;
    border: none;
    border-left: 1px solid #e1e8f5;
    color: #6f7d9c;
    cursor: pointer;
    line-height: 1.6;
    transition: background .15s, color .15s;
}

.login-lang-btn:first-child {
    border-left: none;
}

.login-lang-btn:hover {
    background: #f0f3f9;
    color: #1b2440;
}

.login-lang-btn.active {
    background: #e8effe;
    color: #1f4a95;
    font-weight: 600;
}

.login-version {
    font-size: 11px;
    color: #b0bfd4;
    margin-top: 12px;
}

.login-field-error {
    font-size: 12px;
    color: #c92a2a;
    margin-top: 2px;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .login-card {
        padding: 28px 20px 24px;
    }

    .login-title {
        font-size: 18px;
    }

    .login-desc {
        font-size: 13px;
    }

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