/* ---------------------------------------------------------- notifications */
.notifications-page .stat-card.accent-red::before { background: #dc2626; }

.notifications-page .accent-red .stat-icon { background: #fdecec; color: #b91c1c; }

.notifications-page .filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    align-items: end;
}

.notifications-page .filter-grid .filter-field.narrow {
    max-width: none;
}

.notifications-page .filter-grid .filter-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.notifications-page .table-wrap .truncate {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notifications-page .data-table td.num,
.notifications-page .data-table th.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.notifications-page .data-table td.strong {
    font-weight: 600;
    color: var(--admin-ink);
}

.notifications-page .status-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #eef2f6;
    color: var(--admin-muted);
}

.notifications-page .status-badge.status-success {
    background: #e6f6ee;
    color: #1e7a4a;
}

.notifications-page .status-badge.status-warning {
    background: #fff5e0;
    color: #9a6400;
}

.notifications-page .status-badge.status-danger {
    background: #fdeceb;
    color: #b03a2e;
}

.notifications-page .pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    color: var(--admin-muted);
}

.notifications-page .access-denied .empty-state-icon {
    color: #b03a2e;
}

/* ---------------------------------------------------------------- chart */
.notifications-page .chart-card {
    padding: 20px 24px;
}

.notifications-page .chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 12px;
}

.notifications-page .chart-header h2 {
    margin: 0;
    font-size: 1.05rem;
    color: var(--admin-ink);
}

.notifications-page .chart-legend {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--admin-muted);
}

.notifications-page .legend-swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
}

.notifications-page .swatch-sent,
.notifications-page .bar-sent {
    fill: #003153;
    background: #003153;
}

.notifications-page .swatch-simulated,
.notifications-page .bar-simulated {
    fill: #e0a526;
    background: #e0a526;
}

.notifications-page .swatch-failed,
.notifications-page .bar-failed {
    fill: #c0392b;
    background: #c0392b;
}

.notifications-page .bar-chart {
    width: 100%;
    height: auto;
    display: block;
}

.notifications-page .bar-chart .grid-line {
    stroke: var(--admin-line);
    stroke-width: 1;
}

.notifications-page .bar-chart .axis-label {
    fill: var(--admin-muted);
    font-size: 11px;
}

.notifications-page .bar-group:hover .bar {
    opacity: 0.8;
}

/* -------------------------------------------------------------- settings */
.notifications-page .mode-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 24px 28px;
    border-left: 6px solid var(--admin-brand);
}

.notifications-page .mode-card.mode-simulated {
    border-left-color: #e0a526;
}

.notifications-page .mode-card.mode-live {
    border-left-color: #1e7a4a;
}

.notifications-page .mode-kicker {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--admin-muted);
}

.notifications-page .mode-title {
    margin: 4px 0 6px;
    font-size: 1.3rem;
    color: var(--admin-ink);
}

.notifications-page .mode-title i {
    margin-right: 8px;
}

.notifications-page .mode-help,
.notifications-page .mode-meta {
    margin: 0;
    color: var(--admin-muted);
    font-size: 0.9rem;
}

.notifications-page .mode-meta {
    display: block;
    margin-top: 8px;
}

/* ------------------------------------------------------------ send form */
.notifications-page .recipient-picker {
    border: 1px solid var(--admin-line);
    border-radius: 12px;
    padding: 16px;
    margin: 0;
}

.notifications-page .recipient-picker legend {
    font-weight: 600;
    padding: 0 6px;
    color: var(--admin-ink);
}

.notifications-page .recipient-types {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.notifications-page .recipient-option,
.notifications-page .role-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--admin-line);
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.9rem;
    background: var(--admin-surface);
}

.notifications-page .recipient-option.selected,
.notifications-page .role-chip.selected {
    border-color: var(--admin-brand);
    background: var(--admin-brand-soft);
    color: var(--admin-brand);
    font-weight: 600;
}

.notifications-page .role-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.notifications-page .card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    font-size: 1rem;
    font-weight: 700;
    color: #1e2937;
}

.notifications-page .excluded-add-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.notifications-page .excluded-add-form .form-input {
    flex: 1 1 320px;
    max-width: 480px;
}

.notifications-page .excluded-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.notifications-page .detail-back {
    margin-bottom: 8px;
}

.notifications-page .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notifications-page .detail-back a {
    color: var(--admin-muted);
    text-decoration: none;
    font-size: 0.875rem;
}

.notifications-page .detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    background: #fff;
    border: 1px solid #e3eaf1;
    border-radius: 12px;
    padding: 18px;
}

.notifications-page .detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.notifications-page .detail-item.wide {
    grid-column: 1 / -1;
}

.notifications-page .detail-item > span:first-child {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
    color: var(--admin-muted);
}

.notifications-page .detail-text {
    word-break: break-all;
}

.notifications-page .detail-section {
    margin-top: 22px;
}

.notifications-page .detail-section h2 {
    font-size: 1rem;
    margin: 0 0 8px;
}

.notifications-page .detail-hint {
    font-size: 0.8rem;
    color: var(--admin-muted);
    margin: 0 0 10px;
}

.notifications-page .error-block {
    background: #fdf1f0;
    border: 1px solid #f3c7c3;
    color: #8a1f17;
    border-radius: 10px;
    padding: 12px 14px;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    font-size: 0.85rem;
}

.notifications-page .email-preview {
    width: 100%;
    height: 75vh;
    min-height: 480px;
    border: 1px solid #e3eaf1;
    border-radius: 12px;
    background: #f4f6f9;
}

.notifications-page .inbox-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid #eef2f6;
    cursor: pointer;
}

.notifications-page .inbox-item:last-child {
    border-bottom: none;
}

.notifications-page .inbox-item:hover {
    background: #f8fafc;
}

.notifications-page .inbox-item.unread {
    background: #f0f4ff;
}

.notifications-page .inbox-item.unread .inbox-item-title {
    font-weight: 700;
}

.notifications-page .inbox-item-title {
    color: #1e2937;
    font-weight: 500;
    margin-bottom: 2px;
}

.notifications-page .inbox-item-body {
    color: #475569;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.notifications-page .inbox-item-meta {
    color: #94a3b8;
    font-size: 0.8rem;
}

.notifications-page .btn-link-sm {
    background: none;
    border: none;
    color: #003153;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
