/* ── Tool Notifications ─────────────────────────────────────── */
.dl-notif-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--txt-2);
    font-size: 1rem;
    transition: background .18s, color .18s;
    flex-shrink: 0;
}
.dl-notif-btn:hover { background: var(--surface-2); color: var(--txt-1); }
.dl-notif-badge {
    position: absolute;
    top: 3px; right: 3px;
    min-width: 16px; height: 16px;
    background: #ef4444;
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px;
    line-height: 1;
    border: 2px solid transparent;
    outline: 2px solid #fff;
    outline-offset: -2px;
    animation: dlNotifPop .3s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes dlNotifPop {
    from { transform: scale(0); } to { transform: scale(1); }
}

/* ── Dropdown Panel ─────────────────────────────────── */
.dl-notif-panel {
    position: fixed;
    top: 70px; right: 16px;
    width: 340px;
    max-height: 480px;
    background: var(--surface-1, #fff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
    z-index: 99999;
    overflow: hidden;
    display: flex; flex-direction: column;
    animation: dlNotifSlide .22s cubic-bezier(.4,0,.2,1) both;
}
html[data-theme="dark"] .dl-notif-panel {
    background: #1a1a2e;
    border-color: rgba(255,255,255,.08);
    box-shadow: 0 8px 40px rgba(0,0,0,.5);
}
@keyframes dlNotifSlide {
    from { opacity: 0; transform: translateY(-10px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.dl-notif-header {
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--border, #e5e7eb);
    display: flex; align-items: center; justify-content: space-between;
    flex-shrink: 0;
}
html[data-theme="dark"] .dl-notif-header { border-color: rgba(255,255,255,.08); }
.dl-notif-title {
    font-size: .85rem;
    font-weight: 700;
    color: var(--txt-1);
    display: flex; align-items: center; gap: 6px;
}
.dl-notif-mark-all {
    font-size: .72rem;
    color: var(--brand, #6366f1);
    cursor: pointer;
    background: none; border: none; padding: 0;
    font-weight: 600;
    opacity: .85;
}
.dl-notif-mark-all:hover { opacity: 1; text-decoration: underline; }

.dl-notif-list {
    overflow-y: auto;
    flex: 1;
    padding: 8px 0;
}
.dl-notif-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--txt-3);
    font-size: .82rem;
}
.dl-notif-item {
    padding: 10px 16px;
    display: flex; gap: 10px;
    align-items: flex-start;
    cursor: pointer;
    transition: background .15s;
    border-left: 3px solid transparent;
}
.dl-notif-item:hover { background: var(--surface-2, #f3f4f6); }
.dl-notif-item.dl-notif-unread { border-left-color: var(--brand, #6366f1); background: rgba(99,102,241,.04); }
html[data-theme="dark"] .dl-notif-item:hover { background: rgba(255,255,255,.05); }
html[data-theme="dark"] .dl-notif-item.dl-notif-unread { background: rgba(99,102,241,.08); }

.dl-notif-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    margin-top: 4px;
    flex-shrink: 0;
}
.dl-notif-dot.dot-updated { background: #6366f1; }
.dl-notif-dot.dot-new     { background: #10b981; }

.dl-notif-body { flex: 1; min-width: 0; }
.dl-notif-tool-name {
    font-size: .8rem;
    font-weight: 700;
    color: var(--txt-1);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dl-notif-note {
    font-size: .75rem;
    color: var(--txt-2);
    margin-top: 2px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dl-notif-meta {
    display: flex; align-items: center; gap: 6px;
    margin-top: 4px;
}
.dl-notif-type-badge {
    font-size: .6rem;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 1px 7px;
    border-radius: 999px;
    text-transform: uppercase;
}
.dl-notif-type-badge.badge-updated { background: rgba(99,102,241,.15); color: #6366f1; }
.dl-notif-type-badge.badge-new     { background: rgba(16,185,129,.15); color: #10b981; }
.dl-notif-date { font-size: .68rem; color: var(--txt-3); }
.dl-notif-ver  { font-size: .68rem; color: var(--txt-3); }

/* ── Tool Card Badges (New / Updated) ──────────────────── */
.dl-tool-badge {
    display: inline-flex; align-items: center;
    font-size: .6rem; font-weight: 700; letter-spacing: .05em;
    padding: 2px 8px; border-radius: 999px;
    text-transform: uppercase; cursor: default;
    position: relative;
}
.dl-tool-badge.badge-new     { background: rgba(16,185,129,.15); color: #10b981; border: 1px solid rgba(16,185,129,.3); }
.dl-tool-badge.badge-updated { background: rgba(99,102,241,.15); color: #6366f1; border: 1px solid rgba(99,102,241,.3); }

/* Tooltip on hover */
.dl-tool-badge::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15,15,30,.9);
    color: #fff;
    font-size: .68rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 7px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s;
    letter-spacing: 0;
    text-transform: none;
    z-index: 9999;
}
.dl-tool-badge:hover::after { opacity: 1; }

/* ── Version chip on tool page header ────────────────── */
.dl-tool-version-chip {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: .65rem; font-weight: 700;
    color: #6366f1;
    background: rgba(99,102,241,.1);
    border: 1px solid rgba(99,102,241,.3);
    border-radius: 999px;
    padding: 2px 10px;
    letter-spacing: .03em;
    vertical-align: middle;
}
html[data-theme="dark"] .dl-tool-version-chip {
    color: #a5b4fc;
    background: rgba(99,102,241,.18);
    border-color: rgba(99,102,241,.4);
}

@media (max-width: 480px) {
    .dl-notif-panel { width: calc(100vw - 20px); right: 10px; }
}
