/**
 * GALAXY SMART SYSTEM – mobile-native.css  v3.0
 * Native-app feel on phones and small tablets.
 *
 * Every colour here comes from the design tokens in premium.css, so the
 * mobile shell renders correctly in BOTH light and dark themes. Nothing
 * in this file hardcodes a palette value.
 */

/* Hidden on desktop */
.mob-app-extras,
.mob-tabbar,
.mob-header-btn {
    display: none;
}

/* ═══════════════════════════════════════════════════════════════
   PUBLIC SITE — phones & small tablets
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

    :root {
        --mob-tab-h: 64px;
        --mob-header-h: 58px;
        --mob-radius: 20px;
        --mob-pad: 14px;
    }

    html {
        scroll-behavior: smooth;
        -webkit-text-size-adjust: 100%;
        scroll-padding-top: calc(var(--mob-header-h) + 10px);
    }

    body {
        /* clear the fixed bottom tab bar, including the iOS home indicator */
        padding-bottom: calc(var(--mob-tab-h) + env(safe-area-inset-bottom, 0px));
        -webkit-tap-highlight-color: transparent;
        overscroll-behavior-y: contain;
    }

    /* ── Chrome we don't want on phones ──
       The bottom tab bar owns primary nav and already has an Account entry,
       so the duplicate header account button goes away. The hamburger stays:
       it is the only way to reach About / Team / Technology / Contact. */
    .mob-header-btn,
    .hero-scroll-hint,
    #back-to-top {
        display: none !important;
    }

    #scroll-progress {
        height: 2px;
    }

    /* ── App header ── */
    #navbar {
        height: calc(var(--mob-header-h) + env(safe-area-inset-top, 0px));
        padding: env(safe-area-inset-top, 0px) max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left));
        gap: 8px;
        background: color-mix(in srgb, var(--p-bg) 88%, transparent);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-bottom: 1px solid var(--p-line);
        box-shadow: 0 2px 14px rgba(0, 0, 0, .06);
    }

    body.dark-theme #navbar {
        box-shadow: 0 2px 14px rgba(0, 0, 0, .35);
    }

    #navbar.scrolled {
        height: calc(var(--mob-header-h) + env(safe-area-inset-top, 0px));
    }

    .nav-actions-wrap {
        margin-left: auto;
        gap: 8px;
    }

    .nav-logo {
        min-width: 0;
        flex: 1;
    }

    .nav-logo span {
        font-size: .92rem;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .nav-logo-icon {
        width: 32px;
        height: 32px;
        border-radius: 9px;
        flex-shrink: 0;
    }

    .theme-toggle-btn {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }

    .hamburger {
        display: flex !important;
        flex-shrink: 0;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        border-radius: 11px;
        background: var(--p-panel);
        border: 1px solid var(--p-line);
    }

    .nav-mobile {
        top: calc(var(--mob-header-h) + env(safe-area-inset-top, 0px));
        max-height: calc(100dvh - var(--mob-header-h) - var(--mob-tab-h));
    }

    /* ── Hero — app welcome screen ── */
    #hero {
        min-height: auto;
        align-items: flex-start;
        padding-top: calc(var(--mob-header-h) + env(safe-area-inset-top, 0px) + 22px);
        padding-bottom: 10px;
        margin: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
    }

    /* A 1fr track still floors at min-content, which lets a wide child push
       the grid past the viewport. minmax(0,1fr) + min-width:0 stops that. */
    .hero-split-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 22px;
    }

    .hero-split-grid > * {
        min-width: 0;
    }

    .hero-left-content {
        align-items: stretch;
        text-align: left;
        width: 100%;
        min-width: 0;
    }

    .hero-badge {
        align-self: flex-start;
        font-size: .62rem;
        padding: 6px 14px 6px 8px;
        margin-bottom: 16px;
        letter-spacing: .12em;
    }

    .hero-title {
        font-size: clamp(1.9rem, 8.4vw, 2.5rem);
        line-height: 1.1;
        text-align: left;
        margin-bottom: 12px;
    }

    .hero-tagline {
        font-size: .95rem;
        text-align: left;
        margin-bottom: 20px;
        min-height: 3em;
        color: var(--p-text-2);
    }

    .hero-ctas {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
        max-width: 100%;
        margin-bottom: 18px;
    }

    .hero-ctas .btn {
        width: 100%;
        max-width: 100%;
        justify-content: center;
        padding: 15px 18px;
        border-radius: 14px;
        font-size: .94rem;
    }

    /* The mobile stat strip already carries these numbers */
    .hero-trust {
        display: none;
    }

    .hero-right-visual {
        display: none;
    }

    .hero-orb-1,
    .hero-orb-2,
    .hero-orb-3 {
        opacity: .45;
        transform: scale(.6);
    }

    /* ── Mobile app extras ── */
    .mob-app-extras {
        display: block;
        width: 100%;
        min-width: 0;
        margin-top: 2px;
    }

    .mob-stat-strip {
        display: flex;
        gap: 10px;
        overflow-x: auto;
        padding: 4px 0 14px;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .mob-stat-strip::-webkit-scrollbar {
        display: none;
    }

    .mob-stat-pill {
        flex: 0 0 auto;
        min-width: 92px;
        padding: 12px 14px;
        border-radius: 16px;
        background: var(--p-panel);
        border: 1px solid var(--p-line);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        scroll-snap-align: start;
    }

    .mob-stat-pill span {
        font-size: 1.05rem;
        line-height: 1;
    }

    .mob-stat-pill strong {
        font-family: var(--p-font-display);
        font-size: 1.05rem;
        font-weight: 800;
        background: var(--p-grad);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .mob-stat-pill small {
        font-size: .62rem;
        color: var(--p-text-3);
        text-transform: uppercase;
        letter-spacing: .06em;
    }

    .mob-quick-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
    }

    .mob-quick-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 13px 4px;
        border-radius: 16px;
        background: var(--p-panel);
        border: 1px solid var(--p-line);
        color: var(--p-text-2);
        font-size: .66rem;
        font-weight: 600;
        text-align: center;
        transition: transform .2s var(--p-ease), background .2s var(--p-ease), border-color .2s var(--p-ease);
    }

    .mob-quick-item:active {
        transform: scale(.95);
        background: var(--p-grad-soft);
        border-color: var(--p-line-hot);
    }

    .mob-quick-icon {
        display: grid;
        place-items: center;
        width: 40px;
        height: 40px;
        border-radius: 12px;
        background: var(--p-grad-soft);
        border: 1px solid var(--p-line);
        font-size: 1.1rem;
    }

    /* ── Sections as app feed cards ── */
    .section-divider,
    .section-gradient-divider {
        display: none;
    }

    #about,
    #team,
    #services,
    #tech,
    #projects,
    #stats,
    #project-status,
    #contact {
        margin: 0 var(--mob-pad) 14px;
        padding: 26px 0 !important;
        border-radius: var(--mob-radius);
        background: var(--p-panel);
        border: 1px solid var(--p-line);
        box-shadow: var(--p-shadow-sm);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        overflow: hidden;
    }

    #stats .container,
    #about .container,
    #team .container,
    #services .container,
    #tech .container,
    #projects .container,
    #project-status .container,
    #contact .container {
        padding-inline: var(--mob-pad);
    }

    .section-header,
    .team-section-head {
        text-align: left;
        margin-bottom: 22px;
        max-width: none;
    }

    .section-header .section-desc,
    .team-section-head .section-desc {
        margin-inline: 0;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-desc {
        font-size: .88rem;
    }

    /* Stats — horizontal snap rail */
    .stats-grid {
        display: flex !important;
        overflow-x: auto;
        gap: 12px;
        padding-bottom: 8px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .stats-grid::-webkit-scrollbar {
        display: none;
    }

    .stat-card {
        flex: 0 0 148px;
        min-width: 148px;
        border-radius: 16px;
        scroll-snap-align: start;
    }

    /* ── About: single column on phones.
       (The old 2-column rule targeted an `.about-card` layout that no
       longer exists and squashed the visual against the copy.) ── */
    .about-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 24px;
    }

    .about-img-box {
        max-width: 260px;
    }

    .about-text,
    .about-text .section-desc {
        text-align: left;
    }

    .about-mvp {
        grid-template-columns: minmax(0, 1fr);
    }

    .stats-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* ── Services / Team / Projects: one full-width card per row.
       Full-width beats a snap carousel here — every card stays reachable
       and nothing gets hidden off-screen. ── */
    .services-bento,
    .team-grid,
    .projects-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 14px !important;
    }

    .service-card,
    .team-card,
    .project-card {
        width: 100%;
        max-width: none;
        border-radius: 18px !important;
    }

    .tech-slider-wrap {
        padding: 0 4px;
    }

    .tech-card {
        min-width: 150px;
    }

    /* Project status tabs — pill scroller */
    .pstatus-tabs {
        display: flex;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 6px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .pstatus-tabs::-webkit-scrollbar {
        display: none;
    }

    .pstatus-tab {
        flex-shrink: 0;
        border-radius: 999px;
        padding: 10px 18px;
    }

    .pstatus-card {
        border-radius: 16px;
    }

    /* ── Contact — app style form ── */
    #contact .contact-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 18px;
    }

    #contact .contact-info {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #contact input,
    #contact textarea,
    #contact select {
        min-height: 48px;
        border-radius: 12px;
        /* 16px prevents iOS Safari from zooming on focus */
        font-size: 16px !important;
    }

    #contact textarea {
        min-height: 130px;
    }

    #contact .btn {
        width: 100%;
        border-radius: 14px;
        padding: 16px;
    }

    /* ── Footer — every column stays reachable ── */
    footer {
        margin: 0 var(--mob-pad) calc(var(--mob-tab-h) + 10px);
        border-radius: var(--mob-radius);
        background: var(--p-panel);
        border: 1px solid var(--p-line);
        padding: 26px 0 18px;
    }

    footer .container {
        padding-block: 0 18px;
    }

    footer .footer-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 26px;
    }

    /* ── Bottom tab bar ── */
    .mob-tabbar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1100;
        height: calc(var(--mob-tab-h) + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: color-mix(in srgb, var(--p-bg) 90%, transparent);
        backdrop-filter: blur(24px) saturate(180%);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        border-top: 1px solid var(--p-line);
        box-shadow: 0 -4px 24px rgba(0, 0, 0, .07);
    }

    body.dark-theme .mob-tabbar {
        box-shadow: 0 -4px 24px rgba(0, 0, 0, .45);
    }

    .mob-tab {
        position: relative;
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: var(--p-text-3);
        font-size: .6rem;
        font-weight: 600;
        padding: 8px 2px;
        transition: color .25s var(--p-ease);
        -webkit-user-select: none;
        user-select: none;
        overflow: hidden;
    }

    .mob-tab-icon {
        font-size: 1.2rem;
        line-height: 1;
        transition: transform .28s var(--p-ease);
    }

    .mob-tab.active {
        color: var(--p-cyan);
    }

    .mob-tab.active .mob-tab-icon {
        transform: translateY(-2px) scale(1.14);
    }

    /* active indicator bar */
    .mob-tab::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        width: 26px;
        height: 3px;
        border-radius: 0 0 3px 3px;
        background: var(--p-grad);
        transform: translateX(-50%) scaleX(0);
        transition: transform .3s var(--p-ease);
    }

    .mob-tab.active::before {
        transform: translateX(-50%) scaleX(1);
    }

    .mob-tab:active {
        opacity: .65;
    }

    .mob-tab-label {
        letter-spacing: .01em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    /* ── Modal → bottom sheet ── */
    .proj-modal-overlay.open,
    .modal-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .proj-modal-overlay.open .proj-modal-box,
    .modal-overlay .modal-box {
        width: 100%;
        max-width: 100%;
        max-height: 88dvh;
        border-radius: 24px 24px 0 0;
        margin: 0;
        animation: mobSheetUp .34s cubic-bezier(.16, 1, .3, 1);
    }

    @keyframes mobSheetUp {
        from { transform: translateY(100%); }
        to   { transform: translateY(0); }
    }

    /* Toast above the tab bar */
    #toast-container,
    .toast-container {
        bottom: calc(var(--mob-tab-h) + 16px + env(safe-area-inset-bottom, 0px)) !important;
        left: var(--mob-pad);
        right: var(--mob-pad);
        max-width: none;
    }

    /* Touch targets */
    .btn,
    .pstatus-tab,
    .pstatus-viewmore,
    .nav-mobile a,
    .footer-col ul a,
    .contact-link {
        min-height: 44px;
    }

    /* Cheaper motion on phones */
    .hero-img-graphic {
        animation-duration: 8s;
    }

    .hero-float-card {
        animation: none;
    }
}

