/* ===== Notifications centre ===== */
.notif-page {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 0 5rem;
}

.notif-head-card {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-light);
    padding: 0.875rem 1.1rem 0;
    box-shadow: 0 1px 0 var(--border-light), 0 4px 12px rgba(0, 0, 0, 0.04);
}

.notif-head-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.7rem;
}

.notif-head-row h1 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

.notif-head-actions {
    display: flex;
    gap: 0.3rem;
}

.notif-head-actions .btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    border: 1px solid var(--border-light);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    text-decoration: none;
}

.notif-head-actions .btn-icon:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.notif-tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.notif-tabs::-webkit-scrollbar {
    display: none;
}

.notif-tab {
    padding: 0.5rem 0.9rem 0.6rem;
    background: transparent;
    color: var(--text-secondary);
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-bottom: -1px;
}

.notif-tab i {
    font-size: 0.72rem;
}

.notif-tab:hover {
    color: var(--text-primary);
}

.notif-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.notif-page-body {
    padding: 0.875rem 0.875rem 0;
}

.notif-group-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-tertiary, #9ca3af);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.1rem 0.25rem 0.45rem;
    margin-top: 0.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notif-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    margin-bottom: 0.625rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background 0.12s;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-item:hover {
    background: var(--bg-secondary);
    text-decoration: none;
    color: inherit;
}

.notif-item.unread {
    background: rgba(4, 111, 173, 0.04);
}

.notif-item.unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
    border-radius: 0 2px 2px 0;
}

.notif-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
}

.notif-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.notif-avatar-placeholder {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--text-secondary);
}

.notif-type-badge {
    position: absolute;
    bottom: -2px;
    right: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.notif-type-badge.activity {
    background: #ef4444;
    color: #fff;
}

.notif-type-badge.chat {
    background: #22c55e;
    color: #fff;
}

.notif-type-badge.general {
    background: #3b82f6;
    color: #fff;
}

.notif-type-badge.security {
    background: #f59e0b;
    color: #fff;
}

.notif-body {
    flex: 1;
    min-width: 0;
    padding-top: 1px;
}

.notif-msg {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.45;
    margin-bottom: 0.18rem;
}

.notif-item.unread .notif-msg {
    font-weight: 600;
}

.notif-msg strong {
    font-weight: 700;
}

.notif-time {
    font-size: 0.72rem;
    color: var(--text-tertiary, #9ca3af);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.notif-dot {
    width: 7px;
    height: 7px;
    background: var(--primary);
    border-radius: 50%;
    flex-shrink: 0;
    align-self: center;
    margin-left: 0.15rem;
    box-shadow: 0 0 0 2px rgba(4, 111, 173, 0.15);
}

.notif-thumb {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border-light);
}

.notif-delete-btn {
    border: none;
    background: transparent;
    color: var(--text-tertiary, #9ca3af);
    padding: 0.25rem 0.3rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, color 0.12s, background 0.12s;
    align-self: flex-start;
    flex-shrink: 0;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-top: -1px;
}

.notif-item:hover .notif-delete-btn {
    opacity: 1;
}

.notif-delete-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    opacity: 1;
}

.notif-empty {
    text-align: center;
    padding: 3.5rem 1.5rem 3rem;
}

.notif-empty i,
.notif-empty .notif-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    font-size: 1.55rem;
    color: var(--text-secondary);
    margin: 0 auto 1rem;
}

.notif-empty h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.notif-empty p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0 auto;
    max-width: 300px;
    line-height: 1.45;
}

.notif-empty a {
    color: var(--primary);
    font-weight: 600;
}

.notif-empty-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1.15rem;
}

.notif-empty-actions .btn {
    min-width: 132px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.875rem;
    padding: 0.55rem 1rem;
}

/* Guest gate */
.notif-layout--guest {
    display: block;
    max-width: none;
    width: 100%;
    padding: 0;
}

.notif-layout--guest .notif-page {
    max-width: none;
    width: 100%;
}

.notif-layout--guest .notif-page-body {
    padding: 0;
}

