/* فونت‌های فارسی */
/* @import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap'); */

/* Import main styles */
@import url('style.css');

/* اعمال فونت به همه المان‌ها */
button,
input,
textarea,
select,
.btn,
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-info {
    font-family: 'Vazirmatn', sans-serif !important;
}

/* Admin Container */
.admin-container {
    display: flex;
    gap: 20px;
    margin: 0 auto;
    padding: 30px;
}

/* Sidebar */
.sidebar {
    width: 280px;
    padding: 20px;
    border-radius: var(--border-radius);
    position: sticky;
    top: 160px;
    height: fit-content;
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Disable sidebar entrance animation on desktop (no visual load effect) */
@media (min-width: 1025px) {
    .sidebar {
        /* remove entrance animation when viewed on desktop */
        animation: none !important;
        transition: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

.sidebar-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--glass-border);
}

.sidebar-header h2 {
    color: var(--primary-color);
    font-size: 1.4rem;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 10px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 12px;
    transition: var(--transition);
    font-weight: 500;
}

.sidebar-menu a:hover {
    background: var(--glass-bg);
    transform: translateX(5px);
}

.sidebar-menu a.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.menu-icon {
    font-size: 1.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.menu-icon svg {
    width: 100%;
    height: 100%;
}

/* Glass Card - استایل یکپارچه برای همه کارت‌ها */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

[data-theme="dark"] .glass-card {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.5);
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 20px;
    min-width: 0;
    overflow-x: hidden;
}

/* Admin Header */
.admin-header {
    position: sticky;
    top: 20px;
    z-index: 999;
    padding: 15px 20px;
    margin: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    padding: 8px 12px;
    transition: var(--transition);
    border-radius: 8px;
}

.sidebar-toggle svg {
    display: block;
}

.sidebar-toggle:hover {
    background: var(--glass-bg);
    transform: scale(1.1);
}

.sidebar-toggle:active {
    transform: scale(0.95);
}

/* Admin Profile Dropdown */
.admin-profile-wrapper {
    position: relative;
}

.admin-profile {
    padding: 8px 15px;
    background: var(--glass-bg);
    border-radius: 25px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.admin-profile:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.admin-profile-wrapper.active .admin-profile {
    background: var(--primary-color);
    color: white;
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dropdown-arrow svg {
    display: block;
}

.admin-profile-wrapper.active .dropdown-arrow {
    transform: rotate(180deg);
}

.admin-dropdown {
    position: absolute;
    top: calc(100% + 20px);
    left: 0;
    background: white;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10000;
    overflow: hidden;
}

[data-theme="dark"] .admin-dropdown {
    background: #1e293b;
}

.admin-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.dropdown-item:hover {
    background: var(--primary-color);
    color: white;
}

.dropdown-item .menu-icon {
    font-size: 1.2rem;
}

.dropdown-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 5px 0;
}

.logout-item:hover {
    background: var(--danger-color);
    color: white;
}

/* Notifications Bell */
.notifications-wrapper {
    position: relative;
}

.notifications-bell {
    position: relative;
    padding: 10px;
    background: var(--glass-bg);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--text-primary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.notifications-bell:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.notifications-bell.has-notifications {
    animation: bellRing 0.5s ease-in-out;
}

@keyframes bellRing {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    50% { transform: rotate(-15deg); }
    75% { transform: rotate(10deg); }
}

.notifications-bell .bell-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.notifications-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.notifications-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    left: 0;
    background: white;
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    width: 380px;
    max-height: 500px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

[data-theme="dark"] .notifications-dropdown {
    background: #1e293b;
}

.notifications-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.notifications-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notifications-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.sound-toggle {
    background: var(--glass-bg);
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 50%;
    transition: var(--transition);
    width: 40px;
    height: 40px;
}

.sound-toggle:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.sound-toggle.muted {
    background: #ffe0e0;
    color: #dc3545;
}

.sound-toggle.muted:hover {
    background: #dc3545;
    color: white;
    transform: scale(1.1);
}

.sound-toggle svg {
    display: block;
}

.notifications-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mark-all-read {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 5px;
    transition: var(--transition);
}

.mark-all-read:hover {
    background: var(--glass-bg);
}

.notifications-list {
    flex: 1;
    overflow-y: auto;
    max-height: 350px;
}

.notifications-list::-webkit-scrollbar {
    width: 6px;
}

.notifications-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.no-notifications {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.no-notifications svg {
    margin-bottom: 15px;
}

.no-notifications p {
    margin: 0;
    font-size: 0.95rem;
}

.notification-item {
    padding: 15px 20px;
    border-bottom: 1px solid var(--glass-border);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.notification-item:hover {
    background: var(--glass-bg);
}

.notification-item.unread {
    background: rgba(99, 102, 241, 0.05);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.notification-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.notification-time {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.notifications-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--glass-border);
    text-align: center;
}

.view-all-orders {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.view-all-orders:hover {
    color: var(--secondary-color);
}

/* Profile Change Modal */
.profile-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.profile-modal-overlay.active {
    display: flex;
}

.profile-modal {
    background: white;
    border-radius: 20px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid var(--glass-border);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px 20px 0 0;
}

.profile-modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: white;
    display: flex;
    align-items: center;
}

.profile-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: white;
}

.profile-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.profile-form {
    padding: 30px;
}

.profile-form .form-group {
    margin-bottom: 20px;
}

.profile-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.profile-form input[type="text"],
.profile-form input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.profile-form input[type="text"]:focus,
.profile-form input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
}

.profile-form input[readonly] {
    background: #f5f5f5;
    cursor: not-allowed;
}

.profile-form small {
    display: block;
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.profile-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
}

.profile-modal-footer .btn {
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* حذف شد - دیگر نیازی به mobile-only نیست */

@media (max-width: 1024px) {
    /* dropdown در موبایل هم کار می‌کند */
    .admin-profile-wrapper {
        display: flex;
    }
}

/* Admin Content */
.admin-content {
    flex: 1;
    animation: fadeInUp 0.6s ease-out;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--glass-border);
}

.page-header h1 {
    color: var(--primary-color);
    font-size: 2rem;
    margin: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    padding: 25px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.stat-icon svg {
    width: 28px;
    height: 28px;
}

.stat-content h3 {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    direction: rtl;
}

/* Dashboard Section */
.dashboard-section {
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

/* Quick Actions */
.quick-actions {
    margin-top: 40px;
}

.quick-actions h2 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.action-card {
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.action-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

.action-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-icon svg {
    width: 32px;
    height: 32px;
}

.action-card h3 {
    font-size: 1.1rem;
}

/* Table Styles */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--glass-bg);
}

.data-table th {
    padding: 15px;
    text-align: right;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--glass-border);
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid var(--glass-border);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: var(--glass-bg);
}

.table-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
}

.table-image-placeholder {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border-radius: 10px;
    font-size: 1.5rem;
}

.table-icon {
    font-size: 1.8rem;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Vazirmatn', sans-serif;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
}

.btn-info {
    background: linear-gradient(135deg, #0ea5e9, #06b6d4);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.9rem;
}

.btn-sm svg {
    width: 16px;
    height: 16px;
    display: block;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

/* Badges */
.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin-right: 5px;
}

.badge-success {
    background: var(--success-color);
    color: white;
}

.badge-danger {
    background: var(--danger-color);
    color: white;
}

.badge-warning {
    background: var(--warning-color);
    color: white;
}

/* Forms */
.form-container {
    padding: 30px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
}

.form-container h2 {
    margin-bottom: 25px;
    color: var(--primary-color);
}

.admin-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--glass-border);
    border-radius: 10px;
    background: var(--glass-bg);
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group small,
.form-hint {
    display: block;
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
    transform: scale(1.2);
}

/* Radio Group Styles */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.radio-label:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
    transform: translateX(3px);
}

.radio-label input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
    margin: 0;
}

