/**
 * parosh — Global responsive fixes (tables, admin shell, forms)
 */

/* Prevent horizontal page scroll */
html, body.pp-shell {
    overflow-x: hidden;
    max-width: 100%;
}

.pp-shell {
    min-width: 0;
}

.pp-workspace {
    max-width: 100%;
    box-sizing: border-box;
}

/* ── Scrollable data tables on mobile ── */
.pp-content .card,
.pp-panel,
.pp-table-scroll {
    max-width: 100%;
    box-sizing: border-box;
}

.pp-content .card:has(.data-table),
.pp-content .card:has(> table),
.card:has(.data-table),
.content-area:has(.data-table),
.pp-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    max-width: 100%;
}

.data-table {
    min-width: 36rem;
}

.pp-table-hint {
    display: none;
    font-size: 11px;
    color: var(--pp-text-muted, #7A6F63);
    padding: 0 0 8px;
}

@media (max-width: 768px) {
    .pp-table-hint {
        display: block;
    }

    .data-table {
        font-size: 12px;
        min-width: 32rem;
    }

    .data-table th,
    .data-table td {
        padding: 9px 10px;
        white-space: nowrap;
    }

    .data-table td:last-child,
    .data-table th:last-child {
        padding-right: 14px;
    }
}

/* ── Table floor plan grid ── */
.table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

@media (max-width: 480px) {
    .table-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .table-card {
        padding: 12px;
    }

    .table-card .table-num {
        font-size: 18px;
    }
}

/* ── Admin workspace mobile ── */
@media (max-width: 768px) {
    .pp-workspace {
        padding: 0 12px 24px;
    }

    .pp-pagehead {
        padding: 12px 0 10px;
        margin-bottom: 14px;
    }

    .pp-pagetitle {
        font-size: 1.25rem;
        line-height: 1.25;
    }

    .pp-brandbar-inner {
        padding: 0 12px;
        gap: 8px;
    }

    .pp-outlet-chip {
        display: none;
    }

    .pp-brandbar-meta .pp-date {
        display: none;
    }

    .pp-modnav-inner {
        padding: 0 8px;
    }

    .pp-tab {
        padding: 0 12px;
        font-size: 12px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px;
    }

    .pp-content form[method="GET"],
    .pp-content form[method="POST"].pp-form-stack {
        display: flex !important;
        flex-direction: column;
        gap: 10px;
    }

    .pp-content form[method="GET"] > *,
    .pp-content form[method="GET"] .btn {
        width: 100%;
    }

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

    .grid-2,
    .grid-3,
    .pp-grid-2 {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 480px) {
    .stats-grid,
    .pp-metrics {
        grid-template-columns: 1fr !important;
    }

    .pp-brand-tag {
        display: none;
    }
}

/* ── Brand logo (PNG wordmark, transparent) ── */
.parosh-brand-wrap {
    display: inline-flex;
    align-items: center;
    line-height: 0;
    flex-shrink: 0;
}

.parosh-brand-img {
    display: block;
    height: 34px;
    width: auto;
    max-width: min(160px, 40vw);
}

.parosh-brand-wrap--light .parosh-brand-img {
    height: 30px;
    max-width: min(148px, 38vw);
}

.rb-logo-brand.parosh-brand-img,
.rb-logo .parosh-brand-img {
    height: 32px;
    max-width: min(158px, 42vw);
}

.pp-brand-logo.parosh-brand-img,
.pp-brand .parosh-brand-img {
    height: 28px;
    max-width: min(140px, 36vw);
}

.rb-footer-logo.parosh-brand-img {
    height: 38px;
    max-width: 180px;
    opacity: 0.98;
}

.sa-login-brand-logo.parosh-brand-img {
    height: 40px;
    max-width: 190px;
}

.sa-sidebar-brand.parosh-brand-img {
    height: 24px;
    max-width: 118px;
}

/* ── Marketing site mobile ── */
@media (max-width: 768px) {
    .rb-container {
        padding: 0 16px;
    }

    .rb-nav-wrap {
        padding: 12px 12px;
    }

    .rb-nav {
        padding: 8px 10px 8px 14px;
        gap: 12px;
    }

    .parosh-brand-img {
        height: 28px;
        max-width: 38vw;
    }
}
