* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* ثيم بلون #0877ab */
    --primary-color: #0877ab;
    --secondary-color: #0a9fd4;
    --accent-color: #065a82;
    --blue-light: #e0f4fc;
    --blue-soft: #b3e5f7;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --bg-light: #f0f9ff;
    --white: #ffffff;
    --shadow: rgba(8, 119, 171, 0.1);
    --shadow-hover: rgba(8, 119, 171, 0.18);
}

body {
    font-family: 'Segoe UI', 'Cairo', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0f9ff 100%);
    min-height: 100vh;
    padding: 20px;
    padding-bottom: 180px; /* مساحة للفوتر الثابت */
    direction: rtl;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
}

header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    padding: 25px 30px;
    border-radius: 15px;
    box-shadow: 0 8px 20px var(--shadow);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(8, 119, 171, 0.12) 0%, transparent 70%);
    border-radius: 50%;
}

header h1 {
    color: var(--white);
    font-size: 2.2em;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

header h1::after {
    content: ' EST.2019';
    font-size: 0.5em;
    color: var(--blue-light);
    font-weight: normal;
    margin-right: 10px;
}

nav {
    position: relative;
    z-index: 1;
}

nav a {
    text-decoration: none;
    color: var(--white);
    margin: 0 8px;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
}

nav a:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(8, 119, 171, 0.35);
}

/* السلة في الهيدر */
.header-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 8px;
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

.header-cart-btn:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(8, 119, 171, 0.35);
}

.header-cart-icon {
    font-size: 1.35em;
}

.header-cart-badge {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.25);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.8em;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-cart-btn.has-items .header-cart-badge {
    background: var(--secondary-color);
    color: var(--white);
}

main {
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
    width: 100%;
}

.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.product-card {
    background: var(--white);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px var(--shadow);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px var(--shadow-hover);
    border-color: var(--secondary-color);
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid var(--blue-light);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image:empty::before {
    content: 'لا توجد صورة';
    color: var(--text-light);
    font-size: 0.9em;
}

.product-name {
    font-size: 1.3em;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.product-price {
    font-size: 1.5em;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-price::before {
    content: '';
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #0877ab 100%);
    border-radius: 50%;
    display: inline-block;
}

.product-description {
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1;
}

.btn-order {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s;
    width: 100%;
    box-shadow: 0 4px 10px var(--shadow);
    position: relative;
    overflow: hidden;
}

.btn-order::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(8, 119, 171, 0.25), transparent);
    transition: left 0.5s;
}

.btn-order:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--shadow-hover);
}

.btn-order:hover::before {
    left: 100%;
}

.btn-add-cart {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #0877ab 100%) !important;
    color: var(--white) !important;
}

/* زر السلة العائم - تصميم احترافي */
.floating-cart {
    position: fixed;
    bottom: 100px; /* فوق الفوتر الثابت */
    right: 28px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ea580c 0%, #f59e0b 50%, #d97706 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow:
        0 8px 28px rgba(234, 88, 12, 0.45),
        0 4px 14px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    z-index: 999;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: 3px solid rgba(255, 255, 255, 0.9);
}

.floating-cart::after {
    content: 'السلة';
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    background: linear-gradient(135deg, #ea580c 0%, #d97706 100%);
    color: var(--white);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.9em;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 4px 12px var(--shadow-hover);
}

.floating-cart:hover {
    transform: scale(1.06);
    box-shadow:
        0 12px 36px rgba(234, 88, 12, 0.5),
        0 6px 18px rgba(0, 0, 0, 0.18);
}

.floating-cart:hover::after {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.floating-cart-icon {
    font-size: 1.75em;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.floating-cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.8em;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    border: 2px solid var(--white);
}

.floating-cart.cart-bump {
    animation: cartBump 0.45s ease;
}

@keyframes cartBump {
    0% { transform: scale(1); }
    40% { transform: scale(1.15); }
    70% { transform: scale(0.98); }
    100% { transform: scale(1); }
}

/* نافذة السلة */
.cart-modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.cart-modal-content {
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
}

.cart-items-list {
    margin-bottom: 20px;
    max-height: 280px;
    overflow-y: auto;
}

.cart-empty-message {
    text-align: center;
    color: var(--text-light);
    padding: 30px 20px;
    font-size: 1.1em;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    gap: 12px;
}

.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cart-item-name {
    font-weight: 600;
    color: var(--text-dark);
}

.cart-item-price {
    font-size: 0.9em;
    color: var(--text-light);
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-qty-btn {
    width: 32px;
    height: 32px;
    border: 2px solid var(--blue-light);
    background: var(--white);
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary-color);
    transition: all 0.2s;
}

.cart-qty-btn:hover {
    background: var(--blue-light);
}

.cart-item-qty {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
}

.cart-remove-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #ffebee;
    color: #c62828;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2em;
    line-height: 1;
    transition: all 0.2s;
}

.cart-remove-btn:hover {
    background: #ffcdd2;
}

/* نموذج الطلب */
.order-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 35px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 8px 30px var(--shadow-hover);
    position: relative;
    border: 2px solid var(--secondary-color);
}

