, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #faf7f4;
    color: #1a1a2e;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

/* ─── TOKENS ────────────────────────────────────── */
:root {
    --g: #1aaa7e;
    --gd: #0d6b4f;
    --gl: #e6f4ef;
    --ambar: #f59e0b;
    --ambar-l: #fef3c7;
    --bl: #2d4bc7;
    --bll: #e8edff;
    --gy: #64748b;
    --gyl: #faf7f4;
    --w: #ffffff;
    --bdr: #e8e3dd;
    --sh: 0 2px 16px rgba(13,107,79,.10);
    --r: 14px;
    --nav-h: 56px;
    --tab-h: 62px;
    --sidebar-w: 240px;
    --tinta: #1a1a2e;
    --pedra: #faf7f4;
    --display: Georgia, 'Times New Roman', serif;
}

/* ─── APP SHELL ─────────────────────────────────── */
/* Each "screen" fills the viewport and scrolls independently */
.screen {
    inset: 0;
    display: flex;
    flex-direction: column;
    background: var(--pedra);
}

    .screen.active {
        visibility: visible;
        pointer-events: all;
        z-index: 10;
        height: 100vh;
        overflow: hidden;
    }

/* ─── SCROLLABLE BODY AREA ──────────────────────── */
.scroll-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 16px;
}

    .scroll-area.has-tab {
        padding-bottom: calc(var(--tab-h) + 8px);
    }

/* ─── TOP NAV BAR ───────────────────────────────── */
.topbar {
    height: var(--nav-h);
    min-height: var(--nav-h);
    background: var(--w);
    border-bottom: 1px solid var(--bdr);
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 10px;
    z-index: 20;
    flex-shrink: 0;
}

.topbar-title {
    flex: 1;
    font-family: var(--display);
    font-size: 17px;
    font-weight: 700;
    color: var(--tinta);
    letter-spacing: -.01em;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ─── ACCESS / HORIZONTAL TABS ─────────────────── */
.htabs {
    height: 46px;
    min-height: 46px;
    background: var(--gd);
    display: flex;
    align-items: center;
    overflow-x: auto;
    padding: 0 10px;
    gap: 6px;
    flex-shrink: 0;
}

    .htabs::-webkit-scrollbar {
        display: none;
    }

.htab {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,.65);
    cursor: pointer;
    border: none;
    background: transparent;
    white-space: nowrap;
    transition: all .15s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    letter-spacing: .01em;
}

    .htab.on {
        background: rgba(255,255,255,.2);
        color: #fff;
    }

/* ─── BOTTOM TAB BAR ────────────────────────────── */
.tabbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--tab-h);
    background: var(--w);
    border-top: 1px solid var(--bdr);
    display: none;
    z-index: 20;
}

    .tabbar.visible {
        display: flex;
    }

.tabbar-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 10px;
    color: var(--gy);
    cursor: pointer;
    border: none;
    background: none;
    padding-bottom: 4px;
}

    .tabbar-btn.on {
        color: var(--g);
    }

    .tabbar-btn .ti {
        width: 22px;
        height: 22px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 2px;
    }

        .tabbar-btn .ti svg {
            width: 21px;
            height: 21px;
        }

/* ─── DRAWER ────────────────────────────────────── */
.drawer-bg {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 100;
    display: none;
}

    .drawer-bg.open {
        display: block;
    }

.drawer {
    position: fixed;
    top: 0;
    left: -280px;
    bottom: 0;
    width: 270px;
    background: var(--w);
    z-index: 101;
    display: flex;
    flex-direction: column;
    transition: left .24s ease;
    overflow-y: auto;
}

    .drawer.open {
        left: 0;
    }

.drawer-head {
    background: var(--g);
    padding: 22px 18px 16px;
    color: #fff;
}

    .drawer-head .dh-name {
        font-size: 17px;
        font-weight: 800;
        margin-bottom: 3px;
    }

    .drawer-head .dh-role {
        font-size: 12px;
        opacity: .8;
    }

.ditem {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    color: #111827;
    transition: background .12s;
}

    .ditem:hover {
        background: var(--gl);
        color: var(--gd);
    }

    .ditem .di {
        width: 22px;
        height: 22px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

        .ditem .di svg {
            width: 20px;
            height: 20px;
        }
/* Universal inline icon (replaces emoji across cards, badges, buttons, avatars) */
.uic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: -3px;
    flex-shrink: 0;
}

    .uic svg {
        width: 18px;
        height: 18px;
    }
    /* Scale down only in genuinely small text (badges, labels) */
    .uic.sm svg {
        width: 14px;
        height: 14px;
    }

    .uic.lg svg {
        width: 22px;
        height: 22px;
    }
    /* Explicit size on the span overrides global rule */
    .uic[style*="width"] svg {
        width: 100%;
        height: 100%;
    }

.ddiv {
    height: 1px;
    background: var(--bdr);
    margin: 6px 0;
}

/* ─── MODALS ────────────────────────────────────── */
.modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 200;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

    .modal-bg.open {
        display: flex;
    }

