/* ==================================================================
   CHANGELOG BOARD — MODERN THEME (Bootstrap 5.3 + Responso brand)
   - Bootstrap CDN provides the entire component system
   - This file: re-skins Bootstrap with Responso green/orange + a small
     adapter layer for legacy classes (.input-field, .vote-chip, …)
   ================================================================== */

:root,
[data-bs-theme="light"] {
    /* ── Responso brand ─────────────────────────────── */
    --bs-primary: #16A34A;
    --bs-primary-rgb: 22, 163, 74;
    --bs-primary-text-emphasis: #14532D;
    --bs-primary-bg-subtle: #DCFCE7;
    --bs-primary-border-subtle: #86EFAC;

    --bs-success: #15803D;
    --bs-success-rgb: 21, 128, 61;
    --bs-success-text-emphasis: #14532D;
    --bs-success-bg-subtle: #DCFCE7;
    --bs-success-border-subtle: #86EFAC;

    --bs-warning: #FFA329;
    --bs-warning-rgb: 255, 163, 41;
    --bs-warning-text-emphasis: #7C2D12;
    --bs-warning-bg-subtle: #FFF1DC;
    --bs-warning-border-subtle: #FFD18A;

    --bs-danger: #B91C1C;
    --bs-danger-rgb: 185, 28, 28;
    --bs-danger-text-emphasis: #7F1D1D;
    --bs-danger-bg-subtle: #FEE2E2;
    --bs-danger-border-subtle: #FCA5A5;

    --bs-info: #0369A1;
    --bs-info-rgb: 3, 105, 161;
    --bs-info-text-emphasis: #0C4A6E;
    --bs-info-bg-subtle: #E0F2FE;
    --bs-info-border-subtle: #7DD3FC;

    /* ── Surface tones (warm zinc) ─────────────────── */
    --bs-body-bg: #FAFAF9;
    --bs-body-color: #1C1917;
    --bs-body-color-rgb: 28, 25, 23;
    --bs-secondary-color: #57534E;
    --bs-tertiary-color: #A8A29E;

    --bs-tertiary-bg: #F5F5F4;
    --bs-tertiary-bg-rgb: 245, 245, 244;
    --bs-secondary-bg: #E7E5E4;

    --bs-border-color: #E7E5E4;
    --bs-border-color-translucent: rgba(28, 25, 23, 0.08);

    --bs-link-color: #15803D;
    --bs-link-hover-color: #14532D;
    --bs-link-color-rgb: 21, 128, 61;
    --bs-link-hover-color-rgb: 20, 83, 45;

    /* ── Type ──────────────────────────────────────── */
    /* System font stacks — no third-party CDN dependency */
    --bs-font-sans-serif: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --bs-font-monospace: ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    --bs-body-font-family: var(--bs-font-sans-serif);

    --bs-border-radius: 0.5rem;
    --bs-border-radius-lg: 0.75rem;
    --bs-border-radius-xl: 1rem;
    --bs-border-radius-pill: 50rem;

    /* Brand orange for highlights / 2nd accent — Responso brand hex ──── */
    --responso-orange: #FFA329;
    --responso-orange-hover: #E89220;
    --responso-orange-soft: #FFF1DC;
    /* Responso brand green — vivid, used for decorative accents (logo, badges).
       For interactive elements on white backgrounds use --bs-primary (#16A34A)
       which clears WCAG AA — the bright green fails AA at body-text size. */
    --responso-green-bright: #29CE61;

    /* Force every focus ring + button-focus glow onto our green —
       Bootstrap's defaults (.btn-primary etc.) hardcode a blue rgb here
       even when --bs-primary is overridden, hence the explicit re-set. */
    --bs-focus-ring-color: rgba(22, 163, 74, .25);
    --bs-btn-focus-shadow-rgb: 22, 163, 74;

    /* ── Type-coded color variables (used inline by legacy template) ── */
    --color-feature:     #15803D;
    --color-integration: #0369A1;
    --color-improvement: #B45309;
    --color-bugfix:      #B91C1C;

    /* ── Spacing scale aliases (used by legacy template inline styles) ── */
    --space-xs:  4px;
    --space-sm:  8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* Dark mode — using both Bootstrap's data-bs-theme and our html.dark */
html.dark,
[data-bs-theme="dark"],
html.dark[data-bs-theme="light"] {
    color-scheme: dark;

    --bs-primary: #34D399;
    --bs-primary-rgb: 52, 211, 153;
    --bs-primary-text-emphasis: #6EE7B7;
    --bs-primary-bg-subtle: rgba(52, 211, 153, 0.10);
    --bs-primary-border-subtle: rgba(52, 211, 153, 0.30);

    --bs-success: #34D399;
    --bs-success-rgb: 52, 211, 153;
    --bs-success-bg-subtle: rgba(52, 211, 153, 0.12);

    --bs-warning: #FB923C;
    --bs-warning-rgb: 251, 146, 60;
    --bs-warning-bg-subtle: rgba(251, 146, 60, 0.12);

    --bs-danger: #FCA5A5;
    --bs-danger-rgb: 252, 165, 165;
    --bs-danger-bg-subtle: rgba(252, 165, 165, 0.10);

    --bs-info: #7DD3FC;
    --bs-info-rgb: 125, 211, 252;
    --bs-info-bg-subtle: rgba(125, 211, 252, 0.10);

    --bs-body-bg: #0C0A09;
    --bs-body-bg-rgb: 12, 10, 9;
    --bs-body-color: #FAFAF9;
    --bs-body-color-rgb: 250, 250, 249;
    --bs-secondary-color: #D6D3D1;
    --bs-secondary-color-rgb: 214, 211, 209;
    --bs-tertiary-color: #78716C;
    --bs-tertiary-color-rgb: 120, 113, 108;

    --bs-tertiary-bg: #1C1917;
    --bs-tertiary-bg-rgb: 28, 25, 23;
    --bs-secondary-bg-rgb: 41, 37, 36;
    --bs-secondary-bg: #292524;

    --bs-border-color: #292524;
    --bs-border-color-translucent: rgba(250, 250, 249, 0.10);

    --bs-link-color: #34D399;
    --bs-link-hover-color: #6EE7B7;

    --responso-orange: #FB923C;
    --responso-orange-soft: rgba(251, 146, 60, 0.14);

    --color-feature:     #86EFAC;
    --color-integration: #7DD3FC;
    --color-improvement: #FB923C;
    --color-bugfix:      #FCA5A5;

    --bs-focus-ring-color: rgba(52, 211, 153, .25);
    --bs-btn-focus-shadow-rgb: 52, 211, 153;
}

/* Per-button focus ring — Bootstrap hard-codes a blue rgb on each variant.
   Force them all to use our --bs-btn-focus-shadow-rgb (already set to green). */
.btn-primary, .btn-outline-primary,
.btn-success, .btn-outline-success {
    --bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}
.btn-secondary, .btn-outline-secondary {
    --bs-btn-focus-shadow-rgb: 87, 83, 78; /* zinc-600 */
}
html.dark .btn-secondary, html.dark .btn-outline-secondary {
    --bs-btn-focus-shadow-rgb: 168, 162, 158; /* zinc-400 */
}

/* Bootstrap's `.table-light` thead variant hard-codes a near-white bg/text,
   which stays white when our dark-mode flips the rest of the UI. Re-bind its
   custom properties to body-aware tokens so it inherits the active theme. */
.table-light {
    --bs-table-color: var(--bs-body-color);
    --bs-table-bg: var(--bs-tertiary-bg);
    --bs-table-border-color: var(--bs-border-color);
    --bs-table-striped-bg: var(--bs-secondary-bg);
    --bs-table-striped-color: var(--bs-body-color);
    --bs-table-active-bg: var(--bs-secondary-bg);
    --bs-table-active-color: var(--bs-body-color);
    --bs-table-hover-bg: var(--bs-secondary-bg);
    --bs-table-hover-color: var(--bs-body-color);
}

/* Bootstrap defaults a few things we want to soften */
body { letter-spacing: -0.01em; }

h1, h2, h3, h4 { letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.125rem; }

a { text-decoration: none; }
a:hover { text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════
   Public site header (sticky glass)
   ═══════════════════════════════════════════════════════════ */
.site-header {
    position: sticky; top: 0; z-index: 1030;
    background-color: rgba(var(--bs-body-bg-rgb, 250 250 249), 0.78);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--bs-border-color);
}
.header-inner { display: flex; align-items: center; gap: 1rem; padding: 0.875rem 0; }
.logo { display: inline-flex; align-items: center; gap: .625rem; font-weight: 600; color: var(--bs-body-color); text-decoration: none; }
.logo:hover { color: var(--bs-body-color); }
.logo-img { height: 26px; width: auto; }
.logo-img-dark { display: none; }
html.dark .logo-img-light { display: none; }
html.dark .logo-img-dark { display: inline-block; }
.logo-divider { width: 1px; height: 22px; background: var(--bs-border-color); display: inline-block; margin: 0 4px; }
.logo-text { font-size: .875rem; color: var(--bs-secondary-color); font-weight: 500; }

/* ─── Search ─────────────────────────── */
.search-wrapper { flex: 1; max-width: 480px; position: relative; }
.search-input-wrap { position: relative; }
.search-input {
    width: 100%; padding: .55rem 2.25rem .55rem 2.25rem;
    border: 1px solid transparent; border-radius: var(--bs-border-radius);
    background: var(--bs-tertiary-bg); color: var(--bs-body-color);
    font-size: .875rem; font-family: inherit; transition: all .15s ease;
}
.search-input:focus { outline: 0; border-color: var(--bs-primary); background: var(--bs-body-bg); box-shadow: 0 0 0 .25rem rgba(var(--bs-primary-rgb), .15); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--bs-tertiary-color); font-size: 13px; pointer-events: none; }
.search-kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); padding: 2px 6px; font-family: var(--bs-font-monospace); font-size: 10.5px; color: var(--bs-tertiary-color); border: 1px solid var(--bs-border-color); border-radius: 4px; background: var(--bs-body-bg); line-height: 1.4; }