.close {
    color: #aaa;
    float: left;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    left: 20px;
    top: 20px;
}

.close:hover {
    color: #000;
}

#selectedProductInfo {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.order-summary {
    background: var(--bg-light);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid var(--blue-light);
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 1em;
}

.order-notes-cell {
    max-width: 180px;
    font-size: 0.9em;
    color: var(--text-light);
}

.order-products-cell {
    max-width: 220px;
    font-size: 0.9em;
    line-height: 1.4;
}

.order-summary-row.order-total {
    font-weight: bold;
    font-size: 1.2em;
    color: var(--primary-color);
    border-top: 2px solid var(--secondary-color);
    margin-top: 8px;
    padding-top: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: bold;
}

.form-group label .required-star {
    color: #dc2626;
    font-weight: bold;
    margin-right: 2px;
}

.form-group label .optional-label {
    color: var(--text-light);
    font-weight: normal;
    font-size: 0.85em;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: all 0.3s;
    background: var(--bg-light);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%230877ab' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    padding-left: 44px;
    padding-right: 14px;
}

[dir="rtl"] .form-group select {
    background-position: right 14px center;
    padding-right: 44px;
    padding-left: 14px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(8, 119, 171, 0.12);
}

.form-group textarea {
    resize: vertical;
}

.form-group .field-hint {
    display: block;
    font-size: 0.8em;
    color: var(--text-light);
    margin-top: 6px;
    line-height: 1.4;
}

.form-group .field-error {
    display: none;
    font-size: 0.85em;
    color: #dc2626;
    margin-top: 6px;
    font-weight: 500;
}

.form-group .field-error:not(:empty) {
    display: block;
}

/* حقل المدينة - تصميم احترافي */
.form-group.city-field label {
    font-size: 0.95em;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group.city-field label::before {
    content: '📍';
    font-size: 1.1em;
}

.form-group.city-field select {
    padding: 14px 16px;
    border-radius: 12px;
    border: 2px solid var(--blue-light);
    background-color: var(--white);
    font-size: 1.05em;
    font-weight: 500;
    color: var(--text-dark);
    box-shadow: 0 2px 8px var(--shadow);
}

[dir="rtl"] .form-group.city-field select {
    padding: 14px 44px 14px 16px;
}

.form-group.city-field select:hover {
    border-color: var(--secondary-color);
}

.form-group.city-field select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(8, 119, 171, 0.15);
}

.form-group.city-field select option {
    padding: 12px;
    font-weight: 500;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s;
    box-shadow: 0 4px 10px var(--shadow);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--shadow-hover);
}

.success-message {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    padding: 18px 30px;
    border-radius: 10px;
    box-shadow: 0 6px 20px var(--shadow-hover);
    z-index: 2000;
    font-weight: 600;
    border: 2px solid var(--secondary-color);
}

/* بوب اب بعد إضافة المنتج إلى السلة */
.cart-added-popup {
    display: none;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2001;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-added-popup.show {
    display: flex;
    opacity: 1;
}

.cart-popup-content {
    background: var(--white);
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 380px;
    width: 100%;
    border: 2px solid var(--blue-light);
    animation: popupIn 0.3s ease;
}

@keyframes popupIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.cart-popup-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: var(--white);
    border-radius: 50%;
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 16px;
}

.cart-popup-content h3 {
    color: var(--text-dark);
    font-size: 1.25em;
    margin-bottom: 24px;
    font-weight: 700;
}

.cart-popup-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 0;
}

.btn-popup {
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-family: inherit;
}

.btn-go-cart {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    box-shadow: 0 4px 12px var(--shadow);
}

.btn-go-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--shadow-hover);
}

.btn-continue {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid var(--blue-light);
}

.btn-continue:hover {
    background: var(--blue-light);
}

