/* ================================================================
   Campaign tool — design-system tokens (primitive → semantic → UI)
   ui-ux-master: dark-first, greyscale + functional status colour only.
   ================================================================ */

:root {
    /* ---- Layer 1: Primitives (zinc-inspired neutrals) ---- */
    --primitive-zinc-950: #09090b;
    --primitive-zinc-900: #0f0f12;
    --primitive-zinc-850: #141418;
    --primitive-zinc-800: #18181b;
    --primitive-zinc-750: #1c1c20;
    --primitive-zinc-700: #27272a;
    --primitive-zinc-600: #3f3f46;
    --primitive-zinc-500: #52525b;
    --primitive-zinc-400: #a1a1aa;
    --primitive-zinc-50:  #fafafa;
    --primitive-red-500:  #ef4444;
    --primitive-red-400:  #f87171;
    --primitive-amber-500:#eab308;
    --primitive-green-500:#22c55e;

    /* ---- Layer 2: Semantic (purpose) ---- */
    --color-surface-page:    var(--primitive-zinc-950);
    --color-surface-raised:  var(--primitive-zinc-900);
    --color-surface-input:   var(--primitive-zinc-850);
    --color-surface-hover:   var(--primitive-zinc-800);
    --color-border-default:  var(--primitive-zinc-750);
    --color-border-muted:    var(--primitive-zinc-700);
    --color-border-focus:    var(--primitive-zinc-600);
    --color-fg-default:      var(--primitive-zinc-50);
    --color-fg-muted:        var(--primitive-zinc-400);
    --color-fg-subtle:       var(--primitive-zinc-500);
    --color-fg-disabled:     var(--primitive-zinc-600);
    --color-danger:          var(--primitive-red-500);
    --color-danger-hover:    var(--primitive-red-400);
    --color-danger-muted:    rgba(239, 68, 68, 0.10);
    --color-warn:            var(--primitive-amber-500);
    --color-warn-muted:      rgba(234, 179, 8, 0.10);
    --color-success:         var(--primitive-green-500);
    --color-success-muted:   rgba(34, 197, 94, 0.10);

    /* ---- Layer 3: Component / legacy aliases (maps existing class tokens) ---- */
    --bg:           var(--color-surface-page);
    --bg-panel:     var(--color-surface-raised);
    --bg-input:     var(--color-surface-input);
    --bg-hover:     var(--color-surface-hover);
    --border:       var(--color-border-default);
    --border-light: var(--color-border-muted);
    --border-focus: var(--color-border-focus);
    --text:         var(--color-fg-default);
    --text-sec:     var(--color-fg-muted);
    --text-dim:     var(--color-fg-subtle);
    --text-ghost:   var(--color-fg-disabled);
    --danger:       var(--color-danger);
    --danger-hover: var(--color-danger-hover);
    --danger-muted: var(--color-danger-muted);
    --warn:         var(--color-warn);
    --warn-muted:   var(--color-warn-muted);
    --ok:           var(--color-success);
    --ok-muted:     var(--color-success-muted);

    /* Spacing scale (4 / 8 grid — design-system + ui-ux-pro-max) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;

    --radius:       6px;
    --radius-sm:    4px;
    --radius-lg:    8px;
    --font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --mono:         'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
    --duration-ui:  180ms;
    --ease-ui:      cubic-bezier(0.33, 1, 0.68, 1);
    --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1);
    --z-sticky:     100;
    --z-skip:       200;
    /* Elevation — monochrome, low contrast (design-system component layer) */
    --shadow-sm:    0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md:    0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-nav:   0 8px 24px rgba(0, 0, 0, 0.25);
}

/* ---- Reset ---- */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 11px;
    color-scheme: dark;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    font-feature-settings: "cv02", "cv03", "cv04", "ss01";
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse 100% 60% at 50% -30%, rgba(255, 255, 255, 0.045), transparent 55%);
    color: var(--text);
    line-height: 1.55;
    min-height: 100vh;
    touch-action: manipulation;
}

a { color: var(--text-sec); text-decoration: none; transition: color var(--duration-ui) var(--ease-ui); }
a:hover { color: var(--text); }

/* ui-ux-pro-max: keyboard focus */
:focus { outline: none; }
:focus-visible {
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}
.nav-link:focus-visible,
.nav-logout:focus-visible,
.btn:focus-visible,
.tab:focus-visible,
.filter-chip:focus-visible,
.quick-link-card:focus-visible {
    outline-offset: 1px;
}

