/* Vetmivo Phase 10: Notification Engine & Settings Styles */

.notif-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.notif-kpi-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 18px 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.notif-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.08);
}

.notif-kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.notif-kpi-icon.sent { background: #ecfdf5; color: #059669; }
.notif-kpi-icon.scheduled { background: #eff6ff; color: #2563eb; }
.notif-kpi-icon.failed { background: #fef2f2; color: #dc2626; }
.notif-kpi-icon.queued { background: #fefce8; color: #ca8a04; }

.notif-kpi-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.notif-kpi-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Channel & Status Badges */
.badge-channel {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-channel.email { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-channel.sms { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.badge-channel.whatsapp { background: #f0fdfa; color: #0f766e; border: 1px solid #99f6e4; }
.badge-channel.push { background: #faf5ff; color: #7e22ce; border: 1px solid #e9d5ff; }

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
}

.badge-status.sent { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.badge-status.delivered { background: #d1fae5; color: #064e3b; border: 1px solid #6ee7b7; }
.badge-status.scheduled { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.badge-status.queued, .badge-status.pending { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.badge-status.sending { background: #ffedd5; color: #9a3412; border: 1px solid #fed7aa; }
.badge-status.failed { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.badge-status.cancelled { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
.badge-status.skipped { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }

/* Filter & Action Bar */
.notif-filter-bar {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px 20px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.notif-filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

/* Tabs */
.notif-tabs {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    gap: 8px;
    margin-bottom: 24px;
}

.notif-tab-item {
    padding: 12px 20px;
    font-weight: 700;
    font-size: 0.9rem;
    color: #64748b;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.15s ease, border-color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.notif-tab-item:hover {
    color: #1e293b;
}

.notif-tab-item.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

/* Template Token Chips */
.token-chip-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    margin-bottom: 16px;
}

.token-chip {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-family: monospace;
    color: #334155;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.token-chip:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: #0f172a;
}

/* Delivery History Timeline */
.delivery-timeline {
    border-left: 2px solid #e2e8f0;
    padding-left: 20px;
    margin-left: 10px;
    margin-top: 16px;
}

.delivery-item {
    position: relative;
    padding-bottom: 20px;
}

.delivery-item::before {
    content: '';
    position: absolute;
    left: -27px;
    top: 3px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2563eb;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 2px #93c5fd;
}

.delivery-item.failed::before {
    background: #dc2626;
    box-shadow: 0 0 0 2px #fca5a5;
}

.delivery-item.delivered::before {
    background: #059669;
    box-shadow: 0 0 0 2px #6ee7b7;
}

/* Modal Drawer */
.modal-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-drawer-backdrop.show {
    display: flex;
}

.modal-drawer-content {
    background: #ffffff;
    border-radius: 16px;
    width: 90%;
    max-width: 620px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    overflow: hidden;
    animation: drawerPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes drawerPop {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