/* ── Large phones → tablet portrait (601–768px) ──
   The app shell still applies here, but full-bleed buttons and a
   four-across quick grid look stretched on a 768px iPad. Cap the
   measure and let the CTAs sit side by side. */
@media (min-width: 601px) and (max-width: 768px) {
    .hero-left-content,
    .mob-app-extras {
        max-width: 560px;
    }

    .hero-ctas {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .hero-ctas .btn {
        width: auto;
        flex: 1 1 220px;
    }

    .section-header,
    .team-section-head {
        max-width: 620px;
    }

    .services-bento,
    .team-grid,
    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    #contact .contact-info {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-grid {
        grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr) !important;
        align-items: center;
        gap: 30px;
    }

    footer .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Very small phones */
@media (max-width: 480px) {
    .mob-quick-grid {
        gap: 8px;
    }

    .mob-quick-item {
        padding: 11px 3px;
        font-size: .6rem;
    }

    .mob-quick-icon {
        width: 34px;
        height: 34px;
        font-size: .95rem;
    }

    #contact .contact-info {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 360px) {
    .mob-tab-label {
        font-size: .55rem;
    }

    .mob-tab-icon {
        font-size: 1.08rem;
    }

    .nav-logo span {
        font-size: .82rem;
    }
}

/* Desktop: keep every mobile-only element hidden */
@media (min-width: 769px) {
    .mob-app-extras,
    .mob-tabbar,
    .mob-header-btn,
    .mob-admin-tabbar,
    .mob-dash-tabbar,
    .mob-dash-sheet,
    .mob-sidebar-overlay {
        display: none !important;
    }
}