.skip-link {
    position: absolute;
    left: var(--space-3);
    top: var(--space-3);
    z-index: var(--z-skip);
    padding: var(--space-2) var(--space-3);
    background: var(--text);
    color: var(--bg);
    font-size: 11px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
    white-space: nowrap;
}
.skip-link:focus,
.skip-link:focus-visible {
    clip: auto;
    clip-path: none;
    width: auto;
    height: auto;
}

/* ---- Scrollbar ---- */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-focus); }

/* ================================================================
   Nav
   ================================================================ */

.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-3);
    min-height: 44px;
    padding: var(--space-2) var(--space-5);
    background: rgba(15, 15, 18, 0.78);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-nav);
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    backdrop-filter: blur(12px) saturate(1.1);
    -webkit-backdrop-filter: blur(12px) saturate(1.1);
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 0;
}

.nav-app {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-dim);
    padding-right: var(--space-3);
    margin-right: var(--space-2);
    border-right: 1px solid var(--border);
}

.nav-primary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
    min-width: 0;
}

/* ui-ux-pro-max: min 44px touch target (padding + line-height) */
.nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 var(--space-3);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    font-size: 10px;
    cursor: pointer;
    transition: background var(--duration-ui) var(--ease-ui), color var(--duration-ui) var(--ease-ui);
}
.nav-link:hover { background: rgba(255,255,255,0.06); color: var(--text-sec); }
.nav-link.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.09);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.nav-logout-form {
    display: inline;
    margin: 0;
    padding: 0;
}

.nav-logout {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--text-dim);
    background: none;
    border: none;
    font-family: var(--font);
    font-size: 10px;
    cursor: pointer;
    padding: 0 var(--space-3);
    border-radius: var(--radius-sm);
    transition: background var(--duration-ui) var(--ease-ui), color var(--duration-ui) var(--ease-ui);
}
.nav-logout:hover { color: var(--danger); background: rgba(255,255,255,0.04); }

.nav-user {
    font-size: 10px;
    color: var(--text-sec);
    margin-right: 2px;
}

.nav-role {
    font-size: 8px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    background: rgba(255,255,255,0.03);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    margin-right: 8px;
}

.kill-badge {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--danger);
    border: 1px solid var(--danger);
    padding: 3px var(--space-2);
    border-radius: var(--radius-sm);
    margin-right: var(--space-3);
    background: var(--danger-muted);
}

@media (prefers-reduced-motion: no-preference) {
    .kill-badge { animation: pulse-border 2.5s ease-in-out infinite; }
}

@keyframes pulse-border {
    0%, 100% { border-color: var(--danger); opacity: 1; }
    50% { border-color: rgba(239, 68, 68, 0.35); opacity: 0.92; }
}

/* ================================================================
   Content
   ================================================================ */

.content {
    box-sizing: border-box;
    width: 100%;
    max-width: min(1120px, 100%);
    margin: 0 auto;
    padding: var(--space-8) var(--space-6) 60px;
}

/* ---- Page header ---- */

.page-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    gap: var(--space-3);
    border-bottom: 1px solid var(--border);
}

.page-header h1 {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.25;
}

.page-header__title-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: var(--space-1) 6px;
}

.page-header__title-row h1 {
    margin: 0;
}

/* Shared callout: dashboard + queue (same box, typography, spacing) */
.context-note {
    font-size: 11px;
    line-height: 1.55;
    color: var(--text-sec);
    margin: calc(-1 * var(--space-2)) 0 var(--space-5);
    padding: var(--space-3) var(--space-4);
    max-width: 42rem;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    border-left: 3px solid var(--border-focus);
    box-shadow: var(--shadow-sm);
}

.context-note strong {
    color: var(--text);
    font-weight: 600;
}

.page-meta {
    font-size: 10px;
    color: var(--text-sec);
}

.page-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.breadcrumb {
    font-size: 10px;
    color: var(--text-dim);
}
.breadcrumb:hover { color: var(--text); }
.breadcrumb-sep {
    font-size: 10px;
    color: var(--text-ghost);
    margin: 0 4px;
}

/* ---- Sections ---- */

.section {
    margin-bottom: var(--space-8);
}
.section h2 {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-dim);
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--border);
    max-width: 100%;
}

/* ================================================================
   Stats
   ================================================================ */

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-8);
}