.radio-label input[type="radio"]:checked + span {
    color: var(--primary-color);
    font-weight: 600;
}

.radio-label input[type="radio"]:checked {
    transform: scale(1.1);
}

[data-theme="dark"] .radio-label {
    background: rgba(30, 41, 59, 0.5);
}

[data-theme="dark"] .radio-label:hover {
    background: rgba(99, 102, 241, 0.1);
}

.current-image {
    margin-bottom: 15px;
}

.preview-image {
    max-width: 200px;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--glass-border);
}

/* Content Card */
.content-card {
    padding: 25px;
    border-radius: var(--border-radius);
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 600;
    animation: slideDown 0.3s ease-out;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid var(--success-color);
    color: var(--success-color);
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid var(--danger-color);
    color: var(--danger-color);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 2px solid var(--warning-color);
    color: var(--warning-color);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-background {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    opacity: 0.1;
}

.login-card {
    width: 100%;
    max-width: 450px;
    padding: 40px;
    border-radius: 25px;
    position: relative;
    z-index: 10;
    animation: scaleIn 0.5s ease-out;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    animation: bounce 2s ease-in-out infinite;
}

.login-header h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.login-header p {
    color: var(--text-secondary);
}

.login-form .form-group {
    margin-bottom: 20px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    opacity: 0.6;
}

.input-wrapper input {
    padding-right: 45px;
}

.login-footer {
    margin-top: 30px;
    text-align: center;
}

.default-credentials {
    background: var(--glass-bg);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.default-credentials code {
    background: rgba(99, 102, 241, 0.1);
    padding: 2px 8px;
    border-radius: 5px;
    color: var(--primary-color);
    font-weight: 600;
}

.back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-top: 10px;
}

.back-link:hover {
    text-decoration: underline;
}

/* Sidebar Overlay - بیرون از media query برای overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9997;
    pointer-events: none;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .admin-container {
        flex-direction: column;
        padding-top: 120px;
    }
    
    .sidebar {
        position: fixed;
        top: 120px;
        right: -280px;
        width: 250px;
        height: auto;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        z-index: 9998;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 15px 0 0 15px;
        box-shadow: -5px 5px 30px rgba(0, 0, 0, 0.4);
    }
    
    .sidebar.mobile-open {
        right: 0;
    }
    
    .sidebar-header {
        display: none;
    }
    
    .sidebar-menu {
        padding: 10px;
    }
    
    .sidebar-menu li a {
        padding: 12px 15px;
        font-size: 0.9rem;
        border-radius: 8px;
    }
    
    .sidebar-menu li a .menu-icon {
        font-size: 1.2rem;
    }
    
    .sidebar-toggle {
        display: block !important;
        font-size: 1.5rem;
    }
    
    .main-content {
        padding: 15px;
        margin-top: 10px;
    }
    
    .admin-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 9999;
        margin-bottom: 0;
        border-radius: 15px;
    }
    
    /* dropdown در موبایل */
    .admin-dropdown {
        left: auto;
        right: -50px;
        min-width: 180px;
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    .data-table {
        font-size: 0.9rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px;
    }
    
    .header-left h1 {
        display: none;
    }
    
    /* Notifications Responsive */
    .notifications-dropdown {
        width: calc(100vw - 40px);
        max-width: 380px;
        left: auto;
        right: -140px;
    }
    
    .notification-item {
        padding: 12px 15px;
    }
    
    .notification-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}
}