/* ═══════════════════════════════════════════════
   ADMIN PANEL — Mobile Native App
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {

    body.mob-admin-app,
    body.mob-admin-login-app {
        -webkit-tap-highlight-color: transparent;
    }

    body.mob-admin-app {
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }

    /* Login pages */
    body.mob-admin-login-app .admin-login-wrapper {
        padding: max(48px, env(safe-area-inset-top)) 16px 24px;
        min-height: 100dvh;
        align-items: flex-start;
    }

    body.mob-admin-login-app .admin-login-box {
        width: 100%;
        max-width: 100%;
        border-radius: 24px;
        padding: 28px 22px;
    }

    body.mob-admin-login-app .admin-btn {
        width: 100%;
        padding: 16px;
        border-radius: 14px;
        font-size: 1rem;
    }

    /* Admin shell */
    body.mob-admin-app .admin-shell-topbar {
        padding: 12px 16px;
        padding-top: max(12px, env(safe-area-inset-top));
        min-height: 56px;
    }

    body.mob-admin-app .admin-shell-topbar h1 {
        font-size: 1.05rem;
    }

    body.mob-admin-app .admin-shell-topbar p {
        display: none;
    }

    body.mob-admin-app .admin-shell-hamburger {
        display: none !important;
    }

    body.mob-admin-app .admin-shell-topbar-right .saas-btn-ghost {
        padding: 8px 12px;
        font-size: .75rem;
    }

    body.mob-admin-app .admin-shell-content {
        padding: 14px 12px 20px;
    }

    body.mob-admin-app .admin-shell-sidebar {
        z-index: 1200;
        box-shadow: 8px 0 40px rgba(0, 0, 0, .5);
    }

    body.mob-admin-app .card,
    body.mob-admin-app .users-stat,
    body.mob-admin-app .glass-card {
        border-radius: 18px;
    }

    body.mob-admin-app .users-stats,
    body.mob-admin-app .users-toolbar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    body.mob-admin-app .users-stats::-webkit-scrollbar,
    body.mob-admin-app .users-toolbar::-webkit-scrollbar {
        display: none;
    }

    body.mob-admin-app .users-stat {
        min-width: 120px;
        flex-shrink: 0;
    }

    body.mob-admin-app .table,
    body.mob-admin-app .users-table {
        font-size: .82rem;
    }

    body.mob-admin-app .users-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.mob-admin-app .users-header {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    body.mob-admin-app .users-heading h1 {
        font-size: 1.35rem;
    }

    body.mob-admin-app .modal .card,
    body.mob-admin-app .users-modal-box {
        max-width: calc(100vw - 24px);
        margin: 12px;
        border-radius: 20px;
    }

    body.mob-admin-app .btn,
    body.mob-admin-app .saas-btn {
        min-height: 44px;
    }

    .mob-admin-tabbar {
        display: flex;
    }

    .mob-tab-btn {
        background: none;
        border: none;
        cursor: pointer;
        font-family: inherit;
        text-decoration: none;
    }

    .mob-admin-tabbar a,
    .mob-admin-tabbar button,
    .mob-dash-tabbar a,
    .mob-dash-tabbar button {
        text-decoration: none;
    }

    /* Sidebar overlay */
    .mob-sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 1050;
        background: rgba(0, 0, 0, .55);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    .mob-sidebar-overlay.show {
        display: block;
    }

    body.mob-admin-app .admin-shell-sidebar.open {
        transform: translateX(0);
    }

    body.mob-admin-app .grid-two,
    body.mob-admin-app .form-row {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body.mob-admin-app .saas-page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    body.mob-admin-app .saas-page-header .saas-btn {
        width: 100%;
    }

    body.mob-admin-app .team-editor,
    body.mob-admin-app .team-list {
        flex-direction: column;
    }

    body.mob-admin-app .messages-list .message-card {
        border-radius: 16px;
    }
}

/* ═══════════════════════════════════════════════
   USER DASHBOARD — Mobile Native App
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {

    body.mob-dash-app {
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
        -webkit-tap-highlight-color: transparent;
    }

    body.mob-dash-app #topbar {
        padding: 12px 16px;
        padding-top: max(12px, env(safe-area-inset-top));
        min-height: 56px;
        background: color-mix(in srgb, var(--p-bg) 92%, transparent);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--p-line);
    }

    body.mob-dash-app #sidebar-toggle {
        display: none !important;
    }

    body.mob-dash-app .topbar-title {
        font-size: 1.05rem;
    }

    body.mob-dash-app .panel-area {
        padding: 14px 12px 20px;
    }

    body.mob-dash-app .d-section,
    body.mob-dash-app .dash-premium-card,
    body.mob-dash-app .summary-card {
        border-radius: 18px;
    }

    body.mob-dash-app .summary-grid {
        display: flex;
        overflow-x: auto;
        gap: 12px;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    body.mob-dash-app .summary-grid::-webkit-scrollbar {
        display: none;
    }

    body.mob-dash-app .summary-card {
        min-width: 148px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    body.mob-dash-app .d-btn {
        min-height: 44px;
        border-radius: 12px;
    }

    .mob-dash-tabbar {
        display: flex;
    }

    /* Hide the desktop sidebar — bottom nav + sheet replace it */
    body.mob-dash-app #dashboard-sidebar {
        display: none;
    }

    body.mob-dash-app #dashboard-main {
        margin-left: 0 !important;
        width: 100% !important;
    }

    body.mob-dash-app .orders-table-wrap,
    body.mob-dash-app .d-table-wrap,
    body.mob-dash-app table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    body.mob-dash-app .order-card,
    body.mob-dash-app .timeline-item {
        border-radius: 16px;
    }

    body.mob-dash-app .d-form-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    body.mob-dash-app #d-toast-container {
        bottom: calc(64px + 16px + env(safe-area-inset-bottom, 0px));
    }

    /* Bottom sheet menu */
    .mob-dash-sheet {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 1300;
        pointer-events: none;
    }

    .mob-dash-sheet.open {
        display: block;
        pointer-events: auto;
    }

    .mob-dash-sheet-backdrop {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, .5);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    .mob-dash-sheet-panel {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 12px 16px calc(20px + env(safe-area-inset-bottom, 0px));
        background: var(--p-bg);
        border-radius: 24px 24px 0 0;
        border-top: 1px solid var(--p-line);
        animation: mobSheetUp .3s cubic-bezier(.16, 1, .3, 1);
    }

    .mob-dash-sheet-handle {
        width: 40px;
        height: 4px;
        border-radius: 4px;
        background: var(--p-line);
        margin: 0 auto 16px;
    }

    .mob-dash-sheet-title {
        font-size: 1rem;
        color: var(--p-text-2);
        margin: 0 0 14px;
        font-weight: 600;
    }

    .mob-dash-sheet-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }

    .mob-dash-sheet-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        padding: 16px 8px;
        border-radius: 16px;
        background: var(--p-panel);
        border: 1px solid var(--p-line);
        color: var(--p-text-2);
        font-size: .74rem;
        font-weight: 600;
        text-align: center;
        cursor: pointer;
        font-family: inherit;
    }

    .mob-dash-sheet-item span {
        font-size: 1.35rem;
    }

    .mob-dash-sheet-item:active {
        transform: scale(.96);
        background: var(--p-grad-soft);
    }

    .mob-dash-sheet-danger {
        color: #FF6B6B;
        border-color: rgba(255, 107, 107, .3);
    }
}