.stat-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--duration-ui) var(--ease-ui), box-shadow var(--duration-ui) var(--ease-ui), transform var(--duration-ui) var(--ease-out-soft);
}

.stat-card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-sm), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

@media (prefers-reduced-motion: no-preference) {
    .stat-card:hover { transform: translateY(-1px); }
}

/* slides skill: metric tile — kicker label then value, tabular figures */
.stat-label {
    font-size: 9px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}

.stat-value {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

/* ================================================================
   Tables
   ================================================================ */

.table-wrap {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
}

thead th {
    text-align: left;
    padding: var(--space-3) var(--space-4);
    font-weight: 600;
    color: var(--text-sec);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 8px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr:nth-child(even) { background: rgba(255,255,255,0.02); }
tbody tr:hover { background: rgba(255,255,255,0.04); }

.mono { font-family: var(--mono); font-size: 10px; }

/* ================================================================
   Badges — functional status indicators retain colour
   ================================================================ */

.badge {
    display: inline-block;
    font-size: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
}

/* Status badges — colour is functional */
.badge-active   { color: var(--ok);      border-color: var(--ok);          background: var(--ok-muted); }
.badge-paused   { color: var(--warn);    border-color: var(--warn);        background: var(--warn-muted); }
.badge-pending  { color: var(--warn);    border-color: var(--warn);        background: var(--warn-muted); }
.badge-approved { color: var(--ok);      border-color: var(--ok);          background: var(--ok-muted); }

/* Non-actionable states — monochrome */
.badge-completed { color: var(--text-dim); border-color: var(--border-light); background: rgba(255,255,255,0.02); }
.badge-posted    { color: var(--text-dim); border-color: var(--border-light); background: rgba(255,255,255,0.02); }
.badge-expired   { color: var(--text-dim); border-color: var(--border-light); background: rgba(255,255,255,0.02); }

/* Posting workflow states — functional colour */
.badge-failed    { color: var(--danger);  border-color: var(--danger);       background: var(--danger-muted); }
.badge-posting   { color: var(--warn);    border-color: var(--warn);         background: var(--warn-muted); }

/* Role badges — monochrome labels */
.badge-admin    { color: var(--text-sec);  border-color: var(--border-light); background: rgba(255,255,255,0.03); }
.badge-standard { color: var(--text-dim);  border-color: var(--border);       background: rgba(255,255,255,0.02); }

/* Persona tags — all monochrome, differentiated only by text */
.persona-tag {
    display: inline-block;
    font-size: 9px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    color: var(--text-sec);
    border: 1px solid var(--border-light);
    background: rgba(255,255,255,0.02);
}

.persona-haigh,
.persona-icon,
.persona-david,
.persona-nicola,
.persona-wendy,
.persona-mena {
    color: var(--text-sec);
    border-color: var(--border-light);
}

/* Carousel indicator — monochrome */
.carousel-badge {
    display: inline-flex;
    align-items: center;
    font-size: 7px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.04);
    color: var(--text-dim);
    border: 1px solid var(--border);
    line-height: 1;
}

/* Image badge — matches carousel-badge style */
.image-badge {
    display: inline-flex;
    align-items: center;
    font-size: 7px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.04);
    color: var(--text-dim);
    border: 1px solid var(--border);
    line-height: 1;
}

/* Optional LinkedIn image section */
.post-image-section {
    margin: var(--space-3) 0 var(--space-4);
}
.post-image-preview {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    margin-bottom: var(--space-2);
}
.post-image-thumb {
    max-width: 240px;
    max-height: 160px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    object-fit: cover;
}
.post-image-upload {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.post-image-upload-label {
    cursor: pointer;
}
.post-image-upload-label input[type="file"] {
    display: none;
}
.post-image-hint {
    font-size: 11px;
    color: var(--text-dim);
}

/* LinkedIn carousel — collapsible section + embedded PDF */
.carousel-details {
    margin-top: var(--space-4);
    margin-bottom: var(--space-6);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}
.carousel-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    list-style: none;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-sec);
    user-select: none;
}
.carousel-summary::-webkit-details-marker {
    display: none;
}
.carousel-summary::before {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    margin-right: 2px;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid var(--text-dim);
    transform: translateY(1px);
    transition: transform var(--duration-ui) var(--ease-ui);
}
.carousel-details[open] .carousel-summary::before {
    transform: rotate(90deg) translateX(1px);
}
.carousel-summary-label {
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.carousel-summary-hint {
    font-size: 9px;
    font-weight: 500;
    color: var(--text-dim);
}
.carousel-details-body {
    padding: 0 var(--space-4) var(--space-4);
    border-top: 1px solid var(--border-light);
}
.carousel-pdf-frame {
    display: block;
    width: 100%;
    min-height: 420px;
    height: 52vh;
    max-height: 640px;
    margin-top: var(--space-3);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-panel);
}
.carousel-panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-4);
}
.carousel-open-tab {
    text-decoration: none;
}

