/* ═══════════════════════════════════════
   Softbook – Login Page
   ═══════════════════════════════════════ */

:root {
    --primary:      #058ECE;
    --primary-dark: #046fa0;
    --accent:       #f5a623;
    --dark:         #1a2035;
    --muted:        #6c757d;
    --border:       #dde1e7;
    --bg:           #eef2f7;
    --danger:       #dc3545;
    --success:      #198754;
    --warning:      #ffc107;
}

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

html, body { height: 100%; }

body {
    font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    background-image:
        linear-gradient(135deg, #e4eaf3 25%, transparent 25%),
        linear-gradient(225deg, #e4eaf3 25%, transparent 25%),
        linear-gradient(315deg, #e4eaf3 25%, transparent 25%),
        linear-gradient( 45deg, #e4eaf3 25%, transparent 25%);
    background-size: 56px 56px;
}

/* ── Wrapper ── */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 16px;
}

.auth-wrapper {
    width: 100%;
    max-width: 900px;
}

/* ── Card ── */
.login-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 12px 48px rgba(0,0,0,.11);
    overflow: hidden;
    min-height: 560px;
}

/* ══ LEFT: Form Panel ══ */
.form-panel {
    padding: 40px 36px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Brand */
.brand-row { margin-bottom: 28px; }

.brand-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.brand-img  { height: 28px; }

.brand-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -.3px;
}

/* Headings */
.signin-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.signin-subtitle {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 24px;
}

/* ── Alerts ── */
.auth-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 18px;
}

.auth-alert i { font-size: 15px; flex-shrink: 0; }

.auth-alert-danger  { background: #fff5f5; color: #c0392b; border: 1px solid #f5c6cb; }
.auth-alert-success { background: #f0fff4; color: #1e7e45; border: 1px solid #c3e6cb; }
.auth-alert-warning { background: #fffbf0; color: #856404; border: 1px solid #ffe69c; }

/* ── Fields ── */
.field-group { margin-bottom: 18px; }

.field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 6px;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 13px;
    font-size: 16px;
    color: #aaa;
    pointer-events: none;
    z-index: 1;
}

.field-input {
    width: 100%;
    padding: 11px 44px 11px 38px;
    font-size: 14px;
    font-family: inherit;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    background: #fafbfc;
    color: var(--dark);
    transition: border-color .2s, box-shadow .2s, background .2s;
    outline: none;
}

.field-input::placeholder { color: #bbb; }

.field-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(5,142,206,.12);
    background: #fff;
}

/* Validation states */
.was-validated .field-input:invalid,
.field-input.is-invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(220,53,69,.1);
}

.was-validated .field-input:valid,
.field-input.is-valid {
    border-color: var(--success);
}

.field-error {
    display: none;
    font-size: 12px;
    color: var(--danger);
    margin-top: 5px;
}

.was-validated .field-input:invalid ~ .field-error { display: block; }

/* Password toggle button */
.toggle-pw {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #aaa;
    font-size: 16px;
    line-height: 1;
    transition: color .15s;
    z-index: 1;
}

.toggle-pw:hover { color: var(--primary); }

/* Forgot link */
.forgot-link {
    font-size: 12.5px;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    transition: color .15s;
}

.forgot-link:hover { color: var(--primary-dark); text-decoration: underline; }

/* Remember me */
.remember-check {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.remember-label {
    font-size: 13px;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
}

/* Submit button */
.btn-signin-submit {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    border: none;
    border-radius: 9px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: background .2s, transform .1s, box-shadow .2s;
    box-shadow: 0 4px 14px rgba(5,142,206,.3);
}

.btn-signin-submit:hover  { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(5,142,206,.35); }
.btn-signin-submit:active { transform: translateY(0); }
.btn-signin-submit i      { font-size: 20px; }

/* ── Divider ── */
.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 22px 0 16px;
    color: #ccc;
    font-size: 12px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.divider span { white-space: nowrap; color: var(--muted); font-size: 12.5px; }

/* ── Social buttons ── */
.social-row {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
}

.social-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid var(--border);
    transition: background .15s, border-color .15s, transform .15s;
    white-space: nowrap;
}

.social-btn:hover { transform: translateY(-2px); text-decoration: none; }

.sib-google    { background: #fff;    color: #444; }
.sib-google:hover  { background: #f5f5f5; border-color: #ccc; }

.sib-microsoft { background: #fff;    color: #444; }
.sib-microsoft:hover { background: #f5f5f5; border-color: #ccc; }

/* Sign up prompt */
.signup-prompt {
    font-size: 13px;
    color: var(--muted);
    text-align: center;
}

.signup-prompt a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.signup-prompt a:hover { text-decoration: underline; }

/* ══ RIGHT: Promo Panel ══ */
.promo-panel {
    background: linear-gradient(145deg, var(--primary) 0%, #0a6fa8 55%, #0b5c8e 100%);
    position: relative;
    overflow: hidden;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 36px;
}

.promo-panel::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 300px; height: 300px;
    background: rgba(255,255,255,.06);
    border-radius: 50%;
    pointer-events: none;
}

.promo-panel::after {
    content: '';
    position: absolute;
    bottom: -100px; left: -60px;
    width: 280px; height: 280px;
    background: rgba(255,255,255,.04);
    border-radius: 50%;
    pointer-events: none;
}

.promo-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.promo-illustration svg {
    width: 100%;
    max-width: 280px;
    margin-bottom: 28px;
    filter: drop-shadow(0 8px 24px rgba(0,0,0,.2));
}

.promo-text { width: 100%; }

.promo-title {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 4px;
    letter-spacing: -.3px;
}

.promo-tagline {
    font-size: 13px;
    color: rgba(255,255,255,.7);
    margin-bottom: 20px;
}

.promo-features {
    list-style: none;
    text-align: left;
    display: inline-block;
    margin-bottom: 24px;
}

.promo-features li {
    font-size: 13px;
    color: rgba(255,255,255,.85);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.promo-features li i {
    color: var(--accent);
    font-size: 14px;
    flex-shrink: 0;
}

/* ── Slider ── */
.slides-track {
    width: 100%;
    overflow: hidden;
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.promo-slide {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: slideFadeIn .45s ease;
}

.promo-slide.active { display: flex; }

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

/* Dots */
.promo-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 20px;
    flex-shrink: 0;
}

.pdot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.35);
    cursor: pointer;
    transition: all .3s;
    border: none;
    padding: 0;
}

.pdot:hover  { background: rgba(255,255,255,.6); }

.pdot.active {
    background: #fff;
    width: 22px;
    border-radius: 4px;
}

/* ══ RESPONSIVE ══ */
@media (max-width: 767.98px) {
    .auth-body {
        padding: 0;
        align-items: stretch;
        background-image: none;
        background-color: #fff;
    }

    .auth-wrapper { max-width: 100%; }

    .login-card {
        border-radius: 0;
        box-shadow: none;
        min-height: 100dvh;
    }

    .form-panel {
        padding: 32px 24px 28px;
        justify-content: flex-start;
    }

    .social-row { flex-direction: column; }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .form-panel { padding: 32px 28px; }
    .promo-panel { padding: 32px 24px; }
    .promo-illustration svg { max-width: 220px; }
    .promo-title { font-size: 18px; }
}
