/* Finance Dept of SDSWE - Login with old system background image */

.login-page {
    margin: 0;
    min-height: 100vh;
    overflow: hidden;
}

.login-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Left: Form section */
.login-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-secondary);
    position: relative;
    z-index: 2;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.login-no-permission {
    margin-top: 1rem;
    padding: 1rem;
    text-align: center;
}
.login-no-permission-text {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.login-no-permission-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: contain;
    display: block;
    margin: 0 auto 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.login-header h1 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #22c55e 0%, #eab308 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p,
.login-welcome-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.login-welcome-text {
    line-height: 1.5;
    max-width: 320px;
    margin: 0 auto;
}

.login-copyright {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.login-form .form-group {
    margin-bottom: 1.25rem;
}

.login-form .form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.login-form .form-group label i {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.login-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-primary);
}

.login-form .btn {
    margin-top: 1rem;
    padding: 0.75rem;
    font-size: 1rem;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Right: Old system login background image (SDSWE login image) */
.login-bg-section {
    flex: 1.2;
    background: linear-gradient(135deg, #22c55e 0%, #eab308 100%);
    background-image: url('../images/bg-auth.jpg');
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 100vh;
}

.login-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.6) 40%,
        rgba(0, 0, 0, 0.5) 70%,
        rgba(0, 0, 0, 0.8) 100%
    );
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-welcome-title {
    color: white;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    text-align: center;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.login-welcome-subtitle {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 1rem;
}

.login-bg-tagline {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    text-align: center;
    font-style: italic;
}

.login-bg-copyright {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    text-align: center;
}

/* Fallback if bg-auth.jpg is missing */

[data-theme="dark"] .login-form-section {
    background: var(--bg-primary);
}

[data-theme="dark"] .login-form input {
    color: #f1f5f9;
    background: var(--bg-tertiary);
}

[data-theme="dark"] .login-form input::placeholder {
    color: rgba(241, 245, 249, 0.6);
}

/* Responsive: stack form only, hide background on small screens */
@media (max-width: 900px) {
    .login-bg-section {
        display: none;
    }
    .login-form-section {
        background: var(--bg-primary);
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
    }
    .login-logo-img {
        width: 70px;
        height: 70px;
    }
    .login-header h1 {
        font-size: 1.2rem;
    }
}