/* Modal — carousel text editor */
.carousel-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}
.carousel-modal.hidden {
    display: none;
}
.carousel-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}
.carousel-modal-panel {
    position: relative;
    z-index: 1;
    width: min(640px, 100%);
    max-height: min(90vh, 900px);
    display: flex;
    flex-direction: column;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-panel);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}
.carousel-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border);
}
.carousel-modal-header h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}
.carousel-modal-note {
    margin: 0;
    padding: var(--space-3) var(--space-5) var(--space-2);
    font-size: 9px;
    color: var(--text-dim);
    line-height: 1.5;
}
.carousel-editor-form-mount {
    padding: var(--space-4) var(--space-5) var(--space-5);
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}
.carousel-modal-footer {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-3);
    row-gap: var(--space-2);
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--border);
}
.carousel-field-group,
.carousel-spread-block {
    margin-bottom: var(--space-5);
}
.carousel-spread-block {
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-light);
}
.carousel-spread-title {
    margin: 0 0 var(--space-4);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-sec);
}
.carousel-field-group label,
.carousel-spread-block label {
    display: block;
    font-size: 9px;
    color: var(--text-dim);
    margin-bottom: var(--space-2);
    margin-top: var(--space-3);
}
.carousel-field-group label:first-of-type {
    margin-top: 0;
}
/* Space between Info slide heading field and first info segment; between stacked segments */
.carousel-info-segment {
    margin-top: var(--space-5);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border-light);
}
.carousel-info-segment:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.carousel-info-segment-label {
    display: block;
    font-size: 9px;
    font-weight: 600;
    color: var(--text-sec);
    margin-top: 0;
    margin-bottom: var(--space-3);
    letter-spacing: 0.02em;
}
.carousel-textarea--compact {
    min-height: 72px;
}
.carousel-input,
.carousel-textarea {
    width: 100%;
    box-sizing: border-box;
    font-family: var(--font);
    font-size: 10px;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
}
.carousel-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.45;
}
.carousel-loading {
    margin: 0;
    font-size: 10px;
    color: var(--text-dim);
}

/* ================================================================
   Buttons
   ================================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-family: var(--font);
    font-size: 10px;
    font-weight: 500;
    min-height: 36px;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, var(--bg-panel) 100%);
    color: var(--text-sec);
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
    transition: background var(--duration-ui) var(--ease-ui), border-color var(--duration-ui) var(--ease-ui), color var(--duration-ui) var(--ease-ui), transform 0.1s var(--ease-out-soft), box-shadow var(--duration-ui) var(--ease-ui);
    white-space: nowrap;
}
.btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-focus);
    color: var(--text);
}
.btn:active {
    transform: translateY(1px);
    box-shadow: none;
}

.btn-sm { font-size: 9px; padding: 0 var(--space-3); min-height: 32px; }
.btn-xs { font-size: 8px; padding: var(--space-1) var(--space-2); min-height: 28px; }

/* Primary action — white on dark (Vercel/Linear pattern) */
.btn-primary {
    background: var(--text);
    border-color: var(--text);
    color: var(--bg);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.2);
}
.btn-primary:hover {
    background: #ffffff;
    border-color: #ffffff;
    color: #000;
    filter: brightness(1.02);
}
.btn-primary:active { filter: brightness(0.98); }

/* Destructive action — retains colour */
.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}
.btn-danger:hover { background: var(--danger-hover); border-color: var(--danger-hover); color: #fff; }

/* Warning / unapprove — retains colour */
.btn-warn {
    background: transparent;
    border-color: var(--warn);
    color: var(--warn);
    box-shadow: none;
}
.btn-warn:hover {
    background: var(--warn-muted);
    box-shadow: none;
}

.btn-ghost {
    background: transparent;
    border-color: transparent;
    color: var(--text-dim);
    box-shadow: none;
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-sec);
    box-shadow: none;
}
.btn-ghost:active {
    box-shadow: none;
}

