.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.06));
    z-index: 500;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

@media (max-width: 767px) {
    .bottom-nav {
        display: flex;
        align-items: stretch;
        justify-content: space-around;
    }
}

.bnav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 0.2rem;
    color: var(--gray-400);
    text-decoration: none;
    padding: 0.5rem 0.25rem;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: color 0.15s;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    position: relative;
}

.bnav-item i {
    font-size: 1.25rem;
    line-height: 1;
    transition: transform 0.2s;
}

.bnav-item.active {
    color: var(--primary);
    background: transparent;
    position: relative;
}

.bnav-item.active::after {
    content: "";
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--primary);
}

.bnav-item.active i {
    transform: scale(1.06);
}

.bnav-item:active {
    opacity: 0.7;
}

.bnav-badge {
    position: absolute;
    top: 6px;
    left: calc(50% + 6px);
    background: var(--primary);
    color: var(--white);
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
}

@media (max-width: 767px) {
    .btn,
    .btn-sm,
    a.btn {
        min-height: 44px;
        padding: 0.6rem 1rem;
    }

    .btn-icon {
        min-width: 44px;
        min-height: 44px;
    }

    .pagination a,
    .pagination span {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .nav-item {
        min-height: 48px;
        padding: 0.875rem 1.375rem;
    }
}

@media (max-width: 767px) {
    .filter-trigger {
        display: inline-flex !important;
        align-items: center;
        gap: 0.4rem;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .list-table .table-responsive {
        overflow: visible;
        margin: 0;
    }

    .table-wrap-desktop {
        overflow-x: auto;
        margin: 0 -1rem;
    }

    .table-wrap-desktop .table {
        min-width: 600px;
    }

    .list-table {
        display: none !important;
    }

    .list-cards {
        display: block !important;
    }
}

.filter-trigger {
    display: none;
}

@media (min-width: 768px) {
    .list-cards {
        display: none !important;
    }

    .list-table {
        display: block !important;
    }
}

.list-cards {
    display: none;
    margin: 0;
}

.list-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.list-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-100);
}

.list-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gray-900);
}

.list-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.875rem;
    font-size: 0.8375rem;
    color: var(--gray-600);
    margin-bottom: 0.75rem;
}

.list-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.list-card-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.list-card-actions .btn {
    flex: 1;
    min-width: 44px;
    justify-content: center;
}

@media (max-width: 767px) {
    .product-listing-body .list-cards {
        margin: 0;
        padding: 0.5rem 0;
    }

    .product-listing-body .list-card {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }

    .product-listing-body .list-card-header {
        align-items: center;
        gap: 0.75rem;
    }

    .product-listing-body .list-card-header > div:first-child {
        flex: 1;
        min-width: 0;
    }

    .product-listing-body .list-card-header > div:last-child {
        flex-shrink: 0;
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem;
        justify-content: flex-end;
    }

    .product-listing-body .list-card-meta {
        margin-bottom: 0.75rem;
    }

    .product-listing-body .list-card-actions {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: stretch;
    }

    .product-listing-body .list-card-actions .btn {
        flex: 1 1 0;
        min-width: 0;
        justify-content: center;
    }
}

.filters-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.14);
    z-index: 1050;
    max-height: 85vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (max-width: 767px) {
    .filters-sheet.active {
        transform: translateY(0);
    }
}

@media (min-width: 768px) {
    .filters-sheet {
        position: static;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        max-height: none;
    }

    .filters-sheet .filters-sheet-header {
        display: none;
    }
}

.filters-sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 1;
}

.filters-sheet-body {
    padding: 1.25rem;
}

.filters-sheet-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--gray-200);
    position: sticky;
    bottom: 0;
    background: var(--white);
    display: flex;
    gap: 0.75rem;
}

.filters-sheet-footer .btn {
    flex: 1;
}

.filter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1040;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.filter-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

@media (min-width: 769px) {
    .filter-trigger,
    .filter-overlay {
        display: none !important;
    }

    .filters-inline {
        display: flex !important;
    }
}

@media (min-width: 769px) {
    #reportFilterTrigger {
        display: none !important;
    }

    .report-filters-sheet {
        position: static !important;
        transform: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        max-height: none !important;
    }

    .report-filters-sheet .filters-sheet-header {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .report-filters-sheet {
        padding: 0;
    }

    .report-filters-sheet .report-filters {
        padding: 1.25rem;
    }

    .report-filter-row {
        flex-direction: column;
    }

    .report-filter-group {
        width: 100%;
    }

    .report-filter-actions {
        position: sticky;
        bottom: 0;
        padding-top: 1rem;
        margin-top: 1rem;
        border-top: 1px solid var(--gray-200);
        background: var(--white);
    }
}

