/* ============================================
       ADMIN PANEL - ENHANCED VISUAL STYLES
       (Fully Responsive - No Content Cut Off)
       ============================================ */

/* Base Layout */
.admin-panel {
    padding: 30px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Container for better responsiveness */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* ========== HEADER ========== */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
    background: white;
    padding: 25px 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
}

.admin-header h1 {
    font-size: 32px;
    color: #1a1a2e;
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.5px;
    word-break: break-word;
}

.admin-header .subtitle {
    color: #6c757d;
    font-size: 14px;
    margin-top: 5px;
    font-weight: 400;
}

.admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ========== BUTTONS ========== */
.btn-primary {
    background: linear-gradient(135deg, #b8865b, #a0734d);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(184, 134, 91, 0.25);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #a0734d, #8a6240);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(184, 134, 91, 0.35);
    color: white;
    text-decoration: none;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary.purple {
    background: linear-gradient(135deg, #6f42c1, #5a32a3);
    box-shadow: 0 4px 15px rgba(111, 66, 193, 0.25);
}

.btn-primary.purple:hover {
    background: linear-gradient(135deg, #5a32a3, #4a2788);
    box-shadow: 0 6px 20px rgba(111, 66, 193, 0.35);
}

.btn-primary.green {
    background: linear-gradient(135deg, #28a745, #218838);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.25);
}

.btn-primary.green:hover {
    background: linear-gradient(135deg, #218838, #1a6e2d);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.35);
}

.btn-primary.order-btn {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.25);
}

.btn-primary.order-btn:hover {
    background: linear-gradient(135deg, #27ae60, #1e8449);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.35);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
    color: white;
    text-decoration: none;
}

/* ========== QUICK ACCESS TABS ========== */
.quick-access {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    background: white;
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
    align-items: center;
}

.quick-access .label {
    font-size: 13px;
    color: #6c757d;
    font-weight: 600;
    margin-right: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-access .tab-link {
    padding: 6px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.quick-access .tab-link.active {
    background: #b8865b;
    color: white;
}

.quick-access .tab-link:not(.active) {
    background: #f8f9fa;
    color: #495057;
}

.quick-access .tab-link:not(.active):hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.quick-access .tab-link.purple-tab.active {
    background: #6f42c1;
}

.quick-access .tab-link.green-tab.active {
    background: #28a745;
}

/* ========== STATISTICS CARDS ========== */
.stats-cards {
    margin-bottom: 25px;
}

.stats-row {
    display: grid;
    gap: 15px;
    margin-bottom: 15px;
}

.stats-row.quick-stats {
    grid-template-columns: repeat(6, 1fr);
}

.stats-row.extended-stats {
    grid-template-columns: 1fr 1fr;
}

.stat-card {
    background: white;
    padding: 18px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    min-width: 0;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border-color: #b8865b;
}

.stat-card.extended {
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
}

.stat-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-numbers {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.stat-count {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a2e;
}

.stat-amount {
    font-size: 16px;
    font-weight: 600;
    color: #b8865b;
}

/* Quick Stats */
.quick-stat {
    background: white;
    padding: 14px 16px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
    text-align: center;
    transition: all 0.3s ease;
    overflow: hidden;
}

.quick-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.qs-number {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    display: block;
    word-wrap: break-word;
}

.qs-label {
    font-size: 11px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    word-wrap: break-word;
}

/* Extended Stats */
.stat-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f1f3f5;
}

.top-products-list,
.recent-orders-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.top-product-item,
.recent-order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid #f8f9fa;
    gap: 8px;
    flex-wrap: wrap;
}

.top-product-item:last-child,
.recent-order-item:last-child {
    border-bottom: none;
}

.product-name {
    color: #1a1a2e;
    font-weight: 500;
    word-break: break-word;
}

.product-sales {
    color: #28a745;
    font-weight: 600;
    white-space: nowrap;
}

.product-revenue {
    color: #b8865b;
    font-weight: 600;
    white-space: nowrap;
}

.order-id {
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
}

.order-user {
    color: #6c757d;
    font-size: 12px;
    word-break: break-word;
}

.order-amount {
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
}

.order-status {
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.order-status.status-completed {
    background: #d4edda;
    color: #155724;
}

.order-status.status-pending {
    background: #fff3cd;
    color: #856404;
}

.order-status.status-processing {
    background: #d1ecf1;
    color: #0c5460;
}

.order-status.status-failed {
    background: #f8d7da;
    color: #721c24;
}

/* ========== TODAY'S PRODUCTS SECTION ========== */
.today-products-section {
    margin-bottom: 25px;
}

.today-product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 8px;
    border-bottom: 1px solid #f1f3f5;
    transition: all 0.2s ease;
    border-radius: 8px;
    cursor: default;
    gap: 10px;
    flex-wrap: wrap;
}

.today-product-item:hover {
    background: #f8f9fa;
    transform: translateX(4px);
}

.today-order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 6px;
    border-bottom: 1px solid #f8f9fa;
    transition: all 0.2s ease;
    border-radius: 8px;
    cursor: default;
    gap: 10px;
    flex-wrap: wrap;
}

.today-order-item:hover {
    background: #f8f9fa;
    transform: translateX(4px);
}

/* Scrollbar styling */
.today-products-section div[style*="max-height"]::-webkit-scrollbar {
    width: 4px;
}

.today-products-section div[style*="max-height"]::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 10px;
}

.today-products-section div[style*="max-height"]::-webkit-scrollbar-thumb {
    background: #b8865b;
    border-radius: 10px;
}

/* ========== FILTER BAR ========== */
.filter-bar {
    background: white;
    padding: 20px 24px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    margin-bottom: 25px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    border: 1px solid rgba(0,0,0,0.04);
}

.filter-bar select,
.filter-bar input {
    padding: 10px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 14px;
    background: #f8f9fa;
    min-width: 150px;
    transition: all 0.3s ease;
    color: #1a1a2e;
    flex: 1;
    min-width: 120px;
    max-width: 100%;
}

.filter-bar select:focus,
.filter-bar input:focus {
    outline: none;
    border-color: #b8865b;
    box-shadow: 0 0 0 4px rgba(184, 134, 91, 0.1);
    background: white;
}

.filter-bar .filter-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
    flex-wrap: wrap;
}

/* ========== TABLE ========== */
.products-table-wrapper {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.products-table thead {
    background: linear-gradient(135deg, #f8f9fa, #f1f3f5);
    border-bottom: 2px solid #e9ecef;
}

.products-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 700;
    color: #495057;
    border-bottom: 2px solid #e9ecef;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f8f9fa;
    white-space: nowrap;
}

.products-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f1f3f5;
    vertical-align: middle;
    font-size: 14px;
    background: white;
    transition: background 0.2s ease;
    word-break: break-word;
}

.products-table tbody tr {
    transition: all 0.2s ease;
}

.products-table tbody tr:hover {
    background: #f8f9fa;
}

.products-table tbody tr:hover td {
    background: #f8f9fa;
}

.products-table tbody tr:last-child td {
    border-bottom: none;
}

/* ========== PRODUCT THUMBNAIL ========== */
.product-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 12px;
    border: 2px solid #f1f3f5;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.product-thumbnail:hover {
    transform: scale(1.05);
    border-color: #b8865b;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* ========== PRODUCT NAME CELL ========== */
.product-name-cell {
    font-weight: 600;
    color: #1a1a2e;
    word-break: break-word;
}

.product-name-cell small {
    display: block;
    font-weight: 400;
    color: #6c757d;
    font-size: 12px;
    margin-top: 3px;
    word-break: break-word;
}

.product-name-cell small:first-of-type {
    color: #868e96;
    font-size: 11px;
    font-weight: 500;
}

/* ========== BADGES ========== */
.badge-status {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-active {
    background: #d4edda;
    color: #155724;
}

.badge-inactive {
    background: #f8d7da;
    color: #721c24;
}

.badge-premium {
    background: #fff3cd;
    color: #856404;
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    display: inline-block;
    margin: 2px;
    white-space: nowrap;
}

.badge-bestseller {
    background: #d1ecf1;
    color: #0c5460;
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    display: inline-block;
    margin: 2px;
    white-space: nowrap;
}

.badge-new {
    background: #d6d8db;
    color: #383d41;
    font-size: 10px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    display: inline-block;
    margin: 2px;
    white-space: nowrap;
}

/* ========== ACTION BUTTONS ========== */
.action-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.action-buttons .action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    line-height: 1;
    border: none;
    cursor: pointer;
    min-width: 36px;
    min-height: 36px;
}

.action-buttons .edit-link {
    background: #e3f2fd;
    color: #1565c0;
}

.action-buttons .edit-link:hover {
    background: #1565c0;
    color: white;
    transform: scale(1.1);
    text-decoration: none;
}

.action-buttons .delete-btn {
    background: #fce4ec;
    color: #c62828;
}

.action-buttons .delete-btn:hover {
    background: #c62828;
    color: white;
    transform: scale(1.1);
}

.action-buttons .toggle-btn {
    background: #fff3e0;
    color: #e65100;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    line-height: 1;
}

.action-buttons .toggle-btn:hover {
    background: #e65100;
    color: white;
    transform: scale(1.1);
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 20px 0 25px;
    flex-wrap: wrap;
}

.pagination .page-link {
    padding: 8px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    background: white;
    font-size: 14px;
    white-space: nowrap;
}

.pagination .page-link:hover {
    background: #b8865b;
    color: white;
    border-color: #b8865b;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(184, 134, 91, 0.3);
}

.pagination .page-link.active {
    background: #b8865b;
    color: white;
    border-color: #b8865b;
    box-shadow: 0 4px 15px rgba(184, 134, 91, 0.3);
}

/* ========== MODAL ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.modal-overlay.show {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    margin: 0 auto;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #b8865b;
    border-radius: 10px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f3f5;
    gap: 15px;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    color: #1a1a2e;
    font-weight: 700;
    word-break: break-word;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6c757d;
    transition: all 0.3s ease;
    padding: 0 8px;
    border-radius: 8px;
    line-height: 1;
    flex-shrink: 0;
}

.modal-close:hover {
    color: #1a1a2e;
    background: #f1f3f5;
    transform: rotate(90deg);
}

/* ========== FORM ELEMENTS ========== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #1a1a2e;
    font-size: 13px;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #1a1a2e;
    box-sizing: border-box;
    max-width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #b8865b;
    box-shadow: 0 0 0 4px rgba(184, 134, 91, 0.1);
    background: white;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* ========== CHECKBOXES ========== */
.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s ease;
    cursor: pointer;
}

.form-check:hover {
    background: #f8f9fa;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    border-radius: 4px;
    accent-color: #b8865b;
    flex-shrink: 0;
}

.form-check label {
    margin: 0;
    cursor: pointer;
    font-weight: 400;
    color: #495057;
    word-break: break-word;
}

/* ========== MODAL FOOTER ========== */
.modal-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #f1f3f5;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state .icon {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.6;
}

.empty-state h3 {
    color: #1a1a2e;
    margin-bottom: 10px;
    font-size: 22px;
}

.empty-state p {
    font-size: 15px;
    word-break: break-word;
}

/* ========== IMAGE PREVIEW ========== */
#currentImagePreview img {
    max-width: 150px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    height: auto;
}

#currentImagePreview img:hover {
    transform: scale(1.05);
    border-color: #b8865b;
}