.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius-lg); box-shadow: 0 1rem 3rem rgba(0,0,0,.175); max-height: 480px; overflow-y: auto; z-index: 1040; }
.search-result { display: flex; align-items: flex-start; gap: 10px; padding: 10px 1rem; border-bottom: 1px solid var(--bs-border-color); color: var(--bs-body-color); text-decoration: none; }
.search-result:hover { background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
.search-result:last-child { border-bottom: 0; }
.search-result-icon { font-size: 16px; }
.search-result-body { flex: 1; min-width: 0; }
.search-result-title { font-weight: 600; font-size: .875rem; }
.search-result-summary { font-size: 12px; color: var(--bs-secondary-color); margin-top: 2px; }
.search-result-meta { font-size: 11px; color: var(--bs-tertiary-color); white-space: nowrap; }
.search-empty, .search-count { padding: .5rem 1rem; font-size: 12px; color: var(--bs-tertiary-color); }
.search-count { background: var(--bs-tertiary-bg); border-bottom: 1px solid var(--bs-border-color); }
mark { background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); padding: 0 3px; border-radius: 3px; }

/* ─── Header right side ──────────────── */
.header-actions { display: flex; align-items: center; gap: .5rem; }
.darkmode-toggle { background: transparent; border: 1px solid var(--bs-border-color); width: 36px; height: 36px; border-radius: var(--bs-border-radius); display: inline-flex; align-items: center; justify-content: center; color: var(--bs-secondary-color); }
.darkmode-toggle:hover { background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
.darkmode-icon-light { display: inline; }
.darkmode-icon-dark { display: none; }
html.dark .darkmode-icon-light { display: none; }
html.dark .darkmode-icon-dark { display: inline; }

.market-selector { position: relative; }
.market-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .375rem .75rem; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); background: var(--bs-body-bg); color: var(--bs-body-color); font-size: 13px; font-weight: 500; }
.market-btn:hover { background: var(--bs-tertiary-bg); }
.market-dropdown { position: absolute; top: calc(100% + 6px); right: 0; min-width: 220px; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); box-shadow: 0 1rem 3rem rgba(0,0,0,.175); padding: 6px; display: none; z-index: 1040; }
.market-dropdown.open { display: block; }
.market-option { display: block; padding: .5rem .625rem; border-radius: .375rem; color: var(--bs-body-color); font-size: 13px; text-decoration: none; }
.market-option:hover { background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
.market-option.active { background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); font-weight: 500; }