.modal {
    background: var(--w);
    border-radius: 20px 20px 0 0;
    padding: 24px 20px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp .22s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0
    }

    to {
        transform: translateY(0);
        opacity: 1
    }
}

.modal-title {
    font-family: var(--display);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--tinta);
}

.modal-sub {
    color: var(--gy);
    font-size: 13px;
    margin-bottom: 18px;
}

/* ─── TOAST ─────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #111827;
    color: #fff;
    padding: 11px 20px;
    border-radius: 30px;
    font-size: 13px;
    z-index: 999;
    opacity: 0;
    transition: opacity .25s;
    pointer-events: none;
    white-space: nowrap;
}

    .toast.show {
        opacity: 1;
    }

/* ─── COMMON COMPONENTS ─────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: none;
    cursor: pointer;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    transition: all .15s;
    letter-spacing: .01em;
}

    .btn:active {
        transform: scale(.97);
        opacity: .9;
    }

.btn-g {
    background: var(--gd);
    color: #fff;
}

    .btn-g:hover {
        background: #0a5740;
    }

.btn-w {
    background: var(--w);
    color: var(--tinta);
    border: 1.5px solid var(--bdr);
}

    .btn-w:hover {
        background: var(--pedra);
    }

.btn-bl {
    background: var(--bl);
    color: #fff;
}

.btn-sm {
    padding: 6px 13px;
    font-size: 12px;
    border-radius: 7px;
}

.btn-full {
    width: 100%;
    margin-top: 10px;
}

.btn-cancel {
    width: 100%;
    margin-top: 8px;
    background: transparent;
    color: var(--gy);
    border: 1.5px solid var(--bdr);
    border-radius: 10px;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.card {
    background: var(--w);
    border-radius: 16px;
    border: 1px solid var(--bdr);
    box-shadow: 0 1px 6px rgba(13,107,79,.07);
    padding: 16px;
    margin: 0 12px 12px;
}

.card-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--tinta);
    letter-spacing: .01em;
}

.kgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px 12px 0;
}

.kcard {
    background: var(--w);
    border-radius: 14px;
    border: 1px solid var(--bdr);
    padding: 14px 12px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(13,107,79,.06);
}

    .kcard .kn {
        font-family: var(--display);
        font-size: 24px;
        font-weight: 700;
        color: var(--gd);
        display: block;
    }

        .kcard .kn.bl {
            color: var(--bl)
        }

        .kcard .kn.or {
            color: #d97706
        }

    .kcard .kl {
        font-size: 11px;
        color: var(--gy);
        margin-top: 4px;
    }

.fg {
    margin-bottom: 14px;
}

    .fg label {
        display: block;
        font-size: 12px;
        font-weight: 700;
        margin-bottom: 5px;
        color: var(--tinta);
        letter-spacing: .03em;
        text-transform: uppercase;
    }

    .fg input, .fg select, .fg textarea {
        width: 100%;
        padding: 12px 14px;
        border: 1.5px solid var(--bdr);
        border-radius: 10px;
        font-size: 14px;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
        outline: none;
        background: var(--w);
        color: var(--tinta);
        transition: border-color .15s;
    }

        .fg input:focus, .fg select:focus, .fg textarea:focus {
            border-color: var(--gd);
        }

.progress-wrap {
    background: var(--bdr);
    border-radius: 99px;
    height: 7px;
    overflow: hidden;
    margin-top: 5px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg,var(--g),var(--gd));
    border-radius: 99px;
}

.row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--bdr);
}

    .row:last-child {
        border-bottom: none;
    }

.ava {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--gl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.row-info {
    flex: 1;
}

    .row-info .rn {
        font-size: 14px;
        font-weight: 600;
        color: var(--tinta);
    }

    .row-info .rs {
        font-size: 12px;
        color: var(--gy);
        margin-top: 2px;
    }

.tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 6px;
    background: var(--gl);
    color: var(--gd);
    letter-spacing: .02em;
}

    .tag.bl {
        background: var(--bll);
        color: var(--bl);
    }

    .tag.or {
        background: var(--ambar-l);
        color: #92400e;
    }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 12px 6px;
}

    .section-header h2 {
        font-size: 15px;
        font-weight: 700;
        color: var(--tinta);
        letter-spacing: -.01em;
    }

.see-all {
    font-size: 12px;
    color: var(--gd);
    font-weight: 700;
    cursor: pointer;
    background: none;
    border: none;
    letter-spacing: .02em;
}

.ctabs {
    display: flex;
    gap: 6px;
    padding: 0 12px 10px;
    overflow-x: auto;
}

    .ctabs::-webkit-scrollbar {
        display: none;
    }

.ctab {
    flex-shrink: 0;
    padding: 6px 15px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid var(--bdr);
    background: var(--w);
    color: var(--gy);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    transition: all .14s;
}

    .ctab.on {
        background: var(--gd);
        color: #fff;
        border-color: var(--gd);
    }

.content-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--w);
    border-radius: 14px;
    border: 1px solid var(--bdr);
    margin: 0 12px 10px;
    box-shadow: 0 1px 4px rgba(13,107,79,.06);
}

.cthumb {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--gl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

    /* Styling for thumbnail containers using dynamic Drive images */
    .cthumb.cthumb-video {
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }

