/* ALMUDIR ERP — Login Page v3.0 */
html {
    background: linear-gradient(135deg, #0a1628 0%, #0d2e6b 50%, #0a47a1 100%) !important;
    min-height: 100%;
}
body { background: transparent !important; }

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

.login-wrapper {
    display: flex !important;
    max-width: 1100px !important;
    width: 100%;
    margin: 0 auto;
    border-radius: 20px !important;
    box-shadow: 0 40px 90px rgba(0,0,0,.45) !important;
    overflow: hidden;
    min-height: 580px;
    animation: loginFadeUp .6s ease-out;
}

@keyframes loginFadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.login-brand-section {
    flex: 1;
    background: linear-gradient(160deg, var(--tm-brand-light, #1565c0) 0%, var(--tm-brand, #0d47a1) 55%, #1a237e 100%) !important;
    padding: 60px 44px !important;
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.login-brand-section::before,
.login-brand-section::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
}
.login-brand-section::before { width: 320px; height: 320px; top: -100px; right: -100px; }
.login-brand-section::after  { width: 220px; height: 220px; bottom: -60px; left: -60px; }

.brand-content { position: relative; z-index: 1; width: 100%; }
.logo-circle {
    width: 72px !important; height: 72px !important;
    border-radius: 18px !important;
    background: rgba(255,255,255,.15) !important;
    display: flex !important; align-items: center; justify-content: center;
    font-size: 30px !important; color: #90caf9 !important;
    border: 1.5px solid rgba(255,255,255,.25) !important;
    margin-bottom: 18px; backdrop-filter: blur(6px);
}
.brand-title { font-size: 2rem !important; font-weight: 800 !important; color: #fff !important; margin: 0 0 8px !important; }
.brand-subtitle { font-size: .98rem !important; color: rgba(255,255,255,.82) !important; line-height: 1.65; margin: 0 0 32px !important; }

.features-list { display: grid !important; gap: 10px; width: 100%; }
.feature-item {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px; border-radius: 10px;
    background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.14);
    color: rgba(255,255,255,.88); font-size: .92rem;
    transition: transform .2s, background .2s;
}
.feature-item:hover { transform: translateX(-4px); background: rgba(255,255,255,.13); }
.feature-item i { color: #64b5f6 !important; flex-shrink: 0; }

.login-form-section {
    flex: 1; background: #fff !important;
    display: flex !important; align-items: center; justify-content: center;
}
.form-container { width: 100%; max-width: 420px; padding: 52px 44px; }
.form-header { text-align: center; margin-bottom: 32px; }
.form-header h2 { font-size: 1.85rem !important; font-weight: 800 !important; color: #0d1b2a !important; margin: 0 0 7px !important; }
.form-header p { color: #6b7280 !important; font-size: .93rem; margin: 0 !important; }

.form-group { margin-bottom: 20px; }
.form-label { display: flex; align-items: center; font-weight: 600 !important; color: #374151 !important; margin-bottom: 7px; font-size: .88rem; }
.form-label i { margin-left: 7px !important; color: var(--tm-brand, #1565c0) !important; }
.form-input {
    width: 100%; padding: 12px 16px !important;
    border: 1.5px solid #e5e7eb !important; border-radius: 11px !important;
    font-size: .95rem; background: #f8fafc; color: #111827;
    transition: border-color .2s, box-shadow .2s;
}
.form-input:focus {
    outline: none; border-color: var(--tm-brand, #1565c0) !important;
    background: #fff; box-shadow: 0 0 0 3px var(--tm-brand-glow, rgba(21,101,192,.13)) !important;
}
.has-error .form-input { border-color: #dc2626 !important; background: #fef2f2; }

.password-input-container { position: relative; }
.password-toggle {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: #9ca3af; cursor: pointer; padding: 4px;
}
.password-toggle:hover { color: var(--tm-brand, #1565c0) !important; }

.form-options { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.remember-checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: .88rem; color: #374151; }
.remember-checkbox input[type="checkbox"] { display: none; }
.checkmark {
    width: 18px; height: 18px; border: 1.5px solid #d1d5db; border-radius: 4px;
    position: relative; transition: all .2s; flex-shrink: 0;
}
.remember-checkbox input[type="checkbox"]:checked + .checkmark {
    background: var(--tm-brand, #1565c0) !important; border-color: var(--tm-brand, #1565c0) !important;
}
.remember-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: '✓'; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%); color: #fff; font-size: 11px; font-weight: bold;
}
.forgot-password { color: var(--tm-brand, #1565c0) !important; text-decoration: none; font-size: .88rem; font-weight: 500; }
.forgot-password:hover { color: var(--tm-brand-hover, #0d47a1) !important; text-decoration: underline; }

.login-btn {
    width: 100% !important; padding: 13px 16px !important;
    background: linear-gradient(135deg, var(--tm-brand-light, #1976d2) 0%, var(--tm-brand, #1565c0) 50%, var(--tm-brand-hover, #0d47a1) 100%) !important;
    color: #fff !important; border: none !important; border-radius: 11px !important;
    font-size: 1rem !important; font-weight: 700 !important; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 9px;
    box-shadow: 0 8px 24px var(--tm-brand-glow, rgba(13,71,161,.32)) !important;
    transition: transform .15s ease, box-shadow .2s ease;
}
.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px var(--tm-brand-glow, rgba(13,71,161,.42)) !important;
    color: #fff !important;
}
.login-btn:disabled { opacity: .75; transform: none !important; cursor: not-allowed; }

.register-link { text-align: center; margin-top: 22px; }
.register-link p { color: #6b7280; font-size: .88rem; margin: 0; }
.register-link a { color: var(--tm-brand, #1565c0) !important; font-weight: 600; text-decoration: none; }
.error-message { display: flex; align-items: center; gap: 5px; color: #dc2626; font-size: .83rem; margin-top: 5px; }

@media (max-width: 900px) {
    .login-wrapper { flex-direction: column !important; border-radius: 16px !important; }
    .login-brand-section { padding: 40px 28px !important; min-height: 260px; }
    .features-list { display: none !important; }
    .form-container { padding: 36px 28px; }
}
@media (max-width: 480px) {
    .login-container { padding: 12px; }
    .form-container { padding: 28px 20px; }
}
