/* =========================================================
   W3SMS — Auth Pages (Login / Register / Forgot / Reset)
   Premium split-screen design
   ========================================================= */

:root {
    --w3-gradient: linear-gradient(135deg, #0c4a6e, #0ea5e9);
    --w3-primary: #0ea5e9;
    --w3-primary-dark: #0c4a6e;
    --w3-accent: #38bdf8;
    --w3-text: #0f172a;
    --w3-text-muted: #475569;
    --w3-border: #e2e8f0;
    --w3-bg-soft: #f8fafc;
    --w3-white: #ffffff;
    --w3-success: #10b981;
    --w3-danger: #ef4444;
    --w3-radius: 14px;
    --w3-shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
    --w3-shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
    --w3-shadow-lg: 0 18px 50px rgba(12, 74, 110, 0.18);
}

/* ===== Base ===== */
html, body { height: 100%; }
body {
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--w3-text);
    background: var(--w3-bg-soft);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

/* ===== Layout ===== */
.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--w3-white);
}

@media (max-width: 991.98px) {
    .auth-shell { grid-template-columns: 1fr; }
}

/* ===== Branding side (gradient) ===== */
.auth-brand {
    position: relative;
    background: var(--w3-gradient);
    color: var(--w3-white);
    padding: 56px 56px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.auth-brand::before,
.auth-brand::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    pointer-events: none;
}
.auth-brand::before { width: 380px; height: 380px; top: -120px; right: -120px; }
.auth-brand::after  { width: 260px; height: 260px; bottom: -90px; left: -80px; background: rgba(56,189,248,0.25); }

.auth-brand__logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    margin-bottom: auto;
    z-index: 2;
}
.auth-brand__logo img { max-height: 40px; filter: brightness(0) invert(1); }

.auth-brand__inner {
    margin: auto 0;
    z-index: 2;
}
.auth-brand__inner h1 {
    font-size: clamp(1.6rem, 2.4vw, 2.25rem);
    font-weight: 800;
    margin: 0 0 14px;
    line-height: 1.2;
}
.auth-brand__inner p {
    color: rgba(255,255,255,0.85);
    font-size: 1.02rem;
    line-height: 1.6;
    margin: 0 0 28px;
    max-width: 460px;
}
.auth-brand__features {
    list-style: none;
    padding: 0; margin: 0;
    display: grid;
    gap: 14px;
}
.auth-brand__features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: rgba(255,255,255,0.95);
    font-size: 0.95rem;
}
.auth-brand__features li i {
    flex-shrink: 0;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    color: var(--w3-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    margin-top: 2px;
}
.auth-brand__features strong { display: block; font-weight: 600; margin-bottom: 2px; }
.auth-brand__features span { color: rgba(255,255,255,0.78); font-size: 0.86rem; }

.auth-brand__footer {
    margin-top: 32px;
    z-index: 2;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
}

@media (max-width: 991.98px) {
    .auth-brand {
        padding: 32px 28px;
        min-height: auto;
    }
    .auth-brand__features { display: none; }
    .auth-brand__inner p  { display: none; }
    .auth-brand__footer   { display: none; }
}

/* ===== Form side ===== */
.auth-form-wrap {
    padding: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--w3-white);
}
.auth-form {
    width: 100%;
    max-width: 460px;
}
.auth-form__head { margin-bottom: 28px; }
.auth-form__head .eyebrow {
    color: var(--w3-primary);
    font-weight: 700;
    letter-spacing: 0.15em;
    font-size: 0.78rem;
    text-transform: uppercase;
}
.auth-form__head h2 {
    font-size: clamp(1.4rem, 2vw, 1.8rem);
    font-weight: 800;
    margin: 6px 0 10px;
}
.auth-form__head p {
    color: var(--w3-text-muted);
    margin: 0;
    font-size: 0.95rem;
}

@media (max-width: 991.98px) {
    .auth-form-wrap { padding: 32px 22px; }
}

/* ===== Inputs ===== */
.auth-field {
    position: relative;
    margin-bottom: 16px;
}
.auth-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--w3-text);
    margin-bottom: 6px;
}
.auth-field .input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.auth-field .input-wrap > i.field-icon {
    position: absolute;
    left: 16px;
    color: var(--w3-text-muted);
    font-size: 0.95rem;
    pointer-events: none;
}
.auth-field input,
.auth-field select {
    width: 100%;
    padding: 12px 16px 12px 44px;
    background: var(--w3-bg-soft);
    border: 1px solid var(--w3-border);
    border-radius: var(--w3-radius);
    font-size: 0.95rem;
    color: var(--w3-text);
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.auth-field input:focus,
.auth-field select:focus {
    outline: none;
    border-color: var(--w3-primary);
    background: var(--w3-white);
    box-shadow: 0 0 0 4px rgba(14,165,233,0.12);
}
.auth-field input::placeholder { color: #94a3b8; }
.auth-field select { appearance: none; cursor: pointer; }
.auth-field select + .field-chev {
    position: absolute; right: 16px;
    color: var(--w3-text-muted);
    font-size: 0.75rem;
    pointer-events: none;
}

/* Password toggle */
.auth-field .toggle-pass {
    position: absolute;
    right: 14px;
    background: transparent;
    border: 0;
    color: var(--w3-text-muted);
    cursor: pointer;
    padding: 6px;
    font-size: 0.95rem;
    transition: color .2s ease;
}
.auth-field .toggle-pass:hover { color: var(--w3-primary); }

/* Field error / hint */
.auth-field .hint { font-size: 0.8rem; color: var(--w3-text-muted); margin-top: 4px; }
.auth-field .error { font-size: 0.8rem; color: var(--w3-danger); margin-top: 4px; }

/* Two-column on wider forms */
.auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 575.98px) {
    .auth-row { grid-template-columns: 1fr; gap: 0; }
}

/* ===== Checkbox + actions ===== */
.auth-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}
.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 0.9rem;
    color: var(--w3-text);
}
.auth-checkbox input { width: 16px; height: 16px; accent-color: var(--w3-primary); cursor: pointer; }
.auth-link {
    color: var(--w3-primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: color .2s ease;
}
.auth-link:hover { color: var(--w3-primary-dark); text-decoration: underline; }

/* ===== Submit button ===== */
.auth-submit {
    width: 100%;
    background: var(--w3-gradient);
    color: var(--w3-white);
    border: 0;
    padding: 13px 18px;
    border-radius: var(--w3-radius);
    font-weight: 700;
    font-size: 0.98rem;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(14,165,233,0.28);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.auth-submit:hover { transform: translateY(-2px); box-shadow: 0 14px 28px rgba(14,165,233,0.4); filter: brightness(1.05); }
.auth-submit:active { transform: translateY(0); }

/* ===== Divider + alt actions ===== */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 18px;
    color: var(--w3-text-muted);
    font-size: 0.82rem;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--w3-border);
}
.auth-foot {
    text-align: center;
    color: var(--w3-text-muted);
    font-size: 0.92rem;
    margin: 0;
}
.auth-foot a {
    color: var(--w3-primary);
    font-weight: 600;
    text-decoration: none;
}
.auth-foot a:hover { color: var(--w3-primary-dark); text-decoration: underline; }

/* ===== Back to home ===== */
.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--w3-text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    margin-bottom: 24px;
    transition: color .2s ease;
}
.auth-back:hover { color: var(--w3-primary); }

/* ===== Toastr position fix ===== */
.toast-top-right { top: 80px; right: 18px; }
