/* Admin Dashboard Styles */
:root {
    --admin-sidebar-width: 280px;
    --admin-header-height: 70px;
}

/* Fix overflow issues on mobile */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
    max-width: 100vw;
}

.admin-body {
    overflow-x: hidden;
}

.admin-layout {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    overflow-x: hidden;
    max-width: 100vw;
}

.admin-sidebar {
    width: var(--admin-sidebar-width);
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: var(--white);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
}

.admin-sidebar::-webkit-scrollbar {
    width: 6px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

@media (max-width: 1023px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.active {
        transform: translateX(0);
    }
}

.sidebar-header {
    padding: 1.75rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.sidebar-logo svg {
    width: 36px;
    height: 36px;
    padding: 6px;
    background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
    border-radius: 10px;
}

.sidebar-close {
    display: none;
    padding: 0.5rem;
    color: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    transition: all 0.2s;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

@media (max-width: 1023px) {
    .sidebar-close {
        display: flex;
    }
}

.sidebar-nav {
    padding: 1.25rem 0;
}

.nav-section {
    margin-bottom: 0.5rem;
}

.nav-section-title {
    padding: 0.875rem 1.5rem 0.5rem;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 600;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.5rem;
    color: rgba(255, 255, 255, 0.65);
    transition: all 0.2s ease;
    margin: 0.125rem 0.75rem;
    border-radius: 10px;
    font-weight: 500;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    transform: translateX(4px);
}

.sidebar-link.active {
    background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(26, 86, 219, 0.4);
}

.sidebar-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.85;
}

.sidebar-link.active svg {
    opacity: 1;
}

.sidebar-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: auto;
}

.sidebar-footer-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: all 0.2s;
    font-weight: 500;
}

.sidebar-footer-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-footer-link svg {
    width: 20px;
    height: 20px;
}

.admin-main {
    flex: 1;
    margin-left: var(--admin-sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: calc(100vw - var(--admin-sidebar-width));
    overflow-x: hidden;
}

@media (max-width: 1023px) {
    .admin-main {
        margin-left: 0;
        max-width: 100vw;
        width: 100%;
    }
}

.admin-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: var(--admin-header-height);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    gap: 0.5rem;
    max-width: 100%;
}

@media (min-width: 768px) {
    .admin-header {
        padding: 1rem 2rem;
    }
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .admin-header-left {
        gap: 1.25rem;
    }
}

.sidebar-toggle {
    display: none;
    padding: 0.625rem;
    color: var(--gray-600);
    border-radius: 10px;
    transition: all 0.2s;
}

.sidebar-toggle:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

@media (max-width: 1023px) {
    .sidebar-toggle {
        display: flex;
    }
}

.admin-search {
    position: relative;
    width: 320px;
    flex-shrink: 1;
    min-width: 0;
}

.admin-search input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    font-size: 14px;
    background: var(--gray-50);
    transition: all 0.2s;
}

.admin-search input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(26, 86, 219, 0.1);
}

.admin-search svg {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    width: 18px;
    height: 18px;
}

@media (max-width: 768px) {
    .admin-search {
        display: none;
    }
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.header-icon-btn {
    position: relative;
    padding: 0.5rem;
    color: var(--gray-500);
    border-radius: 10px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.header-icon-btn:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.header-icon-btn svg {
    width: 20px;
    height: 20px;
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid white;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem 0.25rem 0.25rem;
    background: var(--gray-50);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 0.25rem;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .admin-user {
        gap: 0.75rem;
        padding: 0.5rem 1rem 0.5rem 0.5rem;
        margin-left: 0.5rem;
    }
}

.admin-user:hover {
    background: var(--gray-100);
}

.admin-user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .admin-user-avatar {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }
}

.admin-user-info {
    display: none;
}

@media (min-width: 640px) {
    .admin-user-info {
        display: block;
    }
}

.admin-user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-800);
}

.admin-user-role {
    font-size: 12px;
    color: var(--gray-500);
}

.admin-content {
    padding: 2rem;
    flex: 1;
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    .admin-content {
        padding: 1rem;
        width: 100%;
    }
}

/* Page Header */
.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    letter-spacing: -0.5px;
}