/* Semi-transparent dark overlay to make a play icon pop over video thumbnails */
.video-play-overlay {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    transition: transform 0.2s ease, background 0.2s ease;
}

.cthumb-video:hover .video-play-overlay {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.7);
}

.cinfo {
    flex: 1;
}

    .cinfo .ct {
        font-size: 14px;
        font-weight: 600;
        margin-bottom: 2px
    }

    .cinfo .cs {
        font-size: 12px;
        color: var(--gy)
    }

.bars {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    height: 72px;
}

.bar {
    flex: 1;
    background: var(--g);
    border-radius: 4px 4px 0 0;
    opacity: .85;
}

    .bar.dim {
        opacity: .28
    }

.blabels {
    display: flex;
    gap: 5px;
    padding-top: 5px;
}

    .blabels span {
        flex: 1;
        text-align: center;
        font-size: 10px;
        color: var(--gy)
    }

.pi {
    margin-bottom: 13px;
}

.pi-hd {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 4px;
}

    .pi-hd .pn {
        font-weight: 600
    }

    .pi-hd .pp {
        color: var(--g);
        font-weight: 700
    }

/* ─── LANDING SPECIFIC ──────────────────────────── */
#sc-landing {
    background: #fff;
}

/* Nav */
.land-nav {
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--bdr);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 30;
}

.land-nav-links {
    display: none;
    gap: 28px;
}

    .land-nav-links span {
        font-size: 14px;
        font-weight: 500;
        color: var(--gy);
        cursor: pointer;
        transition: color .15s;
        letter-spacing: .01em;
    }

        .land-nav-links span:hover {
            color: var(--gd);
        }

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--display);
    font-weight: 700;
    font-size: 18px;
    color: var(--tinta);
    letter-spacing: -.01em;
}

.logo-ic {
    width: 34px;
    height: 34px;
    background: var(--gd);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

/* Hero */
.hero {
    padding: 56px 22px 48px;
    background: #fff;
}

    .hero .badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: var(--ambar-l);
        color: #92400e;
        border-radius: 6px;
        padding: 5px 12px;
        font-size: 11px;
        font-weight: 700;
        margin-bottom: 22px;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .hero h1 {
        font-family: var(--display);
        font-size: 34px;
        font-weight: 700;
        font-style: italic;
        line-height: 1.15;
        margin-bottom: 18px;
        color: var(--tinta);
        letter-spacing: -.02em;
    }

        .hero h1 em {
            font-style: normal;
            color: var(--g);
        }

    .hero p {
        color: var(--gy);
        font-size: 15px;
        line-height: 1.7;
        margin-bottom: 28px;
        font-weight: 400;
    }

.hero-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Stats band */
.stats-g {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #f5f7fa;
    border-top: 1px solid var(--bdr);
    border-bottom: 1px solid var(--bdr);
}

.stat-cell {
    background: transparent;
    padding: 24px 16px;
    text-align: center;
    border-right: 1px solid var(--bdr);
}

    .stat-cell:nth-child(even) {
        border-right: none;
    }

    .stat-cell .sn {
        font-size: 24px;
        font-weight: 800;
        color: var(--gd);
        display: block;
        letter-spacing: -.02em;
    }

    .stat-cell .sl {
        font-size: 11px;
        color: var(--gy);
        margin-top: 4px;
        letter-spacing: .02em;
        font-weight: 500;
    }

/* Sections */
.land-section {
    padding: 36px 22px;
}

    .land-section h2 {
        font-family: var(--display);
        font-size: 26px;
        font-weight: 700;
        margin-bottom: 10px;
        color: var(--tinta);
        letter-spacing: -.015em;
    }

    .land-section p {
        color: var(--gy);
        line-height: 1.7;
        margin-bottom: 18px;
        font-size: 14px;
    }

/* Checklist */
.checklist {
    list-style: none;
}

    .checklist li {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        padding: 7px 0;
        font-size: 14px;
        color: var(--tinta);
        border-bottom: 1px solid var(--bdr);
    }

        .checklist li:last-child {
            border-bottom: none;
        }

        .checklist li::before {
            content: '';
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: var(--gd);
            flex-shrink: 0;
            margin-top: 1px;
            display: flex;
            align-items: center;
            justify-content: center;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='white'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E");
            background-size: 12px;
            background-repeat: no-repeat;
            background-position: center;
        }

/* Feature cards */
.feat-card {
    background: var(--w);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 12px;
    border: 1px solid var(--bdr);
    box-shadow: 0 1px 4px rgba(13,107,79,.06);
    transition: box-shadow .2s, transform .2s;
}

    .feat-card:hover {
        box-shadow: 0 4px 20px rgba(13,107,79,.12);
        transform: translateY(-2px);
    }

    .feat-card .fic {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        background: var(--gl);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        margin-bottom: 13px;
        border: 1px solid rgba(26,170,126,.15);
    }

        .feat-card .fic.bl {
            background: var(--bll);
            border-color: rgba(45,75,199,.12);
        }

        .feat-card .fic.pu {
            background: #f0eeff;
            border-color: rgba(124,58,237,.12);
        }

    .feat-card h3 {
        font-size: 15px;
        font-weight: 700;
        margin-bottom: 6px;
        color: var(--tinta);
    }

    .feat-card p {
        color: var(--gy);
        font-size: 13px;
        line-height: 1.55;
    }

/* CTA band */
.cta-band {
    background: var(--gd);
    padding: 44px 22px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

    .cta-band::before {
        content: '';
        position: absolute;
        top: -60px;
        right: -60px;
        width: 200px;
        height: 200px;
        border-radius: 50%;
        background: rgba(245,158,11,.18);
        pointer-events: none;
    }

    .cta-band h2 {
        font-family: var(--display);
        font-size: 26px;
        font-weight: 700;
        margin-bottom: 12px;
        font-style: italic;
    }

    .cta-band p {
        opacity: .85;
        margin-bottom: 24px;
        line-height: 1.6;
        font-size: 14px;
    }

/* Hero visual */
.hero-visual {
    display: none;
}

.hv-card {
    background: var(--w);
    border: 1px solid var(--bdr);
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 8px 32px rgba(13,107,79,.12);
}

.hv-stat {
    background: var(--pedra);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    border: 1px solid var(--bdr);
}

.hv-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hv-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--gl);
    color: var(--gd);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(26,170,126,.18);
}

