/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:             #0d1117;
    --surface:        #161b22;
    --border:         #30363d;
    --text:           #e6edf3;
    --muted:          #8b949e;
    --accent:         #1a8cff;
    --accent-h:       #1478d9;
    --success:        #3fb950;
    --tag-blog:       #1f4e8a;
    --tag-blog-text:  #7ab3ff;
    --tag-news:       #1e4d3a;
    --tag-news-text:  #56d364;
    --tag-video:      #5a2d82;
    --tag-video-text: #c792ea;
    --tag-podcast:      #0e3d3d;
    --tag-podcast-text: #4dd0d0;
    --card-sel:       #1c2e45;
    --radius:         8px;
    --topbar-h:       56px;
    --typetabs-h:     58px;
    --productbar-h:   40px;
    --feedbar-h:      48px;
}

html[data-theme="light"] {
    --bg:             #f6f8fa;
    --surface:        #ffffff;
    --border:         #d0d7de;
    --text:           #1f2328;
    --muted:          #656d76;
    --accent:         #0969da;
    --accent-h:       #0759b8;
    --success:        #1a7f37;
    --tag-blog:       #ddf4ff;
    --tag-blog-text:  #0550ae;
    --tag-news:       #dcffe4;
    --tag-news-text:  #116329;
    --tag-video:      #fbefff;
    --tag-video-text: #8250df;
    --tag-podcast:      #e0f7f7;
    --tag-podcast-text: #0d6b6b;
    --card-sel:       #dff0ff;
}

html, body {
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

/* ── Topbar ── */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
    gap: 16px;
}

.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.brand {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.5px;
}
.brand-sub { color: var(--text); font-weight: 400; }
.version {
    font-size: 0.75rem;
    color: var(--muted);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}
.version:hover { color: var(--accent); text-decoration: underline; }

.refresh-status-line {
    font-size: 0.72rem;
    color: var(--muted);
    white-space: nowrap;
}

/* ── Type Tabs Strip ── */
.type-tabs {
    position: fixed;
    top: var(--topbar-h);
    left: 0; right: 0;
    height: var(--typetabs-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 6px;
    z-index: 99;
}

/* ── Search ── */
.search-wrap {
    margin-left: auto;
    display: flex;
    align-items: center;
}
.search-input {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text);
    font-size: 0.8rem;
    font-family: inherit;
    padding: 4px 12px;
    width: 200px;
    outline: none;
    transition: border-color 0.15s, width 0.2s;
}
.search-input:focus {
    border-color: var(--accent);
    width: 260px;
}
.search-input::placeholder { color: var(--muted); }
.search-input::-webkit-search-cancel-button { cursor: pointer; }

/* ── Product Bar (admin-only lens selector) ── */
.product-bar {
    position: fixed;
    top: calc(var(--topbar-h) + var(--typetabs-h));
    left: 0; right: 0;
    height: var(--productbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 8px;
    z-index: 98;
    overflow-x: auto;
    scrollbar-width: none;
}
.product-bar::-webkit-scrollbar { display: none; }
.product-bar-label {
    font-size: 0.72rem;
    color: var(--muted);
    white-space: nowrap;
    flex-shrink: 0;
}
.product-pills { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; }
.product-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: transparent;
    color: var(--muted);
    font-size: 0.76rem;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    font-family: inherit;
}
.product-pill:hover { color: var(--text); border-color: var(--accent); }
.product-pill.active { color: #fff; font-weight: 600; }
.pill-dot {
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-right: 5px;
    opacity: 0.8;
}
.pill-check {
    font-size: 0.7rem;
    margin-right: 4px;
    opacity: 0.9;
}
.product-active-label {
    margin-left: auto;
    font-size: 0.72rem;
    color: var(--muted);
    white-space: nowrap;
    flex-shrink: 0;
}
.product-active-label .clear-product {
    cursor: pointer;
    color: var(--accent);
    margin-left: 4px;
}

/* ── Feed Bar ── */
.feed-bar {
    position: fixed;
    top: calc(var(--topbar-h) + var(--typetabs-h) + var(--productbar-h));
    left: 0; right: 0;
    height: var(--feedbar-h);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 6px;
    overflow-x: auto;
    z-index: 99;
    scrollbar-width: none;
}
.feed-bar::-webkit-scrollbar { display: none; }

.feed-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px 4px 7px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: transparent;
    color: var(--text);
    font-size: 0.78rem;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: border-color 0.15s, opacity 0.15s, color 0.15s;
}
.feed-chip img {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    object-fit: contain;
}
.feed-chip.active { border-color: var(--accent); }
.feed-chip:not(.active) { color: var(--muted); opacity: 0.45; }
.feed-chip:hover { border-color: var(--accent); opacity: 1; color: var(--text); }

