:root {
    --lb-bg: #F7FBF9;
    --lb-surface: #FFFFFF;
    --lb-surface-2: #F3F8F5;
    --lb-ink: #0F172A;
    --lb-muted: #64748B;
    --lb-border: rgba(15,23,42,.10);
    --lb-accent: #059669;
    --lb-accent-2: #1F5E4B;
    --lb-accent-soft: rgba(5,150,105,.12);
    --lb-radius: 18px;
    --lb-radius-sm: 14px;
    --lb-shadow: 0 14px 40px rgba(15,23,42,.08);
    --lb-shadow-sm: 0 10px 24px rgba(15,23,42,.08);
    --lb-max: 1280px;
}

* {
    font-family: Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

.lb-body {
    background: var(--lb-bg);
    color: var(--lb-ink);
}

.lb-topbar {
    position: sticky;
    top: 0;
    z-index: 1050;
    backdrop-filter: blur(10px);
    background: color-mix(in srgb, var(--lb-bg) 84%, white 16%);
    border-bottom: 1px solid var(--lb-border);
}

.lb-topbar-inner {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
}

.lb-brand-text {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--lb-ink);
}

.lb-logo {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    background: linear-gradient(135deg, var(--lb-accent), var(--lb-accent-2));
    box-shadow: 0 10px 24px rgba(5,150,105,.25);
}

.lb-shell {
    display: flex;
    min-height: calc(100vh - 64px);
}

.lb-sidebar {
    width: 280px;
    border-right: 1px solid var(--lb-border);
    background: color-mix(in srgb, var(--lb-bg) 88%, white 12%);
}

.lb-sidebar-inner {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 64px);
    padding: 16px;
    position: sticky;
    top: 64px;
}

.lb-sidebar-footer {
    padding: 12px 10px;
    border-top: 1px dashed var(--lb-border);
}

.lb-main {
    flex: 1;
}

.lb-main-inner {
    max-width: var(--lb-max);
    margin: 0 auto;
    padding: 18px;
    padding-bottom: 96px; /* mobile bottom nav space */
}

/* Cards */
.lb-card {
    background: var(--lb-surface);
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius);
    box-shadow: var(--lb-shadow-sm);
}

.lb-card-soft {
    background: var(--lb-surface-2);
    border: 1px solid var(--lb-border);
    border-radius: var(--lb-radius);
}

.lb-card-header {
    padding: 16px 16px 8px 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.lb-card-body {
    padding: 0 16px 16px 16px;
}

/* Buttons */
.btn-ghost {
    border: 1px solid transparent;
    background: transparent;
    color: var(--lb-ink);
    border-radius: 14px;
    padding: 10px 12px;
}

    .btn-ghost:hover {
        background: rgba(15,23,42,.06);
    }

.btn-soft {
    background: var(--lb-accent-soft);
    border: 1px solid rgba(5,150,105,.22);
    color: var(--lb-accent-2);
    border-radius: 14px;
    padding: 10px 14px;
    font-weight: 600;
}

    .btn-soft:hover {
        filter: brightness(.98);
    }

/* Pills */
.lb-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 7px 10px;
    border: 1px solid rgba(5,150,105,.24);
    background: rgba(5,150,105,.10);
    color: var(--lb-accent-2);
    font-weight: 600;
    font-size: .85rem;
}

.lb-dot {
    width: 8px;
    height: 8px;
    border-radius: 99px;
    background: var(--lb-accent);
    box-shadow: 0 0 0 4px rgba(5,150,105,.14);
}

/* Nav (sidebar) */
.lb-nav {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lb-nav-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lb-nav-title {
    font-size: .78rem;
    color: var(--lb-muted);
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 8px 10px;
}

.lb-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    color: var(--lb-ink);
    text-decoration: none;
    border: 1px solid transparent;
}

    .lb-nav-item:hover {
        background: rgba(15,23,42,.05);
        border-color: rgba(15,23,42,.08);
    }

    .lb-nav-item i {
        color: var(--lb-muted);
    }

/* Bottom Nav (mobile) */
.lb-bottomnav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 2400;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 6px;
    background: rgba(255,255,255,.86);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(15,23,42,.10);
    border-radius: 22px;
    box-shadow: 0 18px 48px rgba(15,23,42,.18);
    padding: 8px;
}

.lb-bottomnav-item {
    appearance: none;
    border: 0;
    background: transparent;
    text-decoration: none;
    color: rgba(15,23,42,.72);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 8px;
    border-radius: 16px;
    font-weight: 750;
    font-size: .75rem;
    line-height: 1;
    transition: transform .12s ease, background .12s ease, color .12s ease, box-shadow .12s ease;
}

    .lb-bottomnav-item i {
        font-size: 1.18rem;
    }

    .lb-bottomnav-item:active {
        transform: scale(.98);
    }

    .lb-bottomnav-item.active {
        background: rgba(5,150,105,.12);
        color: #1F5E4B;
        box-shadow: inset 0 0 0 1px rgba(5,150,105,.22);
    }

        .lb-bottomnav-item.active i {
            transform: translateY(-1px);
        }

.lb-bottomnav-btn {
    cursor: pointer;
}

