
/* v62 — Notifications Center: faster, clearer, cached. */
:root {
    --v62-notify-bg: rgba(12, 14, 18, 0.96);
    --v62-notify-card: rgba(255,255,255,0.055);
    --v62-notify-card-strong: rgba(255,255,255,0.09);
    --v62-notify-border: rgba(255,255,255,0.12);
    --v62-notify-text: #f4f4f5;
    --v62-notify-muted: rgba(244,244,245,0.66);
    --v62-notify-accent: #f4c430;
}

#notificationsBtn {
    position: relative;
}

#notificationsBtn.has-unread,
#notificationsBtn.v62-has-unread {
    box-shadow: 0 0 0 1px rgba(244,196,48,.35), 0 0 18px rgba(244,196,48,.12);
}

.notification-badge,
#notificationBadge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #f4c430;
    color: #171717;
    font-size: 11px;
    line-height: 18px;
    font-weight: 900;
    border: 1px solid rgba(0,0,0,.35);
    box-shadow: 0 8px 18px rgba(0,0,0,.28);
}

#notificationsCenterModal .modal-content,
#notificationsCenterModal .modal-content-wide,
#notificationsCenterModalContent {
    width: min(760px, calc(100vw - 24px));
    max-height: min(82vh, 780px);
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid var(--v62-notify-border);
    background: linear-gradient(180deg, rgba(24,26,32,.98), var(--v62-notify-bg));
}

.v62-notify-panel {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    min-height: 420px;
    max-height: min(82vh, 780px);
}

.v62-notify-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--v62-notify-border);
    background: rgba(255,255,255,.035);
}

.v62-notify-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    color: var(--v62-notify-text);
}

.v62-notify-title i {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #171717;
    background: var(--v62-notify-accent);
}

.v62-notify-head p {
    margin: 6px 0 0;
    color: var(--v62-notify-muted);
    font-size: 13px;
}

.v62-notify-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.v62-notify-action,
.v62-notify-filter {
    height: 34px;
    border: 1px solid var(--v62-notify-border);
    border-radius: 10px;
    background: rgba(255,255,255,.055);
    color: var(--v62-notify-text);
    font-size: 13px;
    font-weight: 800;
    padding: 0 12px;
    cursor: pointer;
    transition: background .14s ease, border-color .14s ease, transform .14s ease;
}

.v62-notify-action:hover,
.v62-notify-filter:hover,
.v62-notify-filter.is-active {
    background: rgba(244,196,48,.14);
    border-color: rgba(244,196,48,.38);
}

.v62-notify-action:active,
.v62-notify-filter:active { transform: translateY(1px); }

.v62-notify-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--v62-notify-border);
    background: rgba(255,255,255,.055);
    color: var(--v62-notify-text);
    cursor: pointer;
}

.v62-notify-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--v62-notify-border);
}

.v62-notify-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.v62-notify-state {
    color: var(--v62-notify-muted);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.v62-notify-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 18px 18px;
    overflow: auto;
    overscroll-behavior: contain;
}

.v62-notify-item {
    width: 100%;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    text-align: left;
    border: 1px solid var(--v62-notify-border);
    border-radius: 16px;
    background: var(--v62-notify-card);
    color: var(--v62-notify-text);
    padding: 12px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.v62-notify-item::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: transparent;
}

.v62-notify-item.unread {
    background: linear-gradient(90deg, rgba(244,196,48,.13), var(--v62-notify-card-strong));
    border-color: rgba(244,196,48,.30);
}

.v62-notify-item.unread::before { background: var(--v62-notify-accent); }
.v62-notify-item:hover { border-color: rgba(244,196,48,.38); background: rgba(255,255,255,.085); }

.v62-notify-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #171717;
    background: var(--v62-notify-accent);
    box-shadow: inset 0 -10px 18px rgba(0,0,0,.12);
}

.v62-notify-body { min-width: 0; }
.v62-notify-topline {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.v62-notify-body strong {
    display: block;
    min-width: 0;
    color: var(--v62-notify-text);
    font-size: 15px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v62-notify-type {
    flex: 0 0 auto;
    color: #171717;
    background: rgba(244,196,48,.88);
    border-radius: 999px;
    padding: 3px 7px;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.v62-notify-body p,
.v62-notify-body small,
.v62-notify-body time {
    display: block;
    color: var(--v62-notify-muted);
    line-height: 1.35;
}

.v62-notify-body p {
    margin: 5px 0 0;
    font-size: 13px;
}

.v62-notify-body small {
    margin-top: 5px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(244,244,245,.78);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v62-notify-body time {
    margin-top: 6px;
    font-size: 11px;
}

.v62-notify-open {
    align-self: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: var(--v62-notify-muted);
    background: rgba(255,255,255,.045);
}

.v62-notify-empty,
.v62-notify-loading,
.v62-notify-error {
    padding: 34px 18px;
    text-align: center;
    color: var(--v62-notify-muted);
}

.v62-notify-empty i,
.v62-notify-loading i,
.v62-notify-error i {
    display: block;
    font-size: 34px;
    margin-bottom: 12px;
    color: var(--v62-notify-accent);
}

.v62-notify-toast {
    position: fixed;
    right: 18px;
    bottom: 92px;
    z-index: 99998;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    width: min(360px, calc(100vw - 24px));
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(244,196,48,.35);
    background: rgba(18,20,26,.96);
    color: var(--v62-notify-text);
    box-shadow: 0 20px 50px rgba(0,0,0,.35);
    transform: translateY(12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease;
}

.v62-notify-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.v62-notify-toast i {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #171717;
    background: var(--v62-notify-accent);
}

.v62-notify-toast strong,
.v62-notify-toast span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.v62-notify-toast strong { font-size: 13px; }
.v62-notify-toast span { margin-top: 3px; font-size: 12px; color: var(--v62-notify-muted); }

body.light #notificationsCenterModalContent,
body.light .v62-notify-panel {
    --v62-notify-bg: rgba(255,255,255,.98);
    --v62-notify-card: rgba(0,0,0,.035);
    --v62-notify-card-strong: rgba(0,0,0,.055);
    --v62-notify-border: rgba(0,0,0,.12);
    --v62-notify-text: #18181b;
    --v62-notify-muted: rgba(24,24,27,.66);
}

@media (max-width: 640px) {
    #notificationsCenterModal .modal-content,
    #notificationsCenterModal .modal-content-wide,
    #notificationsCenterModalContent {
        width: 100vw;
        max-height: 100dvh;
        border-radius: 0;
    }
    .v62-notify-panel { min-height: 100dvh; max-height: 100dvh; }
    .v62-notify-head,
    .v62-notify-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
    .v62-notify-actions { justify-content: flex-start; }
    .v62-notify-item { grid-template-columns: 38px minmax(0,1fr) 26px; padding: 10px; }
    .v62-notify-icon { width: 38px; height: 38px; }
}

html[data-v62-notifications='true'] body::after {
    content: 'v62';
    position: fixed;
    left: 8px;
    bottom: 8px;
    z-index: 2147483000;
    font: 900 10px/1 Inter, system-ui, sans-serif;
    color: #171717;
    background: rgba(244,196,48,.88);
    border: 1px solid rgba(0,0,0,.2);
    border-radius: 999px;
    padding: 3px 6px;
    pointer-events: none;
    opacity: .72;
}
