:root {
    --notif-bg: #f3f4f6;
    --notif-card: #fff;
    --notif-border: #e5e7eb;
    --notif-text: #111827;
    --notif-sub: #6b7280;
    --notif-primary: #0b63f3;
    --notif-primary2: #084fc8;
    --notif-shadow: 0 10px 22px rgba(15, 23, 42, 0.06)
}

.notif-page {
    padding: 16px
}

.notif-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px
}

.notif-title {
    margin: 0;
    font-size: 20px;
    color: var(--notif-text)
}

.notif-subtitle {
    margin-top: 4px;
    color: var(--notif-sub);
    font-size: 13px
}

.notif-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap
}

.notif-btn {
    border: 1px solid var(--notif-border);
  
    color: #fff;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center
}

.notif-btn.secondary {
    background: #fff;
    color: var(--notif-text)
}

.notif-btn.sm {
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px
}

.notif-btn:hover {
    background: var(--notif-primary2)
}

.notif-btn.secondary:hover {
    background: #f9fafb
}

.notif-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 10px 0 14px
}

.notif-link {
    color: var(--notif-primary);
    text-decoration: none;
    font-weight: 600
}

.notif-link:hover {
    text-decoration: underline
}

.notif-filter {
    margin: 0
}

.notif-filter-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1.4fr auto;
    gap: 10px;
    align-items: center;
    width: 100%
}

.notif-filter-grid-admin {
    grid-template-columns: 1fr 1fr 1.6fr auto auto
}

.notif-select,
.notif-input,
.notif-textarea {
    width: 100%;
    border: 1px solid var(--notif-border);
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff;
    color: var(--notif-text)
}

.notif-textarea {
    resize: vertical
}

.notif-list {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.notif-card {
    background: var(--notif-card);
    border: 1px solid var(--notif-border);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
    box-shadow: var(--notif-shadow);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease
}

.notif-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08)
}

.notif-card.is-unread {
    border-color: #bfdbfe;
    box-shadow: 0 1px 0 rgba(37, 99, 235, .08)
}

.notif-card.prio-critical {
    border-left: 4px solid #ef4444
}

.notif-card.prio-high {
    border-left: 4px solid #f97316
}

.notif-card.prio-normal {
    border-left: 4px solid #60a5fa
}

.notif-card.prio-low {
    border-left: 4px solid #10b981
}

.notif-card-check {
    width: 26px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 3px
}

.notif-card-check input {
    width: 16px;
    height: 16px
}

.notif-card-media {
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--notif-border);
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center
}

.notif-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block
}

.notif-card-media.is-empty {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #334155
}

.notif-card-media.is-empty i {
    font-size: 21px;
    line-height: 1
}

.notif-card-media.notif-media-general {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #334155
}