.feed-chip-live.active { border-color: #fb923c; color: #fb923c; }
html[data-theme="light"] .feed-chip-live.active { border-color: #ea580c; color: #ea580c; }
.feed-chip-live:hover { border-color: #fb923c; color: #fb923c; opacity: 1; }

.feedbar-sep {
    width: 1px;
    height: 22px;
    background: var(--border);
    flex-shrink: 0;
    margin: 0 2px;
}

/* ── Feed bar bulk controls ── */
.feedbar-bulk {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 0.75rem;
    font-family: inherit;
    cursor: pointer;
    padding: 2px 5px;
    border-radius: 4px;
    white-space: nowrap;
}
.feedbar-bulk:hover { color: var(--text); }
.feedbar-bulk.feedbar-bulk-active { color: var(--accent); font-weight: 600; }

/* ── Filter Tabs ── */
.tab {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1px;
    padding: 5px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1.2;
}
.tab:hover { color: var(--text); border-color: var(--accent); }
.tab.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

.tab-meta {
    display: block;
    font-size: 0.62rem;
    font-weight: 400;
    opacity: 0.7;
    white-space: nowrap;
    letter-spacing: 0;
}
.tab.active .tab-meta { opacity: 0.85; }

/* ── Buttons ── */
.btn-primary {
    padding: 9px 18px;
    background: var(--accent);
    border: none;
    border-radius: var(--radius);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
    width: 100%;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-h); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-secondary {
    padding: 7px 14px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.15s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.btn-ghost {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    padding: 6px 8px;
    border-radius: var(--radius);
    transition: color 0.15s;
}
.btn-ghost:hover { color: var(--text); }

.theme-toggle {
    font-size: 1rem;
    padding: 4px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    line-height: 1;
}
.theme-toggle:hover { border-color: var(--accent); }

.btn-link {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0 4px;
}
.btn-link:hover { text-decoration: underline; }

/* ── Layout ── */
.layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 0;
    margin-top: calc(var(--topbar-h) + var(--typetabs-h) + var(--productbar-h) + var(--feedbar-h));
    align-items: start;
}

/* ── Feed Panel ── */
.feed-panel {
    padding: 20px;
    border-right: 1px solid var(--border);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.panel-header h2 { font-size: 1rem; font-weight: 600; }
.selection-info { font-size: 0.82rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }

/* ── Feed Grid ── */
.feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

/* ── News Card ── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.card:hover { border-color: var(--accent); }
.card.selected { background: var(--card-sel); border-color: var(--accent); }
.card.selected::after {
    content: '✓';
    position: absolute;
    top: 10px; right: 10px;
    background: var(--accent);
    color: #fff;
    width: 20px; height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.card-thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
    background: var(--bg);
    display: block;
}

.card-hero {
    width: 100%;
    height: 120px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-blog  { background: linear-gradient(135deg, #0d2b5e 0%, #1a4a8a 100%); }
.hero-news  { background: linear-gradient(135deg, #0d3d22 0%, #1a6b3a 100%); }
.hero-video { background: linear-gradient(135deg, #2d1050 0%, #5a2d82 100%); }
html[data-theme="light"] .hero-blog  { background: linear-gradient(135deg, #c8e0ff 0%, #e8f4ff 100%); }
html[data-theme="light"] .hero-news  { background: linear-gradient(135deg, #b6f0c8 0%, #dcffe4 100%); }
html[data-theme="light"] .hero-video { background: linear-gradient(135deg, #e0c0ff 0%, #fbefff 100%); }

.card-hero-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: contain;
    opacity: 0.9;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.source-icon {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    object-fit: contain;
    flex-shrink: 0;
}

.source-tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.tag-blog    { background: var(--tag-blog);    color: var(--tag-blog-text); }
.tag-news    { background: var(--tag-news);    color: var(--tag-news-text); }
.tag-video   { background: var(--tag-video);   color: var(--tag-video-text); }
.tag-podcast { background: var(--tag-podcast); color: var(--tag-podcast-text); }
.tag-cisco-live { background: #4a2800; color: #fb923c; }
html[data-theme="light"] .tag-cisco-live { background: #fff7ed; color: #c2410c; }

/* ── Advisory severity badges ── */
.tag-sev-critical     { background: #3d0000; color: #f87171; }
.tag-sev-high         { background: #3d1800; color: #fb923c; }
.tag-sev-medium       { background: #3d2d00; color: #fbbf24; }
.tag-sev-low,
.tag-sev-informational { background: var(--border); color: var(--muted); }
html[data-theme="light"] .tag-sev-critical      { background: #fee2e2; color: #b91c1c; }
html[data-theme="light"] .tag-sev-high          { background: #ffedd5; color: #c2410c; }
html[data-theme="light"] .tag-sev-medium        { background: #fef3c7; color: #92400e; }
html[data-theme="light"] .tag-sev-low,
html[data-theme="light"] .tag-sev-informational { background: var(--border); color: var(--muted); }

/* ── Advisory severity filter chips ── */
.severity-chip.active.severity-critical { border-color: #f87171; color: #f87171; }
.severity-chip.active.severity-high     { border-color: #fb923c; color: #fb923c; }
.severity-chip.active.severity-medium   { border-color: #fbbf24; color: #fbbf24; }
.severity-chip.active.severity-low      { border-color: var(--muted); color: var(--text); }
.severity-chip.active.severity-all      { border-color: var(--accent); color: var(--accent); }
html[data-theme="light"] .severity-chip.active.severity-critical { border-color: #b91c1c; color: #b91c1c; }
html[data-theme="light"] .severity-chip.active.severity-high     { border-color: #c2410c; color: #c2410c; }
html[data-theme="light"] .severity-chip.active.severity-medium   { border-color: #92400e; color: #92400e; }

/* ── Advisory card secondary source label ── */
.advisory-source {
    font-size: 0.73rem;
    color: var(--muted);
    margin-top: -4px;
}

/* ── Advisory feed bar two-row layout ── */
.feed-bar--advisory {
    flex-direction: column;
    align-items: stretch;
    overflow-x: hidden;
    padding: 0;
    gap: 0;
}

.feedbar-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
}
.feedbar-row::-webkit-scrollbar { display: none; }
.feedbar-row-sep { border-top: 1px solid var(--border); }

/* ── Advisories tab urgency dot ── */

.card-date { font-size: 0.75rem; color: var(--muted); margin-left: auto; }
.card-title { font-size: 0.9rem; font-weight: 600; line-height: 1.4; }
.card-summary { font-size: 0.8rem; color: var(--muted); line-height: 1.5; }
.card-link {
    font-size: 0.78rem;
    color: var(--accent);
    text-decoration: none;
    margin-top: auto;
}
.card-link:hover { text-decoration: underline; }

/* ── Newsletter Panel ── */
.newsletter-panel {
    position: sticky;
    top: calc(var(--topbar-h) + var(--typetabs-h) + var(--productbar-h) + var(--feedbar-h));
    height: fit-content;
    align-self: start;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--surface);
}

.newsletter-controls { display: flex; flex-direction: column; gap: 8px; }
.hint { font-size: 0.8rem; color: var(--muted); text-align: center; }

.picker-label { font-size: 0.72rem; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: -2px; }

.nsl-pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.nsl-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: transparent;
    color: var(--text);
    font-size: 0.78rem;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: border-color 0.15s, background 0.15s;
}
.nsl-pill:hover { border-color: var(--accent); }
.nsl-pill.active { border-color: var(--accent); background: var(--surface); }
.linkedin-hint {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.55;
    padding: 6px 8px;
    background: var(--surface);
    border-radius: 5px;
    border-left: 2px solid var(--accent);
}
.nsl-linkedin-hint { margin: 12px 20px 16px; flex-shrink: 0; }
.format-description { font-size: 0.76rem; color: var(--muted); margin: -2px 0 0; }

.newsletter-output { display: flex; flex-direction: column; gap: 10px; }
.output-actions { display: flex; gap: 8px; }

#newsletterText {
    width: 100%;
    height: 420px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: 'Segoe UI', sans-serif;
    font-size: 0.82rem;
    line-height: 1.6;
    padding: 12px;
    resize: vertical;
    outline: none;
}

.copy-confirm {
    text-align: center;
    color: var(--success);
    font-size: 0.85rem;
    font-weight: 600;
}

/* ── Newsletter Output Modal ── */
.nsl-modal {
    max-width: 680px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}
.nsl-modal-body {
    flex: 1;
    min-height: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
}
.nsl-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    color: var(--muted);
}
.nsl-modal-textarea {
    width: 100%;
    min-height: 300px;
    max-height: 55vh;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: 'Segoe UI', sans-serif;
    font-size: 0.9rem;
    line-height: 1.7;
    padding: 14px;
    resize: vertical;
    outline: none;
    flex: 1;
}
.nsl-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    gap: 12px;
    flex-shrink: 0;
}
.nsl-modal-meta { font-size: 0.75rem; color: var(--muted); }
.nsl-modal-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ── Spinner ── */
.loading-state, .generate-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--muted);
    padding: 40px;
    grid-column: 1 / -1;
}
.spinner {
    width: 28px; height: 28px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Changelog Modal ── */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 560px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.modal-header h2 { font-size: 1rem; font-weight: 600; }
.modal-body {
    overflow-y: auto;
    padding: 20px;
    font-size: 0.85rem;
    line-height: 1.7;
    white-space: pre-wrap;
    color: var(--muted);
}
.modal-body strong { color: var(--text); display: block; margin-top: 12px; margin-bottom: 2px; }

/* ── Utility ── */
.hidden { display: none !important; }

/* ── Empty State ── */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}
.empty-state h3 { font-size: 1rem; margin-bottom: 8px; }
.empty-state p { font-size: 0.85rem; }

/* ── Account ── */
.account-btn {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 4px 10px;
    font-size: 0.8rem;
}
.account-btn:hover { border-color: var(--accent); color: var(--text); }
.account-modal-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
}
.account-label { font-size: 0.78rem; color: var(--muted); }
.account-input {
    width: 100%;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
}
.account-input:focus { border-color: var(--accent); }
.account-msg {
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 0.83rem;
    border: 1px solid;
}
.account-msg.success { background: rgba(0,180,80,0.1); border-color: rgba(0,180,80,0.3); color: var(--success); }
.account-msg.error   { background: rgba(200,0,0,0.1);  border-color: rgba(200,0,0,0.3);  color: #ff6b6b; }

/* ── Admin Portal ── */
.admin-main {
    margin-top: calc(var(--topbar-h) + 24px);
    padding: 0 24px 40px;
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.admin-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
}
.admin-card h2 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-count {
    font-size: 0.75rem;
    background: var(--border);
    color: var(--muted);
    padding: 1px 7px;
    border-radius: 10px;
}
.admin-banner {
    padding: 10px 16px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    border: 1px solid;
}
.admin-banner-error   { background: rgba(200,0,0,0.1);    border-color: rgba(200,0,0,0.3);    color: #ff6b6b; }
.admin-banner-success { background: rgba(0,180,80,0.1);  border-color: rgba(0,180,80,0.3);   color: var(--success); }
.admin-banner-pending { background: rgba(234,140,0,0.1); border-color: rgba(234,140,0,0.35); color: #d97706; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.admin-table th {
    text-align: left;
    color: var(--muted);
    font-weight: 500;
    font-size: 0.78rem;
    padding: 6px 10px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 1;
}
.admin-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: none; }
.admin-td-username { font-weight: 600; }
.admin-td-muted { color: var(--muted); font-size: 0.8rem; }
.admin-td-actions { width: 1%; }
.admin-row-actions { display: flex; align-items: center; gap: 6px; }
.inline-form { display: flex; align-items: center; gap: 4px; }
.role-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.role-admin      { background: var(--tag-blog); color: var(--tag-blog-text); }
.role-user       { background: var(--border);   color: var(--muted); }
.role-moderator  { background: rgba(251,191,36,0.15); color: #d97706; border: 1px solid rgba(251,191,36,0.4); }
html[data-theme="light"] .role-moderator { background: #fffbeb; color: #92400e; border-color: rgba(217,119,6,0.3); }

/* Flag star indicator & moderator flag button */
.flag-wrap { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.flag-star { font-size: 1rem; color: #f59e0b; pointer-events: none; line-height: 1; }
.flag-btn {
    background: none; border: none; cursor: pointer; font-size: 0.95rem;
    color: var(--muted); opacity: 0.5; padding: 0 2px; line-height: 1;
    transition: color 0.15s, opacity 0.15s;
}
.flag-btn:hover { color: #f59e0b; opacity: 1; }
.flag-btn.flag-btn-on { color: #f59e0b; opacity: 1; }

/* Flagged chip in nav */
.feed-chip-flagged.active { border-color: #f59e0b; color: #f59e0b; }
.feed-chip-flagged:hover  { border-color: #f59e0b; color: #f59e0b; opacity: 1; }

.nl-count { font-weight: 600; color: var(--muted); }
.nl-count-active { color: var(--accent); }
.admin-delete { color: #ff6b6b !important; }
.admin-delete:hover { color: #ff4444 !important; }
.admin-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.admin-input {
    padding: 7px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    flex: 1;
    min-width: 140px;
}
.admin-input:focus { border-color: var(--accent); }
.admin-input-sm { min-width: 120px; max-width: 160px; flex: none; font-size: 0.8rem; padding: 5px 10px; }
.admin-submit { width: auto; padding: 7px 18px; }

/* ── Admin Modal ── */
.modal-wide { max-width: 820px; max-height: 85vh; display: flex; flex-direction: column; }
.admin-modal-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    white-space: normal;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.admin-tools-row { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-divider { border: none; border-top: 1px solid var(--border); margin: 2px 0; }
.admin-section-header { display: flex; align-items: center; gap: 12px; }
.admin-section-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.admin-user-search {
    flex: 1;
    padding: 5px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    font-size: 0.82rem;
    font-family: inherit;
    outline: none;
    min-width: 0;
}
.admin-user-search:focus { border-color: var(--accent); }
.admin-user-table { overflow-x: auto; overflow-y: auto; max-height: 320px; }
.admin-add-toggle {
    width: 100%;
    padding: 7px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: transparent;
    color: var(--text);
    font-size: 0.83rem;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, color 0.15s;
}
.admin-add-toggle:hover { border-color: var(--accent); color: var(--accent); }
.admin-add-form { display: flex; flex-direction: column; gap: 6px; }
.admin-create-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.admin-input-inline { width: auto; flex: 1; min-width: 140px; }
.admin-pw-input {
    width: 160px;
    flex: none;
    font-size: 0.8rem;
    padding: 5px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: inherit;
    outline: none;
}
.admin-pw-input:focus { border-color: var(--accent); }
.admin-pw-visible { font-family: monospace; letter-spacing: 0.04em; }
.admin-pw-row { margin-top: 6px; }
.admin-email-link { color: var(--accent); text-decoration: none; }
.admin-email-link:hover { text-decoration: underline; }
.account-msg-ok    { background: rgba(0,180,80,0.1);  border-color: rgba(0,180,80,0.3);  color: var(--success); }
.account-msg-error { background: rgba(200,0,0,0.1);   border-color: rgba(200,0,0,0.3);   color: #ff6b6b; }
.reset-banner {
    background: rgba(255, 160, 0, 0.1);
    border: 1px solid rgba(255, 160, 0, 0.35);
    color: #e8a020;
    border-radius: var(--radius);
    padding: 10px 14px;
    font-size: 0.83rem;
    line-height: 1.5;
}

/* ── Competitors tab button ── */
.tab-competitor { color: #fb923c; border-color: rgba(251, 146, 60, 0.35); }
.tab-competitor:hover { color: #fb923c; border-color: #fb923c; }
.tab-competitor.active { background: #c2410c; border-color: #c2410c; color: #fff; }
html[data-theme="light"] .tab-competitor { color: #c2410c; border-color: rgba(194, 65, 12, 0.35); }
html[data-theme="light"] .tab-competitor:hover { color: #ea580c; border-color: #ea580c; }
html[data-theme="light"] .tab-competitor.active { background: #ea580c; border-color: #ea580c; color: #fff; }

/* ── Competitor source badge — generic fallback ── */
.tag-competitor { background: #3d1a00; color: #fb923c; }
html[data-theme="light"] .tag-competitor { background: #fff7ed; color: #c2410c; }

/* ── Competitor source badge — vendor brand colours ── */
/* Palo Alto Networks — cyan-blue */
.tag-comp-pan        { background: #002538; color: #00BBE8; }
/* Unit 42 (PAN threat research) — orange */
.tag-comp-unit42     { background: #3d1400; color: #F06030; }
/* Fortinet — red */
.tag-comp-fortinet   { background: #3d0000; color: #FF4444; }
/* FortiGuard Labs — red-orange */
.tag-comp-fortiguard { background: #3d0500; color: #FF5533; }
/* Zscaler — royal blue */
.tag-comp-zscaler    { background: #001040; color: #5592F4; }
/* Okta — sky blue */
.tag-comp-okta       { background: #001a40; color: #00AAFF; }
/* Microsoft Security — Microsoft blue */
.tag-comp-microsoft  { background: #001530; color: #60A8FC; }
/* Proofpoint — navy blue */
.tag-comp-proofpoint { background: #001030; color: #5888E8; }
/* CrowdStrike — red */
.tag-comp-crowdstrike { background: #3d0a00; color: #FF4422; }

html[data-theme="light"] .tag-comp-pan        { background: #dcf6ff; color: #005a8e; }
html[data-theme="light"] .tag-comp-unit42     { background: #fff3ee; color: #c03000; }
html[data-theme="light"] .tag-comp-fortinet   { background: #fff0f0; color: #cc0000; }
html[data-theme="light"] .tag-comp-fortiguard { background: #fff2ef; color: #c02200; }
html[data-theme="light"] .tag-comp-zscaler    { background: #eef3ff; color: #003090; }
html[data-theme="light"] .tag-comp-okta       { background: #e0f4ff; color: #006699; }
html[data-theme="light"] .tag-comp-microsoft  { background: #e6f2ff; color: #0060c0; }
html[data-theme="light"] .tag-comp-proofpoint { background: #eef2ff; color: #004898; }
html[data-theme="light"] .tag-comp-crowdstrike { background: #fff2ee; color: #cc2800; }
/* Sophos — corporate blue */
.tag-comp-sophos { background: #001d3d; color: #00AEEF; }
html[data-theme="light"] .tag-comp-sophos { background: #e0f6ff; color: #005580; }

/* ── Competitor cards (read-only, no pointer) ── */
.card-competitor { cursor: default; }
.card-competitor:hover { border-color: #fb923c; }

/* ── Topic pills inside cards ── */
.card-topics { display: flex; flex-wrap: wrap; gap: 4px; }
.topic-pill {
    font-size: 0.68rem;
    padding: 1px 7px;
    border-radius: 10px;
    background: rgba(251, 146, 60, 0.1);
    color: #fb923c;
    border: 1px solid rgba(251, 146, 60, 0.22);
    white-space: nowrap;
    letter-spacing: 0.2px;
}
html[data-theme="light"] .topic-pill {
    background: #fff7ed;
    color: #c2410c;
    border-color: rgba(194, 65, 12, 0.25);
}

/* ── Full-width layout for Competitors tab ── */
.layout--full { grid-template-columns: 1fr; }
.layout--full .newsletter-panel { display: none; }
.layout--full .selection-info { display: none; }

/* ── Submit Feed button + pending badge ── */
.submit-feed-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.pending-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #e53e3e;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    line-height: 1;
}

/* ── Bell notifications ── */
.bell-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.bell-btn {
    font-size: 1rem;
    padding: 4px 8px;
    line-height: 1;
}
.bell-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #e53e3e;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.bell-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 310px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    z-index: 150;
    overflow: hidden;
}
.bell-list {
    max-height: 320px;
    overflow-y: auto;
}
.bell-empty {
    padding: 16px;
    text-align: center;
    color: var(--muted);
    font-size: 0.82rem;
}
.bell-notif {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    border-left: 3px solid transparent;
}
.bell-notif:last-child { border-bottom: none; }
.bell-notif-approved { border-left-color: var(--success); }
.bell-notif-rejected { border-left-color: var(--muted); }
.bell-notif-read { opacity: 0.5; }
.bell-notif-text { font-size: 0.82rem; line-height: 1.4; }
.bell-notif-date { font-size: 0.74rem; color: var(--muted); margin-top: 3px; }
.bell-mark-read {
    padding: 8px 14px;
    border-top: 1px solid var(--border);
    text-align: right;
    background: var(--surface);
}

/* ── Submit Feed modal ── */
.submit-feed-note {
    resize: vertical;
    min-height: 68px;
    font-family: inherit;
    line-height: 1.5;
}
.submit-feed-success {
    color: var(--success);
    font-size: 0.87rem;
    line-height: 1.65;
    padding: 12px 14px;
    background: rgba(0,180,80,0.08);
    border: 1px solid rgba(0,180,80,0.25);
    border-radius: var(--radius);
}

/* ── Admin feeds link in admin modal ── */
.admin-feeds-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    text-decoration: none;
    font-size: 0.82rem;
    transition: border-color 0.15s, color 0.15s;
    white-space: nowrap;
}
.admin-feeds-link:hover { border-color: var(--accent); color: var(--accent); }
.feeds-pending-count {
    background: #e53e3e;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
