/* ── Filters ─────────────────────────────────── */
.scp-notifications-filters {
    background: var(--scp-surface);
    padding: var(--scp-space-4) var(--scp-space-6);
    margin: var(--scp-space-4) 0;
    border: 1px solid var(--scp-border-subtle);
    border-radius: var(--scp-radius-md);
}
.scp-filter-row {
    display: flex;
    align-items: center;
    gap: var(--scp-space-4);
    flex-wrap: wrap;
}
.scp-filter-row label {
    display: flex;
    align-items: center;
    gap: var(--scp-space-1);
    font-size: var(--scp-text-sm);
    font-weight: 500;
    color: var(--scp-text-secondary);
}
.scp-filter-row select {
    padding: 0 var(--scp-space-2);
    font-size: var(--scp-text-sm);
    border: 1px solid var(--scp-border);
    border-radius: var(--scp-radius-sm);
    background: var(--scp-surface);
    color: var(--scp-text-primary);
    height: 32px;
    line-height: 32px;
}
.scp-filter-row select:focus {
    border-color: var(--scp-teal);
    outline: none;
    box-shadow: 0 0 0 1px var(--scp-teal);
}
.scp-filter-row .button {
    height: 32px;
    padding: 0 var(--scp-space-3);
    font-size: var(--scp-text-sm);
    font-weight: 500;
    border-radius: var(--scp-radius-sm);
    background: var(--scp-teal);
    border-color: var(--scp-teal);
    color: var(--scp-teal-text);
    transition: background-color 0.18s ease;
}
.scp-filter-row .button:hover {
    background: var(--scp-teal-dark);
    border-color: var(--scp-teal-dark);
    color: var(--scp-teal-text);
}
.scp-filter-row input[type="checkbox"] {
    accent-color: var(--scp-teal);
}