/* صفحة الإدارة */
.admin-main {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px var(--shadow);
    border: 2px solid var(--blue-light);
}

/* التبويبات */
.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 12px 24px;
    font-size: 1em;
    cursor: pointer;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn:hover {
    color: #667eea;
    background: #f5f5f5;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--secondary-color);
    font-weight: bold;
    background: var(--blue-light);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* الداشبورد */
.dashboard-section {
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--white) 100%);
    border-radius: 15px;
    border: 2px solid var(--blue-light);
}

.dashboard-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.8em;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px var(--shadow-hover);
}

.stat-card.stat-new {
    border-left: 4px solid #2196F3;
}

.stat-card.stat-processing {
    border-left: 4px solid #FF9800;
}

.stat-card.stat-shipped {
    border-left: 4px solid #9C27B0;
}

.stat-card.stat-delivered {
    border-left: 4px solid #4CAF50;
}

.stat-card.stat-cancelled {
    border-left: 4px solid #F44336;
}

.stat-card.stat-total {
    border-left: 4px solid var(--secondary-color);
    background: linear-gradient(135deg, var(--blue-light) 0%, var(--white) 100%);
}

.stat-icon {
    font-size: 2.5em;
    opacity: 0.8;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9em;
}

.filters-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--blue-light);
}

.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    margin-top: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-weight: bold;
    color: #333;
}

.filter-group input,
.filter-group select {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    background: var(--bg-light);
    transition: all 0.3s;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--secondary-color);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(8, 119, 171, 0.12);
}

.btn-filter,
.btn-export {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s;
    height: fit-content;
    box-shadow: 0 4px 10px var(--shadow);
}

.btn-filter:hover,
.btn-export:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--shadow-hover);
}

.btn-export {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #0877ab 100%);
    color: var(--primary-color);
}

.orders-section h2 {
    color: #333;
    margin-bottom: 20px;
}

.orders-table-container {
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.orders-table th,
.orders-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #ddd;
}

.orders-table th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    font-weight: bold;
}

.orders-table tr:hover {
    background-color: var(--blue-light);
    transition: background 0.3s;
}

/* حالات الطلبات */
.status-select {
    padding: 6px 12px;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--white);
    color: var(--text-dark);
    min-width: 140px;
}

.status-select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(8, 119, 171, 0.12);
}

.status-select.status-new {
    background: #E3F2FD;
    color: #1976D2;
    border-color: #2196F3;
}

.status-select.status-processing {
    background: #FFF3E0;
    color: #F57C00;
    border-color: #FF9800;
}

.status-select.status-shipped {
    background: #F3E5F5;
    color: #7B1FA2;
    border-color: #9C27B0;
}

.status-select.status-delivered {
    background: #E8F5E9;
    color: #388E3C;
    border-color: #4CAF50;
}

.status-select.status-cancelled {
    background: #FFEBEE;
    color: #C62828;
    border-color: #F44336;
}

.btn-delete {
    background: #dc3545;
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(220, 53, 69, 0.3);
}

.btn-delete:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4);
}

.empty-orders {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 1.2em;
}

/* إدارة المنتجات */
.products-management-section {
    margin-top: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.btn-add {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #0877ab 100%);
    color: var(--primary-color);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 10px var(--shadow);
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--shadow-hover);
}

.products-table-container {
    overflow-x: auto;
}

.products-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.products-table th,
.products-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #ddd;
}

.products-table th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    font-weight: bold;
}

.products-table tr:hover {
    background-color: var(--blue-light);
    transition: background 0.3s;
}

.btn-edit {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #0877ab 100%);
    color: var(--primary-color);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    margin-left: 5px;
    transition: all 0.3s;
    box-shadow: 0 2px 5px var(--shadow);
}

.btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow-hover);
}

/* نموذج المنتج */
.product-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.product-modal .modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.btn-cancel {
    background: #999;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    width: 100%;
    margin-top: 10px;
    transition: opacity 0.3s;
}

.btn-cancel:hover {
    opacity: 0.9;
}

/* معاينة الصورة */
.image-preview {
    margin-top: 10px;
    display: none;
}

.image-preview.active {
    display: block;
}

.image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    border: 2px solid var(--secondary-color);
    box-shadow: 0 4px 10px var(--shadow);
}

.image-preview-container {
    position: relative;
    display: inline-block;
}