/* ═══════════════════════════════════════════════
   AUTH PAGE — Mobile Native App
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {

    body.mob-auth-app {
        min-height: 100dvh;
        -webkit-tap-highlight-color: transparent;
    }

    body.mob-auth-app .auth-wrapper {
        padding: max(24px, env(safe-area-inset-top)) 16px 24px;
        min-height: 100dvh;
        justify-content: flex-start;
    }

    body.mob-auth-app .auth-card {
        width: 100%;
        max-width: 100%;
        border-radius: 24px;
        padding: 28px 20px;
    }

    body.mob-auth-app .auth-tabs {
        border-radius: 14px;
        padding: 4px;
    }

    body.mob-auth-app .auth-tab {
        padding: 12px;
        border-radius: 10px;
        font-size: .9rem;
    }

    body.mob-auth-app input,
    body.mob-auth-app .auth-submit {
        min-height: 48px;
        border-radius: 12px;
        /* 16px keeps iOS Safari from zooming the viewport on focus */
        font-size: 16px;
    }

    body.mob-auth-app .auth-submit {
        width: 100%;
    }
}

/* ═══════════════════════════════════════════════
   TABLET — between the phone shell and the desktop grid
   ═══════════════════════════════════════════════ */
@media (min-width: 769px) and (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .team-grid,
    .services-bento {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}
