/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #2d3748;
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
    direction: rtl;
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Header --- */
.admin-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: 70px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-logo {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 8px;
    transition: transform 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.1);
}

.header-title {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.hamburger:hover {
    background: rgba(102, 126, 234, 0.1);
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #667eea;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* --- Sidebar --- */
.admin-wrapper {
    display: flex;
    margin-top: 70px;
    min-height: calc(100vh - 70px);
    transition: all 0.3s ease;
}

.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 30px 0;
    position: sticky;
    top: 70px;
    height: calc(100vh - 70px);
    transition: all 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 3px;
}

.sidebar-title {
    font-size: 1.5rem;
    color: #667eea;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    padding: 0 20px;
    position: relative;
}

.sidebar-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.sidebar-btn {
    background: none;
    border: none;
    color: #4a5568;
    font-size: 1rem;
    padding: 16px 25px;
    margin: 0 20px 8px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: right;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.sidebar-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.sidebar-btn:hover::before,
.sidebar-btn.active::before {
    opacity: 1;
}

.sidebar-btn:hover,
.sidebar-btn.active {
    color: white;
    transform: translateX(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.sidebar-btn i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.sidebar-btn:hover i,
.sidebar-btn.active i {
    transform: scale(1.1);
}

.logout-btn {
    margin-top: auto;
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
    font-weight: 600;
    position: relative;
    bottom: 0;
    right: 20px;
    left: 20px;
    box-shadow: 0 4px 20px rgba(229, 62, 62, 0.4);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: linear-gradient(135deg, #c53030 0%, #e53e3e 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(229, 62, 62, 0.6);
}

.logout-btn::before {
    display: none;
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    padding: 40px 30px;
    margin: 20px;
    background: white;
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    overflow-x: hidden;
}

.section {
    display: none;
    animation: fadeInUp 0.6s ease;
}

.section.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* --- Forms --- */
form {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 500px;
    margin: 0 auto 30px auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: all 0.3s ease;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 15px;
    }
}

/* Logo upload styles */
#logo-upload {
    border: 2px dashed rgba(255,255,255,0.3) !important;
    background: rgba(255,255,255,0.1) !important;
    color: white !important;
    transition: all 0.3s ease;
}

#logo-upload:hover {
    border-color: rgba(255,255,255,0.5) !important;
    background: rgba(255,255,255,0.15) !important;
}

#logo-upload:focus {
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3) !important;
}

#logo-preview {
    text-align: center;
    margin-top: 15px;
}

#logo-preview-img {
    max-width: 120px;
    max-height: 120px;
    border-radius: 12px;
    border: 2px solid rgba(255,255,255,0.3);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

#logo-preview-img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

label {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.95rem;
}

input, select, textarea {
    padding: 15px 20px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.8);
    color: #2d3748;
    transition: all 0.3s ease;
    outline: none;
}

input:focus, select:focus, textarea:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

button:hover::before {
    left: 100%;
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

button:active {
    transform: translateY(-1px);
}

/* --- Tables --- */
.table-responsive {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow-x: auto;
    overflow-y: hidden;
    margin-top: 30px;
    transition: all 0.3s ease;
    -webkit-overflow-scrolling: touch;
    /* Ensure scrollbar is always visible on mobile */
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.6) rgba(255, 255, 255, 0.2);
}

/* Table specific styles */
table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
    transition: all 0.3s ease;
}

/* Product table specific styles */
#product-table {
    min-width: 900px;
}

#product-table th,
#product-table td {
    padding: 15px 12px;
    text-align: right;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

/* Product table column styles - ترتیب درست ستون‌ها */
#product-table th:first-child,
#product-table td:first-child {
    min-width: 120px;
    width: 120px;
    text-align: center;
}

#product-table th:nth-child(2),
#product-table td:nth-child(2) {
    min-width: 120px;
    width: 120px;
}

#product-table th:nth-child(3),
#product-table td:nth-child(3) {
    min-width: 120px;
    width: 120px;
}

#product-table th:nth-child(4),
#product-table td:nth-child(4) {
    min-width: 120px;
    width: 120px;
    text-align: center;
}

#product-table th:nth-child(5),
#product-table td:nth-child(5) {
    min-width: 120px;
    width: 120px;
}

#product-table th:nth-child(6),
#product-table td:nth-child(6) {
    min-width: 120px;
    width: 120px;
    text-align: center;
}

#product-table th:nth-child(7),
#product-table td:nth-child(7) {
    min-width: 120px;
    width: 120px;
    text-align: center;
}

#product-table th:last-child,
#product-table td:last-child {
    min-width: 120px;
    width: 120px;
    text-align: center;
}

/* Category table specific styles */
#category-table {
    min-width: 800px;
}

#category-table th,
#category-table td {
    white-space: nowrap;
    padding: 15px 12px;
    text-align: right;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

/* Category table column styles - ترتیب درست ستون‌ها */
#category-table th:first-child,
#category-table td:first-child {
    min-width: 80px;
    width: 80px;
    text-align: center;
}

#category-table th:nth-child(2),
#category-table td:nth-child(2) {
    min-width: 200px;
    width: 200px;
}

#category-table th:nth-child(3),
#category-table td:nth-child(3) {
    min-width: 100px;
    width: 100px;
    text-align: center;
}

#category-table th:nth-child(4),
#category-table td:nth-child(4) {
    min-width: 100px;
    width: 100px;
    text-align: center;
}

#category-table th:nth-child(5),
#category-table td:nth-child(5) {
    min-width: 80px;
    width: 80px;
    text-align: center;
}

#category-table th:nth-child(6),
#category-table td:nth-child(6) {
    min-width: 120px;
    width: 120px;
    text-align: center;
}

#category-table th:last-child,
#category-table td:last-child {
    min-width: 120px;
    width: 120px;
    text-align: center;
}

/* Orderbar table specific styles */
#orderbar-table {
    min-width: 700px;
}

/* Orderbar table column styles - ترتیب درست ستون‌ها */
/* 1: فعال, 2: نام ایتم, 3: موجودی, 4: ظرفیت, 5: جابه‌جایی, 6: عملیات */
#orderbar-table th,
#orderbar-table td {
    white-space: nowrap;
    padding: 15px 12px;
    text-align: right;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

#orderbar-table th:first-child,
#orderbar-table td:first-child {
    min-width: 60px;
    width: 60px;
    text-align: center;
}

#orderbar-table th:nth-child(2),
#orderbar-table td:nth-child(2) {
    min-width: 120px;
    width: 120px;
}

#orderbar-table th:nth-child(3),
#orderbar-table td:nth-child(3) {
    min-width: 80px;
    width: 80px;
    text-align: center;
}

#orderbar-table th:nth-child(4),
#orderbar-table td:nth-child(4) {
    min-width: 100px;
    width: 100px;
    text-align: center;
}

#orderbar-table th:nth-child(5),
#orderbar-table td:nth-child(5) {
    min-width: 100px;
    width: 100px;
    text-align: center;
}

#orderbar-table th:last-child,
#orderbar-table td:last-child {
    min-width: 120px;
    width: 120px;
    text-align: center;
}