/* Destructive secondary — list rows, settings (less visual weight than solid .btn-danger) */
.btn-danger-outline {
    background: transparent;
    border-color: var(--border-light);
    color: var(--danger);
    box-shadow: none;
}
.btn-danger-outline:hover {
    background: var(--danger-muted);
    border-color: rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}
.btn-danger-outline:focus-visible {
    outline-color: var(--danger);
}

.btn-full { width: 100%; }

.action-group {
    display: flex;
    gap: 4px;
}

.status-controls {
    display: flex;
    gap: 4px;
}

/* ================================================================
   Post cards
   ================================================================ */

.post-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.post-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-6);
    box-shadow: var(--shadow-sm);
    transition: border-color var(--duration-ui) var(--ease-ui), box-shadow var(--duration-ui) var(--ease-ui);
}
.post-card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-sm), 0 0 0 1px rgba(255, 255, 255, 0.035);
}

.post-header {
    display: flex;
    align-items: center;
    gap: var(--space-2) var(--space-3);
    row-gap: var(--space-2);
    margin-bottom: var(--space-3);
    flex-wrap: wrap;
}

.post-date {
    font-size: 9px;
    color: var(--text-dim);
    font-family: var(--mono);
    margin-left: auto;
}

.post-platform {
    font-size: 8px;
    font-weight: 600;
    color: var(--text-dim);
    letter-spacing: 0.04em;
}

.post-body {
    margin: var(--space-4) 0 var(--space-5);
}

.post-content {
    font-family: var(--font);
    font-size: 10px;
    line-height: 1.7;
    color: var(--text-sec);
    white-space: pre-wrap;
    word-break: break-word;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

.post-textarea {
    width: 100%;
    min-height: 160px;
    font-family: var(--font);
    font-size: 10px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 10px 12px;
    resize: vertical;
}
.post-textarea:focus { outline: none; }
.post-textarea:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; border-color: var(--border-focus); }

.post-edit-area {
    margin: var(--space-3) 0 var(--space-5);
}

.post-edit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.post-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2) var(--space-3);
    row-gap: var(--space-2);
}

.post-comments-block {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
}

.post-comments-toggle {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    font-weight: 500;
    padding-left: var(--space-3);
    padding-right: var(--space-2);
    margin-top: 2px;
}

.post-comments-panel {
    margin-top: var(--space-3);
    padding: var(--space-4) var(--space-5);
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.post-comments-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
    max-height: 320px;
    overflow-y: auto;
    padding-right: var(--space-1);
    scrollbar-gutter: stable;
}

.post-comments-empty,
.post-comments-loading,
.post-comments-error {
    font-size: 10px;
    color: var(--text-dim);
    margin: 0;
    padding: var(--space-2) 0;
    line-height: 1.5;
}

.post-comment-item {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: var(--space-4);
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

.post-comment-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: 0;
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--border-light);
}

.post-comment-author {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--text);
    line-height: 1.4;
}

.post-comment-time {
    font-size: 9px;
    font-weight: 500;
    color: var(--text-dim);
    font-family: var(--mono);
    flex-shrink: 0;
    text-align: right;
    line-height: 1.4;
    max-width: 55%;
}

.post-comment-body {
    margin-top: var(--space-3);
}

.post-comment-text {
    font-family: var(--font);
    font-size: 10px;
    line-height: 1.6;
    color: var(--text-sec);
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    background: none;
    border: none;
    padding: 0;
}

.post-comment-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-2);
    margin-top: var(--space-4);
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-light);
}

.post-comment-actions .btn-xs {
    min-height: 30px;
    padding: var(--space-1) var(--space-3);
    font-size: 9px;
    font-weight: 500;
}

.post-comments-compose {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding-top: var(--space-2);
    border-top: 1px solid var(--border-light);
    margin-top: var(--space-1);
}

.post-comments-input {
    width: 100%;
    font-family: var(--font);
    font-size: 9px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg-panel);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    resize: vertical;
    min-height: 44px;
}

.post-comments-input:focus { outline: none; }
.post-comments-input:focus-visible {
    border-color: var(--border-focus);
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}

.post-comment-edit {
    margin-top: var(--space-3);
    padding-top: var(--space-3);
    border-top: 1px dashed var(--border-light);
}