@media (min-width: 768px) {
    .page-header {
        margin-bottom: 2rem;
    }

    .page-header h1 {
        font-size: 1.875rem;
        margin-bottom: 0.375rem;
    }
}

.page-header .text-muted {
    color: var(--gray-500);
    font-size: 13px;
}

@media (min-width: 768px) {
    .page-header .text-muted {
        font-size: 15px;
    }
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    background: var(--white);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-wrap: wrap;
}

/* Mobile stat card layout */
@media (max-width: 480px) {
    .stat-card {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 0.75rem;
    }

    .stat-card .stat-icon {
        align-self: center;
    }

    .stat-card .stat-content {
        text-align: center;
    }

    .stat-card .stat-trend {
        justify-content: center;
    }
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, #3b82f6 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 8px 24px rgba(0, 0, 0, 0.08);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1);
}

.stat-icon.bg-primary {
    background: linear-gradient(135deg, rgba(26, 86, 219, 0.15) 0%, rgba(59, 130, 246, 0.15) 100%);
    color: var(--primary);
}

.stat-icon.bg-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(52, 211, 153, 0.15) 100%);
    color: var(--success);
}

.stat-icon.bg-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(251, 191, 36, 0.15) 100%);
    color: var(--warning);
}

.stat-icon.bg-info {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(34, 211, 238, 0.15) 100%);
    color: #0891b2;
}

.stat-icon.bg-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(248, 113, 113, 0.15) 100%);
    color: var(--danger);
}

.stat-icon svg {
    width: 26px;
    height: 26px;
}

.stat-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
    display: block;
    order: 2;
}

.stat-value {
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
    letter-spacing: -0.5px;
    display: block;
    order: 1;
    margin-bottom: 0.25rem;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 13px;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
}

.stat-trend.up {
    color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.stat-trend.down {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.stat-trend svg {
    width: 14px;
    height: 14px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }

    .dashboard-grid .dashboard-card:first-child {
        grid-column: span 1;
    }
}

.dashboard-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(249, 250, 251, 0.5) 0%, transparent 100%);
}

.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
}

.card-body {
    padding: 1.5rem;
}

/* Recent Orders Table */
.table-scroll {
    width: 100%;
    max-width: 100%;
}

@media (max-width: 768px) {
    .table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-scroll .table {
        min-width: 560px;
    }

    .table-scroll .table th,
    .table-scroll .table td {
        white-space: nowrap;
    }
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: var(--gray-50);
    padding: 0.875rem 1rem;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
}

