/* =========================================
   LOGIN PAGE — Modern Split Layout
   ========================================= */

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

body.login-page {
    font-family: 'Nunito', 'Poppins', sans-serif;
    background: #f0f4f8;
    min-height: 100vh;
}

/* ---- Wrapper ---- */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

/* =========================================
   LEFT PANEL — Branding
   ========================================= */
.login-brand-panel {
    display: none;
    flex: 0 0 45%;
    background: linear-gradient(160deg, #054d3e 0%, #076653 45%, #0a8a6e 100%);
    position: relative;
    overflow: hidden;
    padding: 60px 50px;
    flex-direction: column;
    justify-content: space-between;
}

@media (min-width: 992px) {
    .login-brand-panel { display: flex; }
}

/* Decorative circles */
.brand-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    background: #fff;
}
.brand-circle-1 { width: 420px; height: 420px; top: -120px; right: -120px; }
.brand-circle-2 { width: 260px; height: 260px; bottom: 80px; left: -80px; }
.brand-circle-3 { width: 140px; height: 140px; bottom: 280px; right: 60px; }
.brand-circle-4 { width: 70px;  height: 70px;  top: 200px;   left: 50px;  opacity: 0.12; }

/* Brand content */
.brand-content {
    position: relative;
    z-index: 2;
}

.brand-logo img {
    max-width: 140px;
    filter: brightness(0) invert(1);
    margin-bottom: 48px;
}

.brand-headline {
    color: #fff;
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.brand-subtext {
    color: rgba(255,255,255,0.72);
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 320px;
}

/* Feature badges */
.brand-features {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.brand-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.85);
    font-size: 0.875rem;
}

.brand-feature-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* =========================================
   RIGHT PANEL — Form
   ========================================= */
.login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: #f0f4f8;
}

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

/* Mobile logo (shown only when brand panel is hidden) */
.mobile-logo {
    text-align: center;
    margin-bottom: 28px;
}

.mobile-logo img {
    max-width: 120px;
    height: auto;
}

@media (min-width: 992px) {
    .mobile-logo { display: none; }
}

/* Card */
.login-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
    animation: slideUp 0.5s cubic-bezier(0.16,1,0.3,1) both;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Heading */
.form-heading {
    margin-bottom: 28px;
}

.form-heading h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1a2233;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.form-heading p {
    font-size: 0.875rem;
    color: #7a8499;
    margin: 0;
}

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

.lf-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #3d4966;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* Input wrapper with icon */
.lf-input-wrap {
    position: relative;
}

.lf-input-wrap .lf-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aabe;
    font-size: 0.9rem;
    pointer-events: none;
    transition: color 0.2s;
}

.lf-input {
    width: 100%;
    padding: 13px 16px 13px 42px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #1a2233;
    background: #f8fafc;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    font-family: inherit;
}

.lf-input:focus {
    border-color: #076653;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(7,102,83,0.1);
}

.lf-input:focus + .lf-icon,
.lf-input-wrap:focus-within .lf-icon {
    color: #076653;
}

.lf-input.is-invalid {
    border-color: #e53e3e;
    background: #fff5f5;
}

/* Password toggle */
.lf-eye-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #a0aabe;
    font-size: 0.9rem;
    padding: 4px;
    transition: color 0.2s;
    z-index: 2;
}

.lf-eye-toggle:hover { color: #076653; }

/* Validation error */
.lf-error {
    font-size: 0.78rem;
    color: #e53e3e;
    margin-top: 5px;
    padding-left: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Forgot password link */
.lf-forgot-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: #076653;
    text-decoration: none;
    transition: color 0.2s;
}

.lf-forgot-link:hover {
    color: #054d3e;
    text-decoration: underline;
}

/* Readonly input (e.g. email locked from reset link) */
.lf-input[readonly] {
    background: #eef2f7;
    color: #5a6478;
}

/* Remember me row */
.lf-remember {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    cursor: pointer;
    user-select: none;
}

.lf-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #076653;
    cursor: pointer;
    flex-shrink: 0;
}

.lf-remember span {
    font-size: 0.85rem;
    color: #5a6478;
}

/* Submit button */
.lf-btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #076653 0%, #0a8a6e 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.lf-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(7,102,83,0.35);
}

.lf-btn-primary:active { transform: translateY(0); }

.lf-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Spinner inside button */
.lf-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.lf-btn-primary.loading .lf-btn-label { opacity: 0.7; }
.lf-btn-primary.loading .lf-spinner   { display: block; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Divider */
.lf-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0;
    color: #c8d0de;
    font-size: 0.8rem;
}
.lf-divider::before,
.lf-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e8edf3;
}

/* Register link */
.lf-register-link {
    display: block;
    width: 100%;
    padding: 13px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: #076653;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
    font-family: inherit;
    background: transparent;
    cursor: pointer;
}

.lf-register-link:hover {
    border-color: #076653;
    background: #f0faf7;
    color: #054d3e;
    text-decoration: none;
}

/* Alert */
.lf-alert {
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    animation: slideDown 0.25s ease;
}

.lf-alert-error {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #fed7d7;
}

.lf-alert-success {
    background: #f0fff4;
    color: #276749;
    border: 1px solid #c6f6d5;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Footer */
.login-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.78rem;
    color: #9aa3b2;
}

.login-footer strong { color: #5a6478; }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 480px) {
    .login-card {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .form-heading h2 { font-size: 1.4rem; }
}
