/* ===================================================================
   AUTH PAGES — Login & Register
   Uses CSS variables set by dynamic_styles.php for full branding
=================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: #0f172a;
    display: flex;
    align-items: stretch;
    min-height: 100vh;
}

/* ── Wrapper ────────────────────────────────────────────────────── */
.auth-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ── Image Panel ─────────────────────────────────────────────────── */
.auth-image-side {
    flex: 0 0 52%;
    position: relative;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.auth-image-side::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(0,0,0,0.55) 0%,
        rgba(0,0,0,0.2) 50%,
        rgba(0,0,0,0.65) 100%
    );
}

.auth-image-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem 3rem;
}

.auth-image-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.auth-image-brand img {
    max-height: 40px;
    width: auto;
}

.auth-image-tagline {
    color: #fff;
}

.auth-image-tagline h2 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.auth-image-tagline p {
    font-size: 1rem;
    color: rgba(255,255,255,0.82);
    line-height: 1.6;
    max-width: 340px;
}

.auth-image-tagline .auth-trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.auth-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
}

/* ── Form Panel ──────────────────────────────────────────────────── */
.auth-form-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    padding: 3rem 2.5rem;
    overflow-y: auto;
}

.auth-form-container {
    width: 100%;
    max-width: 420px;
}

/* Mobile logo (hidden on desktop) */
.auth-mobile-logo {
    display: none;
    max-height: 40px;
    margin-bottom: 2rem;
}

.auth-form-container h1 {
    color: #0f172a;
    font-size: 1.85rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.auth-form-container .auth-subtitle {
    color: #64748b;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ── Alerts ──────────────────────────────────────────────────────── */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.auth-alert.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.auth-alert.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.auth-alert i { margin-top: 1px; flex-shrink: 0; }

/* ── Form Elements ───────────────────────────────────────────────── */
.auth-form-group {
    margin-bottom: 1.25rem;
}

.auth-form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.4rem;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap i.input-icon {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.95rem;
    pointer-events: none;
}

.auth-form-group input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    color: #0f172a;
    background: #f8fafc;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-form-group input:focus {
    outline: none;
    border-color: var(--color-brand-primary, #da9a28);
    background: #fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-brand-primary, #da9a28) 18%, transparent);
}

.auth-form-group input::placeholder { color: #94a3b8; }

/* Password toggle */
.auth-input-wrap .toggle-password {
    position: absolute;
    right: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.auth-input-wrap .toggle-password:hover { color: #475569; }

/* ── Submit Button ───────────────────────────────────────────────── */
.auth-submit-btn {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--color-brand-gradient, var(--color-brand-primary, #da9a28));
    color: var(--color-text-on-brand, #ffffff);
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    margin-top: 0.5rem;
    letter-spacing: 0.02em;
}

.auth-submit-btn:hover { opacity: 0.92; transform: translateY(-1px); }
.auth-submit-btn:active { transform: translateY(0); }

/* ── Divider ─────────────────────────────────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
    color: #94a3b8;
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

/* ── Footer Links ────────────────────────────────────────────────── */
.auth-footer-links {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-footer-links p {
    color: #64748b;
    font-size: 0.88rem;
    margin-bottom: 0.5rem;
}

.auth-footer-links a {
    color: var(--color-brand-primary, #da9a28);
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.auth-footer-links a:hover { opacity: 0.8; text-decoration: underline; }

/* ── Password strength bar ───────────────────────────────────────── */
.password-strength-bar {
    height: 4px;
    border-radius: 4px;
    margin-top: 0.4rem;
    background: #e2e8f0;
    overflow: hidden;
}

.password-strength-bar span {
    display: block;
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease, background 0.3s ease;
    width: 0%;
}

.password-strength-text {
    font-size: 0.75rem;
    margin-top: 0.2rem;
    color: #94a3b8;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 991px) {
    .auth-image-side { display: none; }
    .auth-mobile-logo { display: block; }
    .auth-form-side {
        padding: 2.5rem 1.5rem;
        background: #f8fafc;
    }
    .auth-form-container {
        background: #fff;
        padding: 2rem 1.5rem;
        border-radius: 16px;
        box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    }
}

@media (max-width: 480px) {
    .auth-form-side { padding: 1.5rem 1rem; }
    .auth-form-container h1 { font-size: 1.5rem; }
}