.table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
    color: var(--gray-700);
    font-size: 14px;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr {
    transition: background 0.2s;
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.table tbody td a {
    color: var(--primary);
    font-weight: 600;
}

.table tbody td a:hover {
    text-decoration: underline;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.status-confirmed,
.status-processing {
    background: rgba(26, 86, 219, 0.1);
    color: var(--primary);
}

.status-shipped {
    background: rgba(6, 182, 212, 0.1);
    color: #0891b2;
}

.status-delivered,
.status-completed {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.status-cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* Chart Section */
.chart-placeholder {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-message {
    text-align: center;
    color: var(--gray-400);
}

.chart-message svg {
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.chart-message p {
    font-size: 14px;
}

/* Product List */
.product-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.product-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    background: var(--gray-50);
    border-radius: 12px;
    transition: all 0.2s;
    overflow: hidden;
}

.product-item:hover {
    background: var(--gray-100);
    transform: translateX(4px);
}

.product-item .rank {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.product-item .product-image {
    width: 44px;
    height: 44px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    overflow: hidden;
}

.product-item .product-image img {
    max-width: 36px;
    max-height: 36px;
    object-fit: contain;
}

.product-item .product-image .img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    color: var(--gray-400);
}

.product-item .product-image .img-placeholder svg {
    width: 24px;
    height: 24px;
}

.product-item .product-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.product-item .product-info strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-item .product-info small {
    font-size: 12px;
    color: var(--gray-500);
}

.product-item .product-revenue {
    font-weight: 700;
    color: var(--gray-800);
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Responsive product list for small screens */
@media (max-width: 400px) {
    .product-item {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .product-item .product-image {
        width: 36px;
        height: 36px;
    }

    .product-item .product-image img {
        max-width: 28px;
        max-height: 28px;
    }

    .product-item .product-info {
        flex: 1 1 calc(100% - 80px);
        min-width: 100px;
    }

    .product-item .product-revenue {
        font-size: 13px;
        margin-left: auto;
    }
}

/* Action List */
.action-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 12px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.action-item:hover {
    background: white;
    border-color: var(--gray-200);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.action-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.action-icon.bg-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(251, 191, 36, 0.15) 100%);
    color: #d97706;
}

.action-icon.bg-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(248, 113, 113, 0.15) 100%);
    color: #dc2626;
}

.action-info {
    flex: 1;
}

.action-info strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.125rem;
}

.action-info small {
    font-size: 13px;
    color: var(--gray-500);
}

.action-item>svg {
    color: var(--gray-400);
    flex-shrink: 0;
}

.stock-alert-name {
    font-size: 14px;
    font-weight: 500;
}

.stock-alert-qty {
    font-size: 12px;
    color: var(--danger);
}

/* Admin Tables */
.admin-table-wrapper {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.admin-table-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.admin-table-title {
    font-weight: 600;
}

.admin-table-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-table {
    width: 100%;
}

.admin-table th {
    background: var(--gray-50);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-600);
}

.admin-table td {
    vertical-align: middle;
}

.table-product {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.table-product-image {
    width: 48px;
    height: 48px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-product-image img {
    max-width: 40px;
    max-height: 40px;
    object-fit: contain;
}

.table-product-name {
    font-weight: 500;
}

.table-product-sku {
    font-size: 12px;
    color: var(--gray-500);
}

.table-actions {
    display: flex;
    gap: 0.5rem;
}

.table-action-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    transition: var(--transition);
}

.table-action-btn:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.table-action-btn.edit:hover {
    background: rgba(26, 86, 219, 0.1);
    color: var(--primary);
}

.table-action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Admin Forms */
.admin-form-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 800px;
}

.admin-form-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-100);
}

.admin-form-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.admin-form-body {
    padding: 1.5rem;
}

.admin-form-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--gray-100);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.form-row {
    display: grid;
    gap: 1rem;
}

@media (min-width: 640px) {
    .form-row.two-col {
        grid-template-columns: repeat(2, 1fr);
    }
}

.image-upload {
    border: 2px dashed var(--gray-200);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.image-upload:hover {
    border-color: var(--primary);
    background: rgba(26, 86, 219, 0.02);
}

.image-upload input {
    display: none;
}

.image-upload-icon {
    color: var(--gray-400);
    margin-bottom: 0.75rem;
}

.image-upload-text {
    color: var(--gray-500);
    font-size: 14px;
}

.image-upload-preview {
    max-width: 200px;
    margin: 1rem auto 0;
}

.image-upload-preview img {
    max-width: 100%;
    border-radius: var(--radius);
}

/* Order Detail */
.order-detail-header {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.order-detail-number {
    font-size: 1.5rem;
    font-weight: 600;
}

.order-detail-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .order-detail-grid {
        grid-template-columns: 1fr 360px;
    }
}

.order-info-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.order-info-header {
    padding: 1rem 1.5rem;
    background: var(--gray-50);
    font-weight: 600;
    border-bottom: 1px solid var(--gray-100);
}

.order-info-body {
    padding: 1.5rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--gray-500);
}

.info-value {
    font-weight: 500;
    text-align: right;
}

/* Status Update */
.status-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.status-btn {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-600);
    transition: var(--transition);
}

.status-btn:hover {
    border-color: var(--gray-300);
}

.status-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* Reports Chart */
.chart-container {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
}

/* Settings */
.settings-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.settings-tab {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 500;
    color: var(--gray-600);
    transition: var(--transition);
}

.settings-tab:hover {
    background: var(--gray-100);
}

.settings-tab.active {
    background: var(--primary);
    color: var(--white);
}

/* Delivery List */
.delivery-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.delivery-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.delivery-info {
    flex: 1;
    min-width: 200px;
}

