@media (max-width: 768px) {
    body {
        padding-bottom: calc(82px + env(safe-area-inset-bottom));
    }

    .sidebar {
        display: none;
    }

    .app-content {
        width: 100%;
        margin-left: 0;
        padding: 84px 14px 18px;
    }

    .mobile-header {
        position: fixed;
        inset: 0 0 auto 0;
        z-index: 40;
        height: 64px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 14px;
        background: var(--blue);
        color: var(--white);
    }

.mobile-brand-mark {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 12px;
        background: var(--cyan);
        color: var(--blue);
        font-size: 13px;
        font-weight: 700;
    }

    .mobile-avatar {
        width: auto;
        min-width: 48px;
        height: 34px;
        padding: 0 8px;
        font-size: 12px;
    }

    .mobile-status-dot {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        min-height: 30px;
        padding: 0 10px;
        border-radius: 999px;
        background: rgba(46, 204, 113, .14);
        color: rgba(255, 255, 255, .88);
        font-size: 12px;
        font-weight: 600;
    }

    .mobile-status-dot::before {
        content: "";
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--green);
    }

    .mobile-drawer {
        position: fixed;
        z-index: 42;
        left: 12px;
        right: 12px;
        bottom: calc(76px + env(safe-area-inset-bottom));
        display: none;
        padding: 10px;
        border: 1px solid rgba(221, 229, 239, .70);
        border-radius: 18px;
        background: var(--white);
        box-shadow: 0 18px 42px rgba(18, 59, 106, .14);
    }

    .mobile-drawer.open {
        display: grid;
        gap: 6px;
    }

    .mobile-drawer a,
    .mobile-drawer-item,
    .mobile-drawer-form button {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 13px 12px;
        border: 0;
        border-radius: 14px;
        background: transparent;
        color: var(--text);
        font: inherit;
        font-size: 14px;
        font-weight: 600;
        text-align: left;
    }

    .mobile-drawer-form {
        margin: 0;
    }

    .mobile-drawer a.active {
        background: rgba(20, 199, 214, .12);
        color: var(--blue);
        font-weight: 600;
    }

    .mobile-drawer-item.is-disabled {
        color: var(--muted);
        opacity: .72;
    }

    .mobile-drawer-form button {
        color: var(--red);
        cursor: pointer;
    }

    .bottom-nav {
        position: fixed;
        inset: auto 0 0 0;
        z-index: 36;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 2px;
        padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
        background: var(--white);
        border-top: 1px solid var(--line);
        box-shadow: 0 -10px 26px rgba(18, 59, 106, .07);
    }

    .bottom-nav a,
    .bottom-nav button {
        min-height: 58px;
        display: grid;
        place-items: center;
        gap: 3px;
        border: 0;
        border-radius: 14px;
        background: transparent;
        color: var(--muted);
        font: inherit;
        font-size: 11px;
        font-weight: 600;
        cursor: pointer;
    }

    .bottom-nav a.active,
    .bottom-nav button.active {
        background: rgba(20, 199, 214, .12);
        color: var(--blue);
    }

    .mobile-nav-icon {
        display: inline-flex;
        width: 21px;
        height: 21px;
    }

    .mobile-nav-icon svg {
        width: 21px;
        height: 21px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .page-heading {
        align-items: flex-start;
    }

    .page-heading h1 {
        font-size: 22px;
    }

    .metric-grid,
    .split-grid,
    .dashboard-metric-grid,
    .dashboard-groups,
    .card-grid,
    .plans-grid,
    .pond-overview,
    .pond-card-grid,
    .pond-detail-metrics,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-hero {
        align-items: stretch;
        flex-direction: column;
        min-height: 0;
        padding: 18px;
        border-radius: 14px;
    }

    .dashboard-hero h1 {
        font-size: 24px;
    }

    .hero-metrics {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hero-metrics div,
    .hero-action {
        width: 100%;
    }

    .metric-card-feature {
        min-height: 128px;
    }

    .active-cycle-header,
    .active-cycle-stats {
        align-items: flex-start;
        flex-direction: column;
    }

    .span-2 {
        grid-column: span 1;
    }

    .metric-card {
        min-height: 92px;
    }

    .responsive-table thead {
        display: none;
    }

    .responsive-table,
    .responsive-table tbody,
    .responsive-table tr,
    .responsive-table td {
        display: block;
        width: 100%;
    }

    .responsive-table tr {
        padding: 12px;
        border-bottom: 1px solid var(--line);
    }

    .responsive-table td {
        border: 0;
        padding: 7px 0;
        display: flex;
        justify-content: space-between;
        gap: 14px;
    }

    .responsive-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-weight: 600;
    }

    .actions-cell {
        width: 100%;
        white-space: normal;
    }

    .actions-cell form {
        margin-left: 0;
    }

    .form-actions {
        position: sticky;
        bottom: 72px;
        background: linear-gradient(to top, var(--bg), rgba(244, 246, 250, .84));
        padding-top: 10px;
    }

    .form-actions .btn {
        width: 100%;
    }

    .pond-card {
        padding: 16px;
    }

    .pond-card-header,
    .pond-card-actions,
    .page-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .pond-card-actions .btn,
    .pond-card-actions form,
    .pond-card-actions button,
    .page-actions .btn {
        width: 100%;
    }

    .pond-card-data,
    .pond-info-grid,
    .feeding-edit-grid,
    .mortality-edit-grid,
    .biometric-edit-grid,
    .note-edit-grid,
    .water-edit-grid,
    .cost-edit-grid,
    .feeding-readonly,
    .mortality-readonly,
    .biometric-readonly,
    .water-readonly,
    .cost-readonly,
    .biometric-history-line {
        grid-template-columns: 1fr;
    }

    .water-edit-grid .span-2,
    .water-readonly strong,
    .water-readonly p,
    .water-indicators {
        grid-column: 1;
    }

    .cost-readonly p {
        grid-column: 1;
    }

    .feeding-item {
        grid-template-columns: 1fr;
    }

    .feeding-item .btn,
    .feeding-item form,
    .feeding-actions,
    .note-card .btn,
    .note-card form,
    .note-actions,
    .btn-large {
        width: 100%;
    }

    .tab-nav {
        margin: 0 -2px;
    }
}
