/* Notifications page: global on purpose because MudBlazor component roots and RenderFragments do not always receive CSS isolation scope attributes. */
.notifications-page {
    display: grid;
    gap: 18px;
}

.notifications-page .page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0;
}

.notifications-page .page-title {
    margin: 0;
    color: #10253f;
    font-weight: 750;
    line-height: 1.15;
}

.notifications-page .page-subtitle {
    display: block;
    margin-top: 6px;
    color: #7b8b9e;
}

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

.notifications-page .notification-indicators {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notifications-page .notification-indicator {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid #dfe7f1;
    border-radius: 12px;
    background: transparent;
    color: #20384f;
    font: inherit;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(15, 35, 58, 0.04);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.notifications-page .notification-indicator:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(15, 35, 58, 0.08);
}

.notifications-page .notification-indicator__icon {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 9px;
    background: #f4f7fa;
}

.notifications-page .notification-indicator__icon .mud-icon-root {
    font-size: 18px;
}

.notifications-page .notification-indicator__label {
    color: #4b5f76;
    font-size: 0.78rem;
    font-weight: 750;
    white-space: nowrap;
}

.notifications-page .notification-indicator strong {
    min-width: 14px;
    font-size: 0.88rem;
    font-weight: 850;
    text-align: right;
}

.notifications-page .notification-indicator--red {
    border-color: #f0a8af;
    color: #e30613;
}

.notifications-page .notification-indicator--red .notification-indicator__icon {
    background: rgba(227, 6, 19, 0.08);
    color: #e30613;
}

.notifications-page .notification-indicator--red.is-active {
    border-color: #e30613;
    box-shadow: 0 0 0 2px rgba(227, 6, 19, 0.12), 0 12px 30px rgba(227, 6, 19, 0.08);
}

.notifications-page .notification-indicator--blue {
    border-color: #9bbcff;
    color: #2f80ff;
}

.notifications-page .notification-indicator--blue .notification-indicator__icon {
    background: rgba(47, 128, 255, 0.1);
    color: #2f80ff;
}

.notifications-page .notification-indicator--blue.is-active {
    border-color: #2f80ff;
    box-shadow: 0 0 0 2px rgba(47, 128, 255, 0.13), 0 12px 30px rgba(47, 128, 255, 0.08);
}

.notifications-page .refresh-action {
    border: 0;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
    color: #5f7187;
    transition: background 0.18s ease, color 0.18s ease;
}

.notifications-page .refresh-action:hover {
    background: rgba(47, 128, 255, 0.08);
    color: #2f80ff;
}

.notifications-page .notifications-panel {
    overflow: hidden;
    border: 1px solid #e5ebf1;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(15, 35, 58, 0.04);
}

.notifications-page .notifications-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid #edf1f5;
    background: #fff;
}

.notifications-page .search-field {
    width: min(420px, 100%);
}

.notifications-page .status-filter {
    width: 180px;
}

.notifications-page .loading-bar {
    border-radius: 0;
}

.notifications-page .notifications-grid-wrap {
    overflow-x: auto;
}

.notifications-page .notifications-grid {
    width: 100%;
    min-width: 1000px;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    color: #20384f;
    font-size: 0.76rem;
}

.notifications-page .notifications-grid col.id-column-col {
    width: 62px;
}

.notifications-page .notifications-grid col.target-column-col {
    width: 130px;
}

.notifications-page .notifications-grid col.date-column-col {
    width: 80px;
}

.notifications-page .notifications-grid col.user-column-col {
    width: 132px;
}

.notifications-page .notifications-grid col.status-column-col {
    width: 30px;
}

.notifications-page .notifications-grid col.message-column-col {
    width: auto;
}

.notifications-page .notifications-grid th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 10px 12px;
    border-bottom: 1px solid #dfe7f1;
    background: #fbfcfd;
    color: #4b5f76;
    font-size: 0.7rem;
    font-weight: 800;
    text-align: left;
    white-space: nowrap;
}

.notifications-page .notifications-grid .stage-heading {
    position: relative;
    padding-left: 0;
    padding-right: 0;
    text-align: center;
}

.notifications-page .notifications-grid .stage-heading span {
    position: absolute;
    top: 50%;
    left: 73px;
    transform: translate(-50%, -50%);
}

.notifications-page .date-header-icon {
    display: inline-grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 8px;
    background: #eef4fb;
    color: #5f7187;
}