.notif-card-media.notif-media-account {
    background: linear-gradient(135deg, #f3e8ff 0%, #ede9fe 100%);
    color: #6d28d9
}

.notif-card-media.notif-media-chat {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1d4ed8
}

.notif-card-media.notif-media-offers {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e
}

.notif-card-media.notif-media-listings {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534
}

.notif-card-media.notif-media-escrow {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #075985
}

.notif-card-media.notif-media-dispute {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b
}

.notif-card-media.notif-media-wallet {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534
}

.notif-card-media.notif-media-promotions {
    background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
    color: #92400e
}

.notif-card-media.notif-media-affiliate {
    background: linear-gradient(135deg, #fae8ff 0%, #f5d0fe 100%);
    color: #a21caf
}

.notif-card-media.notif-media-reputation {
    background: linear-gradient(135deg, #ffedd5 0%, #fdba74 100%);
    color: #9a3412
}

.notif-card-media.notif-media-security {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b
}

.notif-card-media.notif-media-compliance {
    background: linear-gradient(135deg, #ecfeff 0%, #cffafe 100%);
    color: #155e75
}

.notif-card-media.notif-media-moderation {
    background: linear-gradient(135deg, #fef9c3 0%, #fde68a 100%);
    color: #854d0e
}

.notif-card-media.notif-media-operations {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    color: #334155
}

.notif-card-main {
    flex: 1;
    min-width: 0
}

.notif-card-title {
    font-weight: 800;
    color: var(--notif-text);
    margin-bottom: 6px
}

.notif-card-body {
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 10px
}

.notif-card-body-label {
    font-weight: 800;
    color: #0f172a
}

.notif-card-sub {
    color: var(--notif-sub);
    font-size: 13px;
    line-height: 1.35;
    margin: -6px 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.notif-card-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--notif-sub);
    font-size: 12px;
    flex-wrap: wrap
}

.notif-pill {
    border: 1px solid var(--notif-border);
    background: #f9fafb;
    color: #374151;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600
}

.notif-pill-priority {
    background: #111827;
    color: #fff;
    border-color: #111827;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 11px
}

.notif-pill-status {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af
}

.notif-card-side {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 140px
}

.notif-card-side .notif-btn {
    width: 100%
}

.notif-empty {
    padding: 18px;
    border: 1px dashed var(--notif-border);
    border-radius: 14px;
    color: var(--notif-sub);
    background: #fff
}

.notif-form {
    background: #fff;
    border: 1px solid var(--notif-border);
    border-radius: 14px;
    padding: 14px
}

.notif-section {
    background: #fff;
    border: 1px solid var(--notif-border);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px
}

.notif-section-title {
    font-weight: 800;
    color: var(--notif-text);
    margin-bottom: 10px
}

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

.notif-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--notif-sub);
    font-size: 12px
}

.notif-check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    font-size: 14px
}

.notif-tablewrap {
    overflow: auto;
    border: 1px solid var(--notif-border);
    border-radius: 12px;
    background: #fff
}

.notif-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px
}

.notif-table th,
.notif-table td {
    border-bottom: 1px solid var(--notif-border);
    padding: 10px;
    text-align: left;
    vertical-align: top
}

.notif-table th {
    background: #f9fafb;
    color: #374151;
    font-weight: 800
}

.notif-hint {
    margin-top: 10px;
    color: var(--notif-sub);
    font-size: 12px
}

.notif-bulkbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--notif-border);
    background: #fff;
    border-radius: 14px;
    margin-bottom: 10px
}

.notif-bulk-actions {
    display: flex;
    gap: 10px;
    align-items: center
}

.notif-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 6px 0 14px
}

.notif-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--notif-border);
    background: #fff;
    color: var(--notif-text);
    padding: 8px 10px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    font-size: 12px
}

.notif-tab:hover {
    background: #f9fafb
}

.notif-tab.active {
    border-color: #bfdbfe;
    background: #eff6ff;
    color: #1d4ed8
}

.notif-tab-badge {
    background: #ef4444;
    color: #fff;
    border-radius: 999px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 900
}

.notif-group {
    background: transparent
}

.notif-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 16px 0 10px
}

.notif-group-title {
    font-weight: 900;
    color: var(--notif-text)
}

.notif-group-meta {
    color: var(--notif-sub);
    font-size: 12px
}

.notif-quick {
    display: flex;
    gap: 8px;
    flex-wrap: wrap
}

/* Modern Sleek Dropdown */
.notif-dropdown {
    position: absolute;
    z-index: 9999;
    width: 320px;
    max-width: calc(100vw - 24px);
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    /* Lighter border */
    border-radius: 12px;
    /* Sleeker radius */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06), 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px) scale(0.98);
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow: hidden;
}

.notif-dropdown.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.notif-dd-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    background: #fff;
}

.notif-dd-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #111827;
}

.notif-dd-link {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
}

.notif-dd-link:hover {
    text-decoration: underline;
}

.notif-dd-body {
    padding: 0;
    max-height: 400px;
    overflow-y: auto;
    background: #f9fafb;
}

.notif-dd-list {
    display: flex;
    flex-direction: column;
}

