/* P17-UI visual refinement */

.notification-page {
    min-height: 62vh;
    padding-top: 42px;
    padding-bottom: 48px;
    background:
        linear-gradient(
            180deg,
            rgba(15, 91, 70, 0.035) 0,
            rgba(15, 91, 70, 0) 220px),
        #f7f8f7;
    color: #1a1d1f;
}

.notification-page .notification-shell {
    max-width: 1180px;
}

.notification-page h1,
.notification-page h2,
.notification-page h3,
.notification-page strong {
    color: #1a1d1f;
}

.notification-page__header {
    display: flex;
    justify-content: space-between;
    gap: 32px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.notification-page__heading {
    max-width: 760px;
}

.notification-page__eyebrow {
    display: block;
    color: #0f5b46;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
}

.notification-page__header h1 {
    margin: 0 0 10px;
    color: #1a1d1f !important;
    font-size: clamp(1.75rem, 3vw, 2.4rem);
    font-weight: 800;
    line-height: 1.2;
}

.notification-page__header p {
    margin: 0;
    max-width: 720px;
    color: #5f6973 !important;
    font-size: 0.98rem;
    line-height: 1.85;
}

.notification-page__settings {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    border-radius: 999px;
    padding-inline: 18px;
}

.notification-summary {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}

.notification-summary__item {
    min-width: 150px;
    padding: 14px 18px;
    background: #ffffff;
    border: 1px solid #e3e8e5;
    border-radius: 14px;
    display: flex;
    align-items: baseline;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.035);
}

.notification-summary__value {
    color: #0f5b46;
    font-size: 1.35rem;
    font-weight: 800;
}

.notification-summary__label {
    color: #69727c;
    font-size: 0.82rem;
}

.notification-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.notification-toolbar .btn {
    min-width: 92px;
    border-radius: 999px;
}

.notification-list {
    display: grid;
    gap: 12px;
}

.notification-card {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 18px;
    background: #fff;
    border: 1px solid #e3e8e5;
    border-radius: 16px;
    padding: 20px 22px;
    box-shadow: 0 7px 24px rgba(16, 24, 40, 0.04);
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.notification-card:hover {
    border-color: #ccd8d2;
    box-shadow: 0 10px 30px rgba(16, 24, 40, 0.065);
}

.notification-card.is-unread {
    border-inline-start: 4px solid #0f5b46;
    background: #fcfefd;
}

.notification-card__icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 91, 70, 0.10);
    color: #0f5b46;
    font-size: 1.05rem;
}

.notification-card__content {
    min-width: 0;
}

.notification-card__content h2 {
    margin: 9px 0 8px;
    color: #1a1d1f !important;
    font-size: 1.05rem;
    font-weight: 750;
    line-height: 1.5;
}

.notification-card__content p {
    max-width: 900px;
    margin: 0 0 16px;
    color: #4f5964 !important;
    font-size: 0.92rem;
    line-height: 1.8;
    white-space: pre-line;
}

.notification-card__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    color: #7a8490;
    font-size: 0.78rem;
}

.notification-card__category {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(15, 91, 70, 0.075);
    color: #0f5b46 !important;
    font-weight: 700;
}

.notification-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.notification-card__actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 36px;
    border-radius: 999px;
    padding-inline: 14px;
}

.notification-card__ack {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #198754;
    font-size: 0.84rem;
    font-weight: 700;
}

.notification-empty {
    padding: 68px 24px;
    text-align: center;
    background: #fff;
    border: 1px dashed #cfd7d3;
    border-radius: 18px;
}

.notification-empty__icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 14px;
    border-radius: 16px;
    background: rgba(15, 91, 70, 0.09);
    color: #0f5b46;
    display: grid;
    place-items: center;
    font-size: 1.25rem;
}

.notification-empty h2 {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.notification-empty p {
    margin: 0;
    color: #69727c;
}

/* Preferences */

.notification-preferences {
    display: grid;
    gap: 16px;
}

.notification-preference-group {
    background: #fff;
    border: 1px solid #e3e8e5;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 7px 24px rgba(16, 24, 40, 0.035);
}

.notification-preference-group__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid #eef1ef;
}

.notification-preference-group__eyebrow {
    display: block;
    margin-bottom: 4px;
    color: #7a8490;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.notification-preference-group h2 {
    margin: 0;
    color: #1a1d1f !important;
    font-size: 1.05rem;
    font-weight: 800;
}

.notification-preference-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.notification-preference-card {
    position: relative;
    min-height: 176px;
    margin: 0;
    padding: 16px;
    background: #fbfcfb;
    border: 1px solid #e2e7e4;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        box-shadow 160ms ease;
}