.notif-guest {
    margin: 0;
    min-height: calc(100vh - 7.5rem);
    padding: 2rem 1.25rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 1.75rem;
    text-align: left;
    background:
        radial-gradient(ellipse 90% 55% at 12% 0%, rgba(4, 111, 173, 0.16), transparent 55%),
        radial-gradient(ellipse 70% 45% at 100% 100%, rgba(4, 111, 173, 0.08), transparent 50%),
        linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 55%);
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.notif-guest-visual {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.notif-preview-stack {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.notif-preview-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 0.95rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.notif-preview-card:nth-child(2) {
    transform: scale(0.98);
    opacity: 0.88;
}

.notif-preview-card:nth-child(3) {
    transform: scale(0.96);
    opacity: 0.72;
}

.notif-preview-card strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 750;
    color: var(--text-primary);
    margin-bottom: 0.12rem;
}

.notif-preview-card span:last-child {
    font-size: 0.75rem;
    color: var(--text-tertiary, #9ca3af);
    font-weight: 600;
}

.notif-preview-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    font-size: 1rem;
}

.notif-preview-avatar--chat {
    background: rgba(34, 197, 94, 0.14);
    color: #16a34a;
}

.notif-preview-avatar--follow {
    background: rgba(4, 111, 173, 0.12);
    color: var(--primary);
}

.notif-guest-main {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    text-align: center;
}

.notif-guest-kicker {
    display: inline-block;
    margin-bottom: 0.55rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
}

.notif-guest-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(4, 111, 173, 0.1);
    color: var(--primary);
    font-size: 1.85rem;
}

.notif-guest h2 {
    font-size: 1.55rem;
    font-weight: 850;
    color: var(--text-primary);
    margin: 0 0 0.55rem;
    letter-spacing: -0.035em;
    line-height: 1.2;
}

.notif-guest p {
    margin: 0 auto;
    max-width: 34rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.55;
    font-weight: 500;
}

.notif-guest-list {
    list-style: none;
    margin: 1.1rem auto 0;
    padding: 0;
    max-width: 280px;
    text-align: left;
}

.notif-guest-list li {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.35rem 0;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-primary);
}

.notif-guest-list li i {
    color: var(--primary);
    font-size: 0.95rem;
    width: 1.1rem;
    text-align: center;
}

.notif-guest-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: center;
    margin-top: 1.35rem;
}

.notif-guest-actions .btn {
    min-width: 148px;
    border-radius: 12px;
    font-weight: 750;
    font-size: 0.92rem;
    padding: 0.72rem 1.2rem;
}

.notif-guest-cta {
    box-shadow: 0 10px 24px rgba(4, 111, 173, 0.22);
}

