/* ─────────────────────────────────────────
   SmartBooks — Login  (complete rewrite)
───────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ══ ROOT SHELL ══ */
.sb-root {
    display: flex;
    height: 100vh;
    overflow: hidden;
}


/* ══════════════════════════════════════
   LEFT ASIDE
══════════════════════════════════════ */
.sb-aside {
    width: 460px;
    flex-shrink: 0;
    background: #0b1437;
    position: relative;
    overflow: hidden;
    padding: 32px 44px;
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 100vh;
}

/* subtle noise texture overlay */
.sb-aside-noise {
    position: absolute;
    inset: 0;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-size: 180px;
    pointer-events: none;
    z-index: 0;
}

/* decorative gradient blobs */
.sb-blob {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.sb-blob-1 {
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(99,102,241,0.28) 0%, transparent 65%);
    top: -180px;
    left: -180px;
}

.sb-blob-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(59,130,246,0.22) 0%, transparent 65%);
    bottom: -140px;
    right: -120px;
}

.sb-aside > * { position: relative; z-index: 1; }

/* ── Logo ── */
.sb-aside-top { margin-bottom: 0; padding-bottom: 24px; }

.sb-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sb-logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(79,70,229,0.5);
    flex-shrink: 0;
}

.sb-logo-icon.sm { width: 34px; height: 34px; border-radius: 9px; }
.sb-logo-icon i { font-size: 22px; color: #fff; }
.sb-logo-icon.sm i { font-size: 17px; }

.sb-logo-name {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.4px;
}

/* ── Hero ── */
.sb-aside-hero { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.sb-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    font-weight: 600;
    color: #a5b4fc;
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.30);
    border-radius: 50px;
    padding: 4px 13px;
    margin-bottom: 14px;
    width: fit-content;
    letter-spacing: 0.02em;
}

.sb-hero-badge i { font-size: 14px; }

.sb-hero-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.22;
    letter-spacing: -0.8px;
    margin-bottom: 12px;
}

.sb-hero-accent {
    background: linear-gradient(90deg, #818cf8, #60a5fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sb-hero-sub {
    font-size: 13.5px;
    color: rgba(255,255,255,0.5);
    line-height: 1.65;
    margin-bottom: 20px;
    max-width: 340px;
}

/* feature pills */
.sb-features { display: flex; flex-direction: column; gap: 8px; }

.sb-feat {
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 13.5px;
    color: rgba(255,255,255,0.65);
    font-weight: 500;
}

.sb-feat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-green  { background: #4ade80; box-shadow: 0 0 8px rgba(74,222,128,0.7); }
.dot-blue   { background: #60a5fa; box-shadow: 0 0 8px rgba(96,165,250,0.7); }
.dot-violet { background: #a78bfa; box-shadow: 0 0 8px rgba(167,139,250,0.7); }
.dot-amber  { background: #fbbf24; box-shadow: 0 0 8px rgba(251,191,36,0.7); }

/* ── Stats ── */
.sb-aside-bottom { margin-top: auto; padding-top: 20px; }

.sb-stats {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 12px 0;
    margin-bottom: 16px;
}

.sb-stat {
    flex: 1;
    text-align: center;
}

.sb-stat-num {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
}

.sb-stat-lbl {
    font-size: 11.5px;
    color: rgba(255,255,255,0.4);
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sb-stat-sep {
    width: 1px;
    height: 36px;
    background: rgba(255,255,255,0.10);
    flex-shrink: 0;
}

/* ── Testimonial carousel ── */
.sb-testimonial {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 16px 18px 12px;
}

/* slide container — fixed height so collapsing never happens */
.sb-tcarousel {
    position: relative;
    min-height: 108px;
}

.sb-tslide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.40s ease;
}

.sb-tslide.active {
    position: relative;   /* first active keeps natural height */
    opacity: 1;
    pointer-events: auto;
}

.sb-test-quote {
    font-size: 12.5px;
    color: rgba(255,255,255,0.62);
    line-height: 1.65;
    margin-bottom: 12px;
    font-style: italic;
}

.sb-test-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sb-test-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #4f46e5, #2563eb);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10.5px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.sb-test-name {
    font-size: 12.5px;
    font-weight: 600;
    color: #fff;
}

.sb-test-role {
    font-size: 11px;
    color: rgba(255,255,255,0.4);
}

/* controls row */
.sb-tcontrols {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.07);
}

/* dot indicators */
.sb-tdots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sb-tdot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.20);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.25s, transform 0.25s, width 0.25s;
    flex-shrink: 0;
}

.sb-tdot.active {
    background: #818cf8;
    width: 18px;
    border-radius: 4px;
    transform: none;
}

/* arrow buttons */
.sb-tarrows { display: flex; gap: 6px; }

.sb-tarrow {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.55);
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    padding: 0;
    line-height: 1;
}

.sb-tarrow:hover {
    background: rgba(99,102,241,0.25);
    border-color: rgba(99,102,241,0.40);
    color: #c7d2fe;
}