.delivery-order-number {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.delivery-customer {
    color: var(--gray-500);
    font-size: 14px;
}

.delivery-address {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-100);
    font-size: 14px;
    color: var(--gray-600);
}

.delivery-actions {
    display: flex;
    gap: 0.5rem;
}

/* Mobile Admin Overlay */
.admin-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.admin-overlay.active {
    display: block;
}

/* Notifications Page */
.notification-list {
    display: flex;
    flex-direction: column;
}

.notification-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    border-bottom: 1px solid var(--gray-100);
    transition: var(--transition);
}

.notification-item:hover {
    background: var(--gray-50);
}

.notification-item.unread {
    background: rgba(26, 86, 219, 0.02);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon.order {
    background: rgba(26, 86, 219, 0.1);
    color: var(--primary);
}

.notification-icon.alert {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 14px;
    color: var(--gray-500);
}

.notification-time {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 0.5rem;
}

/* WhatsApp Button */
.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #25D366;
    color: var(--white);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.whatsapp-btn:hover {
    background: #128C7E;
    color: var(--white);
}

/* User Dropdown Menu */
.admin-header-right {
    position: relative;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 100;
}

.user-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
}

.user-dropdown-menu .dropdown-item:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.user-dropdown-menu .dropdown-item.text-danger {
    color: var(--danger);
}

.user-dropdown-menu .dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.user-dropdown-menu .dropdown-item svg {
    width: 18px;
    height: 18px;
    color: var(--gray-400);
}

.user-dropdown-menu .dropdown-item.text-danger svg {
    color: var(--danger);
}

.user-dropdown-menu .dropdown-divider {
    height: 1px;
    background: var(--gray-100);
    margin: 0.5rem 0;
}

/* Admin Overlay */
.admin-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    backdrop-filter: blur(4px);
}

.admin-overlay.active {
    display: block;
}

/* Form Select Styling */
.form-select-sm {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 13px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background: white;
    color: var(--gray-700);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 16px;
    transition: all 0.2s;
}

.form-select-sm:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

/* Buttons */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 13px;
    border-radius: 8px;
    font-weight: 500;
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

/* Empty State */
.text-center {
    text-align: center;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .admin-header {
        padding: 1rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-icon {
        width: 48px;
        height: 48px;
    }

    .stat-value {
        font-size: 1.375rem;
    }

    .card-header,
    .card-body {
        padding: 1rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Categories Grid */
.categories-grid {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.category-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 8px 24px rgba(0, 0, 0, 0.08);
}

.category-image {
    width: 100%;
    height: 120px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    background: var(--gray-100);
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    color: var(--gray-400);
}

.category-content {
    flex: 1;
}

.category-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
    word-break: break-word;
}

.category-content .text-muted {
    font-size: 13px;
    color: var(--gray-500);
}

.category-content .description {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 0.5rem;
    line-height: 1.5;
    word-break: break-word;
}

.category-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(26, 86, 219, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 24px;
}

.category-info h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.category-info .description {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 0.5rem;
    line-height: 1.5;
}

.category-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-100);
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--gray-500);
    background: var(--gray-100);
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-icon.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--gray-500);
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-100);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* Form Group */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Alert Messages */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 14px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error,
.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--gray-400);
}

.empty-state svg {
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 15px;
    color: var(--gray-500);
}

/* Page Header with Button */
.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.page-header-left h1 {
    margin-bottom: 0.25rem;
}

/* Buttons Primary */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
    color: white;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(26, 86, 219, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 86, 219, 0.4);
}

.btn-primary svg {
    width: 18px;
    height: 18px;
}

/* User Management Styles */
.user-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-name {
    font-weight: 500;
    color: var(--gray-800);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-primary {
    background: rgba(26, 86, 219, 0.1);
    color: var(--primary);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

/* Admin Form */
.admin-form-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
    max-width: 700px;
}

.admin-form-body {
    padding: 1.5rem;
}

.admin-form-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-100);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.form-row {
    display: grid;
    gap: 1rem;
}