@media (max-width: 480px) {
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .login-card {
        padding: 25px;
    }
    
    .orders-grid {
        grid-template-columns: 1fr;
    }
    
    .order-actions {
        flex-direction: column;
    }
    
    .status-form {
        width: 100%;
    }
    
    .btn-delete {
        width: 100%;
    }
    
    .filter-buttons {
        flex-wrap: wrap;
    }
    
    .filter-btn {
        flex: 1 1 auto;
        min-width: 100px;
    }
}

/* Orders Page */
.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border-radius: 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
}

.filter-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary-color);
    color: white;
}

.orders-grid {
    display: grid;
    gap: 20px;
    /* دو ستون در دسکتاپ، و یک ستون در موبایل */
    grid-template-columns: repeat(2, 1fr);
}

/* روی نمایشگرهای کوچک یک ستونه شود (موبایل) */
@media (max-width: 767px) {
    .orders-grid {
        grid-template-columns: 1fr;
    }
}

.order-card {
    padding: 20px;
    border-radius: 15px;
    animation: fadeIn 0.5s ease;
    transition: var(--transition);
}

.order-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--glass-border);
}

.order-info h3 {
    margin: 0 0 8px 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.order-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: block;
}

.order-status {
    padding: 8px 16px;
    border-radius: 20px;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.order-customer {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
}

.order-customer p {
    margin: 8px 0;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.order-customer strong {
    color: var(--primary-color);
    margin-left: 5px;
}

.order-items {
    margin-bottom: 15px;
}

.order-items h4 {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.order-items ul {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--glass-bg);
    border-radius: 8px;
    padding: 10px;
}

.order-items li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    font-size: 0.95rem;
    border-bottom: 1px solid var(--glass-border);
}

.order-items li:last-child {
    border-bottom: none;
}

.item-quantity {
    color: var(--secondary-color);
    margin: 0 10px;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.1);
    padding: 2px 8px;
    border-radius: 12px;
}