.voter-status { display: flex; align-items: center; }
.voter-badge { display: inline-flex; align-items: center; padding: .3rem .65rem; background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); border-radius: var(--bs-border-radius-pill); font-size: 12px; font-weight: 500; }

/* ─── Flash bars (full-width) ────────── */
.flash { padding: .625rem 0; font-size: .875rem; }
.flash-success { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.flash-error   { background: var(--bs-danger-bg-subtle);  color: var(--bs-danger-text-emphasis);  }
.flash-warning { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); }
.flash-info    { background: var(--bs-info-bg-subtle);    color: var(--bs-info-text-emphasis);    }

/* ─── Site footer ────────────────────── */
.site-footer { padding: 3rem 0 1.5rem; margin-top: 4rem; border-top: 1px solid var(--bs-border-color); color: var(--bs-tertiary-color); font-size: .8125rem; text-align: center; }

.main-content { padding-top: 2.5rem; min-height: 60vh; }

/* ═══════════════════════════════════════════════════════════
   Adapter: legacy classes → Bootstrap-flavored
   ═══════════════════════════════════════════════════════════ */

/* Inputs / selects from custom templates */
.input-field, .textarea-field {
    display: block; width: 100%;
    padding: .5rem .75rem;
    font-size: 1rem; line-height: 1.5;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    background-clip: padding-box;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
}
.input-field:focus, .textarea-field:focus {
    border-color: var(--bs-primary);
    outline: 0;
    box-shadow: 0 0 0 .25rem rgba(var(--bs-primary-rgb), .15);
}
.textarea-field { resize: vertical; min-height: 96px; }

.select-field {
    display: block; width: 100%;
    padding: .5rem 2.25rem .5rem .75rem;
    font-size: 1rem; line-height: 1.5;
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23495057' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-size: 16px 12px;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    appearance: none;
    transition: border-color .15s, box-shadow .15s;
}
.select-field:focus { border-color: var(--bs-primary); outline: 0; box-shadow: 0 0 0 .25rem rgba(var(--bs-primary-rgb), .15); }

/* Legacy form helpers — admin templates use .form-group / .form-row */
label { display: block; font-size: 13px; font-weight: 500; color: var(--bs-secondary-color); margin-bottom: 6px; }
.form-group { margin-bottom: 1rem; }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1rem;
}
.form-row > .form-group { margin-bottom: 0; }
@media (max-width: 576px) { .form-row { grid-template-columns: 1fr; } }

/* Make legacy admin form sections breathe inside Bootstrap cards */
.card .form-group label,
.admin-form .form-group label {
    font-weight: 500;
    color: var(--bs-body-color);
    margin-bottom: 6px;
}

/* Info callout — darker than the form bg, with subtle left accent border.
   Use anywhere we want a "this is meta-info / note" panel to stand out
   instead of blending into the white card surface. */
.info-callout {
    background: var(--bs-secondary-bg);
    color: var(--bs-secondary-color);
    border-left: 3px solid var(--bs-primary);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: .82rem;
    line-height: 1.55;
    margin: 0;
}
.info-callout strong { color: var(--bs-body-color); }
.info-callout small,
.info-callout .info-callout-hint {
    display: block;
    margin-top: 4px;
    color: var(--bs-tertiary-color);
    font-size: .72rem;
}
html.dark .info-callout {
    background: rgba(255, 255, 255, .04);
}

/* Styled multi-file dropzone — wraps a hidden <input type="file" multiple>
   so users can drag-drop OR click. Shows live count + thumbnail preview of
   selected files before submit so it's obvious that multi-select works. */
.media-dropzone {
    display: block;
    border: 2px dashed var(--bs-border-color);
    border-radius: 12px;
    padding: 18px 16px;
    background: var(--bs-tertiary-bg);
    cursor: pointer;
    transition: all .15s;
    position: relative;
}
.media-dropzone:hover, .media-dropzone.is-dragover {
    border-color: var(--bs-primary);
    background: var(--bs-primary-bg-subtle);
}
.media-dropzone-input {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
}
.media-dropzone-content {
    display: flex;
    align-items: center;
    gap: 14px;
    pointer-events: none;
}
.media-dropzone-icon { font-size: 1.7rem; color: var(--bs-primary); flex-shrink: 0; }
.media-dropzone-text { flex-grow: 1; min-width: 0; }
.media-dropzone-text strong { font-size: .9rem; color: var(--bs-body-color); display: block; }
.media-dropzone-count {
    flex-shrink: 0;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    padding: 4px 10px;
    border-radius: var(--bs-border-radius-pill);
    font-weight: 600;
}
.media-dropzone.has-files .media-dropzone-count { background: var(--bs-primary); color: #fff; border-color: var(--bs-primary); }
.media-dropzone-preview {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding: 10px;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
}
.media-dropzone-preview-item {
    position: relative;
    width: 80px; height: 60px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
    background: var(--bs-tertiary-bg);
}
.media-dropzone-preview-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-dropzone-preview-item .name {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,.6); color: #fff;
    font-size: 9px; padding: 2px 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Custom buttons (legacy templates without .btn .btn-primary etc.) */
.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #15803D;
    --bs-btn-hover-border-color: #15803D;
    --bs-btn-active-bg: #14532D;
    --bs-btn-active-border-color: #14532D;
}

/* ─── Filter pills ───────────────────── */
.filter-bar { display: flex; flex-wrap: wrap; gap: .375rem; }
.filter-pill {
    display: inline-flex; align-items: center;
    padding: .4rem .9rem;
    border-radius: var(--bs-border-radius-pill);
    font-size: .8125rem; font-weight: 500;
    color: var(--bs-secondary-color);
    border: 1px solid var(--bs-border-color);
    background: var(--bs-body-bg);
    text-decoration: none;
    transition: all .15s;
}
.filter-pill:hover { color: var(--bs-body-color); border-color: var(--bs-secondary-bg); background: var(--bs-tertiary-bg); }
/* Active state — subtle green tint instead of solid fill so it doesn't
   shout in light mode and stays legible in dark mode. */
