/* =============================================
   ANAFAE MIS — Modern Login Page Styles
   ============================================= */

:root {
    --primary:        #2563EB;
    --primary-dark:   #1E40AF;
    --primary-light:  #EFF6FF;
    --text-primary:   #111827;
    --text-secondary: #6B7280;
    --border:         #E5E7EB;
    --error:          #EF4444;
    --error-bg:       #FEF2F2;
    --error-border:   #FECACA;
    --white:          #FFFFFF;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
    display: flex;
    background: #F3F4F6;
}

/* ===== SPLIT LAYOUT ===== */
.login-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Left brand panel */
.login-brand {
    flex: 0 0 52%;
    background: linear-gradient(160deg, #0c1d35 0%, #152d52 55%, #1a3a6b 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 56px 48px;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Subtle geometric rings */
.login-brand::before {
    content: '';
    position: absolute;
    width: 520px; height: 520px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.06);
    top: -160px; right: -160px;
    pointer-events: none;
}
.login-brand::after {
    content: '';
    position: absolute;
    width: 380px; height: 380px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.05);
    bottom: -120px; left: -120px;
    pointer-events: none;
}

/* White logo card */
.brand-logo-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 20px 32px;
    margin-bottom: 32px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.28);
    position: relative;
    z-index: 1;
}

.brand-logo-card img {
    width: 120px;
    height: auto;
    display: block;
}

.login-brand h1 {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    letter-spacing: -0.01em;
}

.login-brand p {
    font-size: 14px;
    opacity: 0.7;
    max-width: 300px;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.brand-divider {
    width: 40px;
    height: 3px;
    background: rgba(255,255,255,0.35);
    border-radius: 2px;
    margin: 18px auto;
    position: relative;
    z-index: 1;
}

.system-name {
    display: inline-block;
    margin-top: 6px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    opacity: 1 !important;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 7px 22px;
    border-radius: 24px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

/* Right form panel */
.login-card-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 48px;
    background: #fff;
}

.login-form { width: 100%; max-width: 360px; }

.login-header { margin-bottom: 32px; }

.login-header h2 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Alert */
.alert-error {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error);
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    margin-bottom: 20px;
}

/* Form fields */
.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
    background: #fff;
    font-family: inherit;
    transition: border-color 0.18s, box-shadow 0.18s;
    box-shadow: none;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.13);
    background: #fff;
}

/* Submit button */
.btn-login {
    width: 100%;
    height: 46px;
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
    font-family: inherit;
    letter-spacing: 0.01em;
    transition: opacity 0.18s, transform 0.12s, box-shadow 0.18s;
    box-shadow: 0 4px 14px rgba(37,99,235,0.35);
}

.btn-login:hover {
    opacity: 0.93;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37,99,235,0.4);
}
.btn-login:active { transform: translateY(0); }

.login-footer {
    text-align: center;
    margin-top: 28px;
    font-size: 12px;
    color: var(--text-secondary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 860px) {
    .login-wrapper { flex-direction: column; }
    .login-brand {
        flex: 0 0 auto;
        padding: 48px 24px;
    }
    .login-card-wrap {
        flex: 1;
        padding: 40px 24px;
    }
}

@media (max-width: 480px) {
    .login-brand h1 { font-size: 20px; }
    .login-card-wrap { padding: 32px 20px; }
}