/* Ensure horizontal scrollbar is always visible on mobile */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: scroll !important;
        -webkit-overflow-scrolling: touch;
        /* Force scrollbar to be visible */
        scrollbar-width: thin;
        scrollbar-color: rgba(102, 126, 234, 0.6) rgba(255, 255, 255, 0.2);
        /* Add padding to ensure scrollbar is visible */
        padding-bottom: 15px;
    }
    
    .table-responsive::-webkit-scrollbar {
        height: 12px !important;
        background-color: rgba(255, 255, 255, 0.1);
        display: block !important;
    }
    
    .table-responsive::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 6px;
    }
    
    .table-responsive::-webkit-scrollbar-thumb {
        background: rgba(102, 126, 234, 0.6);
        border-radius: 6px;
        border: 2px solid rgba(255, 255, 255, 0.2);
    }
    
    .table-responsive::-webkit-scrollbar-thumb:hover {
        background: rgba(102, 126, 234, 0.8);
    }
    

    
    /* Force table to show horizontal scroll */
    #orderbar-table {
        display: block;
        width: max-content;
        min-width: 700px;
    }
    
    /* Ensure all columns are visible */
    #orderbar-table th,
    #orderbar-table td {
        display: table-cell;
        white-space: nowrap;
    }
}

th, td {
    padding: 18px 20px;
    text-align: right;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

td {
    background: rgba(255, 255, 255, 0.8);
    transition: background 0.3s ease;
}

tr:hover td {
    background: rgba(102, 126, 234, 0.05);
}

tr:last-child td {
    border-bottom: none;
}

/* --- Action Buttons --- */
.action-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    margin: 0 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

/* --- Toggle Switch --- */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #667eea;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-switch:hover .toggle-slider {
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.5);
}

.action-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.delete-btn {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
}

.delete-btn:hover {
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.4);
}

.edit-btn {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
}

.edit-btn:hover {
    box-shadow: 0 4px 15px rgba(56, 161, 105, 0.4);
}

/* --- Status Toggle Buttons --- */
.status-toggle-btn {
    background: none;
    border: 2px solid;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.status-toggle-btn.active {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    border-color: #38a169;
    color: white;
}

.status-toggle-btn.inactive {
    background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
    border-color: #718096;
    color: white;
}

.status-toggle-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* --- Order Controls --- */
.order-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.order-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.order-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.order-btn:active {
    transform: scale(0.95);
}

.order-btn.up-btn {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    box-shadow: 0 2px 8px rgba(56, 161, 105, 0.3);
}

.order-btn.up-btn:hover {
    box-shadow: 0 4px 15px rgba(56, 161, 105, 0.4);
}

.order-btn.down-btn {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.3);
}

.order-btn.down-btn:hover {
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.4);
}

/* --- Status Badges --- */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    min-width: 80px;
    display: inline-block;
}

.status-badge.active {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    color: white;
}

.status-badge.inactive {
    background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
    color: white;
}

/* --- Modals --- */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #ffffff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    margin: auto;
    color: #333;
    font-family: 'Vazir', sans-serif;
}

/* Edit Product Modal Specific Styles */
#edit-product-modal .modal-content {
    max-width: 700px;
    padding: 35px;
}

#edit-product-modal h3 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    text-align: center;
    color: #667eea;
}

#edit-product-modal .form-group {
    margin-bottom: 20px;
}

#edit-product-modal label {
    font-size: 1rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    display: block;
}

#edit-product-modal input,
#edit-product-modal select,
#edit-product-modal textarea {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.9);
    color: #2d3748;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

#edit-product-modal input:focus,
#edit-product-modal select:focus,
#edit-product-modal textarea:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    outline: none;
}

#edit-product-modal button[type="submit"] {
    width: 100%;
    margin-top: 20px;
    padding: 16px 24px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Addon Groups Section in Edit Product */
#edit-addon-groups-section {
    margin: 25px 0;
    padding: 20px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

#edit-addon-groups-section label {
    font-size: 1rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 15px;
    display: block;
}

#edit-addon-groups-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-30px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    z-index: 10001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    transform: scale(1.1);
}

.modal h3 {
    margin: 0 0 25px 0;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.modal .form-group {
    margin-bottom: 20px;
}

.modal label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 0.95rem;
}

.modal input, .modal select, .modal textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #fff;
    color: #333;
}

.modal input:focus, .modal select:focus, .modal textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.modal button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

/* --- Toolbar --- */
.product-toolbar {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
    transition: all 0.3s ease;
}

.product-toolbar select {
    min-width: 200px;
}

/* --- Stats Cards --- */
.snapfood-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
    transition: all 0.3s ease;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.stat-card i {
    font-size: 2.5rem;
    color: #667eea;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
}

.stat-label {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
}

/* --- Control Buttons --- */
.snapfood-controls {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
    transition: all 0.3s ease;
}

.btn-primary, .btn-secondary, .btn-success {
    padding: 15px 30px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    min-width: 200px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    color: white;
}

.btn-primary:hover, .btn-secondary:hover, .btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

/* --- Addon Groups --- */
.addon-group-list {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 20px;
    transition: all 0.3s ease;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.addon-group-item {
    background: rgba(102, 126, 234, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 200px;
}

.addon-group-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.addon-group-item .edit-addon-group-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.addon-group-item .delete-addon-group-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    background: #c0392b !important;
}

.addon-group-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 10px;
    display: block;
}

.addon-options-list {
    margin-top: 15px;
}

.addon-option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.addon-option-item:last-child {
    border-bottom: none;
}

.addon-option-label {
    flex: 1;
}

/* Addon List Styles */
.addon-list {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.addon-add-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px dashed rgba(102, 126, 234, 0.3);
}

.addon-add-form input {
    padding: 8px 12px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
}

.addon-add-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.addon-add-form button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.addon-add-form button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.addon-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.addon-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    margin: 5px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

.addon-list li:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.addon-list li span {
    color: white;
    font-size: 0.95rem;
}

.addon-list li button {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.addon-list li button:hover {
    transform: scale(1.05);
}

.addon-list li button[title="ویرایش گزینه"]:hover {
    background: #2980b9 !important;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.addon-list li button[title="حذف گزینه"]:hover {
    background: #c0392b !important;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.addon-option-price {
    color: #718096;
    font-size: 0.9rem;
    font-weight: 500;
}

/* --- Similarity Badge --- */
.similarity-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    min-width: 60px;
    display: inline-block;
}

/* --- Responsive Design --- */

/* --- Product Addons Button --- */
.product-addons-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.product-addons-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* --- Product Addons Modal --- */
.product-addons-modal .modal-content {
    max-width: 700px;
}