.filter-pill.active {
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary-text-emphasis);
    border-color: var(--bs-primary-border-subtle);
    font-weight: 600;
}
.filter-pill.active:hover {
    background: var(--bs-primary-bg-subtle);
    color: var(--bs-primary-text-emphasis);
    border-color: var(--bs-primary);
}
.filter-pill .sidebar-dot { margin-right: 6px; }
/* Dot keeps its category color in the now-subtle active state — no override needed. */
.filter-pill > i { margin-right: 4px; }
.filter-bar-top .filter-pill { padding: .35rem .75rem; font-size: .78rem; }

/* ─── Badges with status dot prefix ───── */
.badge { font-weight: 500; padding: .35em .75em; border-radius: var(--bs-border-radius-pill); font-size: .72rem; letter-spacing: .01em; display: inline-flex; align-items: center; gap: .35em; }
.badge::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.badge-feature       { background: #DCFCE7; color: #14532D; }
.badge-improvement   { background: #FFEDD5; color: #7C2D12; }
.badge-bugfix        { background: #FEE2E2; color: #7F1D1D; }
.badge-announcement  { background: #F5F5F4; color: #44403C; }
.badge-integration   { background: #E0F2FE; color: #0C4A6E; }

.badge-published, .badge-approved, .badge-completed, .badge-completed_done, .badge-done { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.badge-soon, .badge-in_progress { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); }
.badge-draft, .badge-pending    { background: #F5F5F4; color: #44403C; }
.badge-archived, .badge-rejected { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); }

html.dark .badge-feature       { background: rgba(134, 239, 172, .12); color: #86EFAC; }
html.dark .badge-improvement   { background: rgba(251, 146, 60, .12); color: #FB923C; }
html.dark .badge-bugfix        { background: rgba(252, 165, 165, .10); color: #FCA5A5; }
html.dark .badge-announcement  { background: rgba(214, 211, 209, .08); color: #D6D3D1; }
html.dark .badge-integration   { background: rgba(125, 211, 252, .10); color: #7DD3FC; }

/* ─── Segmented tabs ─────────────────── */
.tabs-bar { display: inline-flex; gap: 2px; padding: 4px; background: var(--bs-tertiary-bg); border-radius: var(--bs-border-radius); }
.tab-pill { padding: .5rem 1rem; font-size: .8125rem; font-weight: 500; color: var(--bs-secondary-color); border-radius: .375rem; border: 0; background: transparent; text-decoration: none; transition: all .15s; }
.tab-pill:hover { color: var(--bs-body-color); }
.tab-pill.active { background: var(--bs-body-bg); color: var(--bs-body-color); box-shadow: 0 1px 2px rgba(0,0,0,.05); }

/* ─── Page hero ──────────────────────── */
.page-hero {
    padding: 2.5rem 0 3rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--bs-border-color);
    background: radial-gradient(ellipse 80% 50% at 50% 0%, var(--bs-primary-bg-subtle) 0%, transparent 70%);
}
.page-hero h1 { font-size: 2.5rem; margin-bottom: .5rem; letter-spacing: -.04em; }
.page-hero-subtitle { font-size: 1.0625rem; color: var(--bs-secondary-color); max-width: 640px; margin: 0; }

/* ─── Card tile (changelog/idea) ─────── */
.card-tile {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-lg);
    padding: 1.25rem 1.5rem;
    transition: transform .15s, box-shadow .15s, border-color .15s;
    cursor: pointer;
    text-decoration: none;
    color: var(--bs-body-color);
    display: block;
}
.card-tile:hover { border-color: var(--bs-secondary-bg); box-shadow: 0 .5rem 1rem rgba(0,0,0,.08); transform: translateY(-2px); color: var(--bs-body-color); }
.card-tile-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .5rem; }
.card-tile-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.card-tile-date { font-family: var(--bs-font-monospace); font-size: 11px; color: var(--bs-tertiary-color); }
.card-tile-title { font-size: 1.0625rem; font-weight: 600; line-height: 1.3; margin: 0 0 .25rem; }
.card-tile-summary { font-size: .875rem; color: var(--bs-secondary-color); line-height: 1.6; margin: 0; }
.card-tile-meta-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--bs-border-color); font-size: 12px; color: var(--bs-tertiary-color); }

.card-version { font-family: var(--bs-font-monospace); font-size: 11px; padding: 2px 8px; background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); border-radius: var(--bs-border-radius-pill); border: 1px solid var(--bs-border-color); }

.feature-card-tile { display: flex; gap: 1rem; }
.feature-card-tile-vote { flex-shrink: 0; }
.feature-card-tile-body { flex: 1; min-width: 0; }
.feature-submitter { font-size: 12px; color: var(--bs-tertiary-color); }

/* ─── Vote chip (compact, ~4× smaller than first iteration) ─── */
.vote-chip {
    display: inline-flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 3px 6px;
    min-width: 36px;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 7px;
    color: var(--bs-secondary-color);
    font-size: 10.5px;
    line-height: 1.1;
    transition: all .15s;
    cursor: pointer;
}
.vote-chip:hover { border-color: var(--bs-primary); color: var(--bs-primary); transform: translateY(-1px); }
.vote-chip.voted { background: var(--bs-primary-bg-subtle); border-color: var(--bs-primary); color: var(--bs-primary-text-emphasis); }
.vote-chip:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--bs-focus-ring-color); }
.vote-arrow { font-size: 10px; line-height: 1; margin-bottom: 1px; }
.vote-count, .vote-number { font-weight: 600; font-size: 11px; line-height: 1; }

/* ─── Importance dots / range ────────── */
.importance-indicator { display: inline-flex; gap: 3px; align-items: center; }
.importance-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--bs-border-color); }
.importance-dot.filled { background: var(--bs-primary); }
.importance-wrapper { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "slider value" "labels value"; column-gap: 14px; row-gap: 4px; align-items: center; }
.importance-range { grid-area: slider; width: 100%; accent-color: var(--bs-primary); cursor: pointer; }
.importance-labels { grid-area: labels; display: flex; justify-content: space-between; font-size: 11px; color: var(--bs-tertiary-color); }
.importance-value { grid-area: value; font-family: var(--bs-font-monospace); font-size: 1.3rem; font-weight: 700; color: var(--bs-primary); background: var(--bs-primary-bg-subtle); border-radius: var(--bs-border-radius); padding: 6px 14px; min-width: 44px; text-align: center; line-height: 1; }

