
@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 1rem;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    }

    .logo-text {
        display: block;
    }

    .nav-links li {
        margin-bottom: 0;
    }

    .nav-links a {
        white-space: nowrap;
    }

    .main-content {
        margin-left: 0;
        padding: 1.5rem;
    }

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

    .top-bar {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .search-box {
        max-width: 100%;
    }

    .user-profile {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 1rem;
    }

    .card {
        padding: 1rem;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-sm {
        width: 100%;
        justify-content: center;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
        color: #e2e8f0;
    }

    .main-content {
        background: #0f172a;
    }

    .card,
    .top-bar {
        background: #1e293b;
        color: #e2e8f0;
    }

    .card-title,
    .stat-info h3 {
        color: #e2e8f0;
    }

    .form-control {
        background: #334155;
        border-color: #475569;
        color: #e2e8f0;
    }

    .form-control::placeholder {
        color: #94a3b8;
    }

    .form-label {
        color: #cbd5e1;
    }

    .data-table {
        background: #1e293b;
        color: #e2e8f0;
    }

    .data-table tbody tr {
        border-color: #334155;
    }

    .data-table tbody tr:hover {
        background-color: #334155;
    }

    .data-table td {
        color: #cbd5e1;
    }

    .search-box input {
        background: #334155;
        border-color: #475569;
        color: #e2e8f0;
    }

    .search-box input::placeholder {
        color: #94a3b8;
    }
}

/* Enhanced Table Responsiveness */
@media (max-width: 1024px) {
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .data-table {
        min-width: 800px;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .store-sidebar {
        width: 100% !important;
        height: auto;
        position: relative;
        padding: 1rem !important;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.2);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .store-logo {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

    .store-logo-text {
        display: none;
    }

    .nav-links li {
        margin-bottom: 0;
    }

    .store-main-content {
        margin-left: 0 !important;
        padding: 1.5rem 1rem !important;
    }

    .search-section {
        padding: 1rem 0 !important;
    }

    .search-box {
        position: relative;
        padding-right: 3rem;
    }

    .search-box input {
        padding-right: 3.5rem;
    }

    .search-box button {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }

    .data-table {
        min-width: 600px;
        margin: 0;
    }

    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }

    .data-table th:first-child,
    .data-table td:first-child {
        padding-left: 1rem;
    }

    .data-table th:last-child,
    .data-table td:last-child {
        padding-right: 1rem;
    }

    .btn-sm {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }

    .btn-sm i {
        margin-right: 0.3rem;
    }

    .pagination {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .pagination button {
        width: 100%;
    }

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

    .card {
        padding: 1rem;
    }

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

    .detail-item {
        padding: 1rem;
        border-radius: 8px;
        background: #f8fafc;
    }

    .detail-label {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .detail-value {
        font-size: 1rem;
        font-weight: 600;
    }
}

@media (max-width: 480px) {
    .store-sidebar {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        width: 100%;
        margin-top: 1rem;
        gap: 0.5rem;
    }

    .store-main-content {
        padding: 1rem !important;
    }

    .search-section {
        padding: 0;
    }

    .search-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .search-section p {
        font-size: 0.9rem;
    }

    .search-box {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .search-box input {
        flex: 1;
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .search-box button {
        padding: 0.75rem;
        min-width: auto;
    }

    /* Hide actions column on very small screens */
    .data-table th:nth-child(7),
    .data-table td:nth-child(7) {
        display: none;
    }

    .data-table {
        min-width: 500px;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    .btn i {
        font-size: 0.85rem;
    }

    .modal-content {
        width: 95% !important;
        padding: 1rem !important;
    }

    .details-grid {
        display: block;
    }

    .detail-item {
        margin-bottom: 0.75rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons button {
        width: 100%;
    }
}