/* ═══════════════════════════════════════════════
   tobot Public Layout — Navbar, Footer, Auth Shell
   ═══════════════════════════════════════════════ */

/* ── Navbar ── */
.tb-nav {
    position: fixed;
    top: 12px;
    left: 16px;
    right: 16px;
    z-index: 1000;
    height: var(--tb-nav-h);
    background: rgba(255,255,255,0.82);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--tb-gray-100);
    border-radius: var(--tb-radius-lg);
    box-shadow: var(--tb-shadow-sm);
}

.tb-nav-inner {
    max-width: var(--tb-max-w);
    margin: 0 auto;
    padding: 0 var(--tb-space-6);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--tb-space-6);
}

.tb-nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--tb-font-display);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--tb-gray-900);
    text-decoration: none;
    flex-shrink: 0;
}

.tb-nav-logo img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.tb-nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
}

.tb-nav-links a {
    padding: 6px 14px;
    font-size: 0.875rem;
    font-weight: 450;
    color: var(--tb-gray-500);
    border-radius: var(--tb-radius-sm);
    transition: color var(--tb-duration), background var(--tb-duration);
}
.tb-nav-links a:hover {
    color: var(--tb-gray-900);
    background: var(--tb-gray-50);
}

.tb-nav-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.tb-nav-toggle {
    display: none;
    color: var(--tb-gray-700);
    padding: 8px;
}
.tb-nav-toggle svg { width: 22px; height: 22px; }

/* Mobile nav */
.tb-mobile-menu {
    display: none;
    position: fixed;
    top: calc(var(--tb-nav-h) + 24px);
    left: 16px;
    right: 16px;
    background: var(--tb-white);
    border: 1px solid var(--tb-gray-100);
    border-radius: var(--tb-radius-lg);
    box-shadow: var(--tb-shadow-xl);
    padding: var(--tb-space-4);
    z-index: 999;
    flex-direction: column;
    gap: 2px;
}
.tb-mobile-menu.open { display: flex; }

.tb-mobile-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 0.9375rem;
    color: var(--tb-gray-600);
    border-radius: var(--tb-radius-md);
    transition: background var(--tb-duration);
}
.tb-mobile-menu a:hover { background: var(--tb-gray-50); color: var(--tb-gray-900); }

@media (max-width: 768px) {
    .tb-nav-links { display: none; }
    .tb-nav-toggle { display: flex; }
    .tb-nav-actions .tb-btn-ghost { display: none; }
}

/* ── Footer ── */
.tb-footer {
    border-top: var(--tb-border);
    padding: var(--tb-space-16) 0 var(--tb-space-8);
    background: var(--tb-white);
}

.tb-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--tb-space-10);
    margin-bottom: var(--tb-space-12);
}

.tb-footer-brand p {
    font-size: 0.875rem;
    color: var(--tb-gray-500);
    line-height: 1.6;
    margin-top: var(--tb-space-4);
    max-width: 300px;
}

.tb-footer-col h5 {
    font-family: var(--tb-font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--tb-gray-900);
    letter-spacing: 0;
    margin-bottom: var(--tb-space-4);
}

.tb-footer-col a {
    display: block;
    font-size: 0.875rem;
    color: var(--tb-gray-500);
    padding: 4px 0;
    transition: color var(--tb-duration);
}
.tb-footer-col a:hover { color: var(--tb-gray-900); }

.tb-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--tb-space-6);
    border-top: var(--tb-border);
    font-size: 0.8125rem;
    color: var(--tb-gray-400);
}

@media (max-width: 768px) {
    .tb-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--tb-space-8);
    }
    .tb-footer-bottom {
        flex-direction: column;
        gap: var(--tb-space-2);
        text-align: center;
    }
}

/* ── Auth Layout (Login / Register / Contact split) ── */
.tb-auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.tb-auth-form-panel {
    background: var(--tb-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: var(--tb-space-12) var(--tb-space-10);
}

.tb-auth-form-inner {
    width: 100%;
    max-width: 400px;
}

.tb-auth-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--tb-gray-500);
    margin-bottom: var(--tb-space-10);
    transition: color var(--tb-duration);
}
.tb-auth-back:hover { color: var(--tb-gray-900); }
.tb-auth-back svg { width: 16px; height: 16px; }

.tb-auth-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    color: var(--tb-gray-900);
    margin-bottom: var(--tb-space-2);
}

.tb-auth-subtitle {
    font-size: 0.9375rem;
    color: var(--tb-gray-500);
    line-height: 1.5;
    margin-bottom: var(--tb-space-8);
}

