body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 2vw, 1.5rem);
    background:
        radial-gradient(circle at 15% 20%, rgba(var(--accent-color-rgb), 0.2), transparent 38%),
        radial-gradient(circle at 82% 80%, rgba(var(--secondary-color-rgb), 0.24), transparent 42%),
        linear-gradient(135deg, #f6f9ff 0%, #edf3ff 45%, #e8f2ff 100%);
    overflow-x: hidden;
}

[data-theme="dark"] body {
    background:
        radial-gradient(circle at 15% 20%, rgba(var(--accent-color-rgb), 0.25), transparent 38%),
        radial-gradient(circle at 82% 80%, rgba(var(--secondary-color-rgb), 0.3), transparent 42%),
        linear-gradient(140deg, #040b1a 0%, #0a1326 45%, #111f39 100%);
}

.login-container {
    width: min(1120px, 100%);
    animation: fadeIn 0.65s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    background: rgba(var(--white-rgb), 0.92);
    border: 1px solid rgba(var(--primary-color-rgb), 0.12);
    border-radius: 24px;
    box-shadow: 0 24px 45px rgba(15, 23, 42, 0.18);
    overflow: hidden;
    backdrop-filter: blur(10px);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
}

[data-theme="dark"] .login-card {
    background: rgba(10, 18, 34, 0.9);
    border-color: rgba(var(--white-rgb), 0.14);
    box-shadow: 0 28px 50px rgba(2, 6, 23, 0.55);
}

.login-showcase {
    color: #fff;
    padding: clamp(1.8rem, 3vw, 2.8rem);
    background:
        linear-gradient(150deg, rgba(9, 33, 89, 0.95), rgba(30, 88, 186, 0.92)),
        url('/images/test.jpg') center/cover no-repeat;
    position: relative;
}

.login-showcase::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(var(--white-rgb), 0.06), transparent 55%);
    pointer-events: none;
}

.showcase-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(var(--white-rgb), 0.35);
    background-color: rgba(var(--white-rgb), 0.14);
    font-size: 0.78rem;
    margin-bottom: 1rem;
}

.company-logo {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.logo-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    background: rgba(var(--white-rgb), 0.16);
    border: 1px solid rgba(var(--white-rgb), 0.24);
}

.company-name {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
}

.company-tagline {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    color: rgba(var(--white-rgb), 0.88);
}

.showcase-description {
    position: relative;
    z-index: 1;
    max-width: 460px;
    margin: 0 0 1.1rem;
    line-height: 1.8;
    color: rgba(var(--white-rgb), 0.95);
}

.showcase-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.65rem;
    position: relative;
    z-index: 1;
}

.showcase-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: rgba(var(--white-rgb), 0.95);
}

.login-panel {
    padding: clamp(1.5rem, 2.8vw, 2.2rem);
}

.login-header {
    margin-bottom: 1.1rem;
}

.login-title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-text-primary);
}

.login-subtitle {
    margin: 0.4rem 0 0;
    color: var(--color-text-secondary);
    font-size: 0.86rem;
}

.login-body {
    padding: 0;
}

.form-group {
    margin-bottom: 0.95rem;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    font-size: 0.8rem;
}

.form-control {
    width: 100%;
    min-height: 44px;
    padding: 0.65rem 0.85rem;
    padding-inline-start: 2.3rem;
    padding-inline-end: 2.3rem;
    border-radius: 12px;
    border: 1.5px solid rgba(var(--primary-color-rgb), 0.2);
    background-color: rgba(var(--white-rgb), 0.9);
}

.form-control:focus {
    border-color: rgba(var(--accent-color-rgb), 0.9);
    box-shadow: 0 0 0 3px rgba(var(--accent-color-rgb), 0.12);
}

.input-icon,
.password-toggle {
    position: absolute;
    top: 37px;
    color: var(--color-text-muted);
}

.input-icon {
    inset-inline-end: 12px;
}

.password-toggle {
    inset-inline-start: 12px;
    border: 0;
    background: transparent;
}

.remember-me {
    display: flex;
    align-items: center;
    margin: 0.2rem 0 1rem;
}

.remember-checkbox {
    display: none;
}

.remember-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
}

.custom-checkbox {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(var(--primary-color-rgb), 0.35);
    margin-inline-start: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.custom-checkbox::after {
    content: '✓';
    color: #fff;
    font-size: 0.66rem;
    opacity: 0;
}

.remember-checkbox:checked + .remember-label .custom-checkbox {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.remember-checkbox:checked + .remember-label .custom-checkbox::after {
    opacity: 1;
}

.login-button {
    width: 100%;
    min-height: 46px;
    border: none;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(120deg, #1d4ed8, #3b82f6);
    box-shadow: 0 14px 24px rgba(29, 78, 216, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 28px rgba(29, 78, 216, 0.28);
}

.login-footer {
    text-align: center;
    margin-top: 1rem;
    padding-top: 0.95rem;
    border-top: 1px solid rgba(var(--primary-color-rgb), 0.12);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--color-link);
    text-decoration: none;
    font-size: 0.77rem;
}

.footer-link:hover {
    text-decoration: none;
    color: var(--accent-color);
}

.copyright {
    margin-top: 0.6rem;
    color: var(--color-text-muted);
    font-size: 0.72rem;
}

.alert {
    border-radius: 10px;
    margin-bottom: 0.9rem;
    font-size: 0.78rem;
}

.loading {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(var(--white-rgb), 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.login-button.loading .button-text {
    display: none;
}

.login-button.loading .loading {
    display: block;
}

@media (max-width: 980px) {
    .login-card {
        grid-template-columns: 1fr;
    }

    .login-showcase {
        border-bottom: 1px solid rgba(var(--white-rgb), 0.2);
    }
}

@media (max-width: 640px) {
    .login-showcase {
        padding: 1.2rem;
    }

    .login-panel {
        padding: 1.2rem;
    }

    .showcase-features {
        display: none;
    }
}
