/* =====================================================================
   GovStaff Pro - Modern login page
   Azure blue + light gray palette to match the landing page.
   Loaded ONLY by layouts/auth.php.
   ===================================================================== */

* { box-sizing: border-box; }

body.auth-modern {
    min-height: 100vh;
    margin: 0;
    padding: 40px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #334155;
    background:
        radial-gradient(circle at 15% 20%, rgba(14, 165, 233, 0.16), transparent 55%),
        radial-gradient(circle at 85% 25%, rgba(2, 132, 199, 0.14), transparent 55%),
        radial-gradient(circle at 50% 90%, rgba(56, 189, 248, 0.14), transparent 55%),
        linear-gradient(135deg, #f0f9ff 0%, #f8fafc 45%, #e0f2fe 100%);
    position: relative;
    overflow-x: hidden;
}

/* Decorative blurred blobs */
body.auth-modern::before,
body.auth-modern::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}
body.auth-modern::before {
    width: 380px; height: 380px;
    top: -100px; left: -100px;
    background: rgba(14, 165, 233, 0.25);
}
body.auth-modern::after {
    width: 420px; height: 420px;
    bottom: -120px; right: -120px;
    background: rgba(2, 132, 199, 0.22);
}

/* Card */
.auth-modern-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    padding: 42px 38px;
    box-shadow:
        0 24px 70px rgba(2, 132, 199, 0.18),
        0 6px 24px rgba(14, 165, 233, 0.10),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Top bar: back + language */
.auth-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    font-size: 13px;
}
.auth-back {
    color: #64748b;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.15s;
}
.auth-back:hover {
    color: #0284c7;
    background: rgba(2, 132, 199, 0.08);
}

.auth-lang {
    position: relative;
}
.auth-lang-current {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(2, 132, 199, 0.15);
    border-radius: 10px;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
}
.auth-lang-current:hover { color: #0284c7; border-color: rgba(2, 132, 199, 0.35); }
.auth-lang-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(2, 132, 199, 0.15);
    min-width: 160px;
    z-index: 20;
    overflow: hidden;
    border: 1px solid rgba(2, 132, 199, 0.1);
}
.auth-lang.open .auth-lang-menu { display: block; }
.auth-lang-menu a {
    display: block;
    padding: 11px 16px;
    color: #475569;
    text-decoration: none;
    font-size: 13px;
    border-bottom: 1px solid #f0f9ff;
}
.auth-lang-menu a:last-child { border-bottom: 0; }
.auth-lang-menu a:hover { background: #f0f9ff; color: #0284c7; }
.auth-lang-menu a.active { color: #0284c7; font-weight: 600; background: #e0f2fe; }

/* Brand */
.auth-brand {
    text-align: center;
    margin-bottom: 30px;
}
.auth-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 60px;
    padding: 0 22px;
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
    border-radius: 16px;
    color: white;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 18px;
    box-shadow:
        0 10px 30px rgba(2, 132, 199, 0.35),
        inset 0 -3px 8px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.5px;
    white-space: nowrap;
}
.auth-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 30px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}
.auth-sub {
    color: #64748b;
    font-size: 14px;
    margin: 0;
}

/* Flash messages */
.auth-flash {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    margin-bottom: 18px;
    border: 1px solid transparent;
    font-weight: 500;
}
.auth-flash.error {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
    border-color: rgba(220, 38, 38, 0.2);
}
.auth-flash.success {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
    border-color: rgba(6, 95, 70, 0.2);
}
.auth-flash.info {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e3a8a;
    border-color: rgba(37, 99, 235, 0.2);
}
.auth-flash.warning {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #78350f;
    border-color: rgba(217, 119, 6, 0.2);
}

/* Form fields */
.auth-field {
    margin-bottom: 18px;
}
.auth-field label {
    display: block;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}
.auth-field input[type="text"],
.auth-field input[type="email"],
.auth-field input[type="password"] {
    width: 100%;
    background: rgba(255, 255, 255, 0.85);
    border: 1.5px solid #bae6fd;
    color: #0f172a;
    padding: 13px 15px;
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
}
.auth-field input:focus {
    outline: none;
    border-color: #0284c7;
    background: white;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}
.auth-field input::placeholder { color: #cbd5e1; }

/* Remember + forgot row */
.auth-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 13px;
}
.auth-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    cursor: pointer;
}
.auth-remember input[type="checkbox"] {
    accent-color: #0284c7;
    width: 15px;
    height: 15px;
    cursor: pointer;
}
.auth-forgot {
    color: #0284c7;
    text-decoration: none;
    font-weight: 500;
}
.auth-forgot:hover { color: #0369a1; }

/* Primary CTA */
.auth-btn {
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow:
        0 10px 25px rgba(2, 132, 199, 0.35),
        0 4px 10px rgba(14, 165, 233, 0.2),
        inset 0 -2px 6px rgba(0, 0, 0, 0.08);
    font-family: inherit;
    letter-spacing: 0.01em;
}
.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow:
        0 14px 30px rgba(2, 132, 199, 0.45),
        0 6px 14px rgba(14, 165, 233, 0.25),
        inset 0 -2px 6px rgba(0, 0, 0, 0.08);
}
.auth-btn:active { transform: translateY(0); }

/* Demo logins panel */
.auth-demo {
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid rgba(2, 132, 199, 0.15);
    text-align: center;
}
.auth-demo-title {
    color: #0284c7;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.auth-demo-users {
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.7;
}
.auth-demo-users code {
    background: rgba(2, 132, 199, 0.1);
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 11.5px;
    color: #0369a1;
    font-family: 'Consolas', monospace;
    font-weight: 500;
}

/* Footer nav links */
.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 8px;
    font-size: 12.5px;
    color: #94a3b8;
}
.auth-footer a {
    color: #0284c7;
    text-decoration: none;
    margin: 0 8px;
    font-weight: 500;
    transition: color 0.15s;
}
.auth-footer a:hover { color: #0369a1; }

/* Sinhala / Tamil font fallbacks */
html[lang="si"] body,
html[lang="si"] input,
html[lang="si"] button { font-family: 'Noto Sans Sinhala', 'Inter', sans-serif; }
html[lang="si"] .auth-title { font-family: 'Noto Sans Sinhala', 'Playfair Display', Georgia, serif; }
html[lang="ta"] body,
html[lang="ta"] input,
html[lang="ta"] button { font-family: 'Noto Sans Tamil', 'Inter', sans-serif; }
html[lang="ta"] .auth-title { font-family: 'Noto Sans Tamil', 'Playfair Display', Georgia, serif; }

/* Responsive */
@media (max-width: 520px) {
    body.auth-modern { padding: 20px 14px; }
    .auth-modern-card { padding: 32px 24px; border-radius: 20px; }
    .auth-title { font-size: 26px; }
    .auth-logo { min-width: 52px; height: 52px; padding: 0 18px; font-size: 21px; margin-bottom: 14px; }
    .auth-brand { margin-bottom: 24px; }
}