/* Progress */
.progress-wrap {
    background: var(--bdr);
    border-radius: 99px;
    height: 7px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg,var(--g),var(--gd));
}

/* ─── NOVO ENQUADRAMENTO MOBILE (padrão onboarding) ──
   Header com botão circular de voltar, área de conteúdo
   centralizada e CTA fixo no rodapé com sombra.        */
.nf-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px 12px;
    flex-shrink: 0;
}

.nf-back {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--bdr);
    background: var(--w);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 14px;
    color: var(--tinta);
}

.nf-header-title {
    flex: 1;
    font-family: var(--display);
    font-size: 16px;
    font-weight: 700;
    color: var(--tinta);
    text-align: center;
    margin-right: 32px; /* balances the back button so title centers */
}

.nf-header.nf-header-3 .nf-header-title {
    margin-right: 0;
}

.nf-wrap {
    padding: 8px 24px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.nf-wrap-center {
    justify-content: center;
    text-align: center;
}

.nf-title {
    font-family: var(--display);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--tinta);
    margin-bottom: 8px;
}

    .nf-title .hl {
        color: var(--gd);
    }

.nf-sub {
    font-size: 14px;
    color: var(--gy);
    line-height: 1.5;
    margin-bottom: 24px;
}

.nf-cta-area {
    padding: 12px 24px 28px;
    flex-shrink: 0;
}

.btn-nf-cta {
    width: 100%;
    padding: 16px;
    border-radius: 14px;
    background: var(--gd);
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    box-shadow: 0 4px 14px rgba(13,107,79,.28);
    transition: opacity .15s;
}

    .btn-nf-cta:disabled {
        opacity: .4;
        cursor: not-allowed;
        box-shadow: none;
    }

.btn-nf-outline {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    background: none;
    color: var(--gy);
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.nf-fg {
    margin-bottom: 16px;
}

    .nf-fg label {
        display: block;
        font-size: 12px;
        font-weight: 700;
        margin-bottom: 6px;
        color: var(--tinta);
        letter-spacing: .02em;
        text-transform: uppercase;
    }

    .nf-fg input, .nf-fg select {
        width: 100%;
        padding: 14px 14px;
        border: 1.5px solid var(--bdr);
        border-radius: 12px;
        font-size: 15px;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
        outline: none;
        background: var(--w);
        color: var(--tinta);
        transition: border-color .15s;
    }

        .nf-fg input:focus, .nf-fg select:focus {
            border-color: var(--gd);
        }

.nf-legal {
    font-size: 11px;
    color: var(--gy);
    text-align: center;
    margin-top: 14px;
    line-height: 1.5;
}

    .nf-legal a {
        color: var(--gd);
        font-weight: 600;
    }

/* ─── LOGIN ─────────────────────────────────────── */
#sc-login {
    background: #fff;
    flex-direction: row;
}

/* Mobile: single column */
.login-panel-left {
    display: none;
}

.login-panel-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    overflow-y: auto;
    background: #fff;
}

.login-box {
    width: 100%;
    max-width: 400px;
}

    .login-box h2 {
        font-size: 26px;
        font-weight: 800;
        margin-bottom: 6px;
        color: var(--tinta);
        letter-spacing: -.03em;
    }

    .login-box .sub {
        color: var(--gy);
        font-size: 14px;
        margin-bottom: 28px;
        line-height: 1.5;
    }