.post-comment-edit .post-edit-actions {
    margin-top: var(--space-3);
}

.post-meta {
    font-size: 9px;
    color: var(--text-dim);
    margin-left: auto;
}

.approval-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-3);
    row-gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.approval-badge {
    display: inline-flex;
    align-items: center;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.02em;
}

.approval-yes {
    color: var(--ok);
    background: var(--ok-muted);
}

.approval-no {
    color: var(--text-dim);
    background: rgba(255,255,255,0.03);
}

.posting-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    margin-bottom: var(--space-3);
}

.posting-meta-item {
    font-size: 8px;
    font-family: var(--mono);
    color: var(--text-dim);
}

.posting-error {
    color: var(--danger);
}

.posting-dryrun {
    color: var(--warn);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.posting-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-5);
    gap: var(--space-4);
    box-shadow: var(--shadow-sm);
}

.posting-mode-indicator {
    font-size: 10px;
    color: var(--text-sec);
}

.posting-log-error {
    font-size: 9px;
    color: var(--danger);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hidden { display: none !important; }

/* ================================================================
   Filter bar (admin persona filter)
   ================================================================ */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
    min-height: 36px;
    height: 36px;
    padding: 0 var(--space-3);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    color: var(--text-dim);
    background: transparent;
    cursor: pointer;
    box-sizing: border-box;
    transition: background var(--duration-ui) var(--ease-ui), color var(--duration-ui) var(--ease-ui), border-color var(--duration-ui) var(--ease-ui);
}
.filter-chip:hover { color: var(--text-sec); border-color: var(--border-focus); }
.filter-chip.filter-active {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* ================================================================
   Tabs
   ================================================================ */

.tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 2px;
    margin-bottom: var(--space-4);
    padding: 3px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font);
    font-size: 10px;
    font-weight: 500;
    min-height: 36px;
    padding: var(--space-2) var(--space-4);
    color: var(--text-dim);
    background: transparent;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: color var(--duration-ui) var(--ease-ui), background var(--duration-ui) var(--ease-ui), box-shadow var(--duration-ui) var(--ease-ui);
}
.tab:hover { color: var(--text-sec); }
.tab.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ================================================================
   Dashboard queue shortcuts (two-up cards)
   ================================================================ */

.quick-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
}

.quick-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-8) var(--space-6);
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: border-color var(--duration-ui) var(--ease-ui), background var(--duration-ui) var(--ease-ui), box-shadow var(--duration-ui) var(--ease-ui), transform var(--duration-ui) var(--ease-out-soft);
}

.quick-link-card:hover {
    border-color: var(--border-focus);
    background: var(--bg-hover);
    color: var(--text);
    box-shadow: var(--shadow-md);
}

@media (prefers-reduced-motion: no-preference) {
    .quick-link-card:hover { transform: translateY(-2px); }
}

.ql-icon {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-sec);
    letter-spacing: -0.02em;
}

.ql-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-dim);
}

.quick-link-card:hover .ql-icon,
.quick-link-card:hover .ql-label {
    color: var(--text-sec);
}

/* ================================================================
   Kill switch panel — colour is functional
   ================================================================ */

.kill-switch-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-6);
    gap: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.kill-switch-info p {
    font-size: 10px;
    color: var(--text-sec);
    line-height: 1.6;
}

.kill-switch-status {
    margin-top: 6px !important;
}

.text-danger { color: var(--danger); font-weight: 600; }
.text-ok { color: var(--ok); font-weight: 600; }

/* ================================================================
   Section header (title + action)
   ================================================================ */

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-header h2 {
    margin-bottom: 0;
}

/* ================================================================
   Campaign form
   ================================================================ */

.campaign-form {
    max-width: 580px;
}

.form-section {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-6);
    margin-bottom: var(--space-4);
    box-shadow: var(--shadow-sm);
}

.form-section-title {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-dim);
    margin-bottom: 16px;
}

.form-hint {
    font-size: 8px;
    color: var(--text-ghost);
    margin-top: 2px;
}

.form-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 8px;
}

/* Campaign table helpers */
.camp-window {
    font-size: 8px;
    white-space: nowrap;
}

.camp-stat {
    font-weight: 500;
}

.camp-pending-hint {
    font-size: 8px;
    color: var(--warn);
    margin-left: 4px;
}