.product-addons-group {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.product-addons-group h4 {
    color: #667eea;
    margin: 0 0 10px 0;
    font-size: 1.1rem;
}

.product-addons-group .group-info {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.product-addons-options {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
}

.product-addons-options strong {
    color: #2d3748;
    display: block;
    margin-bottom: 8px;
}

.product-addons-options ul {
    margin: 10px 0;
    padding-right: 20px;
    list-style: none;
}

.product-addons-options li {
    margin: 5px 0;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.product-addons-options li:last-child {
    border-bottom: none;
}

.product-addons-options .addon-price {
    font-weight: 600;
}

.product-addons-options .addon-price.free {
    color: #718096;
}

.product-addons-options .addon-price.paid {
    color: #38a169;
}

/* Large Tablets and Small Laptops */
@media (max-width: 1200px) {
    .addon-group-list {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
        padding: 20px;
    }
    
    .addon-group-item {
        min-height: 180px;
        padding: 15px;
    }
    
    .addon-option-edit {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
    
    .addon-option-actions {
        flex-wrap: nowrap;
    }
    
    .addon-option-actions button {
        padding: 6px 8px;
        font-size: 0.75rem;
    }
    .sidebar {
        width: 250px;
    }
    
    .main-content {
        padding: 30px 20px;
        margin: 15px;
    }
    
    /* Small Laptop Modal Improvements */
    .modal-content {
        max-width: 80vw;
        padding: 30px 25px;
    }
    
    #edit-product-modal .modal-content {
        max-width: 75vw;
        padding: 35px 30px;
    }
    
    #edit-product-modal h3 {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }
    
    #edit-product-modal .form-group {
        margin-bottom: 20px;
    }
    
    #edit-product-modal label {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    #edit-product-modal input,
    #edit-product-modal select,
    #edit-product-modal textarea {
        padding: 15px 18px;
        font-size: 1rem;
    }
    
    #edit-product-modal button[type="submit"] {
        padding: 16px 24px;
        font-size: 1.1rem;
    }
    
    .snapfood-stats {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* Tablets */
@media (max-width: 900px) {
    .admin-header {
        padding: 0 20px;
        height: 65px;
    }
    
    .header-title {
        font-size: 1.2rem;
    }
    
    .hamburger {
        display: flex;
    }
    
    .sidebar {
        position: fixed;
        top: 65px;
        right: -280px;
        width: 280px;
        height: calc(100vh - 65px);
        z-index: 999;
        transition: right 0.3s ease;
        backdrop-filter: blur(20px);
    }
    
    .sidebar.active {
        right: 0;
    }
    
    .main-content {
        margin: 15px 10px;
        padding: 20px 15px;
        border-radius: 15px;
    }
    
    .section h2 {
        font-size: 1.6rem;
        margin-bottom: 25px;
    }
    
    /* Tablet Modal Improvements */
    .modal {
        padding: 15px;
    }
    
    .modal-content {
        max-width: 90vw;
        padding: 25px 20px;
        max-height: calc(100vh - 30px);
    }
    
    #edit-product-modal .modal-content {
        max-width: 85vw;
        padding: 30px 25px;
    }
    
    #edit-product-modal h3 {
        font-size: 1.4rem;
        margin-bottom: 22px;
    }
    
    #edit-product-modal .form-group {
        margin-bottom: 18px;
    }
    
    #edit-product-modal label {
        font-size: 0.95rem;
        margin-bottom: 7px;
    }
    
    #edit-product-modal input,
    #edit-product-modal select,
    #edit-product-modal textarea {
        padding: 13px 16px;
        font-size: 0.95rem;
    }
    
    #edit-product-modal button[type="submit"] {
        padding: 15px 22px;
        font-size: 1rem;
    }
    
    .snapfood-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .snapfood-controls {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .btn-primary, .btn-secondary, .btn-success {
        min-width: 250px;
        padding: 15px 25px;
    }
    
    .product-toolbar {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .product-toolbar select {
        min-width: 250px;
    }
    
    .table-responsive {
        border-radius: 15px;
        overflow-x: auto;
    }
    
    table {
        min-width: 700px;
    }
    
    #product-table {
        min-width: 800px;
    }
    
    #category-table {
        min-width: 700px;
    }
    
    #orderbar-table {
        min-width: 700px;
    }
    
    th, td {
        padding: 15px 12px;
        font-size: 0.9rem;
    }
    
    .action-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

/* Mobile Phones */
@media (max-width: 600px) {
    .admin-header {
        padding: 0 15px;
        height: 60px;
    }
    
    .admin-wrapper {
        margin-top: 60px;
    }
    
    .header-logo {
        width: 35px;
        height: 35px;
    }
    
    .header-title {
        font-size: 1rem;
    }
    
    .sidebar {
        top: 60px;
        width: 100vw;
        right: -100vw;
        padding: 20px 0;
    }
    
    .sidebar-title {
        font-size: 1.3rem;
        margin-bottom: 30px;
    }
    
    .sidebar-btn {
        padding: 14px 20px;
        margin: 0 15px 6px 15px;
        font-size: 0.95rem;
    }
    
    .main-content {
        margin: 10px 5px;
        padding: 15px 10px;
        border-radius: 15px;
    }
    
    .section h2 {
        font-size: 1.4rem;
        margin-bottom: 20px;
        padding-bottom: 10px;
    }
    
    .section h2::after {
        width: 60px;
        height: 3px;
    }
    
    form {
        padding: 20px 15px;
        margin-bottom: 20px;
        border-radius: 15px;
    }
    
    .form-group {
        gap: 6px;
    }
    
    label {
        font-size: 0.9rem;
    }
    
    input, select, textarea {
        padding: 12px 15px;
        font-size: 0.95rem;
        border-radius: 10px;
    }
    
    /* Ensure table responsiveness on mobile */
    .table-responsive {
        overflow-x: scroll !important;
        -webkit-overflow-scrolling: touch;
        position: relative;
        /* Force scrollbar visibility */
        scrollbar-width: thin;
        scrollbar-color: rgba(102, 126, 234, 0.6) rgba(255, 255, 255, 0.2);
    }
    
    .table-responsive::-webkit-scrollbar {
        height: 10px !important;
        display: block !important;
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .table-responsive::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 5px;
    }
    
    .table-responsive::-webkit-scrollbar-thumb {
        background: rgba(102, 126, 234, 0.7);
        border-radius: 5px;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .table-responsive::-webkit-scrollbar-thumb:hover {
        background: rgba(102, 126, 234, 0.9);
    }
    

    
    button {
        padding: 12px 20px;
        font-size: 0.95rem;
        border-radius: 10px;
    }
    

    
    .table-responsive {
        border-radius: 15px;
        margin-top: 20px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 600px;
    }
    
    #product-table {
        min-width: 700px;
    }
    
    #category-table {
        min-width: 600px;
    }
    
    #orderbar-table {
        min-width: 600px;
    }
    
    th, td {
        padding: 12px 10px;
        font-size: 0.85rem;
    }
    
    /* تمام ستون‌ها در موبایل نمایش داده می‌شوند */
    
    /* Mobile table improvements */
    .table-responsive {
        margin: 15px 0;
        border-radius: 12px;
    }
    
    .product-toolbar {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }
    
    .product-toolbar select {
        min-width: 250px;
        width: 100%;
        max-width: 300px;
    }
    
    .product-toolbar button {
        width: 100%;
        max-width: 300px;
        padding: 12px 20px;
    }
    
    .status-toggle-btn {
        padding: 4px 8px;
        font-size: 0.8rem;
        min-width: 70px;
        gap: 4px;
        display: inline-flex;
    }
    
    .order-controls {
        gap: 6px;
    }
    
    .order-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    .status-badge {
        padding: 4px 8px;
        font-size: 0.8rem;
        min-width: 60px;
        display: inline-block;
    }
    
    .stat-card {
        padding: 20px 15px;
        border-radius: 15px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    .btn-primary, .btn-secondary, .btn-success {
        min-width: 200px;
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    /* Mobile modal improvements - unified */
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        margin: 0;
        padding: 20px 15px;
        border-radius: 15px;
        max-width: 95vw;
        max-height: calc(100vh - 20px);
    }
    
    /* Mobile form improvements - unified */
    #add-addon-modal .modal-content,
    #edit-addon-modal .modal-content,
    #edit-product-modal .modal-content {
        max-width: 95vw;
        padding: 20px 15px;
    }
    
    #edit-product-modal .modal-content {
        padding: 25px 20px;
    }
    
    #edit-product-modal h3 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    #add-addon-modal .form-group,
    #edit-addon-modal .form-group,
    #edit-product-modal .form-group {
        gap: 8px;
        margin-bottom: 15px;
    }
    
    #add-addon-modal label,
    #edit-addon-modal label,
    #edit-product-modal label {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }
    
    #add-addon-modal input,
    #edit-addon-modal input,
    #edit-addon-modal select,
    #edit-addon-modal select,
    #edit-product-modal input,
    #edit-product-modal select,
    #edit-product-modal textarea {
        padding: 12px 15px;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    
    #edit-product-modal button[type="submit"] {
        padding: 14px 20px;
        font-size: 1rem;
        margin-top: 15px;
    }
    
    /* Mobile Addon Groups Section */
    #edit-addon-groups-section {
        margin: 20px 0;
        padding: 15px;
    }
    
    #edit-addon-groups-list {
        max-height: 250px;
        padding: 8px;
    }
    

    

    

    
    .toast-message {
        top: 80px;
        right: 15px;
        left: 15px;
        padding: 12px 20px;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    

    
    .product-addons-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    

}

