/* admin.css - الإصدار المصحح والمنظم بالكامل */

/* ===== المتغيرات والأساسيات ===== */
.admin-panel {
    background: linear-gradient(135deg, var(--dark-gray) 0%, var(--medium-gray) 100%);
    margin: 2rem;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
    border: 1px solid var(--gold);
    position: relative;
}

.admin-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--light-gold));
}

.admin-title {
    text-align: center;
    color: var(--gold);
    margin-bottom: 2rem;
    font-size: 2rem;
}

.admin-subtitle {
    color: var(--gold);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* ===== نظام المصادقة ===== */
.login-section {
    background: linear-gradient(135deg, var(--medium-gray) 0%, var(--dark-gray) 100%);
    margin: 100px auto;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
    max-width: 400px;
    text-align: center;
    border: 1px solid var(--gold);
}

.login-title {
    color: var(--gold);
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

/* ===== النماذج والعناصر ===== */
.admin-form {
    display: grid;
    gap: 1.5rem;
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gold);
    text-align: right;
}

.form-input,
.form-textarea,
.form-group select {
    padding: 0.8rem 1rem;
    border: 2px solid var(--light-gray);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--dark-gray);
    color: var(--white);
    width: 100%;
}

.form-input:focus,
.form-textarea:focus,
.form-group select:focus {
    border-color: var(--gold);
    outline: none;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--light-gray);
}

/* ===== الأزرار ===== */
.login-btn,
.upload-btn,
.add-product-btn,
.filter-btn,
.action-btn,
.save-settings-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-btn,
.upload-btn {
    background: linear-gradient(45deg, var(--gold), var(--dark-gold));
    color: var(--black);
}

.login-btn:hover,
.upload-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
    background: linear-gradient(45deg, var(--dark-gold), var(--gold));
}

.add-product-btn,
.save-settings-btn,
.submit-order-btn,
.update-product-btn,
.btn-complete {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
}

.add-product-btn:hover,
.save-settings-btn:hover,
.submit-order-btn:hover,
.update-product-btn:hover,
.btn-complete:hover {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
    transform: scale(1.02);
}

.filter-btn {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
    padding: 0.5rem 1rem;
}

.filter-btn:hover {
    transform: scale(1.05);
}

.cancel-order-btn,
.cancel-edit-btn,
.btn-cancel,
.delete-product-btn {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
}

