/* ============================================
   Panel: Notifications & Email (CMMS)
   ============================================ */

/* Notification Layout */
.notif-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: var(--space-lg);
}

/* Notification Stats */
.notif-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.notif-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    transition: all 0.3s;
}

.notif-stat-card:hover {
    border-color: var(--border-glow);
}

.notif-stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-mono);
}

.notif-stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Notification List */
.notif-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notif-item {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: var(--space-sm);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s;
    animation: notifSlide 0.3s ease;
}

@keyframes notifSlide {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notif-item:hover {
    border-color: var(--border-glow);
    background: rgba(52, 211, 153, 0.02);
}

.notif-item.unread {
    background: rgba(52, 211, 153, 0.04);
    border-left: 3px solid var(--accent-green);
}

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.notif-icon.approval {
    background: rgba(59, 130, 246, 0.15);
}

.notif-icon.alert {
    background: rgba(239, 68, 68, 0.15);
}

.notif-icon.reminder {
    background: rgba(245, 158, 11, 0.15);
}

.notif-icon.system {
    background: rgba(52, 211, 153, 0.15);
}

.notif-icon.digest {
    background: rgba(167, 139, 250, 0.15);
}

.notif-body h4 {
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.notif-body p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.notif-time {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    white-space: nowrap;
}

/* Email Templates */
.email-template-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.email-template {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.78rem;
    transition: all 0.3s;
}

.email-template:hover {
    border-color: var(--border-glow);
}

.email-template-name {
    font-weight: 600;
}

.email-template-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.email-channel-badge {
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 600;
    background: rgba(52, 211, 153, 0.1);
    color: var(--accent-green);
}

/* Notification Settings */
.notif-settings {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.notif-setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.78rem;
}

.notif-toggle {
    width: 40px;
    height: 22px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.12);
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
    border: none;
}

.notif-toggle.on {
    background: var(--accent-green);
}

.notif-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: white;
    transition: transform 0.3s;
}

.notif-toggle.on::after {
    transform: translateX(18px);
}

/* Sent Log */
.sent-log-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.75rem;
}

.sent-log-status {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.sent-log-status.delivered {
    background: rgba(52, 211, 153, 0.1);
    color: var(--accent-green);
}

.sent-log-status.read {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
}

.sent-log-status.pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-amber);
}