/* Small Mobile Phones */
@media (max-width: 480px) {
    .admin-header {
        padding: 0 10px;
        height: 55px;
    }
    
    .admin-wrapper {
        margin-top: 55px;
    }
    
    .header-logo {
        width: 30px;
        height: 30px;
    }
    
    .header-title {
        font-size: 0.9rem;
    }
    
    .main-content {
        margin: 8px 3px;
        padding: 12px 8px;
        border-radius: 12px;
    }
    
    .section h2 {
        font-size: 1.3rem;
        margin-bottom: 18px;
    }
    
    form {
        padding: 15px 12px;
        margin-bottom: 15px;
    }
    
    input, select, textarea {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    button {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
    
    .table-responsive {
        margin-top: 15px;
        border-radius: 12px;
    }
    
    table {
        min-width: 500px;
    }
    
    #product-table {
        min-width: 600px;
    }
    
    #category-table {
        min-width: 500px;
    }
    
    #orderbar-table {
        min-width: 500px;
    }
    
    th, td {
        padding: 10px 8px;
        font-size: 0.8rem;
    }
    
    .status-toggle-btn {
        padding: 3px 6px;
        font-size: 0.75rem;
        min-width: 65px;
        gap: 3px;
        display: inline-flex;
    }
    
    .order-controls {
        gap: 4px;
    }
    
    .order-btn {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .btn-primary, .btn-secondary, .btn-success {
        min-width: 180px;
        padding: 10px 18px;
        font-size: 0.9rem;
    }
    
    .modal-content {
        margin: 8px;
        padding: 18px 12px;
        border-radius: 12px;
        max-width: 98vw;
    }
    
    #edit-product-modal .modal-content {
        padding: 20px 15px;
    }
    
    #edit-product-modal h3 {
        font-size: 1.2rem;
        margin-bottom: 18px;
    }
    
    #edit-product-modal .form-group {
        margin-bottom: 12px;
    }
    
    #edit-product-modal label {
        font-size: 0.85rem;
        margin-bottom: 5px;
    }
    
    #edit-product-modal input,
    #edit-product-modal select,
    #edit-product-modal textarea {
        padding: 10px 12px;
        font-size: 0.85rem;
        border-radius: 8px;
    }
    
    #edit-product-modal button[type="submit"] {
        padding: 12px 18px;
        font-size: 0.9rem;
        margin-top: 12px;
    }
    
    #edit-addon-groups-section {
        margin: 15px 0;
        padding: 12px;
    }
    
    #edit-addon-groups-list {
        max-height: 200px;
        padding: 6px;
    }
    
    .toast-message {
        top: 75px;
        right: 10px;
        left: 10px;
        padding: 10px 15px;
        font-size: 0.85rem;
    }
    
    .snapfood-stats {
        gap: 12px;
    }
    
    .stat-card {
        padding: 15px 12px;
        border-radius: 12px;
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
    
    .addon-group-list {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }
    
    .addon-group-item {
        padding: 15px;
        margin-bottom: 0;
        border-radius: 8px;
        min-height: auto;
    }
    
    .addon-option-edit {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .addon-option-actions {
        justify-content: center;
        margin-top: 10px;
    }
    
    .addon-option-actions button {
        flex: 1;
        min-width: auto;
        padding: 8px 12px;
        font-size: 0.75rem;
        gap: 2px;
    }
    
    /* Mobile number inputs */
    .number-input-container {
        border-radius: 8px;
    }
    
    .number-input-container input[type="number"] {
        padding: 8px 10px;
        font-size: 0.9rem;
        color: #333;
        font-weight: 600;
    }
    
    .number-btn {
        padding: 6px 10px;
        min-width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }
    
    /* Small table inputs on mobile */
    .number-input-container[style*="max-width: 100px"] {
        max-width: 80px !important;
    }
    
    .number-input-container[style*="max-width: 100px"] input[type="number"] {
        width: 40px;
        font-size: 0.75rem;
        color: #333;
        font-weight: 600;
    }
    
    .number-input-container[style*="max-width: 100px"] .number-btn {
        min-width: 20px;
        height: 20px;
        font-size: 0.55rem;
        padding: 2px 3px;
    }
}

/* Landscape Mobile */
@media (max-width: 900px) and (orientation: landscape) {
    .admin-header {
        height: 55px;
    }
    
    .admin-wrapper {
        margin-top: 55px;
    }
    
    .sidebar {
        top: 55px;
        height: calc(100vh - 55px);
    }
    
    .main-content {
        padding: 15px 12px;
        margin: 10px 8px;
    }
    
    .section h2 {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }
    
    /* Landscape Modal Improvements */
    .modal {
        padding: 15px;
    }
    
    .modal-content {
        max-height: calc(100vh - 30px);
        padding: 25px 20px;
    }
    
    #edit-product-modal .modal-content {
        padding: 30px 25px;
    }
    
    #edit-product-modal h3 {
        font-size: 1.4rem;
        margin-bottom: 20px;
    }
    
    #edit-product-modal .form-group {
        margin-bottom: 15px;
    }
    
    #edit-product-modal input,
    #edit-product-modal select,
    #edit-product-modal textarea {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    #edit-product-modal button[type="submit"] {
        padding: 14px 20px;
        font-size: 1rem;
    }
    
    .status-toggle-btn {
        padding: 4px 8px;
        font-size: 0.8rem;
        min-width: 70px;
        display: inline-flex;
    }
    
    .order-controls {
        gap: 6px;
    }
    
    .order-btn {
        width: 30px;
        height: 30px;
        font-size: 0.75rem;
    }
    
    .snapfood-stats {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 12px;
    }
    
    .stat-card {
        padding: 15px 12px;
    }
    
    .stat-number {
        font-size: 1.4rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .sidebar-btn {
        min-height: 48px;
    }
    
    .action-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .status-toggle-btn {
        min-height: 44px;
        min-width: 80px;
        display: inline-flex;
    }
    
    .order-btn {
        min-height: 44px;
        min-width: 44px;
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
    
    .btn-primary, .btn-secondary, .btn-success {
        min-height: 48px;
    }
    
    input, select, textarea {
        min-height: 44px;
    }
    
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-content {
        -webkit-overflow-scrolling: touch;
    }
}

/* --- Additional Styles --- */
.inactive-item {
    opacity: 0.5;
    color: #718096 !important;
    text-decoration: line-through;
    transition: all 0.3s ease;
}


.toast-message {
    position: fixed;
    top: 90px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    z-index: 10000;
    font-weight: 600;
    animation: slideInRight 0.4s ease;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    max-width: calc(100vw - 40px);
    word-wrap: break-word;
}

.toast-message.success {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
}

.toast-message.error {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
}

.toast-message.info {
    background: linear-gradient(135deg, #3182ce 0%, #2c5aa0 100%);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* --- Loading States --- */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #667eea;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Checkbox Styling --- */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
    cursor: pointer;
}

/* --- Number Input Spinner Styling --- */
/* Enable spinner controls by default - no additional styling needed */

/* Force spinner controls to always be visible */
.stock-input {
    -webkit-appearance: none;
    appearance: none;
    -moz-appearance: textfield;
}

.stock-input::-webkit-outer-spin-button,
.stock-input::-webkit-inner-spin-button {
    -webkit-appearance: inner-spin-button !important;
    opacity: 1 !important;
    height: 100% !important;
    cursor: pointer !important;
    display: block !important;
    background: #f8f9fa !important;
    border-left: 1px solid #dee2e6 !important;
    border-radius: 0 4px 4px 0 !important;
    width: 20px !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Force visibility on focus and hover */
.stock-input:focus::-webkit-outer-spin-button,
.stock-input:focus::-webkit-inner-spin-button,
.stock-input:hover::-webkit-outer-spin-button,
.stock-input:hover::-webkit-inner-spin-button {
    -webkit-appearance: inner-spin-button !important;
    opacity: 1 !important;
    display: block !important;
}

/* Mobile specific spinner controls */
@media (max-width: 768px) {
    .stock-input::-webkit-outer-spin-button,
    .stock-input::-webkit-inner-spin-button {
        -webkit-appearance: inner-spin-button !important;
        opacity: 1 !important;
        height: 100% !important;
        cursor: pointer !important;
        display: block !important;
        background: #f8f9fa !important;
        border-left: 1px solid #dee2e6 !important;
        border-radius: 0 4px 4px 0 !important;
        width: 18px !important;
        position: relative !important;
        z-index: 1 !important;
    }
}

/* --- Addon Groups Section --- */
.addon-groups-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Add Product Addon Groups */
#addon-groups-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#addon-groups-section label {
    color: #667eea !important;
    font-weight: 600;
}

#addon-groups-section .addon-group-checkbox {
    background: rgba(102, 126, 234, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    transition: all 0.3s ease;
}

#addon-groups-section .addon-group-checkbox:hover {
    background: rgba(102, 126, 234, 0.1);
    border-color: rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

#addon-groups-section .addon-group-checkbox label {
    color: #2d3748 !important;
    font-weight: 500;
}

#addon-groups-section .addon-group-info {
    color: #718096 !important;
    font-size: 0.85rem;
}