.cancel-order-btn:hover,
.cancel-edit-btn:hover,
.btn-cancel:hover,
.delete-product-btn:hover {
    background: linear-gradient(45deg, #c0392b, #e74c3c);
    transform: scale(1.05);
}

.edit-product-btn,
.btn-edit {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
}

.edit-product-btn:hover,
.btn-edit:hover {
    background: linear-gradient(45deg, #2980b9, #3498db);
    transform: scale(1.05);
}

.btn-icon {
    font-size: 1.2rem;
}

/* ===== قسم الأسعار والربح ===== */
.pricing-section {
    background: var(--dark-gray);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid var(--gold);
    margin-bottom: 1.5rem;
}

.price-inputs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.profit-preview {
    background: rgba(39, 174, 96, 0.1);
    border: 1px solid #27ae60;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.profit-preview #profitAmount,
.profit-preview #editProfitAmount {
    font-size: 1.2rem;
    font-weight: bold;
    color: #27ae60;
    display: block;
}

.profit-preview #profitPercentage,
.profit-preview #editProfitPercentage {
    font-size: 0.9rem;
    color: #2ecc71;
}

/* ===== إدارة المقاسات ===== */
.tags-input-container {
    background: var(--dark-gray);
    border: 2px solid var(--light-gray);
    border-radius: 10px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.tags-input-container:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.tags-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    min-height: 40px;
}

.tag-item {
    background: linear-gradient(45deg, var(--gold), var(--dark-gold));
    color: var(--black);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.remove-tag {
    background: none;
    border: none;
    color: var(--black);
    cursor: pointer;
    font-weight: bold;
    padding: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-tag:hover {
    background: rgba(0, 0, 0, 0.2);
}

.tags-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tags-input {
    flex: 1;
    padding: 0.5rem 1rem;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    background: var(--medium-gray);
    color: var(--white);
}

.tags-input:focus {
    outline: none;
    border-color: var(--gold);
}

.add-tag-btn {
    background: var(--gold);
    color: var(--black);
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.add-tag-btn:hover {
    background: var(--light-gold);
    transform: scale(1.05);
}

.tags-suggestions {
    margin-top: 1rem;
}

.suggestion-title {
    color: var(--light-gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.suggestion-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.suggestion-tag {
    background: var(--medium-gray);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--light-gray);
}

.suggestion-tag:hover {
    background: var(--gold);
    color: var(--black);
    transform: scale(1.05);
}

/* ===== إدارة الألوان ===== */
.modern-colors-container {
    background: var(--dark-gray);
    border: 2px solid var(--light-gray);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.modern-colors-container:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

.quick-colors-bar {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--medium-gray);
    flex-wrap: wrap;
    justify-content: center;
}

.color-preset {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.color-preset:hover {
    transform: scale(1.15);
    border-color: var(--gold);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.color-preset::after {
    content: '+';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.color-preset:hover::after {
    opacity: 1;
}

.color-picker-advanced {
    margin-bottom: 1.5rem;
}

.color-input-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.color-name-input {
    flex: 1;
    min-width: 200px;
    padding: 0.8rem 1rem;
    border: 2px solid var(--light-gray);
    border-radius: 10px;
    background: var(--medium-gray);
    color: var(--white);
    font-size: 1rem;
}

.color-name-input:focus {
    border-color: var(--gold);
    outline: none;
}

.color-picker-input {
    width: 60px;
    height: 50px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: none;
}

.color-picker-input::-webkit-color-swatch {
    border: 3px solid var(--gold);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.color-picker-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.add-color-btn {
    background: linear-gradient(45deg, var(--gold), var(--dark-gold));
    color: var(--black);
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-color-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

.selected-colors-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    min-height: 60px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px dashed var(--light-gray);
}

.color-tag {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--medium-gray);
    padding: 0.8rem 1rem;
    border-radius: 25px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: slideInUp 0.3s ease;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.color-tag:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
}

.color-tag-preview {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.color-tag-name {
    color: var(--white);
    font-weight: 600;
    font-size: 0.9rem;
}

.remove-color-tag {
    background: none;
    border: none;
    color: var(--light-gray);
    cursor: pointer;
    font-size: 1.2rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-color-tag:hover {
    background: #e74c3c;
    color: white;
}

.empty-colors-message {
    color: var(--light-gray);
    text-align: center;
    width: 100%;
    padding: 1rem;
    font-style: italic;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== إدارة الصور المتعددة ===== */
.multiple-images-upload-section {
    text-align: center;
    padding: 1.5rem;
    border: 2px dashed var(--light-gray);
    border-radius: 10px;
    transition: all 0.3s ease;
    background: var(--medium-gray);
}

.multiple-images-upload-section:hover {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
}

.multiple-upload-btn {
    background: linear-gradient(45deg, #3498db, #2980b9) !important;
    margin-bottom: 1rem;
}

.uploaded-images-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    min-height: 100px;
}

.uploaded-image-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid var(--gold);
    transition: all 0.3s ease;
}

.uploaded-image-item:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

.uploaded-image-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.remove-image-btn {
    position: absolute;
    top: 5px;
    left: 5px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-image-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.images-counter {
    color: var(--gold);
    font-weight: 600;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.upload-hint {
    color: var(--light-gray);
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.upload-icon {
    font-size: 1.2rem;
}

/* ===== أقسام المنتجات والطلبات ===== */
.admin-products-section,
.admin-orders-section,
.accounting-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--gold);
}

.admin-product-item {
    background: var(--dark-gray);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid var(--gold);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.admin-product-item:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.product-actions button {
    flex: 1;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* ===== نظام التعديل ===== */
.edit-product-section {
    background: linear-gradient(135deg, var(--medium-gray) 0%, var(--dark-gray) 100%);
    padding: 2rem;
    border-radius: 15px;
    border: 2px solid #3498db;
    margin-top: 2rem;
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.3);
    position: relative;
}

.edit-product-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2980b9);
}

.edit-action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--light-gray);
}

.edit-action-buttons button {
    flex: 1;
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
}

/* ===== الإحصائيات والبطاقات ===== */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--medium-gray) 0%, var(--dark-gray) 100%);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid var(--gold);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.2);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--light-gray);
    font-size: 0.9rem;
}

.accounting-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.accounting-card {
    background: linear-gradient(135deg, var(--medium-gray) 0%, var(--dark-gray) 100%);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid var(--gold);
}

.accounting-card h4 {
    color: var(--gold);
    margin-bottom: 1rem;
}

.amount {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--light-gold);
}

.profit-card {
    border: 2px solid #27ae60;
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1) 0%, var(--dark-gray) 100%);
}

.profit-amount {
    color: #27ae60 !important;
}

.stat-detail {
    font-size: 0.8rem;
    color: var(--light-gray);
    margin-top: 0.5rem;
}

/* ===== الجداول ===== */
.orders-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.orders-filters select,
.orders-filters input {
    padding: 0.5rem 1rem;
    border: 2px solid var(--light-gray);
    border-radius: 10px;
    background: var(--dark-gray);
    color: var(--white);
    min-width: 150px;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--dark-gray);
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--gold);
}