/* Input fields styled like screenshot */
.login-field {
    margin-bottom: 18px;
}

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

    .login-field input {
        width: 100%;
        padding: 13px 16px;
        border: 1.5px solid var(--bdr);
        border-radius: 12px;
        font-size: 15px;
        font-family: inherit;
        outline: none;
        background: #f4f7fc;
        color: var(--tinta);
        transition: border-color .15s, background .15s;
    }

        .login-field input:focus {
            border-color: var(--gd);
            background: #fff;
            box-shadow: 0 0 0 3px rgba(26,170,126,.1);
        }

/* Submit button */
.login-btn {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    background: var(--gd);
    color: #fff;
    border: none;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: opacity .15s;
    margin-top: 4px;
    letter-spacing: .01em;
}

    .login-btn:hover {
        opacity: .9;
    }

.demo-box {
    background: #f4f7fc;
    border-radius: 12px;
    padding: 14px 16px;
    margin-top: 20px;
    font-size: 13px;
    border: none;
}

    .demo-box strong {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-bottom: 10px;
        font-size: 12px;
        color: var(--tinta);
        font-weight: 700;
    }

.drow {
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .12s;
    margin-bottom: 2px;
    font-size: 12px;
    color: var(--gd);
    font-weight: 600;
}

    .drow:hover {
        background: var(--gl);
    }

    .drow span {
        color: var(--gy);
        font-weight: 400;
    }

.back-lnk {
    display: block;
    text-align: center;
    margin-top: 20px;
    color: var(--gy);
    font-size: 13px;
    cursor: pointer;
}

/* Desktop: split screen like screenshot */
@media(min-width:768px) {
    .login-panel-left {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 42%;
        min-width: 340px;
        background: var(--gd);
        padding: 40px 40px 36px;
        color: #fff;
        overflow: hidden;
        position: relative;
    }

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

        .login-panel-left::after {
            content: '';
            position: absolute;
            bottom: -60px;
            left: -40px;
            width: 200px;
            height: 200px;
            border-radius: 50%;
            background: rgba(255,255,255,.04);
        }

    .lpl-logo {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 17px;
        font-weight: 800;
        color: #fff;
        letter-spacing: -.02em;
    }

    .lpl-logo-ic {
        width: 34px;
        height: 34px;
        background: rgba(255,255,255,.2);
        border-radius: 9px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 15px;
    }

    .lpl-headline {
        font-family: var(--display);
        font-size: 28px;
        font-weight: 700;
        line-height: 1.25;
        color: #fff;
        margin-bottom: 14px;
        letter-spacing: -.02em;
    }

    .lpl-sub {
        font-size: 14px;
        color: rgba(255,255,255,.8);
        line-height: 1.65;
    }

    .lpl-footer {
        font-size: 12px;
        color: rgba(255,255,255,.6);
        font-weight: 500;
        letter-spacing: .03em;
    }

    .login-panel-right {
        padding: 40px 56px;
    }
}

/* ─── NEW HOME HEADER (greeting style) ──────────── */
.nh-topbar {
    background: var(--w);
    padding: 14px 16px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.nh-burger {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--gyl);
    border: 1px solid var(--bdr);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

    .nh-burger svg {
        width: 18px;
        height: 18px;
    }

.nh-greet-pill {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--gyl);
    border: 1px solid var(--bdr);
    border-radius: 40px;
    padding: 6px 14px 6px 8px;
    cursor: pointer;
    margin-left: auto;
}

.nh-avas {
    display: flex;
    flex-shrink: 0;
}

.nh-ava {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    border: 2px solid var(--w);
}

    .nh-ava.a1 {
        background: #1aaa7e;
        margin-right: -12px;
        z-index: 1;
    }

    .nh-ava.a2 {
        background: #6d4ee0;
        z-index: 2;
    }

.nh-greet-txt {
    line-height: 1.25;
}

.nh-greet-hi {
    font-size: 11px;
    color: var(--gy);
}

.nh-greet-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--tinta);
}

.nh-chev {
    margin-left: 4px;
    color: var(--gy);
    font-size: 11px;
}

/* ─── HOME BANNER CAROUSEL ──────────────────────── */
.hbanner-wrap {
    position: relative;
    margin: 4px 0 16px;
    height: 280px;
    overflow: hidden;
}

.hbanner-track {
    display: flex;
    height: 100%;
    transition: transform .45s cubic-bezier(.4,0,.2,1);
}

.hbanner-slide {
    flex: 0 0 100%;
    height: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px 20px 26px;
}

    .hbanner-slide::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(10,12,30,.05) 0%, rgba(8,10,28,.78) 100%);
    }

.hbanner-tag, .hbanner-title, .hbanner-sub, .hbanner-cta {
    position: relative;
    z-index: 2;
}

.hbanner-title {
    font-family: var(--display);
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    line-height: 1.18;
    margin-bottom: 6px;
}

.hbanner-sub {
    font-size: 13px;
    color: rgba(255,255,255,.88);
    line-height: 1.45;
    margin-bottom: 16px;
    max-width: 88%;
}

.hbanner-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--tinta);
    border: none;
    border-radius: 30px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    cursor: pointer;
    width: fit-content;
}

    .hbanner-cta .pc {
        width: 20px;
        height: 20px;
        border-radius: 50%;
        border: 1.5px solid var(--tinta);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 9px;
    }