#currentImagePreview p {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
    word-break: break-word;
}

/* ========== SECTION HEADER ========== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

/* ========== RESPONSIVE ========== */
/* Large screens - 1200px and above */
@media (min-width: 1200px) {
    .stats-row {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Medium-large screens - 992px to 1199px */
@media (max-width: 1199px) and (min-width: 992px) {
    .stats-row {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablet - 768px to 991px */
@media (max-width: 991px) {
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 20px 24px;
    }

    .admin-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .admin-actions .btn-primary {
        flex: 1;
        justify-content: center;
        min-width: 120px;
    }

    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-row.quick-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stats-row.extended-stats {
        grid-template-columns: 1fr;
    }
    
    /* Today's products responsive */
    .today-products-section > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}

/* Small tablets and large phones - 576px to 767px */
@media (max-width: 767px) {
    .admin-panel {
        padding: 16px 0;
    }

    .admin-container {
        padding: 0 12px;
    }

    .admin-header h1 {
        font-size: 24px;
    }

    .admin-actions {
        flex-direction: column;
        width: 100%;
    }

    .admin-actions .btn-primary {
        width: 100%;
        justify-content: center;
        white-space: normal;
        padding: 10px 16px;
    }

    .quick-access {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px;
    }

    .quick-access .tab-link {
        text-align: center;
        justify-content: center;
        white-space: normal;
        padding: 8px 12px;
    }

    .filter-bar {
        flex-direction: column;
        padding: 16px 18px;
    }

    .filter-bar select,
    .filter-bar input {
        width: 100%;
        min-width: unset;
        max-width: 100%;
    }

    .filter-bar .filter-actions {
        width: 100%;
        margin-left: 0;
        flex-direction: row;
    }

    .filter-bar .filter-actions button {
        flex: 1;
        text-align: center;
    }

    .products-table-wrapper {
        border-radius: 12px;
        overflow-x: auto;
    }

    .products-table {
        min-width: 600px;
        width: 100%;
    }

    .products-table th,
    .products-table td {
        padding: 12px 14px;
        font-size: 13px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 20px;
        margin: 10px;
        border-radius: 16px;
    }

    .modal-header h2 {
        font-size: 20px;
    }

    .modal-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .modal-footer .btn-secondary,
    .modal-footer .btn-primary {
        width: 100%;
        justify-content: center;
        text-align: center;
        white-space: normal;
    }
    
    /* Today's products mobile */
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .today-product-item {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .today-product-item > div:first-child {
        flex: 1 1 100%;
    }
    
    .today-order-item {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .today-order-item > div:first-child {
        flex: 1 1 100%;
    }

    .stats-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .stats-row.quick-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-row.extended-stats {
        grid-template-columns: 1fr;
    }
}

/* Mobile phones - 575px and below */
@media (max-width: 575px) {
    .admin-container {
        padding: 0 8px;
    }

    .admin-header {
        padding: 16px 14px;
        border-radius: 12px;
    }

    .admin-header h1 {
        font-size: 20px;
    }

    .admin-header .subtitle {
        font-size: 12px;
    }

    .filter-bar {
        padding: 12px 14px;
        border-radius: 10px;
    }

    .filter-bar select,
    .filter-bar input {
        padding: 8px 12px;
        font-size: 13px;
    }

    .products-table th,
    .products-table td {
        padding: 10px 10px;
        font-size: 12px;
    }

    .products-table th {
        font-size: 10px;
        padding: 10px 10px;
    }

    .products-table td {
        font-size: 12px;
    }

    .product-thumbnail {
        width: 40px;
        height: 40px;
        border-radius: 8px;
    }

    .action-buttons .action-link,
    .action-buttons .toggle-btn {
        padding: 4px 8px;
        font-size: 12px;
        min-width: 28px;
        min-height: 28px;
    }

    .modal-content {
        padding: 16px;
        margin: 8px;
        border-radius: 12px;
    }

    .modal-header h2 {
        font-size: 18px;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 8px 12px;
        font-size: 13px;
    }

    .stats-row {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .stats-row.quick-stats {
        grid-template-columns: 1fr 1fr;
    }
    
    .stats-row.extended-stats {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 12px 14px;
        gap: 10px;
    }

    .stat-count {
        font-size: 18px;
    }

    .stat-amount {
        font-size: 13px;
    }

    .qs-number {
        font-size: 16px;
    }

    .qs-label {
        font-size: 9px;
    }

    .stat-icon {
        font-size: 24px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 8px 16px;
        font-size: 13px;
    }

    .badge-status {
        padding: 3px 10px;
        font-size: 10px;
    }

    .pagination .page-link {
        padding: 6px 12px;
        font-size: 12px;
    }

    .quick-access {
        padding: 10px 12px;
    }

    .quick-access .tab-link {
        font-size: 12px;
        padding: 6px 10px;
    }

    .quick-access .label {
        font-size: 11px;
    }

    .today-product-item {
        font-size: 13px;
        padding: 8px 6px;
    }

    .today-order-item {
        font-size: 13px;
        padding: 8px 6px;
    }

    .modal-close {
        font-size: 24px;
    }

    .form-check {
        padding: 6px 10px;
    }

    .form-check label {
        font-size: 13px;
    }

    .stat-card-title {
        font-size: 13px;
    }

    .top-product-item,
    .recent-order-item {
        font-size: 12px;
        padding: 4px 0;
    }

    .order-status {
        font-size: 10px;
        padding: 2px 8px;
    }

    .empty-state {
        padding: 40px 16px;
    }

    .empty-state .icon {
        font-size: 48px;
    }

    .empty-state h3 {
        font-size: 18px;
    }

    .empty-state p {
        font-size: 13px;
    }

    #currentImagePreview img {
        max-width: 100px;
    }

    .products-table {
        min-width: 500px;
    }
}

/* Extra small devices - 400px and below */
@media (max-width: 400px) {
    .admin-container {
        padding: 0 6px;
    }

    .admin-header {
        padding: 12px 10px;
    }

    .admin-header h1 {
        font-size: 18px;
    }

    .admin-actions .btn-primary {
        font-size: 12px;
        padding: 8px 12px;
    }

    .stats-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stats-row.quick-stats {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat-card {
        padding: 10px 12px;
    }

    .stat-count {
        font-size: 16px;
    }

    .stat-amount {
        font-size: 12px;
    }

    .qs-number {
        font-size: 14px;
    }

    .stat-icon {
        font-size: 20px;
    }

    .stat-label {
        font-size: 10px;
    }

    .products-table {
        min-width: 400px;
    }

    .products-table th,
    .products-table td {
        padding: 8px 8px;
        font-size: 11px;
    }

    .product-thumbnail {
        width: 32px;
        height: 32px;
        border-radius: 6px;
    }

    .action-buttons .action-link,
    .action-buttons .toggle-btn {
        padding: 3px 6px;
        font-size: 11px;
        min-width: 24px;
        min-height: 24px;
    }

    .modal-content {
        padding: 12px;
    }

    .modal-header h2 {
        font-size: 16px;
    }

    .modal-header {
        margin-bottom: 16px;
        padding-bottom: 10px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 6px 10px;
        font-size: 12px;
    }

    .btn-primary,
    .btn-secondary {
        font-size: 12px;
        padding: 6px 12px;
    }

    .filter-bar {
        padding: 10px 12px;
    }

    .filter-bar select,
    .filter-bar input {
        padding: 6px 10px;
        font-size: 12px;
    }
}