.form-row.two-col {
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .form-row.two-col {
        grid-template-columns: repeat(2, 1fr);
    }
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.text-danger {
    color: var(--danger);
}

.text-muted {
    color: var(--gray-500);
}

small.text-muted {
    font-size: 12px;
    display: block;
    margin-top: 0.25rem;
}

/* Page Header with Back Button */
.page-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-header-left>.btn-icon {
    flex-shrink: 0;
}

/* Status Tabs */
.status-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.25rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    max-width: 100%;
    overflow-x: auto;
}

.status-tabs .tab {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-tabs .tab:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.status-tabs .tab.active {
    background: var(--primary);
    color: white;
}

.status-tabs .tab .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.1);
}

.status-tabs .tab.active .count {
    background: rgba(255, 255, 255, 0.25);
}

.status-tabs .tab .count.warning {
    background: rgba(245, 158, 11, 0.2);
    color: #d97706;
}

.status-tabs .tab .count.info {
    background: rgba(6, 182, 212, 0.2);
    color: #0891b2;
}

.status-tabs .tab .count.success {
    background: rgba(16, 185, 129, 0.2);
    color: #059669;
}

.status-tabs .tab .count.danger {
    background: rgba(239, 68, 68, 0.2);
    color: #dc2626;
}

.status-tabs .tab.active .count.warning,
.status-tabs .tab.active .count.info,
.status-tabs .tab.active .count.success,
.status-tabs .tab.active .count.danger {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    max-width: 100%;
}

.filter-search {
    position: relative;
    flex: 1;
    min-width: 0;
    width: 100%;
}

.filter-search svg {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    width: 18px;
    height: 18px;
}

.filter-search input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.25rem;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.2s;
}

.filter-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    width: 100%;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    line-height: 1;
}

.filter-group .form-select {
    padding: 0.5rem 0.625rem;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 13px;
    flex: 1;
    min-width: 0;
    max-width: 100%;
    width: 100%;
}

.filter-group .form-select:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-group .form-input {
    padding: 0.5rem 0.625rem;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 13px;
    flex: 1;
    min-width: 0;
    max-width: 100%;
}

.filter-group .form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-group .btn {
    flex-shrink: 0;
}

/* Data Card */
.data-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}

.data-card .table {
    margin: 0;
}

/* Customer Cell */
.customer-cell {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.customer-cell strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}

.customer-cell small {
    font-size: 12px;
    color: var(--gray-500);
}

/* Order Link */
.order-link {
    color: var(--primary);
    text-decoration: none;
}

.order-link:hover {
    text-decoration: underline;
}

/* Payment Badge */
.payment-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
}

.payment-unpaid,
.payment-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.payment-paid {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.payment-refunded,
.payment-failed {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.375rem;
    align-items: center;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: var(--gray-100);
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.btn-icon.btn-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.btn-icon.btn-success:hover {
    background: rgba(16, 185, 129, 0.2);
}

/* Table Responsive */
@media (max-width: 768px) {
    .status-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-search {
        min-width: 100%;
    }

    .filter-group {
        width: 100%;
        justify-content: stretch;
    }

    .filter-group .form-input {
        flex: 1;
        min-width: 0;
    }

    .filter-group .form-select {
        flex: 1 1 100%;
        width: 100%;
    }

    .data-card {
        overflow-x: auto;
    }

    .data-card .table {
        min-width: 700px;
    }

    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
        font-size: 13px;
    }
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.75rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    transition: all 0.2s;
}

.page-link:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.page-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.open {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-800);
}

.modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--gray-500);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-100);
    background: var(--gray-50);
}

/* Form Group */
.form-group {
    margin-bottom: 1rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}

.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    font-size: 14px;
    background: var(--white);
    transition: all 0.2s;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

/* ========================================
   MOBILE RESPONSIVE ORDERS
   ======================================== */

/* Show/Hide based on screen size */
.orders-mobile {
    display: none;
}

.orders-desktop {
    display: block;
}

@media (max-width: 768px) {
    .orders-mobile {
        display: block;
    }

    .orders-desktop {
        display: none;
    }
}

/* Order Card for Mobile */
.order-card {
    background: var(--white);
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
    gap: 0.5rem;
}

.order-card-header .order-number {
    font-weight: 700;
    color: var(--primary);
    font-size: 13px;
    word-break: break-all;
}

