/* ================================================
   نظام ليالي الشام - تنسيقات لوحة التحكم
   ================================================ */

/* === Dashboard Grid === */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

/* === Chart Card === */
.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
}

.chart-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

/* === Top Products === */
.top-product-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.top-product-item:last-child { border-bottom: none; }

.top-product-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(184, 145, 46, 0.08);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-en);
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.top-product-rank.gold { background: linear-gradient(135deg, #d4a843, #b8912e); color: #ffffff; }
.top-product-rank.silver { background: linear-gradient(135deg, #95a5a6, #7f8c8d); color: #ffffff; }
.top-product-rank.bronze { background: linear-gradient(135deg, #cd7f32, #a66628); color: #ffffff; }

.top-product-info { flex: 1; }
.top-product-info strong { font-size: 13px; display: block; }
.top-product-info span { font-size: 11px; color: var(--text-secondary); font-family: var(--font-en), var(--font-ar); }

.top-product-revenue {
    font-family: var(--font-en), var(--font-ar);
    font-weight: 700;
    color: var(--primary);
    font-size: 13px;
}

/* === Alerts List === */
.alert-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--danger-bg);
    border: 1px solid rgba(231, 76, 60, 0.15);
    margin-bottom: 8px;
    animation: slideUp 0.3s ease;
}

.alert-item.warning {
    background: var(--warning-bg);
    border-color: rgba(243, 156, 18, 0.15);
}

.alert-item svg {
    width: 18px;
    height: 18px;
    color: var(--danger);
    flex-shrink: 0;
}

.alert-item.warning svg { color: var(--warning); }

.alert-item-info { flex: 1; }
.alert-item-info strong { font-size: 12px; display: block; }
.alert-item-info span { font-size: 11px; color: var(--text-secondary); }

/* === Recent Orders === */
.recent-order {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.recent-order:last-child { border-bottom: none; }

.order-number {
    font-family: var(--font-en);
    font-weight: 600;
    color: var(--primary);
    font-size: 12px;
}

.order-info { flex: 1; }
.order-info strong { font-size: 13px; display: block; }
.order-info small { color: var(--text-secondary); font-size: 11px; }

/* === Kitchen Display === */
.kitchen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.kitchen-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    animation: slideUp 0.4s ease;
}

.kitchen-card.status-pending { border-top: 3px solid var(--warning); }
.kitchen-card.status-preparing { border-top: 3px solid var(--info); }

.kitchen-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #f7f8fa;
}

.kitchen-card-header .order-num {
    font-family: var(--font-en);
    font-weight: 700;
    color: var(--primary);
    font-size: 16px;
}

.kitchen-card-header .order-time {
    font-family: var(--font-en);
    font-size: 12px;
    color: var(--text-secondary);
}

.kitchen-timer {
    background: rgba(243, 156, 18, 0.15);
    color: var(--warning);
    padding: 3px 10px;
    border-radius: 12px;
    font-family: var(--font-en);
    font-size: 12px;
    font-weight: 600;
}

.kitchen-timer.late {
    background: var(--danger-bg);
    color: var(--danger);
    animation: pulse 1s ease infinite;
}

.kitchen-items {
    padding: 16px;
}

.kitchen-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.kitchen-item:last-child { border-bottom: none; }

.kitchen-item-qty {
    background: rgba(184, 145, 46, 0.1);
    color: var(--primary);
    min-width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-en);
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.kitchen-item-name { font-size: 14px; font-weight: 600; }
.kitchen-item-notes { font-size: 11px; color: var(--warning); margin-top: 2px; }

.kitchen-card-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

/* === Reports === */
.report-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.report-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
}

.report-card .label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.report-card .value {
    font-size: 24px;
    font-weight: 800;
    font-family: var(--font-en), var(--font-ar);
    color: var(--text-primary);
}

.report-card .value.positive { color: var(--success); }
.report-card .value.negative { color: var(--danger); }

/* === Inventory Styles === */
.inventory-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.inventory-status.ok { background: var(--success-bg); color: var(--success); }
.inventory-status.low { background: var(--warning-bg); color: var(--warning); }
.inventory-status.out { background: var(--danger-bg); color: var(--danger); }

.progress-mini {
    width: 60px;
    height: 6px;
    background: #f1f5f9;
    border-radius: 3px;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

.progress-mini-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s;
}

.progress-mini-fill.ok { background: var(--success); }
.progress-mini-fill.low { background: var(--warning); }
.progress-mini-fill.out { background: var(--danger); }

/* === Settings === */
.settings-section {
    margin-bottom: 30px;
}

.settings-section h3 {
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.setting-label {
    font-size: 14px;
    color: var(--text-primary);
}

.setting-label small {
    display: block;
    color: var(--text-secondary);
    font-size: 11px;
    margin-top: 2px;
}

/* Toggle Switch */
.toggle {
    position: relative;
    width: 48px;
    height: 26px;
}

.toggle input { display: none; }

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #e2e8f0;
    border: 1px solid var(--border);
    border-radius: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--text-secondary);
    top: 2px;
    right: 2px;
    transition: var(--transition);
}

.toggle input:checked + .toggle-slider {
    background: rgba(184, 145, 46, 0.15);
    border-color: var(--primary);
}

.toggle input:checked + .toggle-slider::before {
    background: var(--primary);
    transform: translateX(-22px);
}

/* === Responsive === */
@media (max-width: 992px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .kitchen-grid { grid-template-columns: 1fr; }
}