@media (max-width: 767px) {
    .order-status-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

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

@media (max-width: 480px) {
    .order-status-grid {
        grid-template-columns: 1fr !important;
    }
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 200;
}

.sticky-bottom-bar {
    display: none;
}

@media (max-width: 767px) {
    .sticky-bottom-bar {
        display: flex;
        position: fixed;
        bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
        left: 0;
        right: 0;
        background: var(--white);
        padding: 0.875rem 1rem;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
        z-index: 90;
        gap: 0.75rem;
    }

    .sticky-bottom-bar .btn {
        flex: 1;
    }
}

@media (max-width: 767px) {
    .topbar:has(.page-title-actions) {
        height: auto;
        padding: 10px 0.75rem 10px;
    }

    .topbar:has(.page-title-actions) .topbar-actions {
        align-self: center;
    }

    .topbar:has(.page-title-actions) .topbar-title-inner {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 0.5rem;
        min-width: 0;
    }

    .page-title-actions {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        flex-shrink: 0;
    }

    .page-title-actions .page-title-buttons {
        flex-direction: row;
        gap: 0.35rem;
        flex-wrap: nowrap;
    }

    .page-title-actions .page-title-buttons .btn {
        flex: 0 0 auto;
        justify-content: center;
        min-width: unset;
        padding: 0.35rem 0.5rem;
        font-size: 0.75rem;
    }

    .order-items-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1rem;
    }

    .order-items-table-wrap .table {
        min-width: 400px;
    }
}

@media (max-width: 767px) {
    .report-summary-cards {
        grid-template-columns: 1fr !important;
    }

    .report-table-wrap {
        overflow: visible;
    }

    .report-table-wrap .report-table {
        display: block;
        width: 100%;
    }

    .report-table-wrap thead {
        display: none;
    }

    .report-table-wrap tbody tr {
        display: block;
        background: var(--white);
        border: 1px solid var(--gray-200);
        border-radius: var(--radius-lg);
        padding: 1rem;
        margin-bottom: 0.75rem;
        box-shadow: var(--shadow-sm);
    }

    .report-table-wrap tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 0;
        border: none;
        flex-wrap: wrap;
    }

    .report-table-wrap tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--gray-600);
        font-size: 0.75rem;
        flex-shrink: 0;
        margin-right: 0.5rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

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

@media (max-width: 767px) {
    .reviews-admin-page .reviews-filters {
        display: flex !important;
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1.25rem;
    }

    .reviews-admin-page .reviews-filters .search-box,
    .reviews-admin-page .reviews-filters .filter-group {
        width: 100%;
        min-width: 0;
        flex: none;
    }

    .reviews-admin-page .reviews-filters .search-box input,
    .reviews-admin-page .reviews-filters .form-control {
        width: 100%;
        min-height: 44px;
        box-sizing: border-box;
    }

    .reviews-admin-page .reviews-filters .btn-primary {
        width: 100%;
        min-height: 44px;
    }

    .reviews-admin-page .reviews-bulk-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .reviews-admin-page .reviews-action-select {
        width: 100%;
        max-width: none;
        min-height: 44px;
    }

    .reviews-admin-page .reviews-apply-btn {
        width: 100%;
        min-height: 44px;
    }

    .reviews-admin-page .reviews-count-text {
        text-align: center;
        display: block;
    }

    .reviews-admin-page .reviews-table-wrap {
        overflow: visible;
        margin: 0;
    }

    .reviews-admin-page .reviews-table-wrap .reviews-table {
        display: block;
        min-width: 0;
    }

    .reviews-admin-page .reviews-table-wrap .reviews-table thead {
        display: none;
    }

    .reviews-admin-page .reviews-table-wrap .reviews-table tbody tr {
        display: block;
        background: var(--white);
        border: 1px solid var(--gray-200);
        border-radius: var(--radius-lg);
        padding: 1rem;
        margin-bottom: 0.75rem;
        box-shadow: var(--shadow-sm);
    }

    .reviews-admin-page .reviews-table-wrap .reviews-table tbody tr:hover {
        background: var(--white);
    }

    .reviews-admin-page .reviews-table-wrap .reviews-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.6rem 0;
        border: none;
        border-bottom: 1px solid var(--gray-100);
    }

    .reviews-admin-page .reviews-table-wrap .reviews-table tbody td:last-child {
        border-bottom: none;
    }

    .reviews-admin-page .reviews-table-wrap .reviews-table tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--gray-500);
        font-size: 0.75rem;
        flex-shrink: 0;
        min-width: 80px;
        text-transform: uppercase;
        letter-spacing: 0.03em;
    }

    .reviews-admin-page .reviews-table-wrap .reviews-table tbody tr {
        overflow: hidden;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .reviews-admin-page .reviews-table-wrap .reviews-table tbody td {
        max-width: 100%;
        overflow: hidden;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .reviews-admin-page .reviews-table-wrap .reviews-table tbody tr td[colspan] {
        display: block;
        padding: 2rem 1rem;
        text-align: center;
        border: none;
    }

    .reviews-admin-page .reviews-table-wrap .reviews-table tbody tr td[colspan]::before {
        display: none;
    }
}

@media (max-width: 767px) {
    .message-card .card-body > div:first-child {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 767px) {
    .form-section {
        padding: 1.25rem !important;
    }
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
    @media (max-width: 767px) {
        .content-area {
            padding-bottom: calc(var(--bottom-nav-height) + 1.5rem + env(safe-area-inset-bottom));
        }
    }
}