.notification-preference-card:hover {
    border-color: #ccd8d2;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(16, 24, 40, 0.045);
}

.notification-preference-card__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-preference-card__icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(15, 91, 70, 0.09);
    color: #0f5b46;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.notification-preference-card .form-switch {
    padding: 0;
}

.notification-preference-card .form-switch .form-check-input {
    float: none;
    margin: 0;
    width: 2.6rem;
    height: 1.35rem;
    cursor: pointer;
}

.notification-preference-card__body {
    flex: 1 1 auto;
}

.notification-preference-card__body > strong {
    display: block;
    margin-bottom: 7px;
    color: #1a1d1f !important;
    font-size: 0.96rem;
    font-weight: 800;
}

.notification-preference-card__body > p {
    margin: 0;
    color: #5e6873 !important;
    font-size: 0.8rem;
    line-height: 1.75;
}

.notification-preference-card__note,
.notification-preference-card__consent {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    font-size: 0.72rem;
    line-height: 1.6;
}

.notification-preference-card__note {
    color: #7a8490;
}

.notification-preference-card__consent {
    color: #198754;
    font-weight: 600;
}

.notification-preference-card__status {
    min-height: 18px;
    color: #0f5b46;
    font-size: 0.75rem;
    font-weight: 700;
}

.notification-preference-card__status.is-error {
    color: #b42318;
}

/* Bell */

.notification-bell {
    position: relative;
}

.notification-bell__button {
    position: relative;
    width: 44px;
    min-width: 44px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

.notification-bell__button:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.28);
    outline-offset: 2px;
}

.notification-bell__badge {
    position: absolute;
    inset-block-start: -6px;
    inset-inline-end: -7px;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border: 2px solid #454a49;
    border-radius: 999px;
    background: #dc3545;
    color: #fff;
    font-size: 0.67rem;
    line-height: 15px;
    font-weight: 800;
    text-align: center;
}

.notification-bell__menu {
    width: min(370px, calc(100vw - 24px));
    margin-top: 10px !important;
    padding: 0;
    overflow: hidden;
    border: 1px solid #e2e7e4;
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(16, 24, 40, 0.18);
}

.notification-bell__menu-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 15px 16px;
    background: #ffffff;
    border-bottom: 1px solid #edf0ee;
}

.notification-bell__menu-header > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.notification-bell__menu-header strong {
    color: #1a1d1f;
    font-size: 0.92rem;
}

.notification-bell__menu-header small {
    color: #7a8490;
    font-size: 0.73rem;
}

.notification-bell__menu-header > i {
    color: #0f5b46;
}

.notification-bell__items {
    max-height: 360px;
    overflow: auto;
    background: #fff;
}

.notification-bell__item {
    position: relative;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 13px 16px;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid #eef1ef;
    transition: background-color 140ms ease;
}

.notification-bell__item:hover {
    background: #f6f9f7;
}

.notification-bell__item.is-unread {
    background: #f0f7f4;
}

.notification-bell__item-indicator {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    margin-top: 7px;
    border-radius: 999px;
    background: transparent;
}

.notification-bell__item.is-unread .notification-bell__item-indicator {
    background: #0f5b46;
}

.notification-bell__item-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notification-bell__item-content strong {
    overflow: hidden;
    color: #1a1d1f;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.55;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-bell__item-content small {
    color: #7a8490;
    font-size: 0.7rem;
}

.notification-bell__empty {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    padding: 30px 16px;
    color: #6c757d;
    text-align: center;
}

.notification-bell__empty i {
    color: #0f5b46;
    font-size: 1.1rem;
}

.notification-bell__all {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    color: #0f5b46;
    background: #fff;
    text-align: center;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 800;
    border-top: 1px solid #edf0ee;
}

.notification-bell__all:hover {
    background: #f6f9f7;
    color: #0b4535;
}

html[dir="rtl"] .notification-bell__menu {
    text-align: right;
}

html[dir="ltr"] .notification-bell__menu {
    text-align: left;
}

@media (max-width: 991.98px) {
    .notification-page {
        padding-top: 28px;
    }

    .notification-preference-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .notification-page__header {
        flex-direction: column;
        gap: 16px;
    }

    .notification-page__settings {
        width: 100%;
        justify-content: center;
    }

    .notification-summary {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .notification-summary__item {
        min-width: 0;
    }

    .notification-card {
        grid-template-columns: 1fr;
        padding: 17px;
    }

    .notification-card__actions,
    .notification-card__actions form {
        width: 100%;
    }

    .notification-card__actions .btn {
        width: 100%;
        min-height: 44px;
    }

    .notification-bell__menu {
        width: min(340px, calc(100vw - 20px));
    }
}