/* Edit Product Addon Groups */
#edit-addon-groups-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

#edit-addon-groups-section .addon-group-item {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    padding: 15px;
    margin: 10px 0;
    transition: all 0.3s ease;
}

#edit-addon-groups-section .addon-group-item:hover {
    background: rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.addon-group-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    margin: 8px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.addon-group-checkbox:hover {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
}

.addon-group-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

.addon-group-checkbox label {
    flex: 1;
    cursor: pointer;
    margin: 0;
    color: #2d3748;
    font-weight: 500;
}

.addon-group-info {
    font-size: 0.9rem;
    color: #718096;
    margin-right: 20px;
}

/* --- Addon Options in Groups --- */
.addon-options-container {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.addon-option-edit {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.addon-option-edit:last-child {
    border-bottom: none;
}

.addon-option-edit input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.9);
    color: #2d3748;
    font-size: 0.9rem;
}

.addon-option-edit input:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.addon-option-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.addon-option-actions button {
    padding: 6px 10px;
    font-size: 0.8rem;
    border-radius: 6px;
    min-width: 35px;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.addon-option-actions .save-btn {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    color: white;
}

.addon-option-actions .save-btn:hover {
    background: linear-gradient(135deg, #2f855a 0%, #276749 100%);
    transform: translateY(-1px);
}

.addon-option-actions .edit-btn {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    color: white;
}

.addon-option-actions .edit-btn:hover {
    background: linear-gradient(135deg, #2c5282 0%, #2a4365 100%);
    transform: translateY(-1px);
}

.addon-option-actions .delete-btn {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
}

.addon-option-actions .delete-btn:hover {
    background: linear-gradient(135deg, #c53030 0%, #9c2626 100%);
    transform: translateY(-1px);
}

.addon-option-actions .cancel-btn {
    background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
    color: white;
}

.addon-option-actions .cancel-btn:hover {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    transform: translateY(-1px);
}

/* --- Number Input with Buttons --- */
.number-input-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.number-input-container:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.number-input-container input[type="number"] {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 15px;
    font-size: 1rem;
    color: #333;
    font-weight: 600;
    text-align: center;
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

.number-input-container input[type="number"]::-webkit-outer-spin-button,
.number-input-container input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.number-btn {
    border: none;
    color: white;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border-radius: 6px;
    font-weight: bold;
}

.number-btn:hover {
    transform: scale(1.05);
}

.number-btn:active {
    transform: scale(0.95);
}

.number-decrease {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.number-decrease:hover {
    background: linear-gradient(135deg, #fc8181 0%, #e53e3e 100%);
}

.number-increase {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.number-increase:hover {
    background: linear-gradient(135deg, #68d391 0%, #38a169 100%);
}

/* Mobile responsiveness for number inputs */
@media (max-width: 768px) {
    .number-input-container {
        border-radius: 10px;
    }
    
    .number-input-container input[type="number"] {
        padding: 10px 12px;
        font-size: 0.9rem;
        color: #333;
        font-weight: 600;
    }
    
    .number-btn {
        padding: 6px 10px;
        min-width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .number-input-container {
        border-radius: 8px;
    }
    
    .number-input-container input[type="number"] {
        padding: 8px 10px;
        font-size: 0.85rem;
        color: #333;
        font-weight: 600;
    }
    
    .number-btn {
        padding: 5px 8px;
        min-width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
}

/* Small number inputs for tables */
.number-input-container[style*="max-width: 100px"] {
    max-width: 100px !important;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
}

.number-input-container[style*="max-width: 100px"] input[type="number"] {
    padding: 4px 6px;
    font-size: 0.8rem;
    width: 50px;
    color: #333;
    font-weight: 600;
}

.number-input-container[style*="max-width: 100px"] .number-btn {
    padding: 3px 5px;
    min-width: 24px;
    height: 24px;
    font-size: 0.6rem;
    border-radius: 4px;
}

/* Disabled state for table inputs */
.number-input-container input[type="number"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.number-input-container input[type="number"]:disabled + .number-btn {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* --- Updates Section Styling --- */
.update-info-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.version-info h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.version-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.version-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.version-item .label {
    color: #a0aec0;
    font-weight: 500;
}

.version-item .value {
    color: #fff;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.update-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.update-actions button {
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.update-status {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.status-icon {
    font-size: 2rem;
    color: #667eea;
}

.status-text h4 {
    color: #fff;
    margin: 0;
    font-size: 1.2rem;
}

.status-text p {
    color: #a0aec0;
    margin: 5px 0 0 0;
}

.available-updates {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.available-updates h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.updates-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.update-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.update-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(102, 126, 234, 0.3);
}

.update-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.update-version {
    color: #38a169;
    font-weight: 700;
    font-size: 1.1rem;
}

.update-date {
    color: #a0aec0;
    font-size: 0.9rem;
}

.update-description {
    color: #e2e8f0;
    line-height: 1.6;
    margin-bottom: 15px;
}

.update-changes {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.update-changes h5 {
    color: #667eea;
    margin: 0 0 10px 0;
    font-size: 0.9rem;
}

.update-changes ul {
    margin: 0;
    padding-right: 20px;
    color: #cbd5e0;
}

.update-changes li {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.update-actions-item {
    display: flex;
    gap: 10px;
}

.update-log {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.update-log h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.log-content {
    max-height: 300px;
    overflow-y: auto;
}

.log-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.log-date {
    color: #a0aec0;
    font-size: 0.9rem;
    min-width: 100px;
    font-family: 'Courier New', monospace;
}

.log-version {
    color: #38a169;
    font-weight: 600;
    min-width: 80px;
    font-family: 'Courier New', monospace;
}

.log-description {
    color: #e2e8f0;
    flex: 1;
}

.backup-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.backup-section h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.backup-section p {
    color: #a0aec0;
    margin-bottom: 20px;
    line-height: 1.6;
}

.backup-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.backup-actions button {
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Button Colors */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
    transform: translateY(-2px);
}

.btn-secondary {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #2f855a 0%, #276749 100%);
    transform: translateY(-2px);
}

.btn-warning {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #dd6b20 0%, #c05621 100%);
    transform: translateY(-2px);
}

.btn-info {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    color: white;
}

.btn-info:hover {
    background: linear-gradient(135deg, #2c5282 0%, #2a4365 100%);
    transform: translateY(-2px);
}

/* Mobile Responsive for Updates */
@media (max-width: 768px) {
    .version-details {
        grid-template-columns: 1fr;
    }
    
    .update-actions {
        flex-direction: column;
    }
    
    .update-actions button {
        width: 100%;
        justify-content: center;
    }
    
    .update-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .log-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .log-date, .log-version {
        min-width: auto;
    }
    
    .backup-actions {
        flex-direction: column;
    }
    
    .backup-actions button {
        width: 100%;
        justify-content: center;
    }
    
    /* Modal Mobile Responsive */
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        max-width: 100%;
        padding: 20px;
        margin: 0;
        border-radius: 10px;
    }
    
    .modal h3 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .close-modal {
        top: 10px;
        left: 10px;
        font-size: 24px;
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .modal {
        padding: 5px;
    }
    
    .modal-content {
        padding: 15px;
    }
    
    .modal h3 {
        font-size: 1.2rem;
    }
    
    .modal input, .modal select, .modal textarea {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
    
    .modal button {
        padding: 12px;
        font-size: 0.95rem;
    }
}

/* Critical update badge */
.critical-badge {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.update-info {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.update-info small {
    color: #a0aec0;
    font-size: 0.8rem;
}

/* --- QR Code Section Styling --- */
.qr-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 40px;
    border-radius: 20px;
    margin: 20px 0;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.qr-container h3 {
    color: #2d3748;
    margin-bottom: 30px;
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.qr-container h3 i {
    font-size: 1.5rem;
    color: #667eea;
}

.qr-customization {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    padding: 30px;
    border-radius: 15px;
    margin: 25px 0;
    text-align: right;
    position: relative;
}

.qr-customization h4 {
    color: #2d3748;
    margin-bottom: 25px;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.qr-customization h4 i {
    color: #667eea;
}

.qr-customization label {
    color: #4a5568;
    font-weight: 500;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.qr-customization label i {
    color: #667eea;
    font-size: 0.9rem;
}

.qr-customization input[type="color"] {
    width: 100%;
    height: 45px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.qr-customization input[type="color"]:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.qr-customization input[type="number"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    color: #2d3748;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.qr-customization input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.qr-customization input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #667eea;
    cursor: pointer;
    border-radius: 4px;
}

.qr-customization input[type="checkbox"]:checked {
    background: #667eea;
}

#generate-qr-btn {
    background: #667eea;
    border: none;
    color: white;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    margin-bottom: 25px;
}

#generate-qr-btn:hover {
    background: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

#generate-qr-btn:active {
    transform: translateY(0);
}

#qr-result {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    padding: 30px;
    margin-top: 25px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

#qr-image-container {
    background: #ffffff;
    border: 2px dashed #cbd5e0;
    border-radius: 15px;
    padding: 25px;
    display: inline-block;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

#qr-image-container:hover {
    border-color: #667eea;
    background: #f7fafc;
    transform: scale(1.02);
}

#qr-image {
    max-width: 250px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

#qr-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

#download-qr-btn {
    background: #38a169;
    border: none;
    color: white;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(56, 161, 105, 0.3);
    margin: 0 10px;
}

#download-qr-btn:hover {
    background: #2f855a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(56, 161, 105, 0.4);
}

.qr-presets {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 25px;
    border-radius: 15px;
    margin-top: 30px;
}

.qr-presets h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.qr-presets h3 i {
    color: #667eea;
}

.preset-qr-btn {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    padding: 15px 20px;
    border-radius: 10px;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    width: 100%;
}

.preset-qr-btn:hover {
    border-color: #667eea;
    background: #f7fafc;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.preset-qr-btn i {
    margin-left: 8px;
    color: #667eea;
    font-size: 1rem;
}

/* Mobile Responsive for QR Section */
@media (max-width: 768px) {
    .qr-container {
        padding: 25px;
        margin: 15px 0;
    }
    
    .qr-container h3 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
    
    .qr-customization {
        padding: 20px;
        margin: 20px 0;
    }
    
    .qr-customization h4 {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }
    
    .qr-presets {
        padding: 25px;
        margin-top: 25px;
    }
    
    .qr-presets h3 {
        font-size: 1.3rem;
        margin-bottom: 20px;
    }
    
    .preset-qr-btn {
        padding: 15px;
        font-size: 0.9rem;
    }
    
    #qr-image {
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .qr-container {
        padding: 20px;
    }
    
    .qr-container h3 {
        font-size: 1.3rem;
    }
    
    .qr-customization {
        padding: 15px;
    }
    
    .qr-customization h4 {
        font-size: 1.1rem;
    }
    
    .qr-presets {
        padding: 20px;
    }
    
    .qr-presets h3 {
        font-size: 1.2rem;
    }
    
    .preset-qr-btn {
        padding: 12px;
        font-size: 0.85rem;
    }
    
    #qr-image {
        max-width: 180px;
    }
}

/* --- Range Input Styling --- */
.qr-customization input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    outline: none;
    cursor: pointer;
    margin-top: 8px;
}

.qr-customization input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.qr-customization input[type="range"]::-webkit-slider-thumb:hover {
    background: #5a67d8;
    transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.5);
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .table-responsive {
        border-radius: 15px;
        margin: 20px 10px;
        overflow-x: scroll !important;
        -webkit-overflow-scrolling: touch;
    }
    
    #orderbar-table {
        min-width: 700px;
    }
    
    #product-table {
        min-width: 800px;
    }
    
    #category-table {
        min-width: 700px;
    }
    
    /* Mobile table styles - ترتیب درست ستون‌ها */
    #product-table th,
    #product-table td {
        padding: 12px 8px;
        font-size: 0.85rem;
        min-width: 120px;
        width: 120px;
    }
    
    #category-table th,
    #category-table td {
        padding: 12px 8px;
        font-size: 0.85rem;
    }
    
    /* Category table mobile column adjustments */
    #category-table th:first-child,
    #category-table td:first-child {
        min-width: 60px;
        width: 60px;
    }
    
    #category-table th:nth-child(2),
    #category-table td:nth-child(2) {
        min-width: 120px;
        width: 120px;
    }
    
    #category-table th:nth-child(3),
    #category-table td:nth-child(3) {
        min-width: 80px;
        width: 80px;
    }
    
    #category-table th:nth-child(4),
    #category-table td:nth-child(4) {
        min-width: 80px;
        width: 80px;
    }
    
    #category-table th:nth-child(5),
    #category-table td:nth-child(5) {
        min-width: 60px;
        width: 60px;
    }
    
    #category-table th:nth-child(6),
    #category-table td:nth-child(6) {
        min-width: 100px;
        width: 100px;
    }
    
    #category-table th:last-child,
    #category-table td:last-child {
        min-width: 120px;
        width: 120px;
    }
    
    #orderbar-table th,
    #orderbar-table td {
        padding: 10px 8px;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    /* Mobile number input improvements */
    #orderbar-table input[type="number"] {
        width: 50px !important;
        padding: 4px 6px !important;
        font-size: 0.75rem !important;
    }
    
    /* Orderbar mobile column adjustments */
    #orderbar-table th:first-child,
    #orderbar-table td:first-child {
        min-width: 50px;
        width: 50px;
    }
    
    #orderbar-table th:nth-child(2),
    #orderbar-table td:nth-child(2) {
        min-width: 100px;
        width: 100px;
    }
    
    #orderbar-table th:nth-child(3),
    #orderbar-table td:nth-child(3) {
        min-width: 70px;
        width: 70px;
    }
    
    #orderbar-table th:nth-child(4),
    #orderbar-table td:nth-child(4) {
        min-width: 80px;
        width: 80px;
    }
    
    #orderbar-table th:nth-child(5),
    #orderbar-table td:nth-child(5) {
        min-width: 80px;
        width: 80px;
    }
    
    #orderbar-table th:last-child,
    #orderbar-table td:last-child {
        min-width: 100px;
        width: 100px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group input,
    .form-group select {
        padding: 12px 15px;
        font-size: 1rem;
    }
    
    /* Mobile table improvements */
    .table-responsive::-webkit-scrollbar {
        height: 12px !important;
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .table-responsive::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 6px;
    }
    
    .table-responsive::-webkit-scrollbar-thumb {
        background: rgba(102, 126, 234, 0.6);
        border-radius: 6px;
        border: 2px solid rgba(255, 255, 255, 0.2);
    }
    
    .table-responsive::-webkit-scrollbar-thumb:hover {
        background: rgba(102, 126, 234, 0.8);
    }
}