/* ─── Modals (legacy custom overlays) ── */
.detail-modal-overlay, .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; padding: 1rem; z-index: 1050; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.detail-modal, .modal-card { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius-xl); box-shadow: 0 1.5rem 3rem rgba(0,0,0,.20); max-width: 720px; width: 100%; max-height: 90vh; overflow-y: auto; position: relative; }
.modal-card { max-width: 440px; padding: 2rem; }
/* Close button — pill style with backdrop so it stays legible when an image
   sits underneath. Earlier flat/transparent style overlapped the image's
   top-right corner and looked broken. */
.detail-modal-close, .modal-close {
    position: absolute;
    top: 12px; right: 12px;
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 1px solid var(--bs-border-color);
    background: rgba(255,255,255,.95);
    color: var(--bs-body-color);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}
.detail-modal-close:hover, .modal-close:hover {
    background: var(--bs-body-bg);
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    transform: scale(1.05);
}
html.dark .detail-modal-close, html.dark .modal-close {
    background: rgba(40,40,40,.92);
    color: var(--bs-body-color);
    border-color: rgba(255,255,255,.15);
}
.detail-modal-body { padding: 2rem; }
.detail-title { font-size: 1.625rem; line-height: 1.25; margin: 0 0 1rem; letter-spacing: -.025em; }
.detail-body { font-size: 15px; line-height: 1.7; margin-bottom: 1rem; }
.detail-body p { margin: 0 0 1rem; }
.detail-body img { border-radius: .5rem; margin: 1rem 0; }
.detail-link-btn { display: inline-flex; align-items: center; gap: 6px; padding: .5rem .875rem; background: var(--bs-tertiary-bg); color: var(--bs-body-color); border-radius: .5rem; font-size: 13px; text-decoration: none; transition: all .15s; }
.detail-link-btn:hover { background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); }
.detail-summary { font-size: 16px; color: var(--bs-secondary-color); margin-bottom: 1rem; }
.detail-submitter { font-size: 13px; color: var(--bs-tertiary-color); }

/* ─── Detail-modal gallery — overlay arrows, counter pill, dot indicators ─── */
.gallery-shell { position: relative; }
.gallery-viewport {
    position: relative;
    transition: opacity .12s ease-out;
}
.gallery-viewport.is-fading { opacity: 0; }
.gallery-shell.has-multiple .gallery-viewport img { user-select: none; }

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 0;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 1.2rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all .15s;
    opacity: 0;
    z-index: 2;
}
.gallery-shell:hover .gallery-nav,
.gallery-nav:focus-visible { opacity: 1; }
.gallery-nav:hover { background: rgba(0,0,0,.75); transform: translateY(-50%) scale(1.08); }
.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }

.gallery-counter {
    position: absolute;
    top: 12px; left: 12px;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    letter-spacing: .02em;
    pointer-events: none;
    z-index: 2;
}

.gallery-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
}
.gallery-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    border: 0;
    background: var(--bs-border-color);
    cursor: pointer;
    padding: 0;
    transition: all .15s;
}
.gallery-dot:hover { background: var(--bs-secondary-color); transform: scale(1.2); }
.gallery-dot.active {
    background: var(--bs-primary);
    width: 22px;       /* elongate the active dot — clearer position indicator */
    border-radius: 999px;
}

/* Touch devices: keep arrows visible since hover doesn't apply */
@media (hover: none) {
    .gallery-nav { opacity: .85; }
}

.image-lightbox-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.88); display: none; align-items: center; justify-content: center; z-index: 1060; cursor: zoom-out; }
.image-lightbox-overlay.active { display: flex; }
.image-lightbox-overlay img { max-width: 92vw; max-height: 92vh; border-radius: .5rem; }
.image-lightbox-close { position: absolute; top: 24px; right: 24px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.12); color: white; border: 0; font-size: 22px; cursor: pointer; }
.image-lightbox-close:hover { background: rgba(255,255,255,.22); }

/* ═══════════════════════════════════════════════════════════
   Admin shell
   ═══════════════════════════════════════════════════════════ */
.admin-layout { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }
.admin-sidebar {
    background: var(--bs-body-bg);
    border-right: 1px solid var(--bs-border-color);
    padding: 1.5rem .75rem;
    display: flex; flex-direction: column; gap: 2px;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-sidebar .logo { padding: .25rem .75rem 1.5rem; margin-bottom: .5rem; border-bottom: 1px solid var(--bs-border-color); }
.admin-sidebar .logo-icon { color: var(--bs-primary); font-size: 1.25rem; }
.admin-sidebar nav { display: flex; flex-direction: column; gap: 1px; }
.admin-sidebar a { display: flex; align-items: center; gap: 10px; padding: .5rem .75rem; border-radius: .375rem; color: var(--bs-secondary-color); font-size: .875rem; font-weight: 500; text-decoration: none; transition: all .15s; position: relative; }
.admin-sidebar a:hover { background: var(--bs-tertiary-bg); color: var(--bs-body-color); }
.admin-sidebar a.active { background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); font-weight: 600; }
.admin-sidebar a.active::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 3px; background: var(--bs-primary); border-radius: 0 2px 2px 0; }

.admin-sidebar-bottom { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--bs-border-color); }
.admin-sidebar-bottom a { font-size: .8125rem; }