.tb-auth-submit {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--tb-blue);
    color: var(--tb-white);
    font-size: 0.9375rem;
    font-weight: 600;
    border: none;
    border-radius: var(--tb-radius-md);
    cursor: pointer;
    transition: all var(--tb-duration);
    margin-top: var(--tb-space-6);
}
.tb-auth-submit:hover { background: var(--tb-blue-hover); box-shadow: var(--tb-shadow-md); }
.tb-auth-submit:disabled { opacity: 0.5; pointer-events: none; }
.tb-auth-submit:focus-visible { box-shadow: 0 0 0 3px var(--tb-blue-ring); }

.tb-auth-footer {
    margin-top: var(--tb-space-6);
    padding-top: var(--tb-space-6);
    border-top: var(--tb-border);
    text-align: center;
    font-size: 0.875rem;
    color: var(--tb-gray-500);
}
.tb-auth-footer a {
    color: var(--tb-blue);
    font-weight: 600;
    transition: color var(--tb-duration);
}
.tb-auth-footer a:hover { color: var(--tb-blue-hover); }

.tb-auth-terms {
    margin-top: var(--tb-space-4);
    font-size: 0.8125rem;
    color: var(--tb-gray-400);
    line-height: 1.5;
}
.tb-auth-terms a {
    color: var(--tb-gray-600);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── Brand Panel (dark side of auth) ── */
.tb-auth-brand {
    background: var(--tb-gray-900);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: var(--tb-space-12) var(--tb-space-10);
    position: relative;
    overflow: hidden;
    color: rgba(255,255,255,0.7);
}

.tb-auth-brand::before {
    content: '';
    position: absolute;
    width: 440px;
    height: 440px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,0.12), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.tb-brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}
.tb-brand-logo img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}
.tb-brand-logo-name {
    font-family: var(--tb-font-display);
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--tb-white);
}

.tb-brand-body {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tb-brand-eyebrow {
    font-family: var(--tb-font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.35);
    margin-bottom: var(--tb-space-3);
}

.tb-brand-headline {
    font-family: var(--tb-font-display);
    font-size: clamp(1.75rem, 2.5vw, 2.25rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--tb-white);
    letter-spacing: -0.02em;
    margin-bottom: var(--tb-space-8);
}
.tb-brand-headline em { font-style: italic; color: var(--tb-blue-light); }

.tb-brand-feature {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.tb-brand-feature:last-child { border-bottom: none; }

.tb-brand-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--tb-radius-md);
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--tb-blue-light);
}
.tb-brand-feature-icon svg { width: 18px; height: 18px; }

.tb-brand-feature-text strong {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--tb-white);
    margin-bottom: 2px;
}
.tb-brand-feature-text {
    font-size: 0.8125rem;
    line-height: 1.4;
}

.tb-brand-bottom {
    position: relative;
    z-index: 1;
}

.tb-brand-rotating {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.4);
    min-height: 40px;
    transition: opacity 0.5s;
}
.tb-brand-rotating strong { color: rgba(255,255,255,0.7); }
.tb-brand-rotating.fade-out { opacity: 0; }
.tb-brand-rotating.fade-in { opacity: 1; }

.tb-brand-rotating-label {
    display: block;
    font-family: var(--tb-font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.2);
    margin-bottom: var(--tb-space-2);
}

/* ── Onboarding steps (Register brand panel) ── */
.tb-onboarding-steps {
    margin-top: var(--tb-space-4);
}

.tb-step-item {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: var(--tb-space-4);
    padding: var(--tb-space-4) 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.tb-step-item:last-child { border-bottom: none; }

.tb-step-num {
    font-family: var(--tb-font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: rgba(255,255,255,0.12);
    line-height: 1;
}

.tb-step-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--tb-white);
    margin-bottom: 2px;
}
.tb-step-desc {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.5);
}

.tb-brand-proof {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: var(--tb-space-6);
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.4);
}
.tb-brand-proof strong { color: rgba(255,255,255,0.7); }
.tb-brand-proof-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tb-green);
    flex-shrink: 0;
    animation: tb-pulse-green 2s infinite;
}
@keyframes tb-pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
    50% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
}

/* ── Auth responsive ── */
@media (max-width: 768px) {
    .tb-auth-shell {
        grid-template-columns: 1fr;
    }
    .tb-auth-brand {
        display: none;
    }
    .tb-auth-form-panel {
        padding: var(--tb-space-8) var(--tb-space-6);
    }
}

/* ── Contact alerts ── */
.tb-alert {
    padding: var(--tb-space-3) var(--tb-space-4);
    border-radius: var(--tb-radius-md);
    font-size: 0.875rem;
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: var(--tb-space-6);
}
.tb-alert.show { display: flex; }
.tb-alert svg { width: 18px; height: 18px; flex-shrink: 0; }
.tb-alert-success { background: var(--tb-green-pale); color: #065F46; }
.tb-alert-error   { background: var(--tb-red-pale);   color: #991B1B; }