.notif-dd-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    background: #fff;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.15s;
    position: relative;
}

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

.notif-dd-item:hover {
    background-color: #f3f4f6;
}

.notif-dd-item.is-unread {
    background-color: #f0f9ff;
}

.notif-dd-item.is-unread:hover {
    background-color: #e0f2fe;
}

/* Unread indicator dot */
.notif-dd-item.is-unread::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background-color: #2563eb;
    border-radius: 50%;
}

.notif-dd-media {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 8px;
    /* Softer square */
    overflow: hidden;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 1.1rem;
}

/* Category colors for icons */
.notif-dd-media.cat-wallet {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.notif-dd-media.cat-credit {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.notif-dd-media.cat-debit {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.notif-dd-media.cat-offer {
    background: #fef9c3;
    color: #854d0e;
    border-color: #fde047;
}

.notif-dd-media.cat-security {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.notif-dd-media.cat-escrow {
    background: #dbeafe;
    color: #1e40af;
    border-color: #bfdbfe;
}

.notif-dd-media.cat-general {
    background: #f3f4f6;
    color: #4b5563;
}

.notif-dd-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.notif-dd-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.notif-dd-row-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 2px;
}

.notif-dd-item-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.notif-dd-time {
    font-size: 0.7rem;
    color: #9ca3af;
    white-space: nowrap;
}

.notif-dd-item-body {
    font-size: 0.75rem;
    color: #6b7280;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notif-dd-cta {
    margin-top: 6px;
    display: inline-flex;
    align-self: flex-start;
    gap: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #dbeafe;
}

/* Footer redesign: Sleek, minimalistic, clickable row aesthetics */
/* Footer redesign: Sleek, minimalistic, clickable row aesthetics */
.notif-dd-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #fff;
    border-top: 1px solid #f3f4f6;
    padding: 12px 16px;
}

.notif-dd-btn {
    border: none;
    background: #f9fafb;
    color: #4b5563;
    padding: 8px 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex: 1;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    /* Smooth rounded corners */
    gap: 8px;
    /* Space between icon and text */
}

/* Remove border-right logic since we are using gap now */
.notif-dd-btn:last-child {
    border-right: none;
}

.notif-dd-btn i {
    font-size: 0.9em;
    opacity: 0.8;
}

.notif-dd-btn:hover {
    background: #f3f4f6;
    color: #111827;
    transform: translateY(-1px);
    /* Subtle lift */
}

.notif-dd-btn:active {
    transform: translateY(0);
}

.notif-dd-btn.secondary {
    background: #f9fafb;
    color: #4b5563;
}

.notif-dd-btn.secondary:hover {
    background: #f3f4f6;
    color: #111827;
}

.notif-dd-btn:first-child:hover {
    /* Reset specific corner reliance */
    border-bottom-left-radius: 8px;
}

.notif-dd-btn:last-child:hover {
    border-bottom-right-radius: 8px;
}

/* Make settings slightly distinct if needed, or keep uniform */

/* Remove old button link style overrides if present */
.notif-dd-foot .notif-dd-link {
    display: none;
}

.notif-dd-loading,
.notif-dd-empty {
    padding: 30px 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 0.85rem;
}

@media (max-width: 900px) {
    .notif-grid {
        grid-template-columns: 1fr
    }

    .notif-filter-grid {
        grid-template-columns: 1fr
    }

    .notif-card {
        flex-direction: column
    }

    .notif-card-media {
        width: 56px;
        height: 56px;
        flex: 0 0 56px
    }

    .notif-card-side {
        min-width: auto;
        flex-direction: row;
        flex-wrap: wrap
    }

    .notif-card-side .notif-btn {
        width: auto
    }

    .notif-bulkbar {
        flex-direction: column;
        align-items: flex-start
    }

    .notif-dropdown {
        width: calc(100vw - 20px);
        left: 10px !important;
        right: 10px;
        transform: none !important;
        top: 60px !important;
    }
}