.admin-content { padding: 2rem 3rem; max-width: 1280px; }
.admin-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; padding-bottom: .75rem; border-bottom: 1px solid var(--bs-border-color); }
/* Page heading — admin panels use a tight Linear/Stripe-style heading
   instead of a 28px-tall display title that fights the rest of the UI. */
.admin-header h1 { margin: 0; font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; }
/* Section titles inside admin pages (`<h2 class="h6">` in cards is fine,
   bare <h2>/<h3> shouldn't compete with the page heading). */
.admin-content h2 { font-size: 1.05rem; font-weight: 600; }
.admin-content h3 { font-size: .95rem;  font-weight: 600; }
/* Title cell in admin tables — a list of 50 entries with bold-and-loud
   titles is hard to scan. Drop bold weight and tone down. */
.admin-table tbody td strong { font-weight: 600; font-size: .875rem; }

@media (max-width: 768px) {
    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { position: static; height: auto; flex-direction: row; overflow-x: auto; padding: .5rem; }
    .admin-content { padding: 1rem; }
}

/* ─── Admin tables (legacy class) ────── */
.admin-table { width: 100%; border-collapse: collapse; background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); overflow: hidden; }
.admin-table thead th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-tertiary-color); font-weight: 600; padding: .75rem 1rem; text-align: left; background: var(--bs-tertiary-bg); border-bottom: 1px solid var(--bs-border-color); white-space: nowrap; }
.admin-table tbody td { padding: .875rem 1rem; border-top: 1px solid var(--bs-border-color); font-size: .875rem; vertical-align: middle; }
.admin-table tbody tr:hover { background: var(--bs-tertiary-bg); }
.admin-table tbody tr:first-child td { border-top: 0; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.admin-search-box { display: flex; align-items: center; gap: .5rem; padding: 0 .75rem; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); background: var(--bs-body-bg); transition: all .15s; }
.admin-search-box:focus-within { border-color: var(--bs-primary); box-shadow: 0 0 0 .25rem rgba(var(--bs-primary-rgb), .15); }
.admin-search-input { flex: 1; padding: .5rem 0; border: 0; outline: 0; font-size: .875rem; background: transparent; color: var(--bs-body-color); font-family: inherit; }
.admin-search-icon { color: var(--bs-tertiary-color); }

.admin-form { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); padding: 2rem; }

/* ─── KPI cards ──────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.kpi-card { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius-lg); padding: 1.25rem 1.5rem; transition: all .15s; }
.kpi-card:hover { border-color: var(--bs-secondary-bg); box-shadow: 0 .25rem .5rem rgba(0,0,0,.05); }
.kpi-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--bs-tertiary-color); font-weight: 600; }
.kpi-value { font-size: 2.5rem; font-weight: 700; color: var(--bs-body-color); margin-top: 6px; line-height: 1; letter-spacing: -.04em; font-feature-settings: "tnum"; }
.kpi-meta { font-size: 12.5px; color: var(--bs-tertiary-color); margin-top: 8px; }
.kpi-card--accent .kpi-value { color: var(--bs-primary); }
.kpi-card--warn   .kpi-value { color: var(--bs-warning); }

/* ─── Form tabs (translation tabs) ───── */
.form-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--bs-border-color); margin-bottom: 1rem; flex-wrap: wrap; }
.form-tab { padding: .75rem 1rem; border: 0; background: transparent; color: var(--bs-tertiary-color); font-size: 13px; font-weight: 500; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: all .15s; }
.form-tab:hover { color: var(--bs-body-color); }
.form-tab.active { color: var(--bs-primary); border-bottom-color: var(--bs-primary); }
.translation-panel { display: none; }
.translation-panel.active { display: block; }

.market-check-label { display: inline-flex; align-items: center; gap: 7px; padding: .45rem .85rem; border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius); font-size: 13px; cursor: pointer; transition: all .15s; background: var(--bs-body-bg); }
.market-check-label:hover { border-color: var(--bs-secondary-bg); }
.market-check-label:has(input:checked) { background: var(--bs-primary-bg-subtle); border-color: var(--bs-primary); color: var(--bs-primary-text-emphasis); }

/* ─── Empty state ────────────────────── */
.empty-state { text-align: center; padding: 4rem 1rem; color: var(--bs-tertiary-color); }
.empty-state-icon { font-size: 3.5rem; margin-bottom: 1rem; opacity: .6; }

/* ─── Misc legacy class shims ────────── */
.var-tag { display: inline-block; font-family: var(--bs-font-monospace); font-size: 11px; padding: 3px 8px; background: var(--bs-tertiary-bg); color: var(--bs-primary-text-emphasis); border: 1px solid var(--bs-border-color); border-radius: var(--bs-border-radius-pill); }
.quarter-section { margin-bottom: 3rem; }
.quarter-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--bs-tertiary-color); padding-bottom: .5rem; margin-bottom: 1rem; border-bottom: 1px solid var(--bs-border-color); }
.idea-form-modal { max-width: 720px; }
.idea-form-modal-header { text-align: center; margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--bs-border-color); }
.idea-form-modal-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.idea-form-grid { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
.idea-form-full { grid-column: 1 / -1; }

/* ─── Idea modal — section layout ─── */
.idea-modal-head {
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(41,206,97,.08), rgba(255,163,41,.05));
    border-bottom: 1px solid var(--bs-border-color);
    border-top-left-radius: var(--bs-modal-border-radius, 16px);
    border-top-right-radius: var(--bs-modal-border-radius, 16px);
}
.idea-modal-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: var(--bs-primary);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(41,206,97,.25);
}
.idea-modal-content {
    padding: 24px 28px 8px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.idea-section {
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    background: var(--bs-body-bg);
    overflow: hidden;
}
.idea-section-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bs-tertiary-bg);
    border-bottom: 1px solid var(--bs-border-color);
}
.idea-section-num {
    flex-shrink: 0;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--bs-primary);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    margin-top: 1px;
}
.idea-section-title {
    font-size: .92rem;
    font-weight: 600;
    margin: 0;
    color: var(--bs-body-color);
}
.idea-section-sub {
    font-size: .76rem;
    color: var(--bs-secondary-color);
    margin: 2px 0 0;
    line-height: 1.45;
}
.idea-section-body { padding: 18px; }
.idea-consent {
    background: var(--bs-secondary-bg);
    border-radius: 8px;
    padding: 12px 14px;
    border-left: 3px solid var(--bs-primary);
}
/* Bootstrap's default .form-check pushes the input -1.5em with a negative margin,
   which puts it half outside the consent border. Reset to a clean flex row so the
   checkbox sits flush inside the box. */
