/* ══════════════════════════════════════════════════════════════════════════
   Fablead HRMS - Clean Modern Login Page (Flat & Crisp Card)
   ══════════════════════════════════════════════════════════════════════════ */

:root {
    --primary-color: #E66136;
    --primary-hover: #d8542b;
    --primary-light: rgba(230, 97, 54, 0.1);
    --primary-glow: rgba(230, 97, 54, 0.25);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --bg-input: #f8fafc;
}

body.login-page-body {
    background-color: #f8fafc;
    background-image: 
        radial-gradient(at 0% 0%, rgba(230, 97, 54, 0.12) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(245, 158, 11, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(230, 97, 54, 0.14) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(251, 146, 60, 0.1) 0px, transparent 50%),
        linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 30px 16px;
    box-sizing: border-box;
    position: relative;
    overflow-x: hidden;
}

/* ══════════════════════════════════════════════════════════════════════════
   Background Atmosphere (Soft Ambient Mesh Glow & Dotted Grid)
   ══════════════════════════════════════════════════════════════════════════ */

.login-bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

#particleCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.5;
    pointer-events: auto;
}

/* Modern Dynamic Dot Grid with Soft Center Radial Falloff */
.login-bg-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(230, 97, 54, 0.16) 1.2px, transparent 1.2px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse at 50% 50%, black 35%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 35%, transparent 75%);
    opacity: 0.6;
}

/* Floating Ambient Glowing Blobs */
.floating-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
}

.floating-orb-1 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, rgba(230, 97, 54, 0.22) 0%, rgba(240, 89, 41, 0.06) 65%, transparent 100%);
    top: -150px;
    left: -120px;
    animation: orbMorph1 18s ease-in-out infinite alternate;
}

.floating-orb-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.18) 0%, rgba(230, 97, 54, 0.05) 65%, transparent 100%);
    bottom: -180px;
    right: -140px;
    animation: orbMorph2 22s ease-in-out infinite alternate;
}

.floating-orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(251, 146, 60, 0.15) 0%, transparent 75%);
    top: 45%;
    left: 48%;
    transform: translate(-50%, -50%);
    animation: orbMorph3 15s ease-in-out infinite alternate;
}

@keyframes orbMorph1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 40px) scale(1.1); }
}

@keyframes orbMorph2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-50px, -40px) scale(1.06); }
}

@keyframes orbMorph3 {
    0% { transform: translate(-50%, -50%) scale(0.95); }
    100% { transform: translate(-45%, -55%) scale(1.15); }
}

/* ══════════════════════════════════════════════════════════════════════════
   Main Login Card - Clean, Flat & Minimalist (No Box Shadow)
   ══════════════════════════════════════════════════════════════════════════ */

.login-card-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    margin: auto;
}

.login-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 42px 38px 36px 38px;
    border: 1px solid #e2e8f0;
    box-shadow: none !important;
}

/* Brand Logo */
.login-logo-container {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo-container img {
    max-height: 56px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.login-logo-container img:hover {
    transform: scale(1.02);
}

/* Typography Header */
.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-header h4 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.3px;
    margin: 0 0 6px 0;
}

.login-header p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
    font-weight: 400;
}

/* Form Controls */
.login-form-group {
    margin-bottom: 20px;
}

.login-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 7px;
    letter-spacing: 0.2px;
}

.login-input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.login-input-wrapper .input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 18px;
    pointer-events: none;
    transition: color 0.2s ease;
    z-index: 2;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-input-wrapper .form-control {
    width: 100%;
    height: 48px;
    padding: 10px 44px 10px 42px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    background-color: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    box-shadow: none !important;
    transition: all 0.2s ease;
}

.login-input-wrapper .form-control:focus {
    background-color: #ffffff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light) !important;
    outline: none;
}

.login-input-wrapper:focus-within .input-icon {
    color: var(--primary-color);
}

.login-input-wrapper .toggle-password,
.login-input-wrapper .password-toggle-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    cursor: pointer;
    font-size: 19px;
    line-height: 1;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease, transform 0.15s ease;
    z-index: 3;
    user-select: none;
}

.login-input-wrapper .toggle-password:hover,
.login-input-wrapper .password-toggle-btn:hover {
    color: var(--primary-color);
}

.login-input-wrapper .toggle-password:active,
.login-input-wrapper .password-toggle-btn:active {
    transform: translateY(-50%) scale(0.92);
}

.login-field-error {
    display: block;
    font-size: 12px;
    color: #ef4444;
    font-weight: 500;
    margin-top: 5px;
    padding-left: 2px;
}

/* Options Bar */
.login-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    margin-top: 4px;
}

.login-checkbox-label {
    display: inline-flex;
    align-items: center;
    font-size: 13.5px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.login-checkbox-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    border-radius: 5px;
    margin-right: 8px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* Submit Button */
.btn-login-submit {
    position: relative;
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #E66136 0%, #f05929 100%);
    border: none;
    border-radius: 12px;
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: none !important;
    transition: all 0.25s ease;
    cursor: pointer;
    text-transform: uppercase;
}

.btn-login-submit:hover {
    background: linear-gradient(135deg, #d8542b 0%, #e64f1e 100%);
    transform: translateY(-1px);
    color: #ffffff;
}

.btn-login-submit:active {
    transform: translateY(0);
}

.btn-login-submit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
}

/* Alert Box */
.login-alert-box {
    margin-top: 16px;
}

.login-alert-box .alert {
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 0;
    border: none;
}

.login-alert-box .alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.login-alert-box .alert-success {
    background-color: #dcfce7;
    color: #166534;
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 24px;
}

.login-footer a {
    font-size: 12.5px;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.login-footer a:hover {
    color: var(--primary-color);
}

@media (max-width: 480px) {
    .login-card {
        padding: 32px 22px 28px 22px;
        border-radius: 18px;
    }
    .login-logo-container {
        margin-bottom: 22px;
    }
    .login-header h4 {
        font-size: 20px;
    }
}