/* ================================================================
   Upload form (legacy compat)
   ================================================================ */

.upload-form {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-6);
    box-shadow: var(--shadow-sm);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 14px;
}

/* ================================================================
   Forms
   ================================================================ */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.form-group label {
    font-size: 9px;
    font-weight: 500;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select {
    font-family: var(--font);
    font-size: 10px;
    padding: 9px 12px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: border-color 0.15s;
}
.form-group input:focus,
.form-group select:focus { outline: none; }
.form-group input:focus-visible,
.form-group select:focus-visible {
    border-color: var(--border-focus);
    outline: 2px solid var(--border-focus);
    outline-offset: 2px;
}
.form-group input::placeholder { color: var(--text-ghost); }
.form-group select option { background: var(--bg-panel); color: var(--text); }

.form-group input[type="file"] {
    font-family: var(--font);
    font-size: 10px;
    color: var(--text-dim);
}

.form-group input[type="file"]::file-selector-button {
    font-family: var(--font);
    font-size: 9px;
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    background: var(--bg-panel);
    color: var(--text-sec);
    cursor: pointer;
    margin-right: 10px;
    transition: background 0.15s;
}
.form-group input[type="file"]::file-selector-button:hover {
    background: var(--bg-hover);
    color: var(--text);
}

/* ================================================================
   Flash messages — colour is functional (error / success)
   ================================================================ */

.flash-container {
    margin-bottom: 20px;
}

.flash {
    font-size: 10px;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    margin-bottom: var(--space-2);
    background: var(--bg-panel);
    box-shadow: var(--shadow-sm);
    border-left-width: 3px;
}

.flash-error   { border-color: var(--danger); border-left-color: var(--danger); color: var(--danger); }
.flash-success { border-color: var(--ok); border-left-color: var(--ok); color: var(--ok); }
.flash-info    { border-color: var(--border-light); border-left-color: var(--border-focus); color: var(--text-sec); }

/* ================================================================
   Login
   ================================================================ */

.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: var(--bg);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(255, 255, 255, 0.06), transparent 50%);
}

.login-wrapper {
    width: 100%;
    max-width: 360px;
    padding: 20px;
}

.login-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-8) var(--space-6);
    box-shadow: var(--shadow-md);
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.login-header--minimal {
    margin-bottom: var(--space-5);
}

.login-title {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    margin: 0 0 var(--space-2);
}

.login-subtitle {
    font-size: 10px;
    color: var(--text-dim);
    margin: 0;
    line-height: 1.45;
}

.login-card--error {
    text-align: center;
}

.error-code {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-ghost);
    margin: 0 0 var(--space-2);
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.error-heading {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 var(--space-2);
    letter-spacing: -0.02em;
}

.error-message {
    font-size: 10px;
    color: var(--text-dim);
    line-height: 1.5;
    margin: 0 0 var(--space-5);
    max-width: 22rem;
    margin-left: auto;
    margin-right: auto;
}

.login-form .form-group:last-of-type { margin-bottom: 20px; }

/* Auth screens (login / set password): quiet focus — no outer outline ring */
.login-body .form-group input:focus,
.login-body .form-group input:focus-visible {
    outline: none;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

/* ================================================================
   Account page
   ================================================================ */

.account-card {
    max-width: 400px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
}

.account-card .section-heading {
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.account-form .form-group {
    margin-bottom: 14px;
}

.account-form .form-group:last-of-type {
    margin-bottom: 20px;
}

/* ================================================================
   Empty states
   ================================================================ */

.empty-state {
    font-size: 10px;
    color: var(--text-dim);
    text-align: center;
    padding: var(--space-8) var(--space-4);
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* ================================================================
   Responsive
   ================================================================ */

@media (prefers-reduced-motion: reduce) {
    .btn:active,
    .stat-card:hover,
    .quick-link-card:hover {
        transform: none;
    }
    .kill-badge { animation: none; }
}

@media (max-width: 640px) {
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .form-row { grid-template-columns: 1fr; }
    .quick-links { grid-template-columns: 1fr; }
    .top-nav { padding: var(--space-2) var(--space-3); }
    .content { padding: var(--space-5) var(--space-3) 40px; }
    .kill-switch-panel { flex-direction: column; align-items: stretch; }
    .tabs { display: flex; width: 100%; }
    .tab { flex: 1 1 auto; justify-content: center; }
    .notif-panel { right: -60px; width: calc(100vw - 16px); }
}

/* ================================================================
   Notification bell + panel
   ================================================================ */

.notif-bell-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.notif-bell-btn {
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-sec);
    cursor: pointer;
    padding: 4px 6px;
    display: inline-flex;
    align-items: center;
    transition: color var(--duration-ui) var(--ease-ui),
                border-color var(--duration-ui) var(--ease-ui);
}

.notif-bell-btn:hover {
    color: var(--text);
    border-color: var(--border);
}

.notif-bell-icon {
    display: block;
}

.notif-badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    font-size: 9px;
    font-weight: 600;
    line-height: 14px;
    text-align: center;
    color: #fff;
    background: var(--color-danger);
    border-radius: 7px;
    pointer-events: none;
}

.notif-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 340px;
    max-height: 420px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    z-index: 500;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--border);
}