@media (max-width: 480px) {
    .table-responsive {
        overflow-x: scroll !important;
        -webkit-overflow-scrolling: touch;
        /* Force scrollbar visibility */
        scrollbar-width: thin;
        scrollbar-color: rgba(102, 126, 234, 0.6) rgba(255, 255, 255, 0.2);
        /* Add padding to ensure scrollbar is visible */
        padding-bottom: 15px;
    }
    
    #orderbar-table {
        min-width: 600px;
        display: block;
        width: max-content;
    }
    
    #product-table {
        min-width: 600px;
        display: block;
        width: max-content;
    }
    
    #category-table {
        min-width: 500px;
    }
    
    /* Small mobile table styles - ترتیب درست ستون‌ها */
    #product-table th,
    #product-table td,
    #category-table th,
    #category-table td {
        display: table-cell;
    }
    
    /* Product table small mobile column adjustments */
    #product-table th,
    #product-table td {
        min-width: 120px;
        width: 120px;
    }
    
    /* Category table small mobile column adjustments */
    #category-table th:first-child,
    #category-table td:first-child {
        min-width: 50px;
        width: 50px;
    }
    
    #category-table th:nth-child(2),
    #category-table td:nth-child(2) {
        min-width: 100px;
        width: 100px;
    }
    
    #category-table th:nth-child(3),
    #category-table td:nth-child(3) {
        min-width: 70px;
        width: 70px;
    }
    
    #category-table th:nth-child(4),
    #category-table td:nth-child(4) {
        min-width: 70px;
        width: 70px;
    }
    
    #category-table th:nth-child(5),
    #category-table td:nth-child(5) {
        min-width: 50px;
        width: 50px;
    }
    
    #category-table th:nth-child(6),
    #category-table td:nth-child(6) {
        min-width: 80px;
        width: 80px;
    }
    
    #category-table th:last-child,
    #category-table td:last-child {
        min-width: 100px;
        width: 100px;
    }
    
    /* Small mobile number input improvements */
    #orderbar-table input[type="number"] {
        width: 55px !important;
        padding: 5px 7px !important;
        font-size: 0.8rem !important;
    }
    
    /* Orderbar small mobile column adjustments */
    #orderbar-table th:first-child,
    #orderbar-table td:first-child {
        min-width: 40px;
        width: 40px;
    }
    
    #orderbar-table th:nth-child(2),
    #orderbar-table td:nth-child(2) {
        min-width: 80px;
        width: 80px;
    }
    
    #orderbar-table th:nth-child(3),
    #orderbar-table td:nth-child(3) {
        min-width: 60px;
        width: 60px;
    }
    
    #orderbar-table th:nth-child(4),
    #orderbar-table td:nth-child(4) {
        min-width: 70px;
        width: 70px;
    }
    
    #orderbar-table th:nth-child(5),
    #orderbar-table td:nth-child(5) {
        min-width: 70px;
        width: 70px;
    }
    
    #orderbar-table th:last-child,
    #orderbar-table td:last-child {
        min-width: 80px;
        width: 80px;
    }
    
    #orderbar-table th,
    #orderbar-table td {
        padding: 10px 12px;
        font-size: 0.85rem;
        display: table-cell;
        white-space: nowrap;
    }
    
    .admin-header {
        padding: 0 15px;
    }
    
    .header-title {
        font-size: 1.2rem;
    }
    
    /* Small mobile table improvements */
    .table-responsive {
        margin: 15px 5px;
        border-radius: 12px;
    }
    
    /* Very small mobile table styles - ترتیب درست ستون‌ها */
    #orderbar-table th,
    #orderbar-table td {
        padding: 8px 6px;
        font-size: 0.75rem;
    }
    
    /* Very small mobile number input improvements */
    #orderbar-table input[type="number"] {
        width: 45px !important;
        padding: 3px 5px !important;
        font-size: 0.7rem !important;
    }
    
    /* Orderbar very small mobile column adjustments */
    #orderbar-table th:first-child,
    #orderbar-table td:first-child {
        min-width: 35px;
        width: 35px;
    }
    
    #orderbar-table th:nth-child(2),
    #orderbar-table td:nth-child(2) {
        min-width: 70px;
        width: 70px;
    }
    
    #orderbar-table th:nth-child(3),
    #orderbar-table td:nth-child(3) {
        min-width: 50px;
        width: 50px;
    }
    
    #orderbar-table th:nth-child(4),
    #orderbar-table td:nth-child(4) {
        min-width: 60px;
        width: 60px;
    }
    
    #orderbar-table th:nth-child(5),
    #orderbar-table td:nth-child(5) {
        min-width: 60px;
        width: 60px;
    }
    
    #orderbar-table th:last-child,
    #orderbar-table td:last-child {
        min-width: 70px;
        width: 70px;
    }
    
    /* Adjust button sizes for small mobile */
    .action-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
        margin: 2px;
    }
    
    .order-btn {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    /* Ensure scrollbar is visible on small mobile */
    .table-responsive::-webkit-scrollbar {
        height: 10px !important;
        background-color: rgba(255, 255, 255, 0.1);
        display: block !important;
    }
    
    .table-responsive::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 5px;
    }
    
    .table-responsive::-webkit-scrollbar-thumb {
        background: rgba(102, 126, 234, 0.7);
        border-radius: 5px;
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    
    .table-responsive::-webkit-scrollbar-thumb:hover {
        background: rgba(102, 126, 234, 0.9);
    }
    
    /* Force horizontal scroll visibility */
    .table-responsive {
        position: relative;
    }
}