.item-price {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1rem;
}

.order-notes {
    background: var(--glass-bg);
    padding: 10px;
    border-radius: 8px;
    margin: 15px 0;
    font-size: 0.9rem;
}

.order-notes p {
    margin: 5px 0 0 0;
    color: var(--text-secondary);
}

.order-total {
    display: flex;
    justify-content: space-between;
    padding: 18px 0;
    margin-top: 15px;
    border-top: 2px solid var(--glass-border);
    font-size: 1.2rem;
    color: var(--primary-color);
}

.order-total strong {
    font-weight: 700;
}

.order-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--glass-border);
}

.print-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
}

.btn-print {
    flex: 1;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    font-size: 0.9rem;
}

.btn-print-regular {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.btn-print-regular:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-print-thermal {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-print-thermal:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-print:active {
    transform: translateY(0);
}

.status-form {
    display: flex;
    gap: 10px;
    flex: 1;
    align-items: stretch;
}

.status-form select {
    flex: 1;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.status-form select:hover {
    border-color: var(--primary-color);
}

.status-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.btn-update,
.btn-delete {
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-size: 0.9rem;
}

.btn-update {
    background: var(--primary-color);
    color: white;
}

.btn-update:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-update:active {
    transform: translateY(0);
}

.btn-delete {
    background: #ef4444;
    color: white;
}

.btn-delete:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-delete:active {
    transform: translateY(0);
}

/* Settings Page */
.settings-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

/* Fix page-header for settings page */
.settings-page-header {
    display: block !important;
    text-align: right;
}

.settings-page-header h1 {
    margin: 0;
}

.settings-card {
    padding: 35px;
    animation: fadeInUp 0.5s ease;
    border-radius: 20px;
    transition: transform 0.3s ease;
}

.settings-card:hover {
    transform: translateY(-5px);
}

/* Settings Divider */
.settings-divider {
    margin: 30px 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--glass-border) 20%, var(--glass-border) 80%, transparent);
    border: none;
    position: relative;
}

.settings-divider::before {
    content: "✦";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: var(--card-bg);
    padding: 0 15px;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.card-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--glass-border);
}

.card-header h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
}

/* Logo Upload Section - مینیمال و زیبا */
.current-logo {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
    padding: 25px;
    background: var(--glass-bg);
    border-radius: 16px;
    border: 2px dashed var(--glass-border);
    transition: all 0.3s ease;
}

.current-logo:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
}

.logo-preview-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.logo-image-container {
    flex-shrink: 0;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.logo-image-container:hover {
    transform: scale(1.05);
}

.logo-image-container img {
    display: block;
    max-width: 150px;
    max-height: 150px;
    border-radius: 12px;
    object-fit: contain;
}

/* File Input Custom Style */
.file-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    background: linear-gradient(135deg, var(--glass-bg), rgba(99, 102, 241, 0.05));
    border: 2px dashed var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-primary);
    font-weight: 500;
}

.file-input-label:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.15);
}

.file-input-label .icon {
    font-size: 1.5rem;
}