.hbanner-dots {
    position: absolute;
    bottom: 14px;
    right: 18px;
    z-index: 3;
    display: flex;
    gap: 5px;
    align-items: center;
    background: rgba(0,0,0,.28);
    border-radius: 20px;
    padding: 5px 8px;
}

.hbanner-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    transition: all .25s;
    cursor: pointer;
}

    .hbanner-dot.on {
        width: 16px;
        background: #fff;
    }

/* ─── HOME STAT GRID ─────────────────────────────── */
.hstat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 16px 6px;
}

.hstat-card {
    background: var(--w);
    border: 1px solid var(--bdr);
    border-radius: 16px;
    padding: 14px 14px 16px;
    box-shadow: 0 1px 6px rgba(13,107,79,.06);
}

.hstat-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 14px;
}

.hstat-card-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--tinta);
    line-height: 1.3;
}

.hstat-card-sub {
    font-size: 11px;
    color: var(--gy);
    margin-top: 2px;
}

.hstat-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

    .hstat-icon.purple {
        background: #ede9fe;
        color: #7c3aed;
    }

    .hstat-icon.green {
        background: #d1fae5;
        color: #0d9b6c;
    }

    .hstat-icon.amber {
        background: #fef3c7;
        color: #d97706;
    }

    .hstat-icon.blue {
        background: #dbeafe;
        color: #2563eb;
    }

.hstat-card-val {
    font-family: var(--display);
    font-size: 28px;
    font-weight: 700;
    color: var(--tinta);
}

/* ─── QUICK ACCESS ───────────────────────────────── */
.qa-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--tinta);
    padding: 18px 16px 12px;
    letter-spacing: -.01em;
}

.qa-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 16px;
}

.qa-card {
    background: var(--w);
    border: 1px solid var(--bdr);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    transition: transform .12s;
}

    .qa-card:active {
        transform: scale(.97);
    }

.qa-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}

.qa-card-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--tinta);
}

.qa-card-sub {
    font-size: 11px;
    color: var(--gy);
}

/* ─── FAMILY HERO CARD ──────────────────────────── */
.fhero {
    background: linear-gradient(135deg, var(--gd) 0%, #1aaa7e 100%);
    border-radius: 16px;
    padding: 18px;
    margin: 12px 12px 12px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

    .fhero::after {
        content: '';
        position: absolute;
        top: -30px;
        right: -30px;
        width: 120px;
        height: 120px;
        border-radius: 50%;
        background: rgba(245,158,11,.2);
        pointer-events: none;
    }

.fhero-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px
}

.fhero-ava {
    width: 54px;
    height: 54px;
    background: rgba(255,255,255,.18);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0
}

.fhero-name {
    font-size: 20px;
    font-weight: 800
}

.fhero-sub {
    font-size: 12px;
    opacity: .85;
    margin-top: 2px;
    line-height: 1.5
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255,255,255,.2);
    border-radius: 20px;
    padding: 5px 11px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 5px;
    margin-bottom: 5px
}

.hstats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 7px;
    margin-top: 12px
}

.hstat {
    background: rgba(255,255,255,.15);
    border-radius: 10px;
    padding: 9px;
    text-align: center
}

    .hstat .hv {
        font-size: 19px;
        font-weight: 800;
        display: block
    }

    .hstat .hl {
        font-size: 10px;
        opacity: .8;
        margin-top: 2px
    }

/* ─── MUNICIPALITY BANNER ───────────────────────── */
.banner {
    background: linear-gradient(135deg,var(--bl),#7c3aed);
    border-radius: var(--r);
    padding: 18px;
    margin: 0 12px 12px;
    color: #fff;
}

    .banner h3 {
        font-size: 15px;
        font-weight: 700;
        margin-bottom: 5px
    }

    .banner p {
        font-size: 13px;
        opacity: .9;
        margin-bottom: 12px
    }

.dots {
    display: flex;
    gap: 5px
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,.35)
}

    .dot.on {
        background: #fff;
        width: 16px;
        border-radius: 3px
    }

/* ─── TABLE ─────────────────────────────────────── */
.tbl-wrap {
    overflow-x: auto
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px
}

th {
    background: var(--gyl);
    padding: 9px 11px;
    text-align: left;
    font-weight: 700;
    color: var(--gy);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .4px
}

td {
    padding: 11px 11px;
    border-bottom: 1px solid var(--bdr)
}

/* ─── FILE AREA ─────────────────────────────────── */
.file-area {
    border: 2px dashed var(--bdr);
    border-radius: 12px;
    padding: 22px;
    text-align: center;
    cursor: pointer;
    color: var(--gy);
    font-size: 13px
}

    .file-area:hover {
        border-color: var(--g);
        background: var(--gl)
    }

/* ─── CHIP SELECTOR ─────────────────────────────── */
.chip-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px
}

.chip {
    border: 1.5px solid var(--bdr);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    background: var(--w);
    transition: all .14s
}

    .chip.on {
        border-color: var(--g);
        background: var(--gl);
        color: var(--gd);
        font-weight: 700
    }