.idea-consent.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-left: 14px;
    min-height: 0;
    cursor: pointer;            /* whole row is clickable — it's a <label> */
    user-select: none;          /* clicks don't accidentally start text selection */
    transition: background .12s;
}
.idea-consent.form-check:hover { background: var(--bs-tertiary-bg); }
.idea-consent .form-check-input {
    float: none;
    margin: 2px 0 0;
    flex-shrink: 0;
    cursor: pointer;
}
.idea-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 28px;
    border-top: 1px solid var(--bs-border-color);
    background: var(--bs-tertiary-bg);
    position: sticky;
    bottom: 0;
    border-bottom-left-radius: var(--bs-modal-border-radius, 16px);
    border-bottom-right-radius: var(--bs-modal-border-radius, 16px);
}
@media (max-width: 576px) {
    .idea-modal-head, .idea-modal-content, .idea-modal-footer { padding-left: 18px; padding-right: 18px; }
    .idea-section-body { padding: 14px; }
}
html.dark .idea-modal-head {
    background: linear-gradient(135deg, rgba(41,206,97,.15), rgba(255,163,41,.08));
}
html.dark .idea-section { background: rgba(255,255,255,.02); }
.pagination-custom { display: flex; gap: 4px; justify-content: center; margin-top: 2rem; }

.accent-bar { height: 3px; background: linear-gradient(90deg, var(--bs-primary), var(--responso-orange)); border-radius: 2px; margin-bottom: 1.5rem; }

.card-title { font-size: .9rem; line-height: 1.35; font-weight: 600; }
.card-summary { font-size: 1rem; color: var(--bs-secondary-color); }
.card-body { font-size: 15px; line-height: 1.7; }
.card-date { font-size: 12px; color: var(--bs-tertiary-color); font-family: var(--bs-font-monospace); }
.idea-comment-section { background: var(--bs-tertiary-bg); border-radius: var(--bs-border-radius); padding: 1rem; }

/* ═══════════════════════════════════════════════════════════
   Legacy public-side classes (templates/changelog/index.html.twig)
   ═══════════════════════════════════════════════════════════ */

.container-wide { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ─── Status tabs (segmented control) ─── */
.status-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 5px;
    background: var(--bs-tertiary-bg);
    border-radius: 14px;
    margin-bottom: 2rem;
    border: 1px solid var(--bs-border-color);
}
.status-tab {
    display: inline-flex; align-items: center; gap: 8px;
    padding: .5rem 1.1rem;
    font-size: .875rem;
    font-weight: 500;
    color: var(--bs-secondary-color);
    border-radius: 10px;
    border: 0; background: transparent;
    text-decoration: none;
    transition: all .15s;
}
.status-tab:hover { color: var(--bs-body-color); background: rgba(0,0,0,.02); }
html.dark .status-tab:hover { background: rgba(255,255,255,.04); }
.status-tab.active {
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    font-weight: 600;
}
.status-tab-icon { font-size: 1rem; line-height: 1; }
.status-tab-label { line-height: 1; }

/* ─── Changelog feed wrapper + grid ─── */
.changelog-feed { margin-top: 1rem; }

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
@media (max-width: 768px) { .cards-grid { grid-template-columns: 1fr; } }

/* ─── Quarter banner ─── */
.quarter-banner {
    display: flex; align-items: center; gap: 12px;
    margin: 2rem 0 1rem;
}
.quarter-banner::before, .quarter-banner::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--bs-border-color);
}
.quarter-text {
    font-family: var(--bs-font-monospace);
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--bs-tertiary-color);
    padding: 0 .5rem;
}

/* ─── Card-tile (refined for modern look) ─── */
.card-tile {
    display: flex !important;
    flex-direction: column;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    cursor: default;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    text-decoration: none;
    color: var(--bs-body-color);
}
.card-tile:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 14px 36px -12px rgba(var(--bs-primary-rgb), .25), 0 4px 12px -4px rgba(0,0,0,.06);
    transform: translateY(-3px);
    color: var(--bs-body-color);
}
.card-tile:hover .card-tile-title,
.card-tile:hover .card-title { color: var(--bs-primary-text-emphasis); }

/* Bootstrap card hover — for cards in /bootstrap/changelog/index.html.twig */
.card.shadow-sm,
.card.cursor-pointer,
.card-hover {
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    overflow: hidden;  /* clip the image area to match the card's rounded corners */
}
.card.shadow-sm:hover,
.card.cursor-pointer:hover,
.card-hover:hover {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 14px 36px -12px rgba(var(--bs-primary-rgb), .22), 0 4px 12px -4px rgba(0,0,0,.07) !important;
    transform: translateY(-3px);
}
.card.shadow-sm:hover .card-title,
.card-hover:hover .card-title { color: var(--bs-primary-text-emphasis); }
.card-hover:hover .ratio { background: var(--bs-primary-bg-subtle) !important; }

.cursor-pointer { cursor: pointer; }

/* ─── Quarter banner (Responso orange pill, centred over a faint line) ─── */
.quarter-banner {
    display: block;
    width: 100%;
    text-align: center;
    margin: 28px 0 16px;
    position: relative;
}
.quarter-banner::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 50%;
    height: 1px;
    background: var(--bs-border-color);
    z-index: 0;
}
.quarter-banner-text {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    background: var(--responso-orange);
    color: #fff !important;
    border-radius: 999px;
    font-family: var(--bs-font-monospace);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    box-shadow: 0 6px 16px -4px rgba(255, 163, 41, .40);
}

.card-vote-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px 8px;
    gap: 12px;
}
.card-meta-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.card-clickable {
    cursor: pointer;
    padding: 4px 18px 18px;
    flex: 1;
}
.card-clickable:hover .card-tile-title { color: var(--bs-primary-text-emphasis); }