/* Give pages breathing room so bottom nav never overlaps */
.lb-main {
    padding-bottom: 96px; /* ensures content clears bottom nav */
}

@media (min-width: 992px) {
    .lb-main {
        padding-bottom: 24px;
    }
}

/* Drawer */
.lb-drawer {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 2000;
}

    .lb-drawer[aria-hidden="false"] {
        display: block;
    }

.lb-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,.38);
}

.lb-drawer-panel {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 86%;
    max-width: 360px;
    background: var(--lb-surface);
    box-shadow: var(--lb-shadow);
}

/* Auth pages */
.lb-auth-wrap {
    max-width: 520px;
    margin: 26px auto;
}

.lb-h1 {
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0;
}

.lb-sub {
    color: var(--lb-muted);
}

/* Forms */
.form-control, .form-select {
    border-radius: 14px !important;
    border-color: rgba(15,23,42,.12) !important;
    padding: 12px 12px !important;
}

    .form-control:focus, .form-select:focus {
        box-shadow: 0 0 0 4px rgba(5,150,105,.14) !important;
        border-color: rgba(5,150,105,.35) !important;
    }

.lb-active {
    background: rgba(5,150,105,.10) !important;
    border-color: rgba(5,150,105,.22) !important;
    color: var(--lb-accent-2) !important;
}

    .lb-active i {
        color: var(--lb-accent) !important;
    }

.lb-bottomnav {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 2400;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 6px;
    background: rgba(255,255,255,.86);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(15,23,42,.10);
    border-radius: 22px;
    box-shadow: 0 18px 48px rgba(15,23,42,.18);
    padding: 8px;
}

.lb-bottomnav-item {
    appearance: none;
    border: 0;
    background: transparent;
    text-decoration: none;
    color: rgba(15,23,42,.72);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 8px;
    border-radius: 16px;
    font-weight: 750;
    font-size: .75rem;
    line-height: 1;
    transition: transform .12s ease, background .12s ease, color .12s ease, box-shadow .12s ease;
}

    .lb-bottomnav-item i {
        font-size: 1.18rem;
    }

    .lb-bottomnav-item:active {
        transform: scale(.98);
    }

    .lb-bottomnav-item.active {
        background: rgba(5,150,105,.12);
        color: #1F5E4B;
        box-shadow: inset 0 0 0 1px rgba(5,150,105,.22);
    }

        .lb-bottomnav-item.active i {
            transform: translateY(-1px);
        }

.lb-bottomnav-btn {
    cursor: pointer;
}

/* Give pages breathing room so bottom nav never overlaps */
.lb-main {
    padding-bottom: 96px; /* ensures content clears bottom nav */
}

@media (min-width: 992px) {
    .lb-main {
        padding-bottom: 24px;
    }
}

/* Hide bottom nav whenever any Bootstrap modal is open */
.modal-open .lb-bottomnav {
    display: none !important;
}

.lb-brand-text {
    letter-spacing: -0.02em;
    font-weight: 800;
}

.lb-main-inner {
    max-width: 1120px;
    margin: 0 auto;
}

/* ===== Push notification toast ===== */
#lb-toast-container {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(420px, calc(100vw - 32px));
    pointer-events: none;
}

.lb-push-toast {
    pointer-events: all;
    background: #0f172a;
    color: #f8fafc;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.28), 0 2px 8px rgba(0,0,0,0.16);
    animation: lb-toast-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.lb-push-toast.hiding {
    animation: lb-toast-out 0.25s ease forwards;
}

@keyframes lb-toast-in {
    from { opacity: 0; transform: translateY(-16px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes lb-toast-out {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(-8px) scale(0.97); }
}

.lb-push-toast-icon {
    width: 36px;
    height: 36px;
    background: rgba(5, 150, 105, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #34d399;
    font-size: 16px;
}

.lb-push-toast-title {
    font-weight: 700;
    font-size: 14px;
    color: #f8fafc;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-push-toast-body {
    font-size: 13px;
    color: #94a3b8;
    margin-top: 2px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lb-push-toast .btn-close {
    opacity: 0.5;
    padding: 0;
    width: 20px;
    height: 20px;
}

.lb-push-toast .btn-close:hover {
    opacity: 1;
}

.lb-push-toast-link {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* ===== Push notification opt-in banner ===== */
.lb-push-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1060;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #0f172a;
    color: #f8fafc;
    box-shadow: 0 2px 12px rgba(0,0,0,0.28);
    padding: 12px 16px;
    width: 100%;
    animation: lb-banner-in 0.3s ease;
}

.lb-push-banner.lb-push-banner-out {
    animation: lb-banner-out 0.25s ease forwards;
}

@keyframes lb-banner-in {
    from { opacity: 0; transform: translateY(-100%); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes lb-banner-out {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-100%); }
}

.lb-push-banner-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: rgba(5, 150, 105, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #10b981;
    font-size: 16px;
}

.lb-push-banner-content {
    flex: 1;
    min-width: 0;
}

.lb-push-banner-title {
    font-weight: 700;
    font-size: 14px;
}

.lb-push-banner-body {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 2px;
}

.lb-push-banner-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .lb-push-banner {
        flex-wrap: wrap;
    }
    .lb-push-banner-actions {
        width: 100%;
        justify-content: flex-end;
    }
}