/* ══════════════════════════════════════
   RIGHT MAIN
══════════════════════════════════════ */
.sb-main {
    flex: 1;
    background: #f8faff;
    padding: 24px;
    overflow: hidden;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* subtle grid pattern */
.sb-main::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(79,70,229,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79,70,229,0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

.sb-form-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    animation: sbSlideUp 0.55s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes sbSlideUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Heading ── */
.sb-form-head { margin-bottom: 20px; }

.sb-form-title {
    font-size: 1.7rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.6px;
    margin-bottom: 4px;
}

.sb-form-sub {
    font-size: 14px;
    color: #64748b;
}

/* ── Alert ── */
.sb-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 22px;
    line-height: 1.55;
    animation: sbAlertIn 0.22s ease;
}

@keyframes sbAlertIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sb-alert-error {
    background: #fff1f2;
    border: 1px solid #fecdd3;
    color: #be123c;
}

.sb-alert i { font-size: 16px; margin-top: 1px; flex-shrink: 0; }

/* ── Fields ── */
.sb-field { margin-bottom: 14px; }

.sb-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 7px;
}

.sb-input-wrap { position: relative; }

.sb-input-icon {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    font-size: 16px;
    color: #94a3b8;
    pointer-events: none;
    transition: color 0.2s;
    z-index: 2;
}

.sb-input {
    width: 100%;
    height: 48px;
    padding: 0 48px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 11px;
    font-family: inherit;
    font-size: 14.5px;
    color: #0f172a;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    position: relative;
    z-index: 1;
}

.sb-input::placeholder { color: #cbd5e1; }
.sb-input:hover { border-color: #c7d2fe; background: #fafbff; }

.sb-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99,102,241,0.12);
    background: #fff;
}

.sb-input-wrap:focus-within .sb-input-icon { color: #6366f1; }

.sb-input.is-invalid {
    border-color: #f43f5e;
    background: #fff5f6;
}

.sb-input.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(244,63,94,0.10);
}

/* ── Inline error ── */
.sb-error {
    display: none;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    color: #f43f5e;
    margin-top: 6px;
}

.sb-error.visible { display: flex; }
.sb-error i { font-size: 13px; }

/* ── Eye toggle ── */
.sb-eye {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: #94a3b8;
    font-size: 17px;
    line-height: 1;
    display: flex;
    align-items: center;
    transition: color 0.2s;
    z-index: 2;
}

.sb-eye:hover { color: #6366f1; }

/* ── Forgot link ── */
.sb-forgot {
    font-size: 12.5px;
    font-weight: 600;
    color: #6366f1;
    text-decoration: none;
    transition: color 0.2s;
}

.sb-forgot:hover { color: #4338ca; text-decoration: underline; }

/* ── Checkbox row ── */
.sb-check-row { margin-bottom: 20px; }

.sb-check-label {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 13.5px;
    color: #64748b;
    cursor: pointer;
    user-select: none;
}

.sb-checkbox {
    width: 17px;
    height: 17px;
    accent-color: #6366f1;
    cursor: pointer;
    flex-shrink: 0;
}

/* ── Submit button ── */
.sb-btn {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #6366f1 0%, #2563eb 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(99,102,241,0.40), 0 2px 6px rgba(0,0,0,0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s;
}

.sb-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, transparent 70%);
    border-radius: inherit;
    pointer-events: none;
}

.sb-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(99,102,241,0.50), 0 4px 10px rgba(0,0,0,0.10);
}

.sb-btn:active { transform: translateY(0); box-shadow: 0 3px 14px rgba(99,102,241,0.35); }
.sb-btn:disabled { opacity: 0.60; cursor: not-allowed; transform: none !important; }

/* spinner inside button */
.sb-btn-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,0.30);
    border-top-color: #fff;
    border-radius: 50%;
    animation: sbSpin 0.65s linear infinite;
    flex-shrink: 0;
}

@keyframes sbSpin { to { transform: rotate(360deg); } }

/* ── Footer ── */
.sb-form-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e9eef6;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sb-secure-row {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
    justify-content: center;
}

.sb-secure-row i { font-size: 14px; color: #22c55e; }

.sb-foot-links {
    font-size: 12px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.sb-foot-links a {
    color: #6366f1;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.sb-foot-links a:hover { color: #4338ca; text-decoration: underline; }

.sb-dot-sep { color: #cbd5e1; font-size: 10px; }


/* ══ RESPONSIVE ══ */
@media (max-width: 991px) {
    .sb-main { background: #fff; }
    .sb-main::before { display: none; }
}

@media (max-width: 576px) {
    html, body { overflow: auto; }

    .sb-root { height: auto; overflow: visible; }

    .sb-main {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
        padding: 32px 18px;
        align-items: flex-start;
    }

    .sb-form-wrap { padding: 8px 0; }

    .sb-form-title { font-size: 1.45rem; }

    .sb-btn { height: 46px; font-size: 14.5px; }
}