.orders-table th {
    background: linear-gradient(45deg, var(--gold), var(--dark-gold));
    color: var(--black);
    padding: 1rem;
    text-align: right;
    font-weight: bold;
}

.orders-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--medium-gray);
    text-align: right;
}

.orders-table tr:hover {
    background: rgba(212, 175, 55, 0.1);
}

/* ===== حالات الطلبات ===== */
.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.status-new {
    background: #f39c12;
    color: white;
}

.status-processing {
    background: #3498db;
    color: white;
}

.status-shipped {
    background: #9b59b6;
    color: white;
}

.status-completed {
    background: #27ae60;
    color: white;
}

.status-cancelled {
    background: #e74c3c;
    color: white;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.3rem 0.6rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.action-btn:hover {
    transform: scale(1.1);
}

/* ===== الأدوات المساعدة ===== */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

.debug-info {
    background: #e74c3c;
    color: white;
    padding: 10px;
    margin: 10px;
    border-radius: 5px;
    text-align: center;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ===== التصميم المتجاوب ===== */
@media (max-width: 768px) {
    .admin-panel {
        margin: 1rem;
        padding: 1.5rem;
    }

    .login-section {
        margin: 80px 1rem;
        padding: 2rem 1rem;
    }

    .admin-form {
        gap: 1rem;
    }

    .stats-cards,
    .accounting-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .price-inputs-grid {
        grid-template-columns: 1fr;
    }

    .orders-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .orders-table {
        font-size: 0.8rem;
    }

    .orders-table th,
    .orders-table td {
        padding: 0.5rem;
    }

    .color-input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .color-name-input {
        min-width: auto;
    }

    .quick-colors-bar {
        gap: 0.5rem;
    }

    .color-preset {
        width: 35px;
        height: 35px;
    }

    .uploaded-images-preview {
        grid-template-columns: repeat(3, 1fr);
    }

    .edit-action-buttons,
    .product-actions {
        flex-direction: column;
    }

    .tags-input-group {
        flex-direction: column;
    }

    .add-tag-btn {
        width: 100%;
    }

    .color-suggestions,
    .suggestion-tags {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .admin-panel {
        margin: 0.5rem;
        padding: 1rem;
    }

    .login-section {
        margin: 50px 0.5rem;
        padding: 1rem;
    }

    .stats-cards,
    .accounting-stats {
        grid-template-columns: 1fr;
    }
}
/* أضف هذا في قسم الأدوات المساعدة */
.admin-dashboard {
    transition: all 0.3s ease;
}

.admin-dashboard.hidden {
    display: none !important;
}

.admin-dashboard.visible {
    display: block !important;
}
.admin-dashboard {
    transition: all 0.3s ease;
}

.admin-dashboard.hidden {
    display: none !important;
}

.admin-dashboard.visible {
    display: block !important;
}
/* أنماط معلومات الهاتف */
.phone-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 180px;
}

.main-phone,
.secondary-phone {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.secondary-phone {
    background: rgba(46, 204, 113, 0.1);
    border-color: rgba(46, 204, 113, 0.3);
}

.phone-link {
    color: var(--white);
    text-decoration: none;
    flex: 1;
    font-size: 0.9rem;
    direction: ltr;
    text-align: center;
}

.phone-link:hover {
    color: var(--gold);
}

.copy-btn {
    background: var(--gold);
    color: var(--black);
    border: none;
    border-radius: 5px;
    padding: 0.2rem 0.4rem;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: var(--light-gold);
    transform: scale(1.1);
}

.whatsapp-actions {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.whatsapp-link {
    background: #25D366;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
}

.whatsapp-link:hover {
    background: #128C7E;
    transform: scale(1.05);
}

/* أنماط معلومات العميل والمنتج */
.customer-info,
.product-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 120px;
}

.order-notes {
    color: var(--gold);
    cursor: help;
    font-size: 0.9rem;
}

.product-price {
    color: var(--light-gold);
    font-size: 0.8rem;
    font-weight: bold;
}

/* زر معلومات إضافية */
.btn-info {
    background: linear-gradient(45deg, #9b59b6, #8e44ad) !important;
    color: white !important;
}

.btn-info:hover {
    background: linear-gradient(45deg, #8e44ad, #9b59b6) !important;
    transform: scale(1.1);
}

/* تحسينات للجدول على الشاشات الصغيرة */
@media (max-width: 1200px) {
    .orders-table {
        font-size: 0.8rem;
    }

    .phone-info {
        min-width: 150px;
    }

    .customer-info,
    .product-info {
        min-width: 100px;
    }
}

@media (max-width: 768px) {
    .orders-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .phone-info {
        min-width: 140px;
    }

    .whatsapp-actions {
        flex-direction: column;
    }

    .action-buttons {
        flex-direction: column;
        gap: 0.2rem;
    }

    .action-buttons .action-btn {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
}
/* ===== تحسينات جدول الطلبات ===== */
.orders-table-container {
    overflow-x: auto;
    background: var(--dark-gray);
    border-radius: 15px;
    border: 1px solid var(--gold);
    padding: 1rem;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

.orders-table th {
    background: linear-gradient(45deg, var(--gold), var(--dark-gold));
    color: var(--black);
    padding: 1.2rem;
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
    border-bottom: 2px solid var(--dark-gray);
}

.orders-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--medium-gray);
    text-align: center;
    vertical-align: middle;
}

.orders-table tr:hover {
    background: rgba(212, 175, 55, 0.1);
    transform: scale(1.01);
    transition: all 0.3s ease;
}
/* ===== تحسينات حالات الطلبات ===== */
.status-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: bold;
    text-align: center;
    min-width: 120px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.status-new {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    color: white;
}

.status-processing {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
}

.status-shipped {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    color: white;
}

.status-completed {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
}

.status-cancelled {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
}

/* ===== تحسينات حالة الطلب القابلة للتحديث ===== */
.status-select {
    width: 100%;
    padding: 0.6rem;
    border: 2px solid var(--gold);
    border-radius: 10px;
    background: var(--dark-gray);
    color: var(--white);
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.status-select:focus {
    outline: none;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
    border-color: var(--light-gold);
}

.status-select:hover {
    border-color: var(--light-gold);
}

.status-select option {
    background: var(--dark-gray);
    color: var(--white);
    padding: 0.8rem;
    font-size: 1rem;
}

/* ===== تحسينات أزرار الإجراءات المتبقية ===== */
.actions-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
}

.action-btn {
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-width: 80px;
}

.action-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-delete {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
}

.btn-info {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
}
/* أنماط أيقونة الملاحظات */
.order-notes-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    background: var(--gold);
    color: var(--black);
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
}

.order-notes-icon:hover {
    background: var(--light-gold);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
}

.customer-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 150px;
}

/* تحسينات للجدول */
.orders-table th:nth-child(2) {
    width: 150px;
}

.orders-table td:nth-child(2) {
    min-width: 150px;
}
.order-notes-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    background: var(--gold);
    color: var(--black);
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
}

.order-notes-icon:hover {
    background: var(--light-gold);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
}

.customer-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 150px;
}
/* أنماط عرض الكمية */
.quantity-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.quantity-badge {
    background: linear-gradient(45deg, var(--gold), var(--dark-gold));
    color: var(--black);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 1.1rem;
    min-width: 35px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(212, 175, 55, 0.3);
}

/* تحسينات للجدول مع العمود الجديد */
.orders-table th:nth-child(5) {
    /* عمود الكمية */
    width: 80px;
}

.orders-table td:nth-child(5) {
    text-align: center;
}

/* تحسين العرض على الشاشات الصغيرة */
@media (max-width: 1200px) {
    .quantity-badge {
        font-size: 1rem;
        padding: 0.3rem 0.6rem;
    }

    .orders-table th:nth-child(5),
    .orders-table td:nth-child(5) {
        width: 70px;
    }
}
/* تنسيقات التقارير المالية */
.accounting-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.accounting-card {
    background: linear-gradient(135deg, var(--dark-gray) 0%, var(--medium-gray) 100%);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid var(--gold);
    text-align: center;
}

.accounting-card h4 {
    color: var(--gold);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.amount {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.profit-amount {
    color: #27ae60;
}

.stat-detail {
    color: var(--light-gray);
    font-size: 0.9rem;
}

/* تنسيقات جدول الطلبات */
.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-block;
}

.status-new {
    background: #3498db;
    color: white;
}

.status-processing {
    background: #f39c12;
    color: white;
}

.status-shipped {
    background: #9b59b6;
    color: white;
}

.status-completed {
    background: #27ae60;
    color: white;
}

.status-cancelled {
    background: #e74c3c;
    color: white;
}

.quantity-badge {
    background: var(--gold);
    color: var(--black);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-right: 0.5rem;
}

.product-items {
    margin-top: 0.5rem;
}

.product-item-detail {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
    margin: 0.2rem 0;
    font-size: 0.8rem;
}

.notes-indicator {
    margin-right: 0.5rem;
    cursor: pointer;
}

.order-actions {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.action-buttons {
    display: flex;
    gap: 0.3rem;
    justify-content: center;
}

.action-btn {
    background: var(--dark-gray);
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: var(--gold);
    color: var(--black);
}