/* ============================================================
   ModeMetrix - Centered SaaS Login Page
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.login-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============= WRAPPER ============= */
.login-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: radial-gradient(circle at 8% 3%, rgb(249 115 22 / 23%), transparent 40%), radial-gradient(circle at 92% 4%, rgb(234 88 12 / 22%), transparent 38%);
}

/* ============= LOGO ============= */
.login-logo {
    margin-bottom: 2rem;
    text-align: center;
}

.login-logo a {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-img {
    height: 44px;
    width: auto;
    object-fit: contain;
}

/* ============= CARD ============= */
.login-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06), 0 0 1px rgba(0, 0, 0, 0.1);
    padding: 2.5rem 2.5rem 2rem;
    width: 100%;
    max-width: 460px;
}

.login-heading {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    text-align: center;
    margin-bottom: 0.35rem;
}

.login-subtitle {
    font-size: 0.9rem;
    color: #6b7280;
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

/* ============= FORM FIELDS ============= */
.form-group-login {
    margin-bottom: 1.25rem;
}

.field-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.field-input {
    width: 100%;
    height: 48px;
    padding: 0 1rem;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-size: 0.9375rem;
    color: #111827;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.field-input::placeholder {
    color: #9ca3af;
}

.field-input:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

/* ============= PASSWORD FIELD ============= */
.password-wrapper {
    position: relative;
}

.password-wrapper .field-input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 1rem;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}

.password-toggle:hover {
    color: #6b7280;
}

/* ============= OPTIONS ROW ============= */
.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #4b5563;
    cursor: pointer;
    margin: 0;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #f97316;
    cursor: pointer;
    margin: 0;
}

.forgot-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: #f97316;
    text-decoration: none;
    transition: color 0.15s;
}

.forgot-link:hover {
    color: #ea580c;
    text-decoration: underline;
}

/* ============= SIGN IN BUTTON ============= */
.btn-signin {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
    letter-spacing: 0.3px;
}

.btn-signin:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.4);
}

.btn-signin:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.btn-signin i {
    font-size: 1rem;
}

/* ============= SIGNUP TEXT ============= */
.signup-text {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0;
}

.signup-link {
    font-weight: 600;
    color: #111827;
    text-decoration: none;
    transition: color 0.15s;
}

.signup-link:hover {
    color: #f97316;
    text-decoration: underline;
}

/* ============= FOOTER ============= */
.login-footer {
    margin-top: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.login-footer a {
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: color 0.15s;
}

.login-footer a:hover {
    color: #f97316;
}

/* ============= VALIDATION ERRORS ============= */
.field-input.error,
.field-input.input-validation-error {
    border-color: #ef4444;
}

.field-input.error:focus,
.field-input.input-validation-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

label.text-danger,
.field-validation-error {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    color: #ef4444 !important;
}

/* ============= ERROR MODAL ============= */
#alertSm .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

#alertSm .modal-header {
    border-bottom: 1px solid #f3f4f6;
    padding: 1rem 1.5rem;
}

#alertSm .modal-footer {
    border-top: 1px solid #f3f4f6;
    padding: 0.75rem 1.5rem;
}

/* ============= PACE LOADER (disabled on login) ============= */
/* Login has no real page-load activity to track — kill the Pace loader.
   Loads after vendor.min.css, so this overrides the bundled .pace styles. */
body.login-body .pace {
    display: none !important;
}

/* ============= RESPONSIVE ============= */
@media (max-width: 575.98px) {
    .login-card {
        padding: 2rem 1.5rem 1.5rem;
        border-radius: 12px;
    }

    .login-heading {
        font-size: 1.5rem;
    }

    .login-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .login-footer {
        gap: 1.25rem;
    }

    .login-footer a {
        font-size: 0.6875rem;
    }
}