/* TV Category Drag & Drop Styles */
.tv-category-item {
    transition: all 0.3s ease;
    user-select: none;
}

.tv-category-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15) !important;
}

.tv-category-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.tv-category-item.drag-over {
    border-color: #667eea !important;
    background-color: rgba(102, 126, 234, 0.1) !important;
}

.tv-category-item .grip-handle {
    cursor: grab;
    color: #6c757d;
    transition: color 0.3s ease;
}

.tv-category-item .grip-handle:hover {
    color: #667eea;
}

.tv-category-item .grip-handle:active {
    cursor: grabbing;
}

/* TV Settings Container */
.tv-settings {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* TV Category Toggle Styles */
.tv-show-toggle,
.tv-desc-toggle {
    accent-color: #667eea;
    transform: scale(1.1);
    transition: all 0.3s ease;
}

.tv-show-toggle:checked,
.tv-desc-toggle:checked {
    accent-color: #28a745;
}

.tv-show-toggle:hover,
.tv-desc-toggle:hover {
    transform: scale(1.2);
}

/* TV Category Status Indicators */
.tv-category-item[data-status="active"] {
    border-color: #28a745 !important;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.05) 0%, rgba(40, 167, 69, 0.1) 100%);
}

.tv-category-item[data-status="inactive"] {
    border-color: #dc3545 !important;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.05) 0%, rgba(220, 53, 69, 0.1) 100%);
}

/* TV Category Sort Order */
.tv-category-item .sort-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: bold;
    border-radius: 8px;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.tv-category-item:hover .sort-number {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

/* Mobile Responsive for TV Settings */
@media (max-width: 768px) {
    .tv-category-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .tv-category-item > div:last-child {
        width: 100%;
        justify-content: space-between;
    }
    
    /* TV Container Mobile */
    .tv-container {
        padding: 20px 15px !important;
        margin: 15px 0 !important;
        border-radius: 15px !important;
    }
    
    .tv-container h3 {
        font-size: 1.4em !important;
        margin-bottom: 8px !important;
    }
    
    .tv-container p {
        font-size: 1em !important;
        margin: 0 auto 20px auto !important;
        padding: 0 10px !important;
    }
    
    .tv-container .action-btn {
        padding: 12px 20px !important;
        font-size: 1em !important;
        margin: 5px !important;
        width: 100% !important;
        max-width: 300px !important;
    }
    
    /* TV Settings Mobile */
    .tv-settings {
        padding: 20px 15px !important;
        margin: 15px 0 !important;
        border-radius: 15px !important;
    }
    
    .tv-settings h3 {
        font-size: 1.2em !important;
        margin-bottom: 15px !important;
    }
    
    .tv-settings h4 {
        font-size: 1.1em !important;
        margin-bottom: 12px !important;
    }
    
    .tv-settings p {
        font-size: 0.85em !important;
        margin-bottom: 12px !important;
    }
    
    /* TV Layout Settings Mobile */
    .tv-layout-settings {
        margin-bottom: 25px !important;
    }
    
    .tv-layout-settings .form-group {
        margin-bottom: 15px !important;
    }
    
    .tv-layout-settings input[type="number"],
    .tv-layout-settings select {
        padding: 12px 15px !important;
        font-size: 1em !important;
        border-radius: 10px !important;
    }
    
    /* TV Columns Layout Mobile */
    .tv-columns-settings {
        margin-bottom: 25px !important;
    }
    
    .info-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 15px !important;
        padding: 15px !important;
    }
    
    .info-bar .info-item {
        justify-content: space-between !important;
        margin-bottom: 8px !important;
    }
    
    .action-buttons {
        justify-content: center !important;
        flex-wrap: wrap !important;
    }
    
    .action-buttons .btn {
        flex: 1 !important;
        min-width: 120px !important;
        margin: 5px !important;
        padding: 10px 15px !important;
        font-size: 0.9em !important;
    }
    
    #tv-columns-layout {
        padding: 15px !important;
        min-height: 300px !important;
        border-radius: 10px !important;
    }
    
    /* Grid Layout Mobile */
    .tv-settings div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .tv-settings div[style*="grid-template-columns: repeat(auto-fit, minmax(200px, 1fr))"] {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    /* Font Size Selects Mobile */
    .tv-settings select {
        width: 100% !important;
        padding: 12px 15px !important;
        font-size: 1em !important;
        border-radius: 10px !important;
    }
    
    /* Preview Button Mobile */
    #preview-tv-layout-btn {
        width: 100% !important;
        max-width: 300px !important;
        padding: 15px 25px !important;
        font-size: 1.1em !important;
        margin: 10px 0 !important;
    }
    
    /* Help Section Mobile */
    .tv-settings + div {
        padding: 15px !important;
        margin-top: 15px !important;
        border-radius: 12px !important;
    }
    
    .tv-settings + div h4 {
        font-size: 1.1em !important;
        margin-bottom: 12px !important;
    }
    
    .tv-settings + div ul {
        padding-right: 15px !important;
        font-size: 0.9em !important;
    }
    
    .tv-settings + div li {
        margin-bottom: 8px !important;
        line-height: 1.5 !important;
    }
}