.notif-panel-title {
    font-size: 10px;
    font-weight: 600;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.notif-panel-actions {
    display: flex;
    gap: var(--space-1);
}

.notif-clear-btn {
    color: var(--text-dim);
}

.notif-panel-list {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.notif-item {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: background var(--duration-ui) var(--ease-ui);
}

.notif-item:hover {
    background: var(--bg-hover);
}

.notif-item--unread {
    background: rgba(255, 255, 255, 0.02);
}

.notif-item--unread::before {
    content: "";
    display: block;
    width: 6px;
    min-width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-danger);
    margin-top: 5px;
    flex-shrink: 0;
}

.notif-item-body {
    flex: 1;
    min-width: 0;
}

.notif-item-message {
    font-size: 10px;
    color: var(--text);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.notif-item-meta {
    display: flex;
    gap: var(--space-2);
    margin-top: 2px;
    font-size: 9px;
    color: var(--text-dim);
}

.notif-type-tag {
    font-size: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 1px 4px;
    border-radius: 3px;
    background: var(--bg-hover);
    color: var(--text-sec);
}

.notif-type-tag--mention  { background: rgba(234, 179, 8, 0.12); color: var(--color-warn); }
.notif-type-tag--approval { background: var(--ok-muted); color: var(--ok); }
.notif-type-tag--posted   { background: var(--ok-muted); color: var(--ok); }

.notif-empty {
    text-align: center;
    padding: var(--space-6) var(--space-4);
    font-size: 10px;
    color: var(--text-dim);
}

/* ================================================================
   Threaded comments
   ================================================================ */

.post-comment-item--reply {
    margin-left: 20px;
    padding-left: var(--space-3);
    border-left: 2px solid var(--border-light);
}

.post-comment-reply-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 9px;
    cursor: pointer;
    padding: 0;
    margin-right: var(--space-2);
    transition: color var(--duration-ui) var(--ease-ui);
}

.post-comment-reply-btn:hover {
    color: var(--text);
}

.post-comment-reply-compose {
    margin-left: 20px;
    padding-left: var(--space-3);
    border-left: 2px solid var(--border-light);
    margin-top: var(--space-1);
    margin-bottom: var(--space-2);
}

.post-comment-reply-compose .post-comments-input {
    font-size: 10px;
}

/* ================================================================
   @mention autocomplete
   ================================================================ */

.mention-autocomplete {
    position: absolute;
    z-index: 600;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    max-height: 160px;
    overflow-y: auto;
    min-width: 180px;
}

.mention-option {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    cursor: pointer;
    font-size: 10px;
    color: var(--text);
    transition: background var(--duration-ui) var(--ease-ui);
}

.mention-option:hover,
.mention-option--active {
    background: var(--bg-hover);
}

.mention-option-username {
    font-weight: 600;
    color: var(--text);
}

.mention-option-display {
    color: var(--text-dim);
}

.mention-highlight {
    color: var(--color-warn);
    font-weight: 600;
}

/* ================================================================
   Notification deep-link highlight pulse
   ================================================================ */

.post-card--notif-highlight {
    animation: notifPulse 3s ease-out forwards;
}

@keyframes notifPulse {
    0%   { outline: 2px solid rgba(234, 179, 8, 0.8); outline-offset: 0; }
    30%  { outline: 2px solid rgba(234, 179, 8, 0.5); outline-offset: 2px; }
    60%  { outline: 1px solid rgba(234, 179, 8, 0.25); outline-offset: 1px; }
    100% { outline: 1px solid transparent; outline-offset: 0; }
}