/* ── Notifications Table ─────────────────────── */
.scp-notifications-table {
    font-size: var(--scp-text-sm);
}
.scp-notifications-table th {
    font-weight: 600;
    background: var(--scp-sage-light);
    border-bottom: 2px solid var(--scp-border);
    color: var(--scp-text-primary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.4;
}
.scp-notifications-table th,
.scp-notifications-table td {
    vertical-align: middle !important;
    padding: var(--scp-space-2) var(--scp-space-2) !important;
}
.scp-notifications-table td {
    border-bottom: 1px solid var(--scp-border-subtle);
    color: var(--scp-text-primary);
}
.scp-notifications-table tbody tr {
    background: var(--scp-surface);
    transition: background-color 0.18s ease;
}
.scp-notifications-table tbody tr:hover {
    background: var(--scp-sage-light);
}
.scp-notifications-table tbody tr:last-child td {
    border-bottom: none;
}
.scp-notifications-table th.check-column,
.scp-notifications-table td.check-column {
    width: 2.2em;
    text-align: center;
}
.scp-notifications-table input[type="checkbox"] {
    margin: 0 !important;
    vertical-align: middle !important;
    accent-color: var(--scp-teal);
}

/* Column widths */
.scp-notifications-table .column-timestamp   { width: 11%; }
.scp-notifications-table .column-user-type   { width: 8%; text-align: center; }
.scp-notifications-table .column-user         { width: 12%; }
.scp-notifications-table .column-email        { width: 15%; max-width: 0; }
.scp-notifications-table .column-action       { width: 5%; text-align: center; }
.scp-notifications-table .column-file         { width: 19%; }
.scp-notifications-table .column-project         { width: 11%; }
.scp-notifications-table .column-folder       { width: 11%; }
.scp-notifications-table .column-first-time   { width: 7%; text-align: center; }

/* ── Delete Selected Button ──────────────────── */
.scp-btn-delete-selected {
    height: 36px !important;
    padding: 0 var(--scp-space-4) !important;
    align-items: center;
    gap: var(--scp-space-2);
    margin-right: var(--scp-space-2);
    font-size: var(--scp-text-sm) !important;
    font-weight: 500 !important;
    border-radius: var(--scp-radius-sm) !important;
    background: var(--scp-danger-light, #FEF2F2) !important;
    color: var(--scp-danger, #B32D2E) !important;
    border: 1px solid var(--scp-danger, #B32D2E) !important;
    box-shadow: none !important;
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
    cursor: pointer;
}
.scp-btn-delete-selected:hover,
.scp-btn-delete-selected:focus {
    background: var(--scp-danger, #B32D2E) !important;
    color: #fff !important;
    border-color: var(--scp-danger-dark, #991B1B) !important;
    box-shadow: 0 1px 3px rgba(179, 45, 46, 0.25) !important;
}
.scp-btn-delete-selected svg {
    flex-shrink: 0;
}

/* ── File Cell ───────────────────────────────── */
.scp-file-cell {
    display: flex;
    align-items: center;
    gap: var(--scp-space-2);
    max-width: 100%;
}
.scp-file-name-truncate {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: help;
}
.scp-notifications-table .column-email span {
    display: inline-block;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: help;
    vertical-align: middle;
}
.scp-folder-name-truncate {
    display: inline-block;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
.scp-badge--project { cursor: help; max-width: 100%; }
.scp-project-name-truncate {
    display: inline-block;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}
.scp-badge--folder { cursor: help; }

/* ── Delete Confirmation Modal ────────────────── */
.scp-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.scp-modal-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
}
.scp-modal-content {
    position: relative;
    background: var(--scp-surface);
    border-radius: var(--scp-radius-lg);
    box-shadow: var(--scp-shadow-lg);
    max-width: 480px;
    width: 90%;
    z-index: 1;
    animation: scp-modal-in 0.2s ease-out;
}
@keyframes scp-modal-in {
    from { opacity: 0; transform: scale(0.95) translateY(-20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.scp-modal-header {
    padding: var(--scp-space-8) var(--scp-space-8) var(--scp-space-4);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.scp-modal-header svg { margin-bottom: var(--scp-space-4); }
.scp-modal-header h3 {
    margin: 0;
    font-size: var(--scp-text-lg);
    font-weight: 600;
    color: var(--scp-text-primary);
    text-align: center;
    width: 100%;
}
.scp-modal-body {
    padding: 0 var(--scp-space-8) var(--scp-space-6);
    text-align: center;
    color: var(--scp-text-secondary);
    font-size: var(--scp-text-base);
    line-height: 1.6;
}
.scp-modal-body p { margin: 0 0 var(--scp-space-2); }
.scp-modal-warning {
    color: var(--scp-danger);
    font-weight: 500;
}
.scp-modal-footer {
    padding: var(--scp-space-4) var(--scp-space-8) var(--scp-space-8);
    display: flex;
    gap: var(--scp-space-3);
    justify-content: center;
}
.scp-modal-footer .button {
    min-width: 100px;
    height: 36px;
    font-size: var(--scp-text-sm);
    font-weight: 500;
    border-radius: var(--scp-radius-sm);
}
.scp-btn-danger {
    background: var(--scp-danger) !important;
    border-color: var(--scp-danger) !important;
    color: #fff !important;
}
.scp-btn-danger:hover {
    background: var(--scp-danger-dark) !important;
    border-color: var(--scp-danger-dark) !important;
}

/* ── Notification Badges ─────────────────────── */
.scp-badge--client {
    background: var(--scp-teal-light);
    color: var(--scp-teal-dark);
    border: 1px solid var(--scp-teal-border);
}
.scp-badge--action-view {
    background: var(--scp-teal-light);
    color: var(--scp-teal-dark);
    border: 1px solid var(--scp-teal-border);
}
.scp-badge--action-download {
    background: #edf8f2;
    color: #00713a;
    border: 1px solid #c1e8d3;
}
.scp-badge--icon-only {
    padding: var(--scp-space-1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
}
.scp-badge--icon-only svg { margin: 0; }
.scp-badge--project {
    background: var(--scp-amber-light);
    color: var(--scp-amber-text);
    border: 1px solid rgba(200, 169, 110, 0.3);
}
.scp-badge--first-time {
    background: #edf8f2;
    color: #16a34a;
    border: 1px solid #c1e8d3;
}

/* ── Empty State ─────────────────────────────── */
.scp-empty-state {
    text-align: center;
    padding: var(--scp-space-16) var(--scp-space-6);
    color: var(--scp-text-muted);
}
.scp-empty-state svg { margin-bottom: var(--scp-space-4); }
.scp-empty-state h3 {
    font-size: var(--scp-text-lg);
    margin: var(--scp-space-2) 0;
    color: var(--scp-text-primary);
}

/* ── Pagination ──────────────────────────────── */
.scp-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--scp-space-4);
    margin: var(--scp-space-6) 0;
    padding: var(--scp-space-4);
    background: var(--scp-surface);
    border: 1px solid var(--scp-border-subtle);
    border-radius: var(--scp-radius-md);
}
.scp-pagination .button {
    min-width: 100px;
    border-radius: var(--scp-radius-sm);
}
.scp-pagination .button.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.scp-pagination-info {
    font-weight: 500;
    color: var(--scp-text-primary);
    font-size: var(--scp-text-sm);
}

/* ── Stats ───────────────────────────────────── */
.scp-notifications-stats {
    margin-top: var(--scp-space-6);
    padding: var(--scp-space-4) var(--scp-space-6);
    background: var(--scp-sage-light);
    border: 1px solid var(--scp-border-subtle);
    border-radius: var(--scp-radius-md);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--scp-space-6);
}
.scp-notif-stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--scp-text-muted);
    margin-bottom: var(--scp-space-1);
    font-weight: 600;
}
.scp-notif-stat-value {
    font-size: var(--scp-text-xl);
    font-weight: 700;
    color: var(--scp-text-primary);
    line-height: 1.2;
}
.scp-notif-stat-value--success {
    color: #16a34a;
}

/* ── Mobile Card Layout ────────────────────────── */
@media (max-width: 767px) {
    .scp-filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    .scp-filter-row select,
    .scp-filter-row input[type="date"] {
        width: 100%;
        font-size: 16px;
    }
    .scp-filter-row .button {
        width: 100%;
        justify-content: center;
    }
    .scp-notifications-table {
        min-width: 0 !important;
        border: none;
        table-layout: auto !important;
    }
    .scp-notifications-table thead {
        display: none;
    }
    .scp-notifications-table tbody {
        display: flex;
        flex-direction: column;
        gap: var(--scp-space-3);
        padding: var(--scp-space-3);
    }
    .scp-notifications-table tbody tr {
        display: flex;
        flex-direction: column;
        background: var(--scp-surface);
        border: 1px solid var(--scp-border-subtle);
        border-radius: var(--scp-radius-md);
        overflow: hidden;
    }
    .scp-notifications-table td,
    .scp-notifications-table th.check-column {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: var(--scp-space-2) var(--scp-space-4);
        border-bottom: 1px solid var(--scp-border-subtle);
        width: 100% !important;
        max-width: none !important;
        text-align: left !important;
        box-sizing: border-box;
    }
    .scp-notifications-table td:last-child {
        border-bottom: none;
    }
    .scp-notifications-table td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 10.5px;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--scp-text-muted);
        flex-shrink: 0;
        min-width: 72px;
        margin-right: var(--scp-space-3);
    }

    /* Timestamp row as card header */
    .scp-notifications-table td.column-timestamp {
        background: var(--scp-sage-light);
        padding: var(--scp-space-3) var(--scp-space-4);
        font-weight: 600;
        font-size: var(--scp-text-xs);
    }
    .scp-notifications-table td.column-timestamp::before {
        display: none;
    }

    /* Checkbox: inline in header area */
    .scp-notifications-table th.check-column {
        position: absolute;
        top: var(--scp-space-3);
        right: var(--scp-space-4);
        border: none;
        padding: 0;
        width: auto !important;
        z-index: 2;
    }
    .scp-notifications-table tbody tr {
        position: relative;
    }

    /* File cell wrap */
    .scp-file-cell {
        flex-wrap: wrap;
    }
    .scp-file-name-truncate {
        max-width: 140px;
    }
    .scp-notifications-table .column-email span {
        max-width: none;
        white-space: normal;
        word-break: break-all;
    }
    .scp-folder-name-truncate {
        max-width: 100px;
    }
    .scp-project-name-truncate {
        max-width: 100px;
    }

    /* Pagination */
    .scp-pagination {
        flex-direction: column;
        gap: var(--scp-space-2);
    }
    .scp-pagination .button {
        width: 100%;
        min-height: 44px;
        justify-content: center;
    }

    /* Stats */
    .scp-notifications-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--scp-space-3);
        padding: var(--scp-space-3);
    }

    /* Actions bar */
    .scp-page-header-actions {
        flex-direction: column;
        gap: var(--scp-space-2);
        width: 100%;
    }
    .scp-page-header-actions .scp-btn-delete-selected,
    .scp-page-header-actions .scp-btn-add-client {
        width: 100%;
        justify-content: center;
    }

    /* Modal mobile */
    .scp-modal-content {
        width: 95%;
        max-height: 95vh;
    }
}