.alert-i {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 13px;
    color: #1e40af;
    margin: 0 12px 12px
}

.child-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--w);
    border-radius: var(--r);
    border: 1px solid var(--bdr);
    padding: 14px;
    margin: 0 12px 10px;
    box-shadow: var(--sh);
    cursor: pointer
}

    .child-card:active {
        opacity: .8
    }

.c-ava {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    background: var(--gl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0
}

.lvl {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--bll);
    color: var(--bl);
    margin-left: 5px
}

.padbot {
    padding-bottom: calc(var(--tab-h) + 10px);
}

/* ─── RESPONSIVE: TABLET & DESKTOP ─────────────── */
@media(min-width:600px) {
    .kgrid {
        grid-template-columns: repeat(4,1fr)
    }

    .modal {
        border-radius: 20px;
        margin: 24px auto;
        max-height: 80vh;
        max-width: 560px
    }

    .modal-bg {
        align-items: center
    }

    .hero h1 {
        font-size: 38px
    }

    .stats-g {
        grid-template-columns: repeat(4,1fr)
    }

    .stat-cell:nth-child(even) {
        border-right: 1px solid var(--bdr);
    }

    .stat-cell:last-child {
        border-right: none;
    }
}

.sidebar-btn {
    font-weight: 500;
    color: #374151;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 10px;
    margin: 1px 8px;
    width: calc(100% - 16px);
    transition: background .12s, color .12s;
    text-align: left;
}

.sidebar-btn:hover {
    background: var(--gyl);
}

.sidebar-btn.on {
    background: var(--gl);
    color: var(--gd);
    font-weight: 700;
}

@media(min-width:900px) {

    /* Sidebar replaces bottom tabbar and hamburger */
    .desktop-sidebar {
        display: flex;
        flex-direction: column;
        width: var(--sidebar-w);
        min-width: var(--sidebar-w);
        background: var(--w);
        border-right: 1px solid var(--bdr);
        z-index: 15;
        flex-shrink: 0;
        overflow-y: auto;
    }

    .sidebar-brand {
        display: flex;
        align-items: center;
        gap: 9px;
        font-family: var(--display);
        font-weight: 700;
        font-size: 17px;
        color: var(--tinta);
        padding: 18px 16px 14px;
        border-bottom: 1px solid var(--bdr);
        letter-spacing: -.01em;
    }

        .sidebar-brand .logo-ic {
            width: 32px;
            height: 32px;
            background: var(--gd);
            border-radius: 9px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 14px;
        }

    .sidebar-nav {
        flex: 1;
        padding: 10px 0;
    }

    .sidebar-btn {
        display: flex;
        align-items: center;
        gap: 11px;
        width: 100%;
        padding: 11px 18px;
        font-size: 14px;
        font-weight: 500;
        color: #374151;
        background: none;
        border: none;
        cursor: pointer;
        border-radius: 10px;
        margin: 1px 8px;
        width: calc(100% - 16px);
        transition: background .12s, color .12s;
        text-align: left;
    }

        .sidebar-btn:hover {
            background: var(--gyl);
        }

        .sidebar-btn.on {
            background: var(--gl);
            color: var(--gd);
            font-weight: 700;
            border-left: 3px solid var(--gd);
        }

        .sidebar-btn .sb-ic {
            width: 22px;
            height: 22px;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
        }

            .sidebar-btn .sb-ic svg {
                width: 20px;
                height: 20px;
            }

    .sidebar-footer {
        padding: 12px 10px;
        border-top: 1px solid var(--bdr);
    }

    /* Main content area */
    .desktop-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        min-width: 0;
    }

    /* Hide mobile-only elements on desktop */
    .tabbar {
        display: none !important;
    }

    .htabs {
        display: none !important;
    }

    .hamburger-btn {
        display: none !important;
    }

    /* Topbar adjustments for desktop */
    .topbar {
        padding: 0 22px;
        gap: 14px;
    }

    .topbar-title {
        font-size: 18px;
    }

    /* Scroll area fills the desktop content */
    .scroll-area,
    .scroll-area.has-tab {
        padding-bottom: 24px;
    }

    /* Content width constraints */
    .card {
        margin-left: 20px;
        margin-right: 20px;
    }

    .kgrid {
        padding: 16px 20px 0;
        gap: 14px;
    }

    .content-row {
        margin-left: 20px;
        margin-right: 20px;
    }

    .child-card {
        margin-left: 20px;
        margin-right: 20px;
    }

    .alert-i {
        margin-left: 20px;
        margin-right: 20px;
    }

    .ctabs {
        padding-left: 20px;
    }

    .section-header {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Landing nav links show on desktop */
    .land-nav-links {
        display: flex;
    }

    .land-nav {
        padding: 0 40px;
        height: 64px;
    }

    /* Landing hero — still single column on 900px, just more padding */
    .hero {
        padding: 56px 60px 48px;
        max-width: 860px;
    }

        .hero h1 {
            font-size: 44px;
        }

        .hero p {
            font-size: 16px;
        }

    .hero-btns {
        flex-wrap: nowrap;
    }

    /* Stats grid 4 columns */
    .stats-g {
        grid-template-columns: repeat(4,1fr);
    }

    .stat-cell .sn {
        font-size: 28px;
    }

    /* Landing sections centered */
    .land-section {
        padding: 56px 10%;
    }

        .land-section h2 {
            font-size: 28px;
        }

    /* Feature cards in a row */
    #land-func {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

        #land-func > h2 {
            align-self: flex-start;
            width: 100%;
        }

        #land-func > .land-feat-row {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 16px;
            width: 100%;
            margin-top: 20px;
        }

    /* CTA band */
    .cta-band {
        padding: 56px 10%;
    }

        .cta-band h2 {
            font-size: 30px;
        }

    /* Login screen centered */
    .login-wrap {
        padding: 40px;
    }

    .login-box {
        max-width: 460px;
        padding: 36px 32px;
    }

    /* Modal centered on desktop */
    .modal-bg {
        align-items: center;
        justify-content: center;
    }

    .modal {
        border-radius: 20px;
        margin: 0;
        max-width: 520px;
        width: 100%;
        max-height: 85vh;
    }

    /* Content padding */
    .card {
        margin-left: 20px;
        margin-right: 20px;
    }

    .kgrid {
        padding: 16px 20px 0;
        gap: 14px;
    }

    .content-row {
        margin-left: 20px;
        margin-right: 20px;
    }

    .child-card {
        margin-left: 20px;
        margin-right: 20px;
    }

    .alert-i {
        margin-left: 20px;
        margin-right: 20px;
    }

    .ctabs {
        padding-left: 20px;
    }

    .section-header {
        padding-left: 20px;
        padding-right: 20px;
    }

    .padbot {
        padding-bottom: 24px;
    }
}

