@charset "UTF-8";

:root {
    --primary: #2563eb;       /* Changed to a cleaner blue */
    --primary-dark: #1d4ed8;
    --bg-body: #f3f4f6;
    --text-main: #1f2937;
    --text-muted: #6b7280;
}

* { box-sizing: border-box; }

body { 
    margin: 0; 
    font-family: 'Inter', sans-serif; 
    background: var(--bg-body); 
    color: var(--text-main); 
    min-height: 100vh; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.login-card {
    background: white; 
    width: 100%;
    max-width: 400px; /* Better constraint */
    padding: 2.5rem; 
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    text-align: center; 
    border: none; /* Removed the harsh border */
}

.login-logo { margin-bottom: 1rem; display: block; }
.login-title { font-size: 1.5rem; font-weight: 700; color: #111827; margin-bottom: 0.5rem; }
.login-sub { color: var(--text-muted); font-size: 0.875rem; margin-bottom: 2rem; }

/* Form Inputs */
.inp-group { text-align: left; margin-bottom: 1rem; }

.inp-group label { 
    display: block; 
    font-size: 0.875rem; 
    font-weight: 500; 
    color: #374151; 
    margin-bottom: 0.5rem; 
    text-transform: none; /* Removed uppercase for a friendlier look */
    letter-spacing: normal;
}

.inp-field { 
    width: 100%; 
    padding: 0.75rem; 
    border: 1px solid #d1d5db; 
    border-radius: 6px; 
    font-size: 0.95rem; 
    transition: 0.2s; 
    outline: none; 
}

.inp-field:focus { 
    border-color: var(--primary); 
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1); 
}

/* Checkbox & Links */
.action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.forgot-link { color: var(--primary); text-decoration: none; font-weight: 500; }

/* Buttons */
.btn-login {
    width: 100%; 
    background: var(--primary); 
    color: white; 
    padding: 0.75rem; 
    border: none;
    border-radius: 6px; 
    font-weight: 600; 
    font-size: 1rem; 
    cursor: pointer;
    transition: background-color 0.2s; 
    box-shadow: none;
}

.btn-login:hover { background: var(--primary-dark); }

/* --- LOGIN BUTTON LOADING STATE --- */
#loginBtnWrap {
    position: relative;
}

#loginBtnWrap.loading .btn-login {
    opacity: 0.80;
    cursor: not-allowed;
    pointer-events: none;
    padding-left: 2.5rem; /* room for the spinner on the left */
    color: rgba(255,255,255,0.85);
}

/* CSS spinner rendered as ::before on the wrapper (works; input doesn't support pseudo-elements) */
#loginBtnWrap.loading::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: login-spin 0.65s linear infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes login-spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* --- FORM LOCKED STATE (during submission) --- */
/* Visual-only lock — does NOT use the disabled attribute so form data still submits */
.login-card.form-loading .inp-field {
    opacity: 0.55;
    background: #f9fafb;
    cursor: not-allowed;
    pointer-events: none;
}

.login-card.form-loading .chk-container {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.login-card.form-loading .forgot-link {
    opacity: 0.35;
    pointer-events: none;
}

/* MISSING IN YOUR FILE - Fixes the bad bottom UI */
.footer-link {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.75rem;
    color: var(--text-muted);
}