/* Mobile responsiveness layer - loaded after style.css */

@media (max-width: 768px) {
    .home-nav {
        position: absolute;
        grid-template-columns: 1fr auto;
        padding: 14px 16px;
        gap: 12px;
    }
    .home-nav__links { display: none; }
    .home-nav__actions { gap: 8px; }
    .home-nav__actions .btn--ghost { display: none; }
    .home-brand span:last-child { display: none; }

    .home-hero {
        min-height: 92svh;
        align-items: flex-end;
    }
    .home-hero__image { object-position: 58% center; }
    .home-hero__overlay {
        background:
            linear-gradient(180deg, rgba(11, 35, 31, 0.28) 0%, rgba(11, 35, 31, 0.78) 42%, rgba(11, 35, 31, 0.96) 86%, rgba(247, 248, 251, 1) 100%);
    }
    .home-hero__content {
        width: calc(100% - 32px);
        padding: 120px 0 56px;
    }
    .home-hero h1 { font-size: 3rem; }
    .home-hero__copy { font-size: 1rem; }
    .home-hero__actions .btn {
        width: 100%;
    }
    .home-hero__metrics {
        grid-template-columns: 1fr;
    }
    .home-hero__metrics span { min-height: 0; }

    .home-section {
        width: calc(100% - 32px);
        padding: 52px 0;
    }
    .home-feature-grid {
        grid-template-columns: 1fr;
    }
    .home-feature { min-height: 0; }
    .home-split,
    .home-operations {
        grid-template-columns: 1fr;
    }
    .home-split > div:first-child {
        position: static;
    }
    .home-flow__item {
        grid-template-columns: 1fr;
    }
    .home-ops-grid {
        grid-template-columns: 1fr;
    }
    .home-footer {
        flex-direction: column;
        padding: 22px 16px;
    }

    .app-shell { display: block; }

    .app-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(82vw, 300px);
        transform: translateX(-100%);
        transition: transform 0.2s var(--ease);
        z-index: 30;
        box-shadow: var(--shadow-lg);
    }
    body.is-sidebar-open .app-sidebar { transform: translateX(0); }

    .app-topbar {
        position: sticky;
        top: 0;
        padding: 14px 18px;
    }
    .app-topbar__menu-btn { display: inline-flex; }
    .app-topbar__title { font-size: 1.15rem; }
    .app-flashes { padding: 14px 16px 0; }
    .app-main { padding: 18px 16px; }
    .app-footer { padding: 18px 16px; }

    /* Dashboard hero */
    .dashboard-hero { grid-template-columns: 1fr; gap: 18px; }
    .hero-card { padding: 24px 20px; }
    .hero-card::after { display: none; }
    .hero-card__title { font-size: 1.5rem; }
    .hero-card__subtitle { font-size: 0.92rem; }
    .hero-card__actions { flex-direction: column; gap: 8px; }
    .hero-card__actions .btn { width: 100%; }
    .hero-card__summary { grid-template-columns: 1fr; }
    .hero-card__summary div {
        padding: 12px 14px;
    }

    /* Stat cards */
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .stat-card { padding: 18px; }
    .stat-card__value { font-size: 1.8rem; }
    .stat-card__icon { width: 36px; height: 36px; margin-bottom: 10px; }
    .stat-card__icon svg { width: 17px; height: 17px; }
    .stat-card__note { margin-top: 8px; font-size: 0.78rem; }

    /* Wellness grid / checkin cards */
    .wellness-grid { grid-template-columns: 1fr; }

    /* Focus list items */
    .focus-item { padding: 10px 12px; gap: 10px; }
    .focus-item__title { font-size: 0.84rem; }
    .focus-item__desc { font-size: 0.74rem; }

    /* Section title */
    .section-title { flex-wrap: wrap; gap: 6px; }

    /* Detail grid (order view) */
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 18px;
    }

    /* Page header */
    .page-header { flex-direction: column; align-items: flex-start; gap: 10px; }
    .page-header__actions { width: 100%; flex-direction: column; gap: 8px; }
    .page-header__actions .btn { width: 100%; }
    .page-header .btn { width: 100%; }

    /* Card header */
    .card__header { align-items: flex-start; flex-direction: column; }
    .card__header .btn { width: 100%; }

    /* Table */
    .data-table { display: block; overflow-x: auto; white-space: nowrap; }

    /* Forms */
    .inline-form { flex-direction: column; }
    .inline-form input, .inline-form select { width: 100%; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid__actions { justify-content: stretch; }
    .form-grid__actions .btn, .form-grid__actions button { width: 100%; }

    /* Activity list */
    .activity-item { gap: 10px; padding: 8px 0; }
    .activity-item__icon { width: 32px; height: 32px; }
    .activity-item__icon svg { width: 16px; height: 16px; }
    .activity-item__title { font-size: 0.85rem; }
    .activity-item__time { font-size: 0.74rem; }

    /* Row actions */
    .row-actions { gap: 6px; }

    /* Auth */
    .auth-shell { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .auth-main { min-height: 100vh; padding: 28px 18px; }
    .auth-card { max-width: 440px; }
}

@media (max-width: 420px) {
    .stat-grid { grid-template-columns: 1fr; }
    .stat-card { padding: 16px; }
    .stat-card__value { font-size: 1.6rem; }
    .error-card h1 { font-size: 2.2rem; }
    .row-actions { justify-content: flex-start; }

    .hero-card { padding: 20px 16px; }
    .hero-card__eyebrow { font-size: 0.66rem; }
    .hero-card__title { font-size: 1.3rem; }
    .hero-card__subtitle { font-size: 0.85rem; }
    .hero-card__summary span { font-size: 1.5rem; }
    .hero-card__summary small { font-size: 0.7rem; }

    .checkin-card { padding: 18px; }
    .checkin-card h3 { font-size: 1.05rem; }

    .focus-item__action { width: 26px; height: 26px; }
    .focus-item__action svg { width: 12px; height: 12px; }
}