/* ─── TRUE DESKTOP: two-column hero ────────────── */
@media(min-width:1100px) {
    .hero {
        max-width: 1200px;
        margin: 0 auto;
        padding: 72px 60px 64px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 56px;
        align-items: center;
    }

        .hero h1 {
            font-size: 48px;
        }

    .hero-visual {
        display: flex;
        flex-direction: column;
        gap: 14px;
    }
}

/* ─── MEMORY GAME ───────────────────────────────── */
.mem-card {
    aspect-ratio: 1;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    transition: transform .35s;
}

    .mem-card.flipped, .mem-card.matched {
        transform: rotateY(180deg);
    }

.mem-front, .mem-back {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    backface-visibility: hidden;
}

.mem-front {
    background: var(--gd);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
}

.mem-back {
    background: var(--gl);
    font-size: 28px;
    transform: rotateY(180deg);
    border: 2px solid var(--bdr);
}

.mem-card.matched .mem-back {
    background: #d1fae5;
    border-color: var(--g);
}

/* ─── AI CHAT ────────────────────────────────────── */
.ai-msg {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

    .ai-msg.user {
        flex-direction: row-reverse;
    }

.ai-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.ai-bubble {
    max-width: 80%;
    padding: 11px 14px;
    border-radius: 16px;
    font-size: 13px;
    line-height: 1.6;
}

.ai-msg.bot .ai-bubble {
    background: var(--w);
    border: 1px solid var(--bdr);
    border-bottom-left-radius: 4px;
    color: var(--tinta);
}

.ai-msg.user .ai-bubble {
    background: var(--gd);
    color: #fff;
    border-bottom-right-radius: 4px;
}

/* ─── ONBOARDING ────────────────────────────────── */
.onb-chip {
    padding: 10px 8px;
    border-radius: 10px;
    text-align: center;
    border: 1.5px solid var(--bdr);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    color: var(--tinta);
    background: var(--w);
}

    .onb-chip.on {
        background: var(--gl);
        border-color: var(--gd);
        color: var(--gd);
    }

/* Layout Positioning Framework Rules */
.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-layout-wrapper {
    display: flex;
    flex: 1;
    height: 100vh; /* Force wrapper to take full viewport height */
    max-height: 100vh; /* Prevent it from expanding past the window boundary */
    overflow: hidden; /* Keeps the main page scroll isolate from the sidebar */
}

/* Force the sidebar to fill the height completely */
.app-sidebar {
    width: 260px;
    background-color: #ffffff;
    border-right: 1px solid #eef2f5;
    display: flex;
    flex-direction: column;
    align-self: stretch; /* Forces full vertical expansion in a flex container */
}

/* Ensure the main page container scrolls independently */
.app-main-content {
    flex: 1;
    overflow-y: auto; /* Generates the scrollbar here instead of on the body */
    background-color: #faf7f4;
    padding: 20px;
}

/* NavLink Active Matching Treatment */
.sidebar-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #4a5568;
    text-decoration: none;
    gap: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

    .sidebar-item:hover, .sidebar-item.active {
        background-color: #e6f7f2; /* Subtle theme color block selection highlight */
        color: var(--gd);
    }

.sidebar-divider {
    border: 0;
    border-top: 1px solid #eef2f5;
    margin: 10px 0;
}

.btn-link-style {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}