.notifications-page .date-header-icon .mud-icon-root {
    font-size: 17px;
}

.notifications-page .notifications-grid td {
    padding: 13px 12px;
    border-bottom: 1px solid #edf1f5;
    vertical-align: middle;
}

.notifications-page .notifications-grid tbody tr {
    background: #fff;
}

.notifications-page .notifications-grid tbody tr:hover {
    background: #fff;
}

.notifications-page .id-column {
    width: 5.5%;
}

.notifications-page .target-column,
.notifications-page .user-column {
    width: 10.5%;
}

.notifications-page .date-column {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
    text-align: left;
}

.notifications-page .message-column {
    width: 22%;
}

.notifications-page .status-column {
    width: 30px;
    min-width: 30px;
    max-width: 30px;
    padding-left: 2px !important;
    padding-right: 2px !important;
    text-align: left;
}

.notifications-page .mono {
    color: #66798e;
    font-family: "SFMono-Regular", Consolas, monospace;
    font-size: 0.72rem;
}

.notifications-page .date-stack {
    display: inline-grid;
    min-width: 0;
    gap: 2px;
    color: #20384f;
    font-size: 0.72rem;
    font-weight: 400;
    line-height: 1.05;
    text-align: left;
    white-space: nowrap;
}

.notifications-page .date-stack small {
    color: #66798e;
    font-size: 0.68rem;
    font-weight: 400;
}

.notifications-page .notification-user {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
}

.notifications-page .notification-user .mud-tooltip-root {
    display: block;
    min-width: 0;
}

.notifications-page .notification-user__avatar {
    position: relative;
    display: flex;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    background: linear-gradient(135deg, #2f80ff, #1b59f8);
    color: #fff;
    font-size: 0.58rem;
    font-weight: 850;
}

.notifications-page .notification-user__avatar--photo {
    border: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.notifications-page .notification-user__avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center center;
}

.notifications-page .notification-user__name {
    min-width: 0;
    overflow: hidden;
    color: #20384f;
    font-size: 0.72rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notifications-page .message-text {
    display: -webkit-box;
    max-width: 100%;
    overflow: hidden;
    color: #31465f;
    line-height: 1.35;
    white-space: pre-line;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.message-tooltip-content {
    max-width: 560px;
    text-align: left;
    white-space: normal;
}

.message-tooltip-content div + div {
    margin-top: 3px;
}

.notifications-page .notification-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #f4f7fa;
}

.notifications-page .notification-status--pending {
    background: #fbeaec;
    color: #e30613;
}

.notifications-page .notification-status--notified {
    background: #fff3df;
    color: #e18b10;
}

.notifications-page .notification-status--acknowledged {
    background: #e8f8f0;
    color: #168c59;
}

.notifications-page .notification-status .mud-icon-root {
    font-size: 18px;
}

.notifications-page .status-cell-actions {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-start;
    gap: 2px;
}

.notifications-page .missing-value {
    color: #8a99aa;
    font-weight: 800;
}

.notifications-page .ack-action {
    color: #168c59 !important;
}

.notifications-context-layer {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: transparent;
}

.notifications-context-menu {
    position: fixed;
    z-index: 1201;
    min-width: 220px;
    overflow: hidden;
    border: 1px solid #dfe7f1;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.18);
}

.notifications-context-menu button {
    display: flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    border: 0;
    background: #fff;
    color: #20384f;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 750;
    text-align: left;
    cursor: pointer;
}

.notifications-context-menu button:hover:not(:disabled) {
    background: #f7f9fc;
    color: #e30613;
}

.notifications-context-menu button:disabled {
    color: #9aa3af;
    cursor: not-allowed;
}

.notifications-context-menu .mud-icon-root {
    color: #168c59;
    font-size: 19px;
}

.notifications-page .empty-state {
    display: flex;
    min-height: 260px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    color: #8998a9;
}

.notifications-page .notifications-loading-state {
    min-height: 260px;
}

.notifications-page .empty-state--plain {
    gap: 0;
}

@media (max-width: 1100px) {
    .notifications-page .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .notifications-page .page-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

@media (max-width: 720px) {
    .notifications-page .page-heading,
    .notifications-page .notifications-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .notifications-page .page-actions {
        align-items: stretch;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .notifications-page .notification-indicators {
        width: 100%;
    }

    .notifications-page .notification-indicator {
        flex: 1 1 0;
        justify-content: center;
    }

    .notifications-page .status-filter {
        width: 100%;
    }
}
