/* ═══════════════════════════════════════════════════════════════════════════ */
/* Mobile Responsive & Drawer Navigation Styles                                */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────── */
/* Drawer Navigation (Fixed, off-screen by default)                            */
/* ─────────────────────────────────────────────────────────────────────────── */

.drawer-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 999;
    width: 44px;
    height: 44px;
    padding: 8px;
    background: var(--primary, #2563eb);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.drawer-toggle:hover {
    background: var(--primary-dark, #1d4ed8);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.drawer-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 998;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.drawer-overlay.active {
    display: block;
    opacity: 1;
}

.drawer-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: min(82vw, 320px);
    height: 100vh;
    z-index: 1000;
    background: white;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    transform: translateX(-100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding-top: 20px;
}

.drawer-nav.active {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

.drawer-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.drawer-nav-item {
    display: block;
    padding: 16px 24px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.drawer-nav-item:hover {
    background: #f5f5f5;
    color: var(--primary, #2563eb);
}

.drawer-nav-item.active {
    background: #eef2ff;
    color: var(--primary, #2563eb);
    font-weight: 500;
    border-left: 4px solid var(--primary, #2563eb);
    padding-left: 20px;
}

.drawer-nav-item.drawer-logout {
    margin-top: 20px;
    border-top: 2px solid #e5e7eb;
    color: #dc2626;
}

.drawer-nav-item.drawer-logout:hover {
    background: #fee2e2;
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* Mobile Responsive Styles (<768px)                                          */
/* ─────────────────────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
    .top-links {
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2px;
    }

    .top-links a {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    /* Show drawer toggle on mobile */
    .drawer-toggle {
        display: flex;
    }

    /* Adjust header for drawer toggle button */
    .rp-header {
        position: sticky;
        padding-left: 0;
    }

    .rp-header-inner {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 0.65rem 0.8rem;
    }

    .rp-logo {
        font-size: 14px;
        padding-left: 56px;
    }

    .rp-logo-text strong {
        font-size: 14px;
    }

    .rp-logo-text em {
        font-size: 11px;
    }

    /* Hide search form details on mobile */
    .rp-search-form {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .rp-search-form input {
        width: 100%;
        padding: 10px;
        font-size: 14px;
    }

    .rp-search-btn {
        width: 100%;
        padding: 10px;
    }

    /* Stack action buttons on mobile */
    .rp-actions {
        display: none;
    }

    .rp-action-btn {
        width: 100%;
        padding: 12px;
        font-size: 13px;
        min-height: 44px;
    }

    /* Category bar scrolls horizontally on mobile */
    .rp-catbar {
        overflow-x: auto;
        padding: 10px 0;
    }

    .rp-catbar-list {
        flex-wrap: nowrap;
    }

    .rp-cat-pill {
        min-width: fit-content;
        padding: 8px 16px;
    }

    /* Main content adjustments */
    .rp-main {
        padding: 16px;
    }

    /* Product grid on mobile */
    .rp-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }

    /* Forms on mobile */
    label {
        display: block;
        width: 100%;
        margin-bottom: 12px;
    }

    input, select, textarea {
        width: 100% !important;
        padding: 12px !important;
        min-height: 44px !important;
        font-size: 16px !important;
    }

    /* Touch-friendly buttons */
    button {
        min-height: 44px;
        padding: 12px 16px;
        font-size: 14px;
    }

    /* Full-width forms */
    .grid-two {
        grid-template-columns: 1fr !important;
    }

    /* Footer on mobile */
    .rp-footer {
        padding: 16px;
        font-size: 12px;
    }
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* Tablet Responsive Styles (768px - 1024px)                                  */
/* ─────────────────────────────────────────────────────────────────────────── */

@media (min-width: 768px) and (max-width: 1023px) {
    .drawer-toggle,
    .drawer-nav,
    .drawer-overlay {
        display: none !important;
    }

    .rp-header-inner {
        flex-wrap: wrap;
        gap: 12px;
    }

    .rp-logo {
        flex: 0 0 auto;
    }

    .rp-search-form {
        flex: 1 1 auto;
        min-width: 200px;
    }

    .rp-actions {
        flex: 1 1 100%;
        flex-wrap: wrap;
    }

    .rp-action-btn {
        flex: 0 1 calc(50% - 6px);
    }

    .rp-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .rp-product-detail {
        padding: 0.4rem;
    }

    .rp-detail-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .rp-detail-media {
        min-height: 0;
    }

    .rp-detail-media img {
        max-height: 340px;
        width: 100%;
        object-fit: contain;
    }

    .rp-product-detail .table-wrap {
        overflow-x: auto;
    }

    .rp-product-detail table {
        min-width: 0;
        width: 100%;
        table-layout: fixed;
    }

    .rp-product-detail th,
    .rp-product-detail td {
        word-break: break-word;
    }

    .rp-product-detail .grid-two {
        grid-template-columns: 1fr !important;
    }

    .rp-product-detail .variant-select,
    .rp-product-detail #variant_price_preview,
    .rp-product-detail input[type="number"],
    .rp-product-detail input[type="text"],
    .rp-product-detail button {
        width: 100%;
    }

    .rp-detail-status {
        flex-wrap: wrap;
    }

    .grid-two {
        grid-template-columns: 1fr 1fr !important;
    }

    label {
        min-height: 44px;
    }

    input, select, textarea, button {
        min-height: 44px;
    }
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* Desktop Responsive Styles (>1024px)                                        */
/* ─────────────────────────────────────────────────────────────────────────── */

@media (min-width: 1024px) {
    .drawer-toggle {
        display: none !important;
    }

    .drawer-nav {
        display: none !important;
    }

    .drawer-overlay {
        display: none !important;
    }

    .rp-actions {
        display: flex;
    }

    .rp-header-inner {
        flex-direction: row;
        gap: 24px;
    }

    .rp-logo {
        flex: 0 0 auto;
    }

    .rp-search-form {
        flex: 1 1 auto;
        min-width: 300px;
    }

    .rp-actions {
        flex: 0 1 auto;
        flex-direction: row;
        gap: 12px;
    }

    .rp-action-btn {
        white-space: nowrap;
        padding: 10px 16px;
    }

    .rp-product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .grid-two {
        grid-template-columns: 1fr 1fr;
    }
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* Accessibility & Reduced Motion                                              */
/* ─────────────────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .drawer-toggle,
    .drawer-toggle span,
    .drawer-overlay,
    .drawer-nav,
    .drawer-nav-item,
    button,
    a {
        transition: none !important;
    }
}

/* Focus states for accessibility */
.drawer-toggle:focus,
.drawer-nav-item:focus,
button:focus,
input:focus,
select:focus,
a:focus {
    outline: 2px solid var(--primary, #2563eb);
    outline-offset: 2px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .drawer-nav {
        background: #1f2937;
        color: #f3f4f6;
    }

    .drawer-nav-item {
        color: #f3f4f6;
        border-bottom-color: #374151;
    }

    .drawer-nav-item:hover {
        background: #374151;
        color: #60a5fa;
    }

    .drawer-nav-item.active {
        background: #1e3a8a;
        border-left-color: #60a5fa;
        color: #60a5fa;
    }

    .drawer-nav-item.drawer-logout {
        border-top-color: #4b5563;
        color: #f87171;
    }

    .drawer-nav-item.drawer-logout:hover {
        background: #7f1d1d;
    }
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* Flipkart-style Mobile Skin (Retailer only)                                 */
/* ─────────────────────────────────────────────────────────────────────────── */

.rp-bottom-nav {
    display: none;
}

@media (max-width: 767px) {
    .rp-body {
        background: #f1f3f6;
    }

    .drawer-toggle,
    .drawer-nav,
    .drawer-overlay {
        display: none !important;
    }

    .rp-header {
        background: #d9ecff;
        box-shadow: none;
        border-bottom: 1px solid #dbe2ea;
    }

    .rp-header-inner {
        padding: 0.7rem 0.9rem;
        gap: 0.6rem;
    }

    .rp-logo {
        display: none;
    }

    .rp-search-form {
        order: 1;
        display: grid;
        grid-template-columns: 1fr 46px;
        border: 1px solid #2b72ff;
        border-radius: 12px;
        overflow: hidden;
        background: #fff;
    }

    .rp-search-form input[type="search"] {
        border: 0 !important;
        min-height: 46px !important;
        font-size: 1.05rem !important;
        padding: 0 0.9rem !important;
    }

    .rp-search-btn {
        min-height: 46px !important;
        width: 46px;
        padding: 0 !important;
        justify-content: center;
        border-left: 1px solid #e5e7eb;
        background: #fff;
        color: #2b72ff;
        font-size: 0;
    }

    .rp-search-btn svg {
        width: 20px;
        height: 20px;
    }

    .rp-actions {
        display: none !important;
    }

    .rp-catbar {
        background: #fff;
        border-top: 0;
        border-bottom: 1px solid #dde4ea;
        padding: 0;
    }

    .rp-catbar-list {
        padding: 0 0.5rem;
    }

    .rp-cat-pill {
        font-size: 0.88rem;
        padding: 0.72rem 0.6rem;
    }

    .rp-main {
        padding: 0.65rem 0.65rem 5.2rem;
    }

    .rp-banners {
        margin-bottom: 0.85rem;
        border-radius: 10px;
    }

    .rp-banner-slide {
        min-height: 152px;
        padding: 0.9rem 0.95rem;
        align-items: flex-start;
    }

    .rp-banner-content {
        max-width: 100%;
        padding-right: 0;
    }

    .rp-banner-content h2 {
        font-size: 1.18rem;
        margin-bottom: 0.28rem;
        line-height: 1.2;
    }

    .rp-banner-content p {
        font-size: 0.86rem;
        line-height: 1.28;
        margin-bottom: 0.65rem;
        max-width: 94%;
    }

    .rp-banner-tag {
        font-size: 0.66rem;
        margin-bottom: 0.45rem;
        padding: 0.16rem 0.55rem;
    }

    .rp-banner-cta {
        font-size: 0.76rem;
        padding: 0.42rem 0.8rem;
    }

    .rp-bn-prev,
    .rp-bn-next {
        display: none;
    }

    .rp-bn-dots {
        gap: 5px;
        padding: 0.42rem 0 0;
    }

    .rp-dot {
        width: 6px;
        height: 6px;
        min-height: 0;
        padding: 0;
        line-height: 0;
        flex: 0 0 auto;
        border-radius: 999px;
        background: #cbd5e1;
        transition: width 0.2s ease, background 0.2s ease;
    }

    .rp-dot.active {
        width: 18px;
        transform: none;
        background: #2b72ff;
    }

    .rp-section {
        margin-bottom: 1rem;
    }

    .rp-section-title {
        font-size: 0.94rem;
        letter-spacing: -0.02em;
        margin-bottom: 0.55rem;
    }

    .rp-cat-tiles {
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0.1rem 0.1rem 0.4rem;
        scrollbar-width: none;
    }

    .rp-cat-tiles::-webkit-scrollbar {
        display: none;
    }

    .rp-cat-tile {
        box-shadow: none;
        border: 0;
        border-radius: 0;
        background: transparent;
        padding: 0.25rem 0.12rem 0.45rem;
        font-size: 0.68rem;
        font-weight: 700;
        min-height: 0;
        min-width: 62px;
        flex: 0 0 auto;
        justify-content: flex-start;
        gap: 0.24rem;
        position: relative;
    }

    .rp-cat-icon {
        width: 40px;
        height: 40px;
        display: grid;
        place-items: center;
        font-size: 1.08rem;
        border-radius: 999px;
        background: #ffffff;
        border: 1px solid #e4e9f0;
    }

    .rp-cat-tile span:last-child {
        display: block;
        line-height: 1.15;
        text-align: center;
        white-space: normal;
        max-width: 62px;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .rp-cat-tile.active {
        color: #2563eb;
    }

    .rp-cat-tile.active .rp-cat-icon {
        border-color: #9ec3ff;
        background: #eff6ff;
    }

    .rp-cat-tile.active::after {
        content: '';
        position: absolute;
        left: 10px;
        right: 10px;
        bottom: 0;
        height: 2px;
        border-radius: 2px;
        background: #2563eb;
    }

    .rp-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .rp-product-card {
        border-radius: 10px;
        box-shadow: none;
        border: 1px solid #e7ebf0;
    }

    .rp-product-card:hover {
        transform: none;
        box-shadow: none;
    }

    .rp-product-img {
        background: #fff;
        aspect-ratio: 0.9;
    }

    .rp-product-img img {
        padding: 0.2rem;
    }

    .rp-product-badge {
        font-size: 0.6rem;
        padding: 0.12rem 0.36rem;
    }

    .rp-product-info {
        padding: 0.48rem;
        gap: 0.16rem;
    }

    .rp-product-brand,
    .rp-product-sku,
    .rp-product-desc,
    .rp-instock,
    .rp-lowstock,
    .rp-outstock {
        display: none;
    }

    .rp-product-name {
        font-size: 0.82rem;
        font-weight: 600;
        line-clamp: 2;
        -webkit-line-clamp: 2;
    }

    .rp-price {
        font-size: 1.18rem;
        line-height: 1.1;
    }

    .rp-product-bottom {
        gap: 0.4rem;
    }

    .rp-enquiry-form {
        display: none;
    }

    .rp-view-btn {
        background: #ffdb3a;
        color: #111827;
        border: 1px solid #e6bf12;
        font-size: 0.8rem;
    }

    .rp-results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    .rp-clear-link {
        font-size: 0.78rem;
    }

    .rp-detail-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .rp-detail-media {
        border: 0;
        border-bottom: 1px solid #e6e8ee;
        min-height: 0;
        border-radius: 0;
    }

    .rp-detail-media img {
        width: 100%;
        max-height: 300px;
        object-fit: contain;
        padding: 0.4rem;
    }

    .rp-detail-media video {
        width: 100% !important;
        max-height: 220px !important;
        object-fit: contain;
    }

    .rp-detail-content {
        padding: 0.75rem;
        overflow-x: hidden;
    }

    .rp-product-detail {
        padding: 0;
        border-radius: 10px;
        overflow: hidden;
    }

    .rp-product-detail h2 {
        font-size: 1.12rem;
        line-height: 1.3;
        margin-bottom: 0.45rem;
    }

    .rp-product-detail .rp-product-sku,
    .rp-product-detail .muted {
        font-size: 0.82rem;
        line-height: 1.35;
        word-break: break-word;
    }

    .rp-product-detail .rp-tier-box {
        margin-top: 0.6rem;
        padding: 0.6rem;
        border-radius: 8px;
    }

    .rp-product-detail .rp-section-title {
        font-size: 0.98rem;
        margin-bottom: 0.45rem;
    }

    .rp-product-detail .table-wrap {
        overflow-x: auto;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
    }

    .rp-product-detail table {
        min-width: 0;
        width: 100%;
        table-layout: fixed;
    }

    .rp-product-detail th,
    .rp-product-detail td {
        font-size: 0.76rem;
        padding: 0.42rem;
        word-break: break-word;
    }

    .rp-product-detail .grid-two {
        grid-template-columns: 1fr !important;
        gap: 0.55rem;
    }

    .rp-product-detail .variant-select,
    .rp-product-detail #variant_price_preview,
    .rp-product-detail input[type="number"],
    .rp-product-detail input[type="text"],
    .rp-product-detail button {
        width: 100%;
        min-height: 44px;
        font-size: 16px;
    }

    .rp-detail-status {
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .rp-detail-status .chip,
    .rp-detail-status .rp-instock,
    .rp-detail-status .rp-lowstock,
    .rp-detail-status .rp-outstock {
        white-space: nowrap;
        font-size: 0.76rem;
    }

    .rp-footer {
        display: none;
    }

    .rp-bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1500;
        height: 58px;
        background: #fff;
        border-top: 1px solid #d9e0e7;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
    }

    .rp-bottom-item {
        text-decoration: none;
        color: #4b5563;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0.08rem;
        font-size: 0.72rem;
        font-weight: 600;
    }

    .rp-bottom-ico {
        font-size: 1.05rem;
        line-height: 1;
    }

    .rp-bottom-item.active {
        color: #2563eb;
    }
}

/* ─────────────────────────────────────────────────────────────────────────── */
/* Global Responsive Layer (All pages: admin/auth/chat/orders/forms/tables)  */
/* ─────────────────────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
    .container {
        width: min(100%, 96%);
        margin: 0.85rem auto 2rem;
    }

    .card {
        padding: 0.95rem;
        border-radius: 12px;
    }

    .row-between {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .search-bar {
        margin-left: 0;
        width: 100%;
    }

    .search-bar input {
        min-width: 0;
        width: 100%;
    }

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

    .retailer-mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.8rem;
    }

    .retailer-mini-card {
        padding: 0.9rem;
        border-radius: 16px;
    }

    .retailer-mini-foot {
        align-items: flex-start;
        flex-direction: column;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .actions {
        flex-wrap: wrap;
    }

    .top-links {
        width: 100%;
    }

    .rp-bn-dots {
        gap: 6px;
    }

    .rp-dot {
        width: 7px;
        height: 7px;
    }

    .rp-dot.active {
        width: 20px;
        transform: none;
    }
}

@media (max-width: 767px) {
    .page-bg {
        display: none;
    }

    .topbar {
        position: sticky;
        top: 0;
        z-index: 40;
        padding: 0.65rem 0.75rem;
        gap: 0.65rem;
        flex-direction: column;
        align-items: stretch;
    }

    .brand-wrap {
        width: 100%;
    }

    .brand-wrap h1 {
        font-size: 0.95rem;
    }

    .brand-wrap p {
        font-size: 0.74rem;
    }

    .top-links {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem;
    }

    .top-links a {
        text-align: center;
        font-size: 0.8rem;
        padding: 0.55rem 0.45rem;
        border-radius: 10px;
        min-height: 42px;
        display: grid;
        place-items: center;
    }

    .container {
        width: 96%;
        margin: 0.7rem auto 1.2rem;
    }

    .card {
        padding: 0.8rem;
        border-radius: 12px;
        margin-bottom: 0.8rem;
    }

    .retailer-mini-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .retailer-mini-card {
        gap: 0.65rem;
        padding: 0.85rem;
    }

    .retailer-mini-head {
        gap: 0.55rem;
    }

    .retailer-rank {
        min-width: 38px;
        height: 38px;
        font-size: 0.86rem;
    }

    .retailer-mini-name {
        font-size: 0.96rem;
    }

    .retailer-mini-sub {
        font-size: 0.82rem;
        word-break: break-word;
    }

    .retailer-mini-metrics {
        gap: 0.35rem;
    }

    .retailer-score {
        font-size: 0.78rem;
    }

    h2 {
        font-size: 1.2rem;
        line-height: 1.25;
    }

    .eyebrow {
        font-size: 0.68rem;
    }

    .muted {
        font-size: 0.84rem;
    }

    .inline-form {
        width: 100%;
        gap: 0.5rem;
    }

    .inline-form input,
    .inline-form select,
    .inline-form textarea,
    .inline-form button {
        width: 100%;
        min-height: 44px;
    }

    .chat-file-btn {
        width: 100%;
        min-height: 44px;
    }

    .chat-image {
        max-width: 100%;
        max-height: 240px;
    }

    .chat-item {
        max-width: 92%;
    }

    .chat-item header {
        font-size: 0.76rem;
    }

    .chat-time {
        font-size: 0.68rem;
    }

    .grid-form,
    .grid-two,
    .split {
        grid-template-columns: 1fr !important;
        gap: 0.65rem;
    }

    label {
        font-size: 0.86rem;
    }

    input,
    select,
    textarea,
    button {
        min-height: 44px;
        font-size: 16px;
    }

    .table-wrap {
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        background: #fff;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 560px;
    }

    th,
    td {
        padding: 0.5rem;
        font-size: 0.82rem;
    }

    .chip {
        font-size: 0.72rem;
        padding: 0.16rem 0.44rem;
    }

    .actions {
        gap: 0.3rem;
    }

    .product-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
        gap: 0.7rem;
    }

    .product-card {
        padding: 0.6rem;
    }

    .product-media {
        aspect-ratio: 16 / 10;
    }

    .chat-box {
        max-height: 52vh;
        padding: 0.55rem;
    }

    .chat-item {
        padding: 0.5rem;
        margin-bottom: 0.55rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .stats-grid h3 {
        font-size: 1.35rem;
    }

    .hero {
        margin: 1rem auto;
    }

    .rp-profile-actions {
        gap: 0.5rem;
    }

    .rp-profile-action-link,
    .rp-profile-edit-btn {
        flex: 1 1 calc(50% - 0.5rem);
        text-align: center;
        padding: 0.7rem 0.65rem;
        font-size: 0.8rem;
    }

    /* ── Categories Page Mobile ─────────────────────── */
    .rp-categories-header h1 {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }

    .rp-categories-subtitle {
        font-size: 0.85rem;
    }

    .rp-categories-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .rp-category-card {
        gap: 0.75rem;
        padding: 1rem;
        border-radius: 8px;
    }

    #chatThread {
        padding: 0.75rem;
        border-radius: 14px;
    }

    #chatThread .chat-live-strip {
        position: sticky;
        top: 0;
        z-index: 2;
        background: #ffffff;
        padding: 0.25rem 0;
    }

    #chatThread .chat-box {
        max-height: 58vh;
        background: linear-gradient(180deg, #eef3f8, #f8fbfe);
        border-radius: 14px;
        border-color: #dbe3ec;
    }

    #chatThread .chat-item {
        max-width: 86%;
        border-radius: 15px;
    }

    #chatThread .chat-upload-form {
        position: sticky;
        bottom: 0;
        z-index: 3;
        background: #ffffff;
        border-top: 1px solid #e4e7ec;
        padding-top: 0.6rem;
        margin-top: 0.4rem;
    }

    #chatThread #chatMessageInput {
        border-radius: 14px;
    }

    #chatThread .chat-file-btn,
    #chatThread .chat-upload-form button {
        border-radius: 14px;
    }

    .rp-category-icon {
        font-size: 1.75rem;
        min-width: 40px;
    }

    .rp-category-info h3 {
        font-size: 0.95rem;
    }

    .rp-category-count {
        font-size: 0.8rem;
    }

    .rp-category-arrow {
        font-size: 1rem;
    }

    .rp-categories-empty {
        padding: 3rem 1rem;
    }

    .rp-empty-icon {
        font-size: 3rem;
        margin-bottom: 0.75rem;
    }
}