/* Small Mobile TV Settings */
@media (max-width: 480px) {
    .tv-container {
        padding: 15px 10px !important;
        margin: 10px 0 !important;
    }
    
    .tv-container h3 {
        font-size: 1.2em !important;
    }
    
    .tv-container p {
        font-size: 0.9em !important;
        padding: 0 5px !important;
    }
    
    .tv-container .action-btn {
        padding: 10px 15px !important;
        font-size: 0.9em !important;
        margin: 3px !important;
    }
    
    .tv-settings {
        padding: 15px 10px !important;
        margin: 10px 0 !important;
    }
    
    .tv-settings h3 {
        font-size: 1.1em !important;
    }
    
    .tv-settings h4 {
        font-size: 1em !important;
    }
    
    .tv-settings p {
        font-size: 0.8em !important;
    }
    
    .info-bar {
        padding: 12px !important;
    }
    
    .action-buttons .btn {
        padding: 8px 12px !important;
        font-size: 0.8em !important;
        min-width: 100px !important;
    }
    
    #tv-columns-layout {
        padding: 12px !important;
        min-height: 250px !important;
    }
    
    .tv-settings select,
    .tv-settings input[type="number"] {
        padding: 10px 12px !important;
        font-size: 0.9em !important;
    }
    
    #preview-tv-layout-btn {
        padding: 12px 20px !important;
        font-size: 1em !important;
    }
    
    .tv-settings + div {
        padding: 12px !important;
    }
    
    .tv-settings + div h4 {
        font-size: 1em !important;
    }
    
    .tv-settings + div ul {
        font-size: 0.8em !important;
        padding-right: 12px !important;
    }
}

/* Column Layout Styles */
.column-container {
    transition: all 0.3s ease;
    position: relative;
}

.column-container:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.column-categories {
    transition: all 0.3s ease;
    min-height: 150px;
    border-radius: 8px;
    padding: 10px;
}

.column-categories.drag-over {
    background: #e3f2fd !important;
    border: 2px dashed #2196f3 !important;
    transform: scale(1.02);
}

.category-item {
    transition: all 0.3s ease;
    user-select: none;
    cursor: move;
}

.category-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.category-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg) scale(1.05);
    z-index: 1000;
}

/* Empty column styling */
.column-categories:empty::before {
    content: "دسته‌بندی‌ها را اینجا بکشید";
    display: block;
    text-align: center;
    color: #6c757d;
    padding: 40px 20px;
    font-style: italic;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    background: #f8f9fa;
}

/* Column header styling */
.column-header {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    position: relative;
}

.column-header .category-count {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    opacity: 0.8;
}

/* Drag and drop visual feedback */
.drag-placeholder {
    background: #e3f2fd;
    border: 2px dashed #2196f3;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: #1976d2;
    font-style: italic;
    margin: 10px 0;
}

/* TV Columns Settings */
.tv-columns-settings {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}

.tv-columns-settings h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: 600;
}

.tv-columns-settings .info-bar {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tv-columns-settings .info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tv-columns-settings .info-badge {
    background: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.9em;
}

.tv-columns-settings .info-badge.categories {
    background: #28a745;
}

.tv-columns-settings .action-buttons {
    display: flex;
    gap: 10px;
}

.tv-columns-settings .btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tv-columns-settings .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.tv-columns-settings .btn-reset {
    background: #6c757d;
    color: white;
}

.tv-columns-settings .btn-reset:hover {
    background: #5a6268;
}

.tv-columns-settings .btn-save {
    background: #28a745;
    color: white;
}

.tv-columns-settings .btn-save:hover {
    background: #218838;
}