.card-tile-image {
    margin: 4px -18px 12px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bs-tertiary-bg);
    position: relative;
}
.card-tile-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-tile-image--placeholder {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--bs-tertiary-bg) 0%, var(--bs-primary-bg-subtle) 100%);
}
.placeholder-icon { font-size: 3rem; opacity: .55; }
.card-tile-video-thumb { position: relative; }
.video-play-icon {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 48px; height: 48px;
    border-radius: 50%;
    background: rgba(0,0,0,.65);
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    pointer-events: none;
    z-index: 2;
}

.card-tile-title {
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 .375rem;
    letter-spacing: -.015em;
    color: var(--bs-body-color);
    transition: color .15s;
}
.card-tile-summary {
    font-size: .875rem;
    line-height: 1.55;
    color: var(--bs-secondary-color);
    margin: 0 0 .75rem;
}
.card-tile-date {
    display: inline-block;
    font-family: var(--bs-font-monospace);
    font-size: 11px;
    color: var(--bs-tertiary-color);
    letter-spacing: .02em;
}
.card-tile-meta-row {
    display: flex; align-items: center; gap: 10px;
    flex-wrap: wrap;
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid var(--bs-border-color);
    font-size: 11.5px;
    color: var(--bs-tertiary-color);
}

/* ─── Sidebar section label (groups items under a heading) ─── */
.sidebar-section-label {
    text-transform: uppercase;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--bs-tertiary-color);
    padding: 6px 12px 4px;
    margin-top: 2px;
}
.sidebar-section-label:first-child { margin-top: 0; padding-top: 0; }

/* ─── Sidebar nav (changelog page + admin) ─── */
.sidebar-link {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 7px 12px !important;
    border-radius: 8px !important;
    color: var(--bs-secondary-color) !important;
    font-size: .875rem;
    font-weight: 500;
    text-decoration: none !important;
    border: 1px solid transparent;
    background: transparent !important;
    transition: background-color .15s, color .15s;
    position: relative;
}
.sidebar-link i.bi { color: var(--bs-tertiary-color); transition: color .15s; }
.sidebar-link:hover {
    background: var(--bs-tertiary-bg) !important;
    color: var(--bs-body-color) !important;
}
.sidebar-link:hover i.bi { color: var(--bs-secondary-color); }
.sidebar-link.active {
    /* Calm green-tinted active — not a saturated fill */
    background: rgba(22, 163, 74, 0.07) !important;
    color: #166534 !important;
    font-weight: 600;
}
.sidebar-link.active i.bi { color: #166534; }
.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0; top: 6px; bottom: 6px;
    width: 3px;
    background: var(--bs-primary);
    border-radius: 0 2px 2px 0;
}
html.dark .sidebar-link.active {
    background: rgba(52, 211, 153, 0.10) !important;
    color: #6EE7B7 !important;
}
html.dark .sidebar-link.active i.bi { color: #6EE7B7; }
.sidebar-link:focus-visible {
    outline: 0 !important;
    box-shadow: 0 0 0 3px var(--bs-focus-ring-color) !important;
}

.sidebar-dot {
    display: inline-block;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--bs-tertiary-color);
    flex-shrink: 0;
}
.sidebar-dot.dot-feature      { background: var(--color-feature); }
.sidebar-dot.dot-integration  { background: var(--color-integration); }
.sidebar-dot.dot-improvement  { background: var(--color-improvement); }
.sidebar-dot.dot-bugfix       { background: var(--color-bugfix); }

/* Sticky on lg+ — Bootstrap doesn't ship per-breakpoint sticky utilities */
@media (min-width: 992px) {
    .position-lg-sticky { position: -webkit-sticky; position: sticky; }
}

/* ─── Idea-style cards (lighter accent) ─── */
.card-tile--idea { border-color: var(--bs-primary-border-subtle); }
.card-tile--idea-mirror { border-style: dashed; opacity: .9; }

/* ─── Submit-idea CTA button ─── */
.submit-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 22px;
    border-radius: 999px;
    border: 0;
    background: var(--bs-primary);
    color: #fff;
    font-size: .9375rem; font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    box-shadow: 0 4px 12px rgba(var(--bs-primary-rgb), .25);
}
.submit-toggle:hover {
    background: var(--bs-primary-text-emphasis);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(var(--bs-primary-rgb), .35);
}

/* ─── badge-customer-idea ─── */
.badge-customer-idea {
    background: var(--responso-orange-soft);
    color: var(--responso-orange);
    font-size: .65rem;
}

/* ─── Form-grid items used in idea modal ─── */
.idea-modal-form .form-group { margin-bottom: 1rem; }
.idea-modal-form label { font-size: .8125rem; font-weight: 500; color: var(--bs-secondary-color); }

/* ─── Detail link arrows ─── */
.detail-link-title { font-weight: 500; }
.detail-link-arrow { color: var(--bs-tertiary-color); margin-left: 4px; }

/* ─── Idea comment section inside detail modal ─── */
.idea-comment-section { background: var(--bs-tertiary-bg); border-radius: var(--bs-border-radius); padding: 1rem; }

/* ═══════════════════════════════════════════════════════════
   Page transition polish — top progress bar + content fade-in
   ═══════════════════════════════════════════════════════════ */
#pageProgress {
    position: fixed; top: 0; left: 0;
    height: 2px;
    background: var(--bs-primary);
    width: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 1;
    box-shadow: 0 0 8px rgba(var(--bs-primary-rgb), .55);
    transition: width .2s ease-out;
}
#pageProgress.loading {
    width: 80%;
    transition: width 1.6s cubic-bezier(.05, .85, .2, .98);
}
#pageProgress.done {
    width: 100%;
    opacity: 0;
    transition: width .2s ease-out, opacity .25s ease-in .15s;
}

/* Smooth fade-in for the main content after each navigation
   so tab switching feels instant rather than blink-flash. */
.main-content,
.admin-content {
    animation: contentFadeIn 240ms cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes contentFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) { * { animation-duration: 0s !important; transition-duration: 0s !important; } }