.order-card-body {
    padding: 0.75rem 1rem;
}

.order-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-100);
    gap: 0.5rem;
}

.order-info-row:last-child {
    border-bottom: none;
}

.order-info-row .label {
    font-size: 12px;
    color: var(--gray-500);
    flex-shrink: 0;
}

.order-info-row .value {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-800);
    text-align: right;
    word-break: break-word;
}

.order-info-row .value.total {
    font-weight: 700;
    color: var(--primary);
}

.order-card-footer {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
    flex-wrap: wrap;
}

.order-card-footer .btn {
    flex: 1;
    min-width: 80px;
    justify-content: center;
    font-size: 12px;
    padding: 0.5rem 0.5rem;
    display: inline-flex;
    align-items: center;
}

.order-card-footer .btn svg {
    margin-right: 0.25rem;
    flex-shrink: 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--white);
    border-radius: 12px;
}

/* Mobile Status Tabs improvements */
@media (max-width: 768px) {
    .status-tabs {
        padding: 0.5rem;
        gap: 0.375rem;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .status-tabs::-webkit-scrollbar {
        display: none;
    }

    .status-tabs .tab {
        padding: 0.5rem 0.75rem;
        font-size: 13px;
        flex-shrink: 0;
    }

    .status-tabs .tab .count {
        min-width: 18px;
        height: 18px;
        font-size: 10px;
    }

    /* Filter bar mobile */
    .filter-bar {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .filter-search {
        width: 100%;
        min-width: 0;
    }

    .filter-search input {
        padding: 0.625rem 1rem 0.625rem 2.5rem;
        font-size: 14px;
    }

    .filter-group {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }

    .filter-group .form-input,
    .filter-group .form-select {
        min-width: 0;
        width: 100%;
        padding: 0.625rem 0.75rem;
        font-size: 14px;
    }

    /* Page header mobile */
    .page-header {
        margin-bottom: 1rem;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .page-header .text-muted {
        font-size: 13px;
    }
}

/* Extra small screens */
@media (max-width: 400px) {
    .order-card-footer {
        flex-direction: column;
    }

    .order-card-footer .btn {
        width: 100%;
    }

    .status-tabs .tab {
        padding: 0.5rem 0.625rem;
        font-size: 12px;
    }
}

/* ========================================
   Categories Page Mobile Responsive
   ======================================== */

/* Mobile categories adjustments */
@media (max-width: 767px) {
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .category-card {
        padding: 1rem;
        border-radius: 12px;
    }

    .category-image {
        height: 100px;
        border-radius: 10px;
    }

    .category-placeholder svg {
        width: 36px;
        height: 36px;
    }

    .category-content h3 {
        font-size: 0.9375rem;
    }

    .category-content .description {
        font-size: 12px;
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .category-actions {
        padding-top: 0.75rem;
        gap: 0.375rem;
    }

    .category-actions .btn-icon {
        width: 32px;
        height: 32px;
    }

    .category-actions .btn-icon svg {
        width: 14px;
        height: 14px;
    }
}

/* Modal mobile */
@media (max-width: 576px) {
    .modal {
        padding: 0.5rem;
        align-items: flex-end;
    }

    .modal-content {
        max-width: 100%;
        max-height: 85vh;
        border-radius: 16px 16px 0 0;
        margin-bottom: 0;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-header h3 {
        font-size: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        padding: 0.75rem 1rem;
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }

    .image-upload-small {
        flex-direction: column;
        align-items: stretch;
    }

    .image-upload-small .preview {
        width: 100%;
        height: 120px;
    }

    .image-upload-small .btn {
        width: 100%;
    }
}

/* Two column grid for tablets */
@media (min-width: 480px) and (max-width: 767px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .category-card {
        padding: 0.875rem;
    }

    .category-image {
        height: 80px;
    }

    .category-content h3 {
        font-size: 0.875rem;
    }

    .category-content .text-muted {
        font-size: 12px;
    }
}

/* Page header mobile for categories */
@media (max-width: 480px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .page-header .btn {
        width: 100%;
        justify-content: center;
    }

    .page-header-left h1 {
        font-size: 1.25rem;
    }
}