.image-preview-remove {
    position: absolute;
    top: -10px;
    left: -10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.image-preview-remove:hover {
    background: #c82333;
}

/* صفحة المدن - أجور التوصيل */
.cities-section {
    max-width: 700px;
}

.cities-desc {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 0.95em;
}

.cities-table-container {
    overflow-x: auto;
    margin-bottom: 20px;
}

.cities-table {
    width: 100%;
    border-collapse: collapse;
}

.cities-table th,
.cities-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #ddd;
}

.cities-table th {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    font-weight: bold;
}

.cities-table tr:hover {
    background-color: var(--blue-light);
}

.city-fee-input {
    width: 120px;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    margin-left: 8px;
}

.currency-label {
    color: var(--text-light);
    font-size: 0.9em;
}

/* إعدادات الموقع */
.settings-section {
    max-width: 600px;
}

.settings-section h2 {
    margin-bottom: 20px;
    color: #333;
}

/* قسم SEO */
.seo-section {
    max-width: 720px;
}

.seo-header {
    margin-bottom: 28px;
}

.seo-header h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.6em;
}

.seo-desc {
    color: var(--text-light);
    font-size: 0.95em;
    line-height: 1.6;
    margin: 0;
}

.seo-block {
    background: var(--bg-light);
    padding: 24px;
    border-radius: 12px;
    border: 2px solid var(--blue-light);
    margin-bottom: 24px;
}

.seo-block h3 {
    color: var(--primary-color);
    font-size: 1.15em;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--blue-light);
}

.seo-block .form-group {
    margin-bottom: 18px;
}

.seo-block .form-group:last-of-type {
    margin-bottom: 0;
}

/* قسم الواتساب */
.whatsapp-section {
    max-width: 720px;
}

.whatsapp-section h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.6em;
}

.whatsapp-section .section-desc {
    color: var(--text-light);
    font-size: 0.95em;
    line-height: 1.6;
    margin-bottom: 24px;
}

.whatsapp-section .form-group {
    margin-bottom: 18px;
}

.whatsapp-test-box {
    background: var(--bg-light);
    padding: 24px;
    border-radius: 12px;
    border: 2px solid var(--blue-light);
    margin: 24px 0;
}

.whatsapp-test-box h3 {
    color: var(--primary-color);
    font-size: 1.15em;
    margin-bottom: 16px;
}

.btn-test-whatsapp {
    padding: 12px 24px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.btn-test-whatsapp:hover {
    opacity: 0.95;
    transform: translateY(-1px);
}

.whatsapp-test-status {
    display: inline-block;
    margin-right: 12px;
    font-size: 0.9em;
    vertical-align: middle;
}

.whatsapp-test-status.sending {
    color: var(--text-light);
}

.whatsapp-test-status.success {
    color: #059669;
}

.whatsapp-test-status.error {
    color: #dc2626;
}

.whatsapp-message-section {
    background: var(--bg-light);
    padding: 24px;
    border-radius: 12px;
    border: 2px solid var(--blue-light);
    margin-top: 28px;
}

.whatsapp-message-section h3 {
    color: var(--primary-color);
    font-size: 1.15em;
    margin-bottom: 12px;
}

.placeholders-list {
    list-style: none;
    margin: 12px 0 16px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}

.placeholders-list li {
    font-size: 0.9em;
    color: var(--text-light);
}

.placeholders-list code {
    background: rgba(8, 119, 171, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--accent-color);
}

.field-hint {
    display: block;
    font-size: 0.8em;
    color: var(--text-light);
    margin-top: 4px;
}

.og-image-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.og-image-row input[type="url"] {
    flex: 1;
    min-width: 200px;
}

.btn-upload-og {
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-upload-og:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow);
}

.btn-upload-og:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.og-image-preview {
    margin-top: 10px;
    display: none;
}

.og-image-preview img {
    max-width: 280px;
    max-height: 148px;
    object-fit: contain;
    border-radius: 8px;
    border: 2px solid var(--blue-light);
    box-shadow: 0 2px 8px var(--shadow);
}

.btn-save {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s;
    margin-top: 10px;
    box-shadow: 0 4px 10px var(--shadow);
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--shadow-hover);
}

.btn-restore-default {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    margin-right: 12px;
    transition: all 0.2s;
}

.btn-restore-default:hover {
    background: var(--blue-light);
}

/* الفوتر الثابت - تصميم احترافي ومدمج */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, #054363 0%, var(--primary-color) 40%, var(--accent-color) 100%);
    color: var(--white);
    padding: 0;
    border-top: 2px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 -4px 20px rgba(8, 119, 171, 0.15);
    z-index: 100;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(8, 119, 171, 0.15) 0%, transparent 65%);
    border-radius: 50%;
    pointer-events: none;
}