.notif-guest-foot {
    margin-top: 1rem;
    font-size: 0.84rem;
    color: var(--text-tertiary, #9ca3af);
}

.notif-guest-foot a {
    color: var(--primary);
    font-weight: 750;
    text-decoration: none;
}

.notif-guest-foot a:hover {
    text-decoration: underline;
}

.notif-skeleton {
    animation: notifSkPulse 1.1s ease-in-out infinite alternate;
}

@keyframes notifSkPulse {
    from {
        opacity: 0.45;
    }
    to {
        opacity: 0.9;
    }
}

.notif-load-more {
    text-align: center;
    padding: 0.75rem 0 1.5rem;
}

.notif-load-more .btn-secondary {
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    padding: 0.48rem 1.5rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.notif-load-more .btn-secondary:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.notif-sidebar {
    display: none;
}

@media (max-width: 600px) {
    .notif-page {
        padding-bottom: calc(4rem + env(safe-area-inset-bottom));
    }

    .notif-head-card {
        padding: 0.7rem 0.875rem 0;
    }

    .notif-head-row h1 {
        font-size: 1.05rem;
    }

    .notif-page-body {
        padding: 0.625rem 0 0;
    }

    .notif-guest {
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        min-height: calc(100vh - 8.5rem);
        padding: 1.5rem 1rem 6rem;
    }

    .notif-guest-visual {
        max-width: 100%;
    }

    .notif-card {
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin-bottom: 0.5rem;
        box-shadow: none;
    }

    .notif-group-label {
        padding: 0.1rem 0.875rem 0.4rem;
    }

    .notif-item {
        padding: 0.7rem 0.875rem;
        gap: 0.6rem;
    }

    .notif-avatar-wrap,
    .notif-avatar,
    .notif-avatar-placeholder {
        width: 40px;
        height: 40px;
    }

    .notif-type-badge {
        width: 17px;
        height: 17px;
        font-size: 0.52rem;
    }

    .notif-msg {
        font-size: 0.835rem;
    }

    .notif-thumb {
        width: 38px;
        height: 38px;
    }

    .notif-delete-btn {
        opacity: 0.45;
    }

    .notif-load-more {
        padding: 0.75rem 0.875rem 1.5rem;
    }
}

@media (min-width: 601px) and (max-width: 960px) {
    .notif-page {
        max-width: 100%;
        padding-bottom: 4rem;
    }

    .notif-page-body {
        padding: 0.875rem 0.5rem 0;
    }
}

@media (min-width: 961px) {
    .notif-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 360px;
        gap: 1.5rem;
        max-width: none;
        width: 100%;
        margin: 0;
        padding: 1rem 1.75rem 5rem;
        box-sizing: border-box;
    }

    .notif-page {
        max-width: none;
        margin: 0;
        padding: 0;
        width: 100%;
    }

    .notif-head-card {
        border: 1px solid var(--border-light);
        border-radius: 14px;
        padding: 1rem 1.25rem 0;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
        margin-bottom: 0.25rem;
    }

    .notif-head-row h1 {
        font-size: 1.45rem;
    }

    .notif-page-body {
        padding: 1rem 0 0;
    }

    .notif-card {
        border-radius: 14px;
        margin-bottom: 0.85rem;
    }

    .notif-item {
        padding: 1rem 1.15rem;
        gap: 0.9rem;
    }

    .notif-avatar-wrap,
    .notif-avatar,
    .notif-avatar-placeholder {
        width: 48px;
        height: 48px;
    }

    .notif-msg {
        font-size: 0.92rem;
    }

    .notif-thumb {
        width: 52px;
        height: 52px;
        border-radius: 10px;
    }

    .notif-empty {
        padding: 5rem 2rem;
        background: var(--bg-primary);
        border: 1px solid var(--border-light);
        border-radius: 16px;
    }

    .notif-guest {
        display: grid;
        grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.05fr);
        align-items: center;
        gap: 2.5rem 3.5rem;
        margin: 0;
        padding: 2.75rem 3rem;
        min-height: calc(100vh - 5.5rem);
        text-align: left;
        border-radius: 0;
    }

    .notif-guest-visual {
        max-width: none;
        margin: 0;
        order: 2;
    }

    .notif-preview-stack {
        max-width: 460px;
        margin-left: auto;
    }

    .notif-preview-card {
        padding: 1rem 1.1rem;
    }

    .notif-preview-card strong {
        font-size: 0.95rem;
    }

    .notif-guest-main {
        max-width: 520px;
        margin: 0;
        text-align: left;
        order: 1;
    }

    .notif-guest h2 {
        font-size: 2.15rem;
        max-width: 14ch;
    }

    .notif-guest p {
        margin: 0;
        max-width: none;
        font-size: 1.05rem;
    }

    .notif-guest-actions {
        justify-content: flex-start;
        margin-top: 1.55rem;
    }

    .notif-guest-actions .btn {
        min-width: 160px;
        padding: 0.8rem 1.25rem;
        font-size: 0.95rem;
    }

    .notif-guest-foot {
        text-align: left;
    }

    .notif-layout--guest .notif-sidebar {
        display: none;
    }

    .notif-sidebar {
        display: block;
        align-self: start;
        position: sticky;
        top: 0.85rem;
    }

    .notif-sidebar .card {
        background: var(--bg-primary);
        border: 1px solid var(--border-light);
        border-radius: 14px;
        padding: 1.1rem 1.15rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
        margin-bottom: 1rem;
    }

    .notif-sidebar h3 {
        font-size: 0.95rem;
        margin: 0 0 0.65rem;
        color: var(--text-primary);
        font-weight: 800;
    }

    .notif-side-hint {
        font-size: 0.86rem;
        color: var(--text-secondary);
        line-height: 1.5;
        margin: 0;
    }

    .notif-side-list {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .notif-side-list li {
        display: flex;
        gap: 0.65rem;
        align-items: flex-start;
        padding: 0.6rem 0;
        border-bottom: 1px solid var(--border-light);
        font-size: 0.86rem;
        color: var(--text-secondary);
        line-height: 1.4;
    }

    .notif-side-list li:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .notif-side-list li i {
        color: var(--primary);
        margin-top: 0.12rem;
        flex-shrink: 0;
    }
}

@media (min-width: 1280px) {
    .notif-layout {
        grid-template-columns: minmax(0, 1fr) 380px;
        gap: 1.75rem;
        padding: 1.15rem 2.25rem 5rem;
    }

    .notif-guest {
        min-height: calc(100vh - 5rem);
        padding: 3.25rem 4rem;
        gap: 3rem 4.5rem;
    }

    .notif-guest h2 {
        font-size: 2.4rem;
    }

    .notif-preview-stack {
        max-width: 500px;
    }
}
