/* Delivery Monitor Module */
.delivery-monitor-page {
    --dlv-primary: #ea580c;
    --dlv-primary-soft: #ffedd5;
    --dlv-success: #059669;
    --dlv-warning: #f59e0b;
    --dlv-danger: #dc2626;
    --dlv-info: #0891b2;
    --dlv-ink: #7c2d12;
    --dlv-muted: #64748b;
    --dlv-bg: #fff7ed;
    padding: 1.25rem;
    background:
        radial-gradient(circle at 8% -5%, rgba(234, 88, 12, 0.10), transparent 35%),
        radial-gradient(circle at 92% 0%, rgba(251, 146, 60, 0.09), transparent 33%),
        var(--dlv-bg);
    border-radius: 1rem;
}

.dlv-title { color: var(--dlv-ink); }
.dlv-subtitle { color: var(--dlv-muted); }
.dlv-card { border: 1px solid rgba(234, 88, 12, 0.15); border-radius: 0.9rem; background: #fff; box-shadow: 0 8px 24px rgba(124, 45, 18, 0.05); }
.dlv-card .card-header { background: linear-gradient(180deg, rgba(234, 88, 12, 0.06), transparent); border-bottom: 1px solid rgba(234, 88, 12, 0.1); }
.dlv-stats-box { border-radius: 0.8rem; background: linear-gradient(135deg, rgba(234, 88, 12, 0.05), rgba(251, 146, 60, 0.05)); border: 1px solid rgba(234, 88, 12, 0.18); padding: 1rem; text-align: center; }
.dlv-stats-box .label { color: var(--dlv-muted); font-size: 0.8rem; margin-bottom: 0.4rem; }
.dlv-stats-box .value { color: var(--dlv-ink); font-size: 1.5rem; font-weight: 700; }
.dlv-timeline { position: relative; padding-left: 2rem; }
.dlv-timeline-item { position: relative; padding-bottom: 1.5rem; border-left: 2px solid #e5e7eb; padding-left: 1.5rem; }
.dlv-timeline-item:last-child { border-left-color: transparent; }
.dlv-timeline-item::before { content: ''; position: absolute; left: -6px; top: 0; width: 10px; height: 10px; border-radius: 50%; background: #ea580c; border: 2px solid #fff; box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.2); }
.dlv-timeline-item.success::before { background: #059669; box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2); }
.dlv-timeline-item.error::before { background: #dc2626; box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2); }
.dlv-timeline-item.warning::before { background: #f59e0b; box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2); }
.dlv-status-badge { padding: 0.3rem 0.7rem; border-radius: 0.45rem; font-size: 0.78rem; font-weight: 600; display: inline-flex; align-items: center; gap: 0.3rem; }
.dlv-status-badge.sent { background: #d1fae5; color: #065f46; }
.dlv-status-badge.delivered { background: #dbeafe; color: #1e40af; }
.dlv-status-badge.read { background: #ede9fe; color: #5b21b6; }
.dlv-status-badge.failed { background: #fee2e2; color: #991b1b; }
.dlv-status-badge.pending { background: #fef3c7; color: #92400e; }
.dlv-error-box { border-radius: 0.75rem; border: 1px solid #fecaca; background: #fef2f2; padding: 1rem; margin-bottom: 0.8rem; }
.dlv-error-box .error-code { font-weight: 700; color: #991b1b; font-size: 0.9rem; margin-bottom: 0.4rem; }
.dlv-alert-box { border-radius: 0.75rem; border-left: 4px solid; padding: 0.85rem; margin-bottom: 0.8rem; }
.dlv-alert-box.warning { background: #fffbeb; border-color: #f59e0b; color: #92400e; }
.dlv-alert-box.info { background: #eff6ff; border-color: #3b82f6; color: #1e40af; }

/* Dark Mode */
html.dark-theme .delivery-monitor-page {
    --dlv-ink: #fed7aa;
    --dlv-muted: #94a3b8;
    --dlv-bg: #1a0f08;
    background:
        radial-gradient(circle at 8% -5%, rgba(234, 88, 12, 0.12), transparent 35%),
        radial-gradient(circle at 92% 0%, rgba(251, 146, 60, 0.10), transparent 33%),
        var(--dlv-bg);
}
html.dark-theme .dlv-title { color: #fed7aa; }
html.dark-theme .dlv-subtitle { color: #94a3b8; }
html.dark-theme .dlv-card { background: #2a1810; border-color: rgba(234, 88, 12, 0.2); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }
html.dark-theme .dlv-card .card-header { background: linear-gradient(180deg, rgba(234, 88, 12, 0.1), transparent); border-color: rgba(234, 88, 12, 0.2); }
html.dark-theme .dlv-stats-box { background: linear-gradient(135deg, rgba(234, 88, 12, 0.1), rgba(251, 146, 60, 0.1)); border-color: rgba(234, 88, 12, 0.3); }
html.dark-theme .dlv-stats-box .value { color: #fb923c; }
html.dark-theme .dlv-timeline-item { border-color: rgba(255, 255, 255, 0.1); }
html.dark-theme .dlv-error-box { background: rgba(239, 68, 68, 0.1); border-color: #ef4444; }
html.dark-theme .dlv-alert-box.warning { background: rgba(245, 158, 11, 0.1); border-color: #f59e0b; color: #fcd34d; }
html.dark-theme .dlv-alert-box.info { background: rgba(59, 130, 246, 0.1); border-color: #3b82f6; color: #93c5fd; }