.site-footer::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
    pointer-events: none;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 16px 20px 10px;
    position: relative;
    z-index: 1;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section h3 {
    color: var(--secondary-color);
    font-size: 0.95em;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.footer-section p {
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85em;
    margin: 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    transition: transform 0.2s, opacity 0.2s;
}

.contact-item:hover {
    transform: translateX(-3px);
    opacity: 1;
}

.contact-icon {
    font-size: 1em;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    opacity: 0.95;
}

.contact-label {
    font-weight: 600;
    color: var(--blue-light);
    min-width: 70px;
    font-size: 0.8em;
    letter-spacing: 0.01em;
}

.contact-value {
    flex: 1;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.85em;
    word-break: break-word;
    line-height: 1.4;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 20px 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    position: relative;
    z-index: 1;
    background: rgba(0, 0, 0, 0.08);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.75em;
    margin: 0;
    font-weight: 500;
}

@media (max-width: 768px) {
    body {
        padding-bottom: 92px;
    }

    header {
        flex-direction: column;
        gap: 15px;
    }

    .products-container {
        grid-template-columns: 1fr;
    }

    .floating-cart {
        bottom: 100px;
        right: 20px;
        width: 58px;
        height: 58px;
    }

    .floating-cart::after {
        display: none;
    }

    .filter-controls {
        flex-direction: column;
    }

    .orders-table {
        font-size: 0.9em;
    }

    .orders-table th,
    .orders-table td {
        padding: 8px;
    }

    /* فوتر مدمج على الموبايل */
    .site-footer::before {
        width: 100px;
        height: 100px;
    }

    .footer-content {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        padding: 10px 12px 6px;
        text-align: center;
    }

    .footer-section {
        width: 100%;
        min-width: 0;
    }

    .footer-section:first-child .contact-info {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px 14px;
    }

    .footer-section h3 {
        display: none;
    }

    .contact-item {
        justify-content: center;
        gap: 4px;
        padding: 2px 0;
    }

    .contact-icon {
        font-size: 0.95em;
        min-width: 22px;
        height: 22px;
    }

    .contact-label {
        display: none;
    }

    .contact-value {
        font-size: 0.72em;
        line-height: 1.3;
    }

    .footer-section p {
        font-size: 0.7em;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .footer-bottom {
        padding: 4px 12px 6px;
    }

    .footer-bottom p {
        font-size: 0.68em;
    }
}

/* صفحة تسجيل الدخول */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0f9ff 100%);
}

.login-box {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 30px var(--shadow-hover);
    width: 100%;
    max-width: 450px;
    border: 2px solid var(--secondary-color);
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(8, 119, 171, 0.12) 0%, transparent 70%);
    border-radius: 50%;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.login-header h1 {
    color: var(--primary-color);
    font-size: 2em;
    margin-bottom: 10px;
    font-weight: bold;
}

.login-header p {
    color: var(--text-light);
    font-size: 1.1em;
}

.login-box form {
    position: relative;
    z-index: 1;
}

.btn-login {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s;
    box-shadow: 0 4px 10px var(--shadow);
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px var(--shadow-hover);
}

.error-message {
    display: none;
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
    font-size: 0.9em;
    border: 1px solid #ef5350;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.login-footer p {
    color: var(--text-light);
    font-size: 0.85em;
    padding: 10px;
    background: var(--blue-light);
    border-radius: 8px;
}

.logout-link {
    color: #ff6b6b !important;
    border-color: #ff6b6b !important;
}

.logout-link:hover {
    background: #ff6b6b !important;
    color: var(--white) !important;
}

/* البروفايل */
.profile-section {
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 25px;
    padding: 30px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px var(--shadow);
    color: var(--white);
}

.profile-avatar {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--secondary-color);
}

.avatar-icon {
    font-size: 3em;
}

.profile-info h2 {
    color: var(--white);
    margin-bottom: 10px;
    font-size: 1.8em;
}

.profile-info p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
    margin: 0;
}

.profile-info span {
    color: var(--secondary-color);
    font-weight: bold;
}

.profile-content {
    margin-top: 20px;
}

.profile-card {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px var(--shadow);
    border: 2px solid var(--blue-light);
}

.profile-card h3 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 1.5em;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--blue-light);
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-avatar {
        width: 80px;
        height: 80px;
    }

    .avatar-icon {
        font-size: 2.5em;
    }
}