/* Remove Logo Button - زیبا و مینیمال */
.remove-logo-form {
    display: inline-block;
    margin-top: 10px;
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-family: 'Vazirmatn', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
    font-size: 0.9rem;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
    background: linear-gradient(135deg, #dc2626, #b91c1c);
}

.btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

/* Save Button - Gradient Green */
.form-actions {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    margin-top: 10px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    font-family: 'Vazirmatn', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.5);
    background: linear-gradient(135deg, #059669, #047857);
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

/* Form Group Enhanced */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

.form-group small {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-group small::before {
    content: "ℹ️";
    font-size: 0.9rem;
}

.preview-section {
    padding: 20px;
}

.preview-header {
    text-align: center;
    transition: transform 0.3s ease;
}

.preview-header:hover {
    transform: scale(1.02);
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    background: linear-gradient(135deg, var(--glass-bg), rgba(99, 102, 241, 0.03));
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.info-item:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.info-label {
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-value {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1rem;
}

/* Alert Messages */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.4s ease;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    border: 2px solid #10b981;
    color: #065f46;
}

.alert-success::before {
    content: "✅";
    font-size: 1.2rem;
}

.alert-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
    border: 2px solid #ef4444;
    color: #991b1b;
}

.alert-error::before {
    content: "❌";
    font-size: 1.2rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Color Picker Styles */
.color-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.color-input-wrapper {
    display: flex;
    gap: 15px;
    align-items: center;
}

.color-input {
    width: 80px;
    height: 50px;
    border: 3px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.color-input:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.2);
}

.color-text-input {
    flex: 1;
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    text-align: center;
}

.color-preview-box {
    margin: 30px 0;
    padding: 25px;
    background: var(--glass-bg);
    border-radius: 15px;
    border: 2px solid var(--glass-border);
}

.color-preview-box h3 {
    margin: 0 0 20px 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.preview-gradient {
    height: 120px;
    border-radius: 12px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.preview-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.preview-btn-primary {
    padding: 12px 24px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: not-allowed;
    transition: all 0.3s ease;
}

.preview-btn-gradient {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: not-allowed;
    transition: all 0.3s ease;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    justify-content: center;
    background: linear-gradient(135deg, #6b7280, #4b5563);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.2);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 114, 128, 0.4);
    background: linear-gradient(135deg, #4b5563, #374151);
}

/* Responsive */
@media (max-width: 768px) {
    .settings-card {
        padding: 20px;
    }
    
    .logo-preview-wrapper {
        flex-direction: column;
    }
    
    .btn-primary {
        width: 100%;
        justify-content: center;
    }
    
    .color-picker-grid {
        grid-template-columns: 1fr;
    }
    
    .preview-buttons {
        flex-direction: column;
    }
    
    .preview-btn-primary,
    .preview-btn-gradient {
        width: 100%;
    }
    
    /* Custom Status Dropdown Mobile */
    .status-dropdown-menu {
        max-height: 300px;
        font-size: 0.9rem;
    }
    
    .status-option {
        padding: 10px 14px;
    }
    
    .status-dropdown-trigger {
        font-size: 0.9rem;
        padding: 10px 14px;
    }
}

/* دکمه‌های اضافی برای صفحه میزها */
.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-update {
    background: var(--primary-color);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.9rem;
}

.btn-update:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Custom Status Dropdown */
.custom-status-dropdown {
    position: relative;
    width: 100%;
}

.status-dropdown-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
}

.status-dropdown-trigger:hover {
    border-color: var(--primary-color);
    background: var(--hover-bg);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.status-dropdown-trigger svg:first-child {
    flex-shrink: 0;
}

.status-dropdown-trigger span {
    flex: 1;
    text-align: right;
}

.dropdown-arrow-icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.status-dropdown-trigger.active .dropdown-arrow-icon {
    transform: rotate(180deg);
}

.status-dropdown-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-height: 400px;
    overflow-y: auto;
}

/* حالت تاریک */
[data-theme="dark"] .status-dropdown-menu {
    background: #1e293b;
}

.status-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.status-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

.status-option:last-child {
    border-bottom: none;
}

.status-option:hover {
    background: var(--hover-bg);
    padding-right: 20px;
}

.status-option svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.status-option span {
    flex: 1;
    text-align: right;
    font-size: 0.95rem;
    font-weight: 500;
}

.status-option[data-value="pending"]:hover {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.status-option[data-value="pending"]:hover svg {
    stroke: #f59e0b;
    opacity: 1;
}

.status-option[data-value="awaiting_payment"]:hover {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

.status-option[data-value="awaiting_payment"]:hover svg {
    stroke: #8b5cf6;
    opacity: 1;
}

.status-option[data-value="paid"]:hover,
.status-option[data-value="ready"]:hover {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-option[data-value="paid"]:hover svg,
.status-option[data-value="ready"]:hover svg {
    stroke: #10b981;
    opacity: 1;
}

.status-option[data-value="preparing"]:hover {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.status-option[data-value="preparing"]:hover svg {
    stroke: #3b82f6;
    opacity: 1;
}

.status-option[data-value="delivered"]:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.status-option[data-value="delivered"]:hover svg {
    stroke: #6366f1;
    opacity: 1;
}

.status-option[data-value="cancelled"]:hover,
.status-option[data-value="payment_failed"]:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.status-option[data-value="cancelled"]:hover svg,
.status-option[data-value="payment_failed"]:hover svg {
    stroke: #ef4444;
    opacity: 1;
}

.btn-download {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-print {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.btn-print:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-delete {
    background: #ef4444;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.btn-delete:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* استایل‌های صفحه میزها */
.settings-card,
.add-table-card {
    margin-bottom: 30px;
}

.settings-card h2,
.add-table-card h2 {
    margin: 0 0 20px 0;
    color: var(--primary-color);
    font-size: 1.3rem;
}

/* گرید میزها - دو ستونه در دسکتاپ و تکی در موبایل */
.tables-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 767px) {
    .tables-grid {
        grid-template-columns: 1fr;
    }
}

.table-card {
    position: relative;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--glass-border);
}

.table-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.table-info {
    margin-bottom: 20px;
}

.table-info p {
    margin: 8px 0;
    color: var(--text-secondary);
}

.table-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--text-secondary);
    opacity: 0.5;
}

.empty-icon svg {
    width: 48px;
    height: 48px;
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 1rem;
}

[data-theme="dark"] .empty-state h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .empty-state p {
    color: var(--text-secondary);
}


/* ?????????? ??? ????? ???? */
.products-selection {
    max-height: 600px;
    overflow-y: auto;
    padding: 15px;
    background: var(--glass-bg);
    border-radius: 12px;
    border: 1px solid var(--glass-border);
}

.category-section {
    margin-bottom: 30px;
}

.category-section:last-child {
    margin-bottom: 0;
}

.category-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.products-grid-select {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.product-select-item {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
}

.product-select-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.product-select-info {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 1;
}

.product-select-info img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    flex-shrink: 0;
}

.product-select-info h4 {
    font-size: 0.95rem;
    margin: 0 0 5px 0;
    color: var(--text-primary);
}

.product-price {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
}

.product-select-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.product-select-quantity input[type="number"] {
    width: 50px;
    text-align: end;
    padding: 8px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: var(--glass-bg);
    color: var(--text-primary);
    font-weight: 600;
}

.order-summary {
    margin-top: 20px;
    padding: 20px;
}

.order-summary h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--glass-border);
}

.summary-item:last-child {
    border-bottom: none;
}

.total-amount {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    margin-top: 15px;
    border-top: 2px solid var(--primary-color);
    font-size: 1.2rem;
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .products-grid-select {
        grid-template-columns: 1fr;
    }
    
    .product-select-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .product-select-quantity {
        width: 100%;
        justify-content: center;
    }
}

/* ?????? ??? ???? ??????? */
.products-search-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.products-search-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid var(--glass-border);
    border-radius: 12px;
    background: var(--glass-bg);
    color: var(--text-primary);
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.products-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.products-search-wrapper .search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.products-search-input:focus + .search-icon {
    color: var(--primary-color);
}

/* Placeholder ???? ??????? ???? ??? */
.product-no-image {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 2px dashed var(--glass-border);
    border-radius: 8px;
    flex-shrink: 0;
}

.product-no-image svg {
    color: var(--text-secondary);
    opacity: 0.5;
}
