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

:root {
    --brand-red: #C8312B;
    --brand-dark-red: #9B2119;
    --brand-black: #1A1A1A;
    --brand-gray: #F7F8FA;
    --brand-border: #E8EBF0;
    --brand-text: #2C2C2C;
    --brand-muted: #6B7280;
    /* Layout */
    --sidebar-width: 248px;
    --topbar-height: 60px;
    /* Sidebar theme */
    --sidebar-bg: #111318;
    --sidebar-text: rgba(255, 255, 255, 0.88);
    --sidebar-muted: rgba(255, 255, 255, 0.42);
    --sidebar-hover: rgba(255, 255, 255, 0.06);
    /* Typography scale */
    --fs-xs:   0.75rem;
    --fs-sm:   0.8125rem;
    --fs-base: 0.9375rem;
    --fs-md:   1.0625rem;
    --fs-lg:   1.25rem;
    --fs-xl:   1.5rem;
    --fs-2xl:  1.875rem;
    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.12);
    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--sidebar-bg);
    height: 100vh;
    overflow: hidden;
    color: var(--brand-text);
    padding: 0;
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── App Shell ──────────────────────────────────────────────────────────── */

.app-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ─── Sidebar ────────────────────────────────────────────────────────────── */

.sidebar {
    width: var(--sidebar-width);
    height: 100%;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    position: relative;
    z-index: 200;
}

.sidebar-header {
    padding: 22px 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo-mark {
    color: var(--brand-red);
    flex-shrink: 0;
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-brand-name {
    font-size: var(--fs-md);
    font-weight: 800;
    color: var(--brand-red);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.sidebar-brand-sub {
    font-size: var(--fs-xs);
    color: var(--sidebar-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 9px 14px;
    border: none;
    background: none;
    color: var(--sidebar-text);
    cursor: pointer;
    font-family: inherit;
    font-size: var(--fs-sm);
    font-weight: 500;
    text-align: left;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    white-space: nowrap;
    border-radius: var(--radius-sm);
    border-right: none;
    margin-bottom: 1px;
}

/* External tools in the sidebar (e.g. Zistemo) are links, not buttons. */
a.nav-item { text-decoration: none; }

.nav-item:hover {
    background: var(--sidebar-hover);
    color: white;
}

.nav-item.active {
    background: rgba(200, 49, 43, 0.12);
    color: #ff9490;
    font-weight: 600;
}

.nav-icon-svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.55;
    transition: opacity var(--transition-fast);
}

.nav-item.active .nav-icon-svg {
    opacity: 1;
    color: var(--brand-red);
}

.nav-item:hover .nav-icon-svg {
    opacity: 1;
}

/* Sidebar count pill (e.g. new Bug Reports for a manager): white on brand red
   is 5.34:1, AA-compliant for small text. .hidden (display: none !important)
   already covers showing/hiding it, so no .nav-badge.hidden override is needed. */
.nav-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    margin-left: auto;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--brand-red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.nav-group-label {
    padding: 16px 14px 6px;
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--sidebar-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
}

.sidebar-footer {
    padding: 10px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.sidebar-footer-text {
    font-size: var(--fs-xs);
    color: rgba(255, 255, 255, 0.22);
    font-weight: 500;
}

/* Sidebar profile nav item */
.profile-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: background var(--transition-fast);
    white-space: nowrap;
    border-radius: var(--radius-sm);
}
.profile-nav-item:hover { background: var(--sidebar-hover); }
.profile-nav-item.active {
    background: rgba(200, 49, 43, 0.12);
}

.sidebar-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-red);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.sidebar-avatar img { width: 100%; height: 100%; object-fit: cover; }

.sidebar-profile-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow: hidden;
    min-width: 0;
}
.sidebar-profile-name {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--sidebar-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-profile-sub {
    font-size: var(--fs-xs);
    color: var(--sidebar-muted);
    font-weight: 500;
}

/* ─── Main Area ──────────────────────────────────────────────────────────── */

.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    background: white;
    border-radius: 16px 0 0 16px;
}

/* ─── Top Bar ────────────────────────────────────────────────────────────── */

.topbar {
    height: var(--topbar-height);
    background: white;
    border-bottom: 1px solid var(--brand-border);
    display: flex;
    align-items: center;
    padding: 0 32px;
    gap: 16px;
    flex-shrink: 0;
}

.sidebar-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    flex-shrink: 0;
    border-radius: 6px;
    transition: background 0.2s;
}

.sidebar-toggle:hover { background: var(--brand-gray); }

.sidebar-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--brand-black);
    border-radius: 2px;
}

.topbar-title {
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--brand-black);
    letter-spacing: 0.02em;
}

/* ─── Main Content ───────────────────────────────────────────────────────── */

.main-content {
    flex: 1;
    overflow-y: auto;
    background: var(--brand-gray);
}
.main-content { padding-bottom: 96px; }
@media (max-width: 600px) { .main-content { padding-bottom: 76px; } }

/* 1.19.1: at rest the FAB is a 56px circle (padding + border + icon add up to
   exactly 56px, see the box-shadow/colour spec below); overflow:hidden plus a
   capped max-width clip the label out of view until hover/focus expand it. */
.bug-report-fab {
    position: fixed; right: 24px; bottom: 24px; z-index: 40;
    height: 56px; width: auto; max-width: 56px; border-radius: 28px; padding: 0 16px;
    background: #ffffff; border: 1px solid var(--brand-border); color: var(--brand-red);
    cursor: pointer; display: flex; align-items: center; justify-content: flex-start; gap: 10px; overflow: hidden;
    box-shadow: 0 4px 24px rgba(26, 26, 26, 0.12), 0 1px 3px rgba(26, 26, 26, 0.08);
    transition: max-width 0.32s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.bug-report-fab.hidden { display: none; }
/* W11: two icons stacked in the same box, crossfading on a shared CSS clock —
   ported from cvpoint-ai/src/app/globals.css:1088-1146 ("Bug-report launcher"),
   pure CSS so a decorative effect never needs a JS timer. */
.bug-report-fab-icon-stack { position: relative; width: 22px; height: 22px; flex-shrink: 0; }
.bug-report-fab-icon {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    animation-duration: 11s; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); animation-iteration-count: infinite;
}
.bug-report-fab-icon--primary { animation-name: bug-report-fab-primary; }
.bug-report-fab-icon--alternate { animation-name: bug-report-fab-alternate; }
@keyframes bug-report-fab-primary {
    0%, 38%   { opacity: 1; transform: scale(1) rotate(0deg); }
    44%, 56%  { opacity: 0; transform: scale(0.55) rotate(-25deg); }
    62%, 100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes bug-report-fab-alternate {
    0%, 38%   { opacity: 0; transform: scale(0.55) rotate(25deg); }
    44%, 56%  { opacity: 1; transform: scale(1) rotate(0deg); }
    62%, 100% { opacity: 0; transform: scale(0.55) rotate(25deg); }
}
/* Hovering means a click is coming: stop the swap and commit to the bug icon
   so the button's meaning does not change under the cursor. */
.bug-report-fab:hover .bug-report-fab-icon--primary, .bug-report-fab:focus-visible .bug-report-fab-icon--primary { animation: none; opacity: 1; transform: none; }
.bug-report-fab:hover .bug-report-fab-icon--alternate, .bug-report-fab:focus-visible .bug-report-fab-icon--alternate { animation: none; opacity: 0; }
/* 1.19.1: the label stays in the flow (display:inline) so it is ready to show
   the instant the button expands; opacity + a short delay is what hides it at
   rest, with overflow:hidden on the button as the clip. */
.bug-report-fab-label { display: inline; white-space: nowrap; font-size: 14px; font-weight: 600; color: var(--brand-text); padding-right: 4px; opacity: 0; transition: opacity 0.2s ease 0.06s; }
@media (hover: hover) {
    .bug-report-fab:hover {
        max-width: 280px; transform: translateY(-1px);
        box-shadow: 0 8px 28px rgba(26, 26, 26, 0.16), 0 2px 4px rgba(26, 26, 26, 0.08);
        border-color: #f3c9c6;
    }
    .bug-report-fab:hover .bug-report-fab-label { opacity: 1; }
}
/* Keyboard focus gets the same expanded pill as hover, outside the (hover: hover)
   media query, so keyboard users see the label too. */
.bug-report-fab:focus-visible {
    max-width: 280px; transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(26, 26, 26, 0.16), 0 2px 4px rgba(26, 26, 26, 0.08);
    border-color: #f3c9c6; outline: 2px solid var(--brand-red); outline-offset: 3px;
}
.bug-report-fab:focus-visible .bug-report-fab-label { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
    .bug-report-fab-icon--primary { animation: none; opacity: 1; transform: none; }
    .bug-report-fab-icon--alternate { animation: none; opacity: 0; }
    .bug-report-fab, .bug-report-fab-label { transition: none; }
    .bug-report-fab:hover, .bug-report-fab:focus-visible { transform: none; }
}
@media (max-width: 600px) {
    .bug-report-fab { height: 52px; max-width: 52px; padding: 0 14px; right: 16px; bottom: 16px; }
}
/* ─── Bug Report Window (br-*; values ported verbatim from the approved mockup,
   mockup-1.19.0/mockup-lib.js:124-201 — every colour is one of ON-IT's own
   --brand-* custom properties, see :8-14 above) ─────────────────────────── */
.br-overlay { display: flex; align-items: center; justify-content: center; padding: 16px; }
.br-panel { width: 100%; max-width: 576px; max-height: min(88vh, 720px); display: flex; flex-direction: column;
    overflow: hidden; border-radius: 24px; background: #fff; box-shadow: 0 20px 50px rgba(0,0,0,0.22), 0 4px 10px rgba(0,0,0,0.08); }
.br-panel form { display: contents; }
.br-header { position: relative; flex-shrink: 0; padding: 20px 24px; color: #fff;
    background: linear-gradient(120deg, var(--brand-red), var(--brand-dark-red)); }
.br-close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border-radius: 999px; border: 0;
    display: inline-flex; align-items: center; justify-content: center; background: transparent; color: rgba(255,255,255,0.75); cursor: pointer; }
.br-close:hover { background: rgba(255,255,255,0.12); color: #fff; }
.br-badge { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; background: rgba(255,255,255,0.14);
    padding: 4px 12px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.18em; color: rgba(255,255,255,0.92); }
.br-title { margin: 11px 0 0; font-size: 18px; font-weight: 700; color: #fff; line-height: 1.3; }
.br-subtitle { margin: 4px 0 0; font-size: 12px; line-height: 1.5; color: rgba(255,255,255,0.92); }
.br-body { flex: 1 1 auto; overflow-y: auto; padding: 20px 24px; }
.br-fieldset { border: 0; margin: 0 0 20px; padding: 0; }
.br-legend { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.14em; color: var(--brand-muted); }
.br-hint { margin: 6px 0 0; font-size: 11px; line-height: 1.5; color: var(--brand-muted); }
.br-kind-row { display: flex; gap: 8px; }
.br-kind-option { flex: 1; text-align: left; border-radius: 12px; border: 1px solid var(--brand-border); background: transparent;
    padding: 11px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.br-kind-option.active { border-color: var(--brand-red); background: rgba(200,49,43,0.05); }
.br-kind-label { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: #3F3F46; }
.br-kind-option.active .br-kind-label { color: var(--brand-red); }
.br-kind-hint { font-size: 11px; line-height: 1.4; color: var(--brand-muted); }
.br-area-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.br-area-chip { display: flex; align-items: center; gap: 7px; border-radius: 10px; border: 1px solid var(--brand-border);
    background: transparent; padding: 9px 10px; cursor: pointer; text-align: left; min-width: 0; }
.br-area-chip.active { border-color: var(--brand-red); background: rgba(200,49,43,0.05); }
.br-area-chip svg { flex-shrink: 0; color: #A1A1AA; }
.br-area-chip.active svg { color: var(--brand-red); }
.br-area-chip span { font-size: 11px; font-weight: 600; color: #3F3F46; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-area-chip.active span { color: var(--brand-red); }
.br-sublabel { margin: 12px 0 6px; font-size: 11px; font-weight: 600; color: var(--brand-muted); }
.br-pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.br-pill { border-radius: 999px; border: 1px solid var(--brand-border); background: transparent; padding: 5px 12px;
    font-size: 11px; font-weight: 600; color: #52525B; cursor: pointer; }
.br-pill.active { border-color: var(--brand-red); background: rgba(200,49,43,0.06); color: var(--brand-red); }
.br-label { display: block; margin: 0 0 6px; font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.14em; color: var(--brand-muted); }
.br-counter { margin-left: 6px; font-size: 11px; font-weight: 500; text-transform: none; letter-spacing: normal; color: var(--brand-muted); }
.br-input, .br-textarea { width: 100%; border-radius: 12px; border: 1px solid var(--brand-border); font-size: 14px; color: var(--brand-text);
    outline: none; font-family: inherit; }
.br-input { height: 40px; padding: 0 14px; }
.br-input:focus, .br-textarea:focus { border-color: #A1A1AA; }
.br-textarea { padding: 10px 14px; resize: vertical; line-height: 1.5; }
.br-textarea.br-mono { font-family: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, monospace; font-size: 12px; }
.br-shots-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.br-shot-thumb { position: relative; width: 96px; height: 64px; border-radius: 8px; overflow: hidden; border: 1px solid var(--brand-border); }
.br-shot-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.br-shot-remove { position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; border-radius: 999px; border: 0;
    background: rgba(0,0,0,0.55); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.br-dropzone { border: 1.5px dashed #D4D4D8; border-radius: 12px; padding: 16px; text-align: center; }
.br-dropzone svg { margin: 0 auto 6px; color: var(--brand-muted); display: block; }
.br-choose-btn { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; border-radius: 999px;
    border: 1px solid var(--brand-border); background: #fff; padding: 6px 14px; font-size: 12px; font-weight: 600; color: #3F3F46; cursor: pointer; }
.br-context-note { margin: 18px 0 0; border-radius: 12px; background: #F7F8FA; padding: 10px 14px; font-size: 11px;
    line-height: 1.6; color: var(--brand-muted); }
.br-error { margin: 0 24px 8px; border-radius: 12px; background: #FEF2F2; padding: 8px 12px; font-size: 12px; font-weight: 500; color: #B91C1C; }
.br-footer { flex-shrink: 0; display: flex; align-items: center; gap: 8px; border-top: 1px solid #F4F4F5; padding: 14px 24px; }
.br-btn-cancel { margin-right: auto; border-radius: 999px; border: 1px solid var(--brand-border); background: #fff; padding: 8px 16px;
    font-size: 12px; font-weight: 600; color: #52525B; cursor: pointer; }
.br-btn-submit { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; border: 0; padding: 8px 20px;
    font-size: 12px; font-weight: 600; color: #fff; background: var(--brand-red); cursor: pointer; }
.br-btn-submit:disabled { cursor: not-allowed; background: #E4E4E7; color: #52525B; }
.br-btn-primary { border-radius: 999px; border: 0; padding: 8px 18px; font-size: 12px; font-weight: 600; color: #fff; background: var(--brand-red); cursor: pointer; }
.br-result { display: flex; flex-direction: column; align-items: center; padding: 30px 24px 26px; overflow-y: auto; }
.br-result-icon { width: 48px; height: 48px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
    background: rgba(200,49,43,0.06); border: 1px solid rgba(200,49,43,0.16); color: var(--brand-red); margin-bottom: 14px; }
.br-result-title { margin: 0; font-size: 16px; font-weight: 700; color: var(--brand-black); text-align: center; }
.br-result-body { margin: 7px 0 0; font-size: 12px; line-height: 1.5; color: var(--brand-muted); text-align: center; max-width: 380px; }
.br-result-actions { margin-top: 20px; display: flex; gap: 10px; }

@media (max-width: 600px) {
    .br-area-grid { grid-template-columns: repeat(2, 1fr); }
    /* W13: the header shrinks to about half its desktop height — badge on one
       line at a smaller size, a smaller title, the subtitle hidden entirely. */
    .br-header { padding: 10px 44px 10px 16px; }
    .br-badge { padding: 3px 9px; font-size: 9px; letter-spacing: 0.12em; }
    .br-title { font-size: 15px; margin: 6px 0 0; }
    .br-subtitle { display: none; }
}

/* ─── Bug Reports (list + detail window) ──────────────────────────────────── */

.bug-report-status-badge,
.bug-report-severity-badge,
.bug-report-priority-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: var(--fs-xs);
    font-weight: 600;
    white-space: nowrap;
}
.bug-report-row { cursor: pointer; }
/* 1.23.0 (T7): the summary keeps its ellipsis; the comment count sits outside
   it so a long summary never clips the count. The flex box is an inner div:
   `display: flex` on the <td> itself would take it out of table layout. */
.bug-reports-table td.bug-report-first-line { max-width: 280px; }
.bug-report-summary-cell { display: flex; align-items: center; gap: 6px; min-width: 0; }
.bug-report-summary-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.bug-report-comment-count { display: inline-flex; align-items: center; gap: 2px; flex-shrink: 0; color: var(--brand-muted); font-size: var(--fs-xs); }
/* A8: a VISIBLY filled circle (controller fix: --brand-gray #F7F8FA is
   invisible on the white row — the mockup showed bare "DS" letters).
   #1f2937 on #d1d5db is ~10:1 (measure in the harness from computed colours). */
.bug-report-assignee-circle { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-left: 6px; border-radius: 50%; background: #d1d5db; color: #1f2937; font-size: 10px; font-weight: 700; vertical-align: middle; }
.bug-reports-table th { white-space: normal; }

.bug-report-detail-meta { display: flex; gap: 20px; flex-wrap: wrap; margin: 14px 0; font-size: var(--fs-sm); color: var(--brand-text); }
.bug-report-detail-meta strong { color: #374151; margin-right: 4px; }

.bug-report-detail h4 { font-size: var(--fs-base); font-weight: 700; color: #333; margin: 20px 0 8px; }
/* V2 (review): whichever element renders first (the manager's Status row or the
   first <h4>) must not push the panel's own top padding down with its own
   top margin — margin collapsing otherwise added it to the panel padding. */
.bug-report-detail > *:first-child { margin-top: 0; }

.bug-report-screenshots { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.bug-report-screenshot { width: 120px; height: 120px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--brand-border); cursor: pointer; }

.bug-report-context { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 8px 0 24px; }
.bug-report-context dt { font-weight: 600; color: #374151; font-size: var(--fs-sm); }
.bug-report-context dd { margin: 0; font-size: var(--fs-sm); color: var(--brand-text); word-break: break-word; }
.bug-report-errors { font-family: monospace; margin: 0; padding-left: 18px; }

/* The reset at the top of this file zeroes <p> margins, so whatever precedes the
   manager's Status field (the Kontext list above, or a Reply paragraph) would
   otherwise sit flush against its label; this guarantees the gap either way. */
.bug-report-fields { margin-top: 20px; }

/* A11 (review fix round 1 — matches the user-approved mockup): three columns
   side by side, each its own label-above-select-above-message stack (not the
   V1 one-row-per-field look). The message span already sits last in the
   markup, so no extra rule is needed to keep it below the select.
   `.form-group .bug-report-field-group label` has specificity (0,2,1), which
   beats the later `.form-group label` (line ~723, margin-bottom: 7px) so the
   label stays flush above its select instead of getting a stacked-field gap
   meant for a different layout. `.form-group.bug-report-status-row select`
   keeps that same (0,2,1) specificity (needed regardless of its own width
   value) and sets width:100%/min-width:0 so the select fills its 200px-ish
   column instead of the plain `.form-group select`'s intrinsic sizing. */
.bug-report-status-row { display: flex; align-items: flex-start; gap: 12px 20px; flex-wrap: wrap; }
.bug-report-field-group { display: flex; flex-direction: column; align-items: stretch; gap: 6px; flex: 0 1 200px; min-width: 160px; }
.form-group .bug-report-field-group label { margin: 0; }
.form-group.bug-report-status-row select { width: 100%; min-width: 0; }
.bug-report-readonly-line { display: flex; align-items: center; gap: 10px; }
@media (max-width: 600px) {
    .bug-report-status-row { flex-direction: column; align-items: stretch; }
    .bug-report-field-group { flex: none; width: 100%; }
}

/* 1.23.0 (T8): the comment thread and its composer. */
.bug-report-thread-heading { margin-top: 28px; }
.bug-report-thread { display: flex; flex-direction: column; gap: 10px; margin: 10px 0 16px; }
.bug-report-comment { display: flex; gap: 10px; align-items: flex-start; }
.bug-report-comment-avatar { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-gray); color: var(--brand-text); font-size: 11px; font-weight: 700; }
.bug-report-comment-body { flex: 1; min-width: 0; }
.bug-report-comment-meta { display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); color: var(--brand-muted); flex-wrap: wrap; }
.bug-report-comment-tag { background: var(--brand-gray); color: var(--brand-muted); border-radius: 10px; padding: 1px 8px; font-size: 10px; font-weight: 600; }
.bug-report-comment-delete { background: none; border: none; color: var(--brand-muted); cursor: pointer; font-size: var(--fs-xs); padding: 0; text-decoration: underline; }
.bug-report-comment-delete:hover { color: var(--brand-red); }
.bug-report-comment-text { white-space: pre-wrap; font-size: var(--fs-sm); color: var(--brand-text); margin-top: 2px; }
.bug-report-composer textarea { width: 100%; resize: vertical; }
.bug-report-composer .form-actions { justify-content: flex-end; margin-top: 8px; }

/* V3 (review, fix before merge): the irreversible report Delete button gets
   its own row, separated from the composer above it. */
.bug-report-detail-danger { border-top: 1px solid var(--brand-border); margin-top: 20px; padding-top: 14px; display: flex; justify-content: flex-start; }

@media (max-width: 600px) {
    .bug-report-context { grid-template-columns: 1fr; }
}

.read-only-banner { background: #fef3c7; color: #78350f; padding: 10px 16px; font-size: var(--fs-sm); font-weight: 600; }
/* 1.35.0: Home tells why an address did not open (unknown page / no access). Amber tokens of the 1.33.0 import notice. */
.route-notice { margin: -12px 0 24px; padding: 10px 12px; color: #92400e; background: #fffbeb; border: 1px solid #f59e0b; border-radius: 8px; font-size: var(--fs-sm); line-height: 1.45; }
.home-access-info { margin: -12px 0 24px; padding: 10px 12px; color: #1a56db; background: #f0f4ff; border: 1px solid #c7d7fd; border-radius: 8px; font-size: var(--fs-sm); line-height: 1.45; }
.admin-user-state-badge { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #92400e; background: #fffbeb; border: 1px solid #f59e0b; }

/* ─── Home Dashboard ─────────────────────────────────────────────────────── */

.home-welcome {
    margin-bottom: 36px;
}

.home-title {
    font-size: var(--fs-2xl);
    font-weight: 800;
    color: var(--brand-black);
    letter-spacing: -0.03em;
    margin-bottom: 10px;
    line-height: 1.2;
}

.home-title span { color: var(--brand-red); }

.home-subtitle {
    font-size: var(--fs-base);
    color: var(--brand-muted);
    max-width: 560px;
    line-height: 1.7;
}

.home-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 14px;
}

.home-module-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    border: 1px solid var(--brand-border);
    text-align: left;
    transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
    box-shadow: var(--shadow-xs);
}

.home-module-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: #d1d5db;
}

.hmc-icon-wrap {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #FEF2F2, #FDE8E8);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--brand-red);
}

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

.hmc-title {
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--brand-black);
    margin-bottom: 4px;
}

.hmc-desc {
    font-size: var(--fs-sm);
    color: var(--brand-muted);
    line-height: 1.4;
}

.hmc-arrow {
    font-size: var(--fs-lg);
    color: var(--brand-muted);
    flex-shrink: 0;
    transition: transform var(--transition-base), color var(--transition-base);
    opacity: 0.5;
}

.home-module-card:hover .hmc-arrow {
    transform: translateX(4px);
    color: var(--brand-red);
    opacity: 1;
}

/* ─── Mobile Sidebar Overlay ─────────────────────────────────────────────── */

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 199;
}

@media (max-width: 1023px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.28s ease;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
    }

    .sidebar.open { transform: translateX(0); }

    .sidebar-overlay.active { display: block; }

    .sidebar-toggle { display: flex; }

    .tab-content:not(.ob-tab-content) { padding: 24px 20px; }

    .home-modules-grid { grid-template-columns: 1fr; }

    .main-area { border-radius: 0; }
}

/* ─── Tab Content ────────────────────────────────────────────────────────── */

.tab-content {
    display: none;
    padding: 36px 40px;
    background: var(--brand-gray);
    min-height: 100%;
}

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

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    color: #374151;
    font-size: var(--fs-sm);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--brand-border);
    border-radius: var(--radius-sm);
    font-size: var(--fs-base);
    font-family: inherit;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px rgba(200, 49, 43, 0.08);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

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

.submit-button {
    width: 100%;
    padding: 13px 24px;
    background: var(--brand-red);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--fs-base);
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.submit-button:hover {
    background: var(--brand-dark-red);
    box-shadow: 0 4px 16px rgba(200, 49, 43, 0.3);
    transform: translateY(-1px);
}

.submit-button:active {
    background: var(--brand-dark-red);
    box-shadow: none;
    transform: translateY(0);
}

.form-card {
    background: white;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
    box-shadow: var(--shadow-sm);
}

/* ─── Submit Ideas workspace refresh ──────────────────────────────────────── */
.submit-workspace {
    --submit-ink: #0f172a;
    --submit-ink-2: #475569;
    --submit-line: #e2e8f0;
}

.submit-ideas-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.submit-ideas-breadcrumb {
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 6px;
}

.submit-ideas-breadcrumb ol {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.submit-ideas-breadcrumb li + li::before {
    content: '/';
    margin-right: 4px;
}

.submit-ideas-breadcrumb-link {
    color: inherit;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}

.submit-ideas-breadcrumb-link:hover {
    text-decoration: underline;
}

.submit-ideas-breadcrumb-link:focus-visible {
    outline: 2px solid var(--brand-black);
    outline-offset: 2px;
    border-radius: 4px;
}

.submit-ideas-title {
    color: var(--submit-ink);
    margin-bottom: 6px;
}

.submit-ideas-subtitle {
    color: var(--submit-ink-2);
    max-width: 58ch;
    margin: 0;
}

.submit-ideas-hero-badge {
    align-self: center;
    padding: 8px 14px;
    margin: 0;
    border-radius: 999px;
    background: #e8efff;
    border: 1px solid #c7d7ff;
    color: #1d4ed8;
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.submit-ideas-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 16px;
}

.submit-workspace .submit-ideas-form-card {
    border-color: var(--submit-line);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 12px 24px rgba(15, 23, 42, 0.04);
}

.submit-workspace .submit-button {
    margin-top: 8px;
    border-radius: var(--radius-md);
    text-transform: none;
    letter-spacing: normal;
}

.submit-ideas-aside {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.submit-ideas-aside-card {
    background: white;
    border: 1px solid var(--submit-line);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-xs);
}

.submit-ideas-aside-card h3 {
    margin: 0 0 8px;
    font-size: var(--fs-base);
    color: var(--submit-ink);
}

.submit-ideas-aside-card p {
    margin: 0;
    color: var(--submit-ink-2);
    font-size: var(--fs-sm);
}

.submit-ideas-aside-card ol {
    margin: 0;
    padding-left: 18px;
    color: var(--submit-ink-2);
    font-size: var(--fs-sm);
    display: grid;
    gap: 6px;
}

.message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.hidden {
    display: none !important;
}

.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.filter-bar select {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid var(--brand-border);
    border-radius: var(--radius-sm);
    font-size: var(--fs-base);
    font-family: inherit;
    background: white;
}

.filter-bar select:focus {
    outline: none;
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px rgba(200, 49, 43, 0.08);
}

.filter-bar .btn-secondary {
    flex-shrink: 0;
    white-space: nowrap;
}

.ideas-list {
    min-height: 200px;
}

.loading {
    text-align: center;
    color: #999;
    padding: 40px;
}

.idea-card {
    background: white;
    border: 1px solid var(--brand-border);
    border-left: 4px solid var(--brand-red);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    margin-bottom: 12px;
    transition: box-shadow var(--transition-base);
    box-shadow: var(--shadow-xs);
}

.idea-card:hover {
    box-shadow: var(--shadow-md);
}

.idea-card.idea-focus-highlight {
    box-shadow: 0 0 0 3px rgba(200, 49, 43, 0.18), var(--shadow-lg);
    border-color: rgba(200, 49, 43, 0.35);
}

.idea-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.idea-title {
    font-size: var(--fs-lg);
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.idea-meta {
    font-size: var(--fs-sm);
    color: #666;
}

.idea-description {
    font-size: var(--fs-base);
    font-family: inherit;
    color: #555;
    line-height: 1.6;
    margin: 15px 0;
}

.idea-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge.category {
    background: #F0EDEC;
    color: var(--brand-black);
    border: 1px solid var(--brand-border);
}

.badge.type {
    background: #FDF3F2;
    color: var(--brand-red);
    border: 1px solid #F2C5C3;
}

.badge.status {
    background: #fff3e0;
    color: #c45800;
    border: 1px solid #ffe0b2;
}

.badge.status.prioritized {
    background: #e8eaf6;
    color: #283593;
    border: 1px solid #c5cae9;
}

.badge.status.implemented {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #c8e6c9;
}

.badge.status.in-progress {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

.badge.status.blocked {
    background: #fce4ec;
    color: #b71c1c;
    border: 1px solid #f8bbd0;
}

.badge.status.in-testing {
    background: #f3e5f5;
    color: #6a1b9a;
    border: 1px solid #e1bee7;
}

.idea-actions {
    display: flex;
    gap: 6px;
    align-items: flex-start;
    flex-shrink: 0;
}

.idea-admin-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.idea-admin-label {
    font-size: var(--fs-sm);
    color: #666;
    font-weight: 600;
}

.idea-status-btn {
    padding: 3px 10px;
    border-radius: 3px;
    border: 1px solid var(--brand-border);
    background: #f5f5f5;
    color: #555;
    font-size: var(--fs-sm);
    cursor: pointer;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.idea-status-btn:hover {
    background: #e0e0e0;
}

.idea-status-btn.active {
    background: var(--brand-red);
    color: #fff;
    border-color: var(--brand-red);
}

.idea-comments-section {
    margin-top: 14px;
}

.idea-activity-section {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #f0f1f4;
}

.idea-activity-title {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: #374151;
    margin-bottom: 10px;
}

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

.idea-activity-item {
    border: 1px solid #ebeef3;
    border-radius: 14px;
    background: #fbfcfe;
    padding: 12px 14px;
}

.idea-activity-summary {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
}

.idea-activity-meta {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 8px;
}

.idea-activity-comment {
    font-size: var(--fs-sm);
    color: #7f1d1d;
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 10px 12px;
    white-space: pre-wrap;
}

.idea-comments {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.idea-comment {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #fafafa;
    border: 1px solid var(--brand-border);
    border-radius: 4px;
    padding: 8px 12px;
    font-size: var(--fs-sm);
}

.idea-comment-text {
    flex: 1;
    color: #333;
    line-height: 1.5;
}

.idea-comment-meta {
    color: #999;
    font-size: 11px;
    white-space: nowrap;
    flex-shrink: 0;
}

.idea-comment-delete {
    background: none;
    border: none;
    color: #bbb;
    cursor: pointer;
    font-size: 11px;
    padding: 0 2px;
    line-height: 1;
}

.idea-comment-delete:hover {
    color: var(--brand-red);
}

.idea-add-comment {
    display: flex;
    gap: 8px;
    align-items: center;
}

.idea-comment-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid var(--brand-border);
    border-radius: 4px;
    font-size: var(--fs-sm);
    font-family: inherit;
}

.idea-comment-input:focus {
    outline: none;
    border-color: var(--brand-red);
}

.idea-assigned-to {
    font-size: var(--fs-sm);
    color: #555;
    margin-top: 8px;
}

.idea-assign-input {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid var(--brand-border);
    border-radius: 4px;
    font-size: var(--fs-sm);
    font-family: inherit;
}

.idea-assign-input:focus {
    outline: none;
    border-color: var(--brand-red);
}

.idea-assign-select {
    flex: 1;
    padding: 4px 8px;
    border: 1px solid var(--brand-border);
    border-radius: 4px;
    font-size: var(--fs-sm);
    font-family: inherit;
    background: #fff;
    cursor: pointer;
}

.idea-assign-select:focus {
    outline: none;
    border-color: var(--brand-red);
}

.idea-attachments {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
}

.idea-attachments-label {
    font-size: var(--fs-sm);
    color: #666;
    font-weight: 600;
    margin-right: 2px;
}

.idea-attachment {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #f5f5f5;
    border: 1px solid var(--brand-border);
    border-radius: 4px;
    padding: 3px 8px;
    font-size: var(--fs-sm);
}

.idea-attachment-link {
    color: var(--brand-red);
    text-decoration: none;
    font-weight: 500;
}

.idea-attachment-link:hover {
    text-decoration: underline;
}

.idea-attachment-download {
    background: none;
    border: none;
    color: var(--brand-red);
    font-weight: 500;
    font-size: var(--fs-sm);
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}

.idea-attachment-download:hover {
    text-decoration: underline;
}

.idea-attachment-delete {
    background: none;
    border: none;
    color: #bbb;
    cursor: pointer;
    font-size: 11px;
    padding: 0 2px;
    line-height: 1;
}

.idea-attachment-delete:hover {
    color: var(--brand-red);
}

.file-input {
    display: block;
    width: 100%;
    padding: 6px 0;
    font-size: var(--fs-sm);
    font-family: inherit;
    color: #333;
}

.form-hint {
    display: block;
    font-size: var(--fs-sm);
    color: #888;
    margin-top: 4px;
}

.btn-sm {
    padding: 5px 12px;
    border-radius: 4px;
    border: 1px solid var(--brand-border);
    background: #f5f5f5;
    color: #333;
    font-size: var(--fs-sm);
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.15s;
}

.btn-sm:hover {
    background: #e0e0e0;
}

.no-ideas {
    text-align: center;
    color: #999;
    padding: 40px;
    font-size: var(--fs-md);
}

/* ─── Ideas: view toggle (List / Kanban) ─────────────────────────────────── */
.view-toggle {
    display: inline-flex;
    gap: 0;
    margin-bottom: 16px;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.view-toggle-btn {
    padding: 7px 16px;
    border: none;
    background: white;
    color: #555;
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.view-toggle-btn + .view-toggle-btn {
    border-left: 1px solid var(--brand-border);
}

.view-toggle-btn.active {
    background: var(--brand-red);
    color: white;
}

/* ─── Ideas: Kanban board ────────────────────────────────────────────────── */
.ideas-kanban {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.kanban-column {
    background: #f7f6f5;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    min-height: 120px;
}

.kanban-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--brand-border);
    position: sticky;
    top: 0;
    background: #f7f6f5;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.kanban-column-title {
    font-weight: 700;
    font-size: var(--fs-sm);
    color: #333;
}

.kanban-column-count {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: #666;
    background: white;
    border: 1px solid var(--brand-border);
    border-radius: 12px;
    padding: 1px 8px;
}

.kanban-column-body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-height: 60px;
}

.kanban-column-body.drag-over {
    background: #fdecea;
    outline: 2px dashed var(--brand-red);
    outline-offset: -6px;
    border-radius: var(--radius-sm);
}

.kanban-empty {
    color: #aaa;
    font-size: var(--fs-xs);
    text-align: center;
    padding: 12px 0;
    margin: 0;
}

.kanban-card {
    background: white;
    border: 1px solid var(--brand-border);
    border-left: 3px solid var(--brand-red);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    box-shadow: var(--shadow-xs);
}

.kanban-card[draggable="true"] {
    cursor: grab;
}

.kanban-card.dragging {
    opacity: 0.5;
}

.kanban-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.kanban-card-title {
    font-weight: 700;
    font-size: var(--fs-base);
    color: #333;
}

.kanban-card-desc {
    font-size: var(--fs-sm);
    color: #666;
    margin: 6px 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kanban-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.kanban-card-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: var(--fs-xs);
    color: #777;
}

.kanban-card-owner {
    font-weight: 600;
    color: #444;
}

.kanban-card-controls {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed var(--brand-border);
}

.kanban-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: var(--fs-xs);
    color: #666;
    font-weight: 600;
}

.kanban-control select {
    flex: 1;
    max-width: 62%;
    padding: 3px 6px;
    font-size: var(--fs-xs);
    border: 1px solid var(--brand-border);
    border-radius: 3px;
    background: white;
}

/* Priority badges */
.priority-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: var(--fs-xs);
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.priority-badge.high {
    background: #fdecea;
    color: #b71c1c;
    border: 1px solid #f5c6c3;
}

.priority-badge.medium {
    background: #fff3e0;
    color: #c45800;
    border: 1px solid #ffe0b2;
}

.priority-badge.low {
    background: #e8f5e9;
    color: #1b5e20;
    border: 1px solid #c8e6c9;
}

@media (max-width: 1100px) {
    .ideas-kanban {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ─── Ideas workspace (Jira-style refresh) ───────────────────────────────── */
.ideas-workspace {
    --ideas-surface: #ffffff;
    --ideas-subtle: #f6f7f9;
    --ideas-line: #e6e8ec;
    --ideas-ink: #0f172a;
    --ideas-ink-2: #475569;
    --ideas-ink-3: #94a3b8;
    --ideas-backlog: #64748b;
    --ideas-prioritized: #4f46e5;
    --ideas-progress: #2563eb;
    --ideas-blocked: #dc2626;
    --ideas-testing: #9333ea;
    --ideas-done: #16a34a;
}

.ideas-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.ideas-breadcrumb {
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ideas-ink-3);
    margin-bottom: 6px;
}

.ideas-breadcrumb span { margin: 0 4px; }

.ideas-workspace .ideas-hero-title {
    font-size: var(--fs-2xl);
    margin-bottom: 4px;
    color: var(--ideas-ink);
    letter-spacing: -0.03em;
}

.ideas-hero-subtitle {
    color: var(--ideas-ink-2);
    font-size: var(--fs-base);
    margin: 0;
}

.ideas-workspace .view-toggle {
    margin-bottom: 0;
    padding: 4px;
    gap: 4px;
    background: var(--ideas-subtle);
    border: 1px solid var(--ideas-line);
    border-radius: 999px;
}

.ideas-workspace .view-toggle-btn {
    border-radius: 999px;
    background: transparent;
    color: var(--ideas-ink-2);
    padding: 7px 18px;
}

.ideas-workspace .view-toggle-btn + .view-toggle-btn { border-left: none; }

.ideas-workspace .view-toggle-btn:hover { color: var(--ideas-ink); }

.ideas-workspace .view-toggle-btn.active {
    background: var(--ideas-surface);
    color: var(--ideas-ink);
    box-shadow: var(--shadow-sm);
}

/* Stats strip */
.ideas-stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.ideas-stat {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 16px;
    background: var(--ideas-surface);
    border: 1px solid var(--ideas-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}

.ideas-stat::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--stat-accent, var(--ideas-backlog));
}

.ideas-stat-neutral { --stat-accent: var(--ideas-ink); }
.ideas-stat-backlog { --stat-accent: var(--ideas-backlog); }
.ideas-stat-progress { --stat-accent: var(--ideas-progress); }
.ideas-stat-blocked { --stat-accent: var(--ideas-blocked); }
.ideas-stat-done { --stat-accent: var(--ideas-done); }
.ideas-stat-high { --stat-accent: var(--brand-red); }

.ideas-stat-label {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--ideas-ink-2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ideas-stat-value {
    font-size: var(--fs-2xl);
    font-weight: 800;
    color: var(--ideas-ink);
    letter-spacing: -0.03em;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.ideas-stat-hint {
    font-size: var(--fs-xs);
    color: var(--ideas-ink-3);
}

/* Toolbar */
.ideas-workspace .ideas-toolbar {
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px;
    background: var(--ideas-subtle);
    border: 1px solid var(--ideas-line);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    position: sticky;
    top: 0;
    z-index: 5;
}

.ideas-search {
    position: relative;
    flex: 2 1 240px;
    min-width: 200px;
}

.ideas-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ideas-ink-3);
    font-size: 1.05rem;
    pointer-events: none;
}

.ideas-search input {
    width: 100%;
    padding: 9px 12px 9px 34px;
    border: 1px solid var(--ideas-line);
    border-radius: var(--radius-md);
    background: var(--ideas-surface);
    font: inherit;
    font-size: var(--fs-sm);
    color: var(--ideas-ink);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.ideas-workspace .ideas-toolbar select {
    flex: 1 1 140px;
    padding: 9px 12px;
    font-size: var(--fs-sm);
    border: 1px solid var(--ideas-line);
    border-radius: var(--radius-md);
    color: var(--ideas-ink);
    cursor: pointer;
}

.ideas-search input:focus,
.ideas-workspace .ideas-toolbar select:focus {
    outline: none;
    border-color: var(--brand-red);
    box-shadow: 0 0 0 3px rgba(200, 49, 43, 0.12);
}

.ideas-workspace .ideas-toolbar .btn-secondary {
    border-radius: var(--radius-md);
    font-size: var(--fs-sm);
}

/* Empty state */
.ideas-workspace .no-ideas {
    background: var(--ideas-surface);
    border: 1px dashed var(--ideas-line);
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    color: var(--ideas-ink-2);
}

.no-ideas-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

/* List view: issue navigator rows */
.ideas-workspace .ideas-list {
    background: var(--ideas-surface);
    border: 1px solid var(--ideas-line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.ideas-workspace .ideas-list:has(> .no-ideas),
.ideas-workspace .ideas-list:has(> .loading) {
    background: transparent;
    border: none;
    box-shadow: none;
}

.idea-list-header,
.idea-row-summary {
    display: grid;
    grid-template-columns: 20px 104px minmax(0, 1fr) 128px 104px 180px 112px;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
}

.idea-list-header {
    height: 40px;
    background: var(--ideas-subtle);
    border-bottom: 1px solid var(--ideas-line);
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--ideas-ink-2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ideas-workspace .idea-card.idea-row {
    margin: 0;
    padding: 0;
    border: none;
    border-bottom: 1px solid var(--ideas-line);
    border-radius: 0;
    box-shadow: none;
    background: var(--ideas-surface);
    transition: background var(--transition-fast);
}

.ideas-workspace .idea-card.idea-row:last-child { border-bottom: none; }

.idea-row-summary {
    min-height: 60px;
    padding-top: 10px;
    padding-bottom: 10px;
    cursor: pointer;
    list-style: none;
    position: relative;
}

.idea-row-summary::-webkit-details-marker { display: none; }

.idea-row-summary::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--row-accent, var(--ideas-backlog));
    opacity: 0.85;
}

.idea-row.status-prioritized { --row-accent: var(--ideas-prioritized); }
.idea-row.status-in-progress { --row-accent: var(--ideas-progress); }
.idea-row.status-blocked { --row-accent: var(--ideas-blocked); }
.idea-row.status-in-testing { --row-accent: var(--ideas-testing); }
.idea-row.status-implemented { --row-accent: var(--ideas-done); }

.idea-row-summary:hover { background: #fafbfc; }

.idea-row-summary:focus-visible {
    outline: 2px solid var(--brand-red);
    outline-offset: -2px;
}

.idea-row[open] > .idea-row-summary { background: #fbfbfd; }

.idea-row-chevron {
    color: var(--ideas-ink-3);
    font-size: 1.2rem;
    line-height: 1;
    transition: transform var(--transition-base);
    justify-self: center;
}

.idea-row[open] .idea-row-chevron { transform: rotate(90deg); color: var(--ideas-ink); }

.idea-key {
    font-family: ui-monospace, 'SF Mono', 'Cascadia Code', Menlo, monospace;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--ideas-ink-2);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.idea-row-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.ideas-workspace .idea-row .idea-title {
    font-size: var(--fs-base);
    font-weight: 600;
    color: var(--ideas-ink);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ideas-workspace .idea-row .idea-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    font-size: var(--fs-xs);
    color: var(--ideas-ink-3);
}

.idea-meta-chip {
    color: var(--ideas-ink-2);
    font-weight: 600;
}

.idea-row-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    font-size: var(--fs-sm);
    color: var(--ideas-ink-2);
}

.idea-row-assignee-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.idea-priority-none { color: var(--ideas-ink-3); }

.idea-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1f2937, #C8312B);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 0 0 2px var(--ideas-surface, #fff);
}

.idea-avatar-sm { width: 24px; height: 24px; font-size: 10px; }

.idea-avatar-empty {
    background: var(--ideas-subtle, #f1f5f9);
    color: var(--ideas-ink-3, #94a3b8);
    border: 1px dashed #cbd5e1;
    box-shadow: none;
}

/* Expanded detail panel */
.idea-row-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    padding: 20px 24px 24px 56px;
    border-top: 1px solid var(--ideas-line);
    background: linear-gradient(180deg, #fbfbfd 0%, #ffffff 60px);
    animation: ideaRowReveal var(--transition-slow);
}

@keyframes ideaRowReveal {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: none; }
}

.idea-detail-heading {
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ideas-ink-3);
    margin-bottom: 8px;
}

.ideas-workspace .idea-row .idea-description {
    margin: 0 0 16px;
    color: var(--ideas-ink);
    white-space: pre-wrap;
    word-break: break-word;
}

.idea-detail-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    background: var(--ideas-surface);
    border: 1px solid var(--ideas-line);
    border-radius: var(--radius-lg);
    align-self: start;
}

.ideas-workspace .idea-detail-side .idea-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.ideas-workspace .idea-detail-side .idea-actions:empty { display: none; }

.idea-detail-fields {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px 12px;
    margin: 0;
    font-size: var(--fs-sm);
}

.idea-detail-fields dt {
    color: var(--ideas-ink-3);
    font-weight: 600;
    align-self: center;
}

.idea-detail-fields dd {
    margin: 0;
    color: var(--ideas-ink);
    min-width: 0;
    word-break: break-word;
}

.idea-detail-person {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ideas-workspace .idea-detail-person .idea-assigned-to {
    margin: 0;
    font-size: inherit;
    color: inherit;
}

.idea-admin-panel {
    border-top: 1px solid var(--ideas-line);
    padding-top: 14px;
}

.ideas-workspace .idea-admin-panel .idea-admin-actions { margin-top: 10px; }
.ideas-workspace .idea-admin-panel .idea-admin-actions:first-of-type { margin-top: 0; }

.ideas-workspace .idea-admin-label {
    min-width: 64px;
    font-size: var(--fs-xs);
    color: var(--ideas-ink-2);
}

.ideas-workspace .idea-status-btn {
    border-radius: 999px;
    background: var(--ideas-subtle);
    border-color: var(--ideas-line);
    padding: 4px 10px;
    font-size: var(--fs-xs);
    font-weight: 600;
}

.ideas-workspace .idea-status-btn.active {
    background: var(--ideas-ink);
    border-color: var(--ideas-ink);
    color: #fff;
}

.ideas-workspace .idea-priority-select,
.ideas-workspace .idea-assign-select {
    flex: 1;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid var(--ideas-line);
    border-radius: var(--radius-sm);
    background: #fff;
    font: inherit;
    font-size: var(--fs-sm);
}

.ideas-workspace .btn-sm {
    border-radius: var(--radius-sm);
    background: var(--ideas-surface);
    border-color: var(--ideas-line);
    color: var(--ideas-ink);
    font-weight: 600;
}

.ideas-workspace .btn-sm:hover { background: var(--ideas-subtle); }

.ideas-workspace .btn-danger-soft {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fff5f5;
}

.ideas-workspace .btn-danger-soft:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.ideas-workspace .idea-row .idea-comment {
    border-radius: var(--radius-md);
    background: var(--ideas-subtle);
    border-color: var(--ideas-line);
}

.ideas-workspace .idea-row .idea-comment-input {
    padding: 8px 12px;
    border-radius: var(--radius-md);
    border-color: var(--ideas-line);
}

.ideas-workspace .badge {
    border-radius: 6px;
    padding: 3px 8px;
    white-space: nowrap;
}

/* Longer (German) labels wrap inside the idea's side panel instead of running past it. */
.ideas-workspace .idea-detail-fields .badge {
    white-space: normal;
}

.ideas-workspace .badge.status {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 11px;
}

.ideas-workspace .priority-badge {
    border-radius: 6px;
    font-size: 11px;
}

/* Board view */
.ideas-workspace .ideas-kanban {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x proximity;
}

.ideas-workspace .kanban-column {
    flex: 0 0 280px;
    background: var(--ideas-subtle);
    border: 1px solid var(--ideas-line);
    border-radius: var(--radius-lg);
    scroll-snap-align: start;
    max-height: calc(100vh - 260px);
    min-height: 320px;
    --col-accent: var(--ideas-backlog);
}

.ideas-workspace .kanban-column-prioritized { --col-accent: var(--ideas-prioritized); }
.ideas-workspace .kanban-column-in-progress { --col-accent: var(--ideas-progress); }
.ideas-workspace .kanban-column-blocked { --col-accent: var(--ideas-blocked); }
.ideas-workspace .kanban-column-in-testing { --col-accent: var(--ideas-testing); }
.ideas-workspace .kanban-column-implemented { --col-accent: var(--ideas-done); }

.ideas-workspace .kanban-column-header {
    background: transparent;
    border-bottom: none;
    padding: 14px 14px 6px;
}

.ideas-workspace .kanban-column-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ideas-ink-2);
}

.kanban-column-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--col-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--col-accent) 18%, transparent);
}

.ideas-workspace .kanban-column-count {
    background: var(--ideas-surface);
    border-color: var(--ideas-line);
    color: var(--ideas-ink-2);
    font-variant-numeric: tabular-nums;
}

.ideas-workspace .kanban-column-body {
    overflow-y: auto;
    padding: 8px 10px 12px;
}

.ideas-workspace .kanban-column-body.drag-over {
    background: color-mix(in srgb, var(--col-accent) 8%, transparent);
    outline: 2px dashed var(--col-accent);
    border-radius: var(--radius-md);
}

.ideas-workspace .kanban-card {
    border: 1px solid var(--ideas-line);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    box-shadow: var(--shadow-xs);
    transition: box-shadow var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
}

.ideas-workspace .kanban-card:hover {
    box-shadow: var(--shadow-md);
    border-color: #d5d9e0;
    transform: translateY(-1px);
}

.ideas-workspace .kanban-card.kanban-card-high { box-shadow: inset 3px 0 0 #dc2626, var(--shadow-xs); }
.ideas-workspace .kanban-card.kanban-card-medium { box-shadow: inset 3px 0 0 #f59e0b, var(--shadow-xs); }
.ideas-workspace .kanban-card.kanban-card-low { box-shadow: inset 3px 0 0 #22c55e, var(--shadow-xs); }

.ideas-workspace .kanban-card.idea-focus-highlight {
    box-shadow: 0 0 0 3px rgba(200, 49, 43, 0.25), var(--shadow-lg);
}

.ideas-workspace .kanban-card-title {
    background: none;
    border: none;
    padding: 0;
    text-align: left;
    font: inherit;
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--ideas-ink);
    cursor: pointer;
    line-height: 1.4;
}

.ideas-workspace .kanban-card-title:hover { color: var(--brand-red); text-decoration: underline; }

.kanban-card-delete {
    flex-shrink: 0;
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    padding: 2px 6px;
    font-size: 13px;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}

.kanban-card:hover .kanban-card-delete,
.kanban-card-delete:focus-visible { opacity: 1; }

.kanban-card-delete:hover {
    background: #fff5f5;
    border-color: #fecaca;
}

.ideas-workspace .kanban-card-meta {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.ideas-workspace .kanban-card-meta .kanban-card-date {
    color: var(--ideas-ink-3);
    margin-right: auto;
}

.ideas-workspace .kanban-card-owner { display: inline-flex; }

@media (hover: none) {
    .kanban-card-delete { opacity: 1; }
}

@media (max-width: 1280px) {
    .ideas-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .idea-list-header,
    .idea-row-summary { grid-template-columns: 20px 96px minmax(0, 1fr) 120px 96px 88px; }
    .idea-list-header > span:last-child,
    .idea-row-updated { display: none; }
    .idea-row-assignee-name { display: none; }
    .idea-row-body { grid-template-columns: 1fr; padding-left: 24px; }
}

@media (max-width: 768px) {
    .ideas-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .idea-list-header { display: none; }
    .idea-row-summary {
        grid-template-columns: 20px minmax(0, 1fr) auto;
        grid-template-areas: "chev main status" "chev key assignee";
        row-gap: 4px;
    }
    .idea-row-chevron { grid-area: chev; }
    .idea-row-summary .idea-key { grid-area: key; }
    .idea-row-main { grid-area: main; }
    .idea-row-status { grid-area: status; justify-content: flex-end; }
    .idea-row-assignee { grid-area: assignee; justify-content: flex-end; }
    .idea-row-priority { display: none; }
    .idea-row-body { padding: 16px; }
    .ideas-workspace .ideas-toolbar { position: static; }
}

@media (max-width: 768px) {
    .submit-ideas-hero {
        flex-direction: column;
        margin-bottom: 14px;
    }
    .submit-ideas-hero-badge {
        align-self: flex-start;
    }
    .submit-ideas-layout {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .form-row-3 {
        grid-template-columns: 1fr;
    }
    .filter-bar {
        flex-direction: column;
    }
    .idea-reassign-flow {
        grid-template-columns: 1fr;
    }
    .idea-reassign-arrow {
        justify-self: center;
        transform: rotate(90deg);
    }
}

/* A10: scoped to the bug-report filter row only — the shared .ls-filter-input/
   .ls-filter-select and .filter-bar rules (other pages) are never edited.
   Controller fix (plan review), root causes measured from the CSS:
   - 1440 clipping: .ls-filter-select has flex: 1 (= flex-basis 0), so the
     selects never wrap and shrink to equal shares; flex-basis auto lets a
     select keep its content width and wrap to the next line instead.
   - At <= 768 px (the same breakpoint as the shared .filter-bar phone rule
     above), that rule's column layout keeps .filter-bar's align-items: center,
     centring an uneven stack; stretch it here so the gap between our old
     600px cutoff and the shared rule's 768px cutoff no longer shows it.
   Selectors use .filter-bar.bug-report-filters (0,2,x) so they beat the
   equal-specificity shared rules wherever those sit in the file (1.23.0 lesson). */
.filter-bar.bug-report-filters .ls-filter-select { flex: 1 1 auto; }
@media (max-width: 768px) {
    .filter-bar.bug-report-filters { flex-direction: column; align-items: stretch; }
    .filter-bar.bug-report-filters .ls-filter-input,
    .filter-bar.bug-report-filters .ls-filter-select { width: 100%; min-width: 0; flex: none; }
}

/* 1.28.0: same fix as A10 above, scoped to the Process Ownership Map filter row —
   German option text ("Alle Geschäftsbereiche", "Alle IT-Systeme" …) is longer
   than English and was clipped by the shared .ls-filter-select flex: 1 (flex-basis
   0) rule. flex-basis auto lets each select keep its content width and wrap to
   the next line instead of shrinking. Selector uses .filter-bar.process-filters
   (0,2,x) so it beats the equal-specificity shared rule regardless of file order.
   Round 2 fix: flex-grow 0 (not 1) keeps a select at its content width even when
   it wraps alone onto a line — otherwise it stretches to fill the whole row
   ("Alle Kritikalitäten" became full-width). The search input gets its own
   flex-basis/min-width so the five wider selects no longer squeeze it down to a
   stub ("Nach Name, Prozess-("); 240px shows a readable chunk of its placeholder. */
.filter-bar.process-filters .ls-filter-select { flex: 0 1 auto; }
.filter-bar.process-filters .ls-filter-input { flex: 1 1 240px; min-width: 240px; }
@media (max-width: 768px) {
    .filter-bar.process-filters { flex-direction: column; align-items: stretch; }
    .filter-bar.process-filters .ls-filter-input,
    .filter-bar.process-filters .ls-filter-select { width: 100%; min-width: 0; flex: none; }
}

/* 1.31.0 (N6–N9): the ticket ID F-12 / V-7 after the kind badge — list, board card, window title. */
.bug-report-key { margin-left: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--brand-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bug-report-key:empty { display: none; }
.bug-report-kind-cell { white-space: nowrap; }
.bug-board-card-top .bug-report-key { margin-left: 0; font-size: var(--fs-xs); }

/* ─── 1.25.0 Bug-report board (spec 2026-10-12-bug-report-board-design.md;
   values from the approved mockup P1, mock-board/P1-board-*.png). Scoped to the
   bug-report page: the shared .sub-tabs / .view-toggle / .kanban-* rules stay
   untouched. ─── */
#bug-reports-tabs { flex-wrap: wrap; row-gap: 6px; }
.bug-view-toggle {
    display: inline-flex;
    align-items: center;
    align-self: center;
    gap: 4px;
    padding: 4px;
    margin-left: auto;
    background: var(--brand-gray);
    border: 1px solid var(--brand-border);
    border-radius: 999px;
}
.bug-view-toggle-btn {
    border: none;
    background: transparent;
    color: var(--brand-muted);
    padding: 7px 16px;
    border-radius: 999px;
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.bug-view-toggle-btn:hover { color: var(--brand-text); }
.bug-view-toggle-btn.active { background: #fff; color: var(--brand-text); box-shadow: var(--shadow-sm); }
#bug-report-board-message { margin: 0 0 12px; }
.bug-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 4px;
}
.bug-board-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 120px;
    background: var(--brand-gray);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-lg);
}
.bug-board-col-header { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; }
.bug-board-col-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.bug-board-col-title { font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--brand-text); }
.bug-board-col-count {
    margin-left: auto;
    padding: 1px 8px;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--brand-muted);
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: 12px;
}
.bug-board-col-body { display: flex; flex-direction: column; gap: 10px; flex: 1; min-height: 60px; padding: 4px 10px 12px; border-radius: var(--radius-md); }
.bug-board-col-body.drag-over { background: rgba(200, 49, 43, 0.06); outline: 2px dashed rgba(200, 49, 43, 0.45); outline-offset: -6px; }
.bug-board-empty { margin: 8px 4px; font-size: var(--fs-xs); color: var(--brand-muted); }
.bug-board-card {
    padding: 10px 12px;
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-xs);
    cursor: pointer;
}
.bug-board-card-draggable { cursor: grab; }
.bug-board-card.dragging { opacity: .5; }
.bug-board-card.saving { opacity: .6; pointer-events: none; }
.bug-board-card-top { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.bug-board-card-summary {
    display: block;
    width: 100%;
    margin: 0 0 8px;
    padding: 0;
    border: none;
    background: none;
    text-align: left;
    font: inherit;
    cursor: inherit;
}
.bug-board-card-summary:focus-visible { outline: 2px solid var(--brand-red); outline-offset: 2px; }
.bug-board-card-summary-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--brand-text);
}
.bug-board-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: var(--fs-xs); color: var(--brand-muted); }
.bug-board-card-meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bug-board-card-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
@media (max-width: 768px) {
    .bug-board { display: flex; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
    .bug-board-col { flex: 0 0 280px; scroll-snap-align: start; }
}

/* ─── Onboarding Tab ─────────────────────────────────────────────────────── */

.ob-tab-content {
    padding: 0;
    background: white;
}

.sub-tabs {
    display: flex;
    background: white;
    border-bottom: 1px solid var(--brand-border);
    overflow-x: auto;
    padding: 0 40px;
    gap: 4px;
}

.sub-tab-btn {
    padding: 14px 18px;
    border: none;
    border-bottom: 2px solid transparent;
    background: none;
    cursor: pointer;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--brand-muted);
    white-space: nowrap;
    transition: all var(--transition-fast);
    letter-spacing: 0.02em;
    margin-bottom: -1px;
}

.sub-tab-btn:hover { color: var(--brand-text); background: var(--brand-gray); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.sub-tab-btn.active { background: white; color: var(--brand-red); border-bottom-color: var(--brand-red); }

.ob-section {
    display: none;
    padding: 32px 40px;
}
.ob-section.active { display: block; }

.section-title {
    font-size: var(--fs-lg);
    font-weight: 800;
    color: var(--brand-black);
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

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

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

/* ─── KPI Dashboard ──────────────────────────────────────────────────────── */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.kpi-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 20px 18px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--brand-border);
    transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.kpi-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.loading-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90px;
}

.kpi-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #e0e0e0;
    border-top-color: #C8312B;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.kpi-icon { font-size: var(--fs-2xl); margin-bottom: 6px; }
.kpi-value { font-size: var(--fs-2xl); font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; }
.kpi-value-currency { font-size: var(--fs-lg); line-height: 1.35; }
.kpi-label { font-size: var(--fs-sm); color: #666; margin-top: 6px; font-weight: 500; }

.dashboard-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.entity-chart-box, .recent-activity-box {
    background: white;
    border-radius: var(--radius-md);
    padding: 22px;
    border: 1px solid var(--brand-border);
    box-shadow: var(--shadow-xs);
}

.entity-chart-box h3, .recent-activity-box h3 {
    font-size: var(--fs-base);
    font-weight: 700;
    color: #444;
    margin-bottom: 14px;
}

.entity-bar-row { margin-bottom: 14px; }
.entity-bar-label { font-size: var(--fs-sm); font-weight: 600; color: #555; margin-bottom: 4px; }
.entity-bar-track {
    height: 10px;
    background: #e8e8e8;
    border-radius: 5px;
    overflow: hidden;
    display: flex;
}
.entity-bar-fill { height: 100%; transition: width 0.5s; }
.active-fill { background: #C8312B; }
.completed-fill { background: #43a047; }
.entity-bar-counts { display: flex; gap: 12px; margin-top: 4px; font-size: var(--fs-sm); }
.ebc-active { color: #C8312B; font-weight: 600; }
.ebc-done { color: #43a047; font-weight: 600; }

.recent-proc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--brand-gray);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    cursor: pointer;
    border: 1px solid var(--brand-border);
    transition: box-shadow var(--transition-fast), background var(--transition-fast);
}
.recent-proc-row:hover { box-shadow: var(--shadow-sm); background: white; }
.rp-name { font-weight: 600; font-size: var(--fs-base); color: #333; display: block; }
.rp-meta { font-size: var(--fs-sm); color: #888; }
.rp-right { display: flex; align-items: center; gap: 8px; }
.mini-progress { width: 60px; height: 6px; background: #e0e0e0; border-radius: 3px; overflow: hidden; }
.mini-progress-fill { height: 100%; background: var(--brand-red); border-radius: 3px; }
.rp-pct { font-size: var(--fs-sm); color: #888; min-width: 30px; }

.no-data { color: #aaa; font-size: var(--fs-base); text-align: center; padding: 20px 0; }

/* ─── Templates ──────────────────────────────────────────────────────────── */

.templates-list { display: flex; flex-direction: column; gap: 16px; }

.template-card {
    background: white;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-md);
    padding: 20px;
    transition: box-shadow var(--transition-base);
    box-shadow: var(--shadow-xs);
}
.template-card:hover { box-shadow: var(--shadow-md); }

.tpl-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.tpl-name { font-size: var(--fs-md); font-weight: 700; color: #333; margin-right: 10px; }
.tpl-actions { display: flex; gap: 6px; }
.btn-icon {
    background: none;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: var(--fs-base);
    transition: background 0.2s;
}
.btn-icon:hover { background: #f0f0f0; }
.btn-icon.btn-danger:hover { background: #fce8e8; border-color: #f5c6c6; }

.tpl-entities { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }

.entity-chip {
    background: #F0EDEC;
    color: var(--brand-black);
    padding: 3px 10px;
    border-radius: 3px;
    font-size: var(--fs-sm);
    font-weight: 600;
    border: 1px solid var(--brand-border);
}

.tpl-desc { color: #666; font-size: var(--fs-base); margin-bottom: 10px; }
.tpl-steps-summary { font-size: var(--fs-sm); color: #888; margin-bottom: 10px; }

.tpl-steps-list { border-top: 1px solid #f0f0f0; padding-top: 10px; }
.tpl-step-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #f8f8f8;
    font-size: var(--fs-sm);
}
.step-order {
    background: #C8312B;
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-xs);
    font-weight: 700;
    flex-shrink: 0;
}
.step-name { font-weight: 600; color: #333; flex: 1; }
.step-owner { color: #888; }
.step-due { color: #fb8c00; font-weight: 600; font-size: var(--fs-sm); }

/* ─── Template Modal ─────────────────────────────────────────────────────── */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 1000;
    padding: 40px 20px;
    overflow-y: auto;
}

.modal {
    background: white;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 680px;
    box-shadow: var(--shadow-xl);
}

.modal-wide { max-width: 780px; }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e8e8e8;
}

.modal-header h3 { font-size: var(--fs-lg); font-weight: 700; color: #333; }

.modal-close {
    background: none;
    border: none;
    font-size: var(--fs-lg);
    cursor: pointer;
    color: #888;
    padding: 4px 8px;
    border-radius: 6px;
}
.modal-close:hover { background: #f0f0f0; color: #333; }

.modal-body { padding: 24px; max-height: 80vh; overflow-y: auto; }

.idea-reassign-flow {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
}

.idea-reassign-person {
    min-width: 0;
}

.idea-reassign-label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7280;
}

.idea-reassign-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fbfcfe;
    border: 1px solid #ebeef3;
    border-radius: 16px;
}

.idea-reassign-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fde7e6;
    color: var(--brand-red);
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}

.idea-reassign-name {
    font-size: var(--fs-base);
    font-weight: 700;
    color: #111827;
}

.idea-reassign-meta {
    font-size: var(--fs-sm);
    color: #6b7280;
}

.idea-reassign-arrow {
    font-size: 22px;
    font-weight: 800;
    color: var(--brand-red);
}

.checkbox-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding: 8px 0;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: var(--fs-base);
}

.steps-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    margin-top: 16px;
}
.steps-header label { font-weight: 600; color: #333; }

.btn-add-step {
    background: var(--brand-red);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 14px;
    font-size: var(--fs-base);
    font-weight: 600;
    cursor: pointer;
}
.btn-add-step:hover { background: var(--brand-dark-red); }

.steps-container { display: flex; flex-direction: column; gap: 12px; }

.step-row {
    display: flex;
    gap: 12px;
    background: var(--brand-gray);
    border-radius: 6px;
    padding: 14px;
    border: 1px solid var(--brand-border);
    align-items: flex-start;
}

.step-row-num {
    background: #C8312B;
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-sm);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 8px;
}

.step-row-fields { flex: 1; }

.btn-remove-step {
    background: none;
    border: 1px solid #e8b8b8;
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    color: #c62828;
    font-size: var(--fs-base);
    flex-shrink: 0;
    margin-top: 8px;
}
.btn-remove-step:hover { background: #fce8e8; }

/* ─── Processes ──────────────────────────────────────────────────────────── */

.filter-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.filter-group select {
    padding: 9px 14px;
    border: 1.5px solid var(--brand-border);
    border-radius: var(--radius-sm);
    font-size: var(--fs-base);
    background: white;
    transition: border-color var(--transition-fast);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--brand-red);
}

.processes-list { display: flex; flex-direction: column; gap: 14px; }

.process-card {
    background: white;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-md);
    padding: 18px 22px;
    cursor: pointer;
    transition: box-shadow var(--transition-base), transform var(--transition-base);
    box-shadow: var(--shadow-xs);
}
.process-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.proc-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.proc-emp-name { font-size: var(--fs-md); font-weight: 700; color: #333; }
.proc-role { font-size: var(--fs-sm); color: #888; margin-left: 8px; }
.proc-meta-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.proc-date { font-size: var(--fs-sm); color: #888; }
.overdue-warn { font-size: var(--fs-sm); color: #e53935; font-weight: 600; }

.progress-bar-track {
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    flex: 1;
}
.progress-bar-fill {
    height: 100%;
    background: var(--brand-red);
    border-radius: 4px;
    transition: width 0.4s;
}
.proc-progress-row { display: flex; align-items: center; gap: 12px; }
.progress-label { font-size: var(--fs-sm); color: #888; white-space: nowrap; }

/* ─── Status Badges ──────────────────────────────────────────────────────── */

.proc-status-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: var(--fs-xs);
    font-weight: 700;
}
.proc-status-badge.in_progress { background: #e3f2fd; color: #1565c0; }
.proc-status-badge.completed   { background: #e8f5e9; color: #2e7d32; }
.proc-status-badge.cancelled   { background: #fce4ec; color: #880e4f; }
.proc-status-badge.pending     { background: #fff8e1; color: #e65100; }

.ob-badge  { background: #e3f2fd; color: #1565c0; }
.off-badge { background: #fce4ec; color: #880e4f; }

.step-status-badge {
    padding: 2px 9px;
    border-radius: 10px;
    font-size: var(--fs-xs);
    font-weight: 700;
}
.step-status-badge.pending     { background: #fff8e1; color: #e65100; }
.step-status-badge.in_progress { background: #e3f2fd; color: #1565c0; }
.step-status-badge.completed   { background: #e8f5e9; color: #2e7d32; }
.step-status-badge.overdue     { background: #fce4ec; color: #b71c1c; }

/* ─── Process Detail Modal ───────────────────────────────────────────────── */

.proc-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    background: var(--brand-gray);
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 16px;
}
.pdm-item { display: flex; flex-direction: column; gap: 3px; min-width: 120px; }
.pdm-item strong { font-size: var(--fs-xs); color: #888; text-transform: uppercase; }

.proc-detail-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font-size: var(--fs-base); color: #555; }

.proc-steps-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

.proc-step-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #e8e8e8;
    background: white;
    gap: 10px;
}
.proc-step-row.completed { border-color: #c8e6c9; background: #f9fff9; }
.proc-step-row.overdue   { border-color: #ffcdd2; background: #fff9f9; }
.proc-step-row.in_progress { border-color: #bbdefb; background: #f8fbff; }

.psr-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.psr-info { min-width: 0; }
.psr-name { font-weight: 600; color: #333; font-size: var(--fs-base); }
.psr-desc { font-size: var(--fs-sm); color: #888; margin-top: 2px; }
.psr-meta { font-size: var(--fs-sm); color: #aaa; margin-top: 3px; }
.psr-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.psr-actions { display: flex; gap: 6px; }

.btn-sm {
    padding: 4px 10px;
    border: none;
    border-radius: 6px;
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.btn-sm:hover { opacity: 0.85; }
.btn-success { background: #43a047; color: white; }
.btn-warn    { background: #fb8c00; color: white; }

.proc-detail-footer {
    border-top: 1px solid #eee;
    padding-top: 14px;
    text-align: right;
}
.btn-secondary {
    background: white;
    border: 1.5px solid var(--brand-border);
    color: var(--brand-text);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.btn-secondary:hover { border-color: var(--brand-red); color: var(--brand-red); box-shadow: var(--shadow-sm); }

/* ─── New Process Form ───────────────────────────────────────────────────── */

.new-process-form-wrap {
    max-width: 700px;
}

.template-preview {
    background: #FDF3F2;
    border: 1px solid #F2C5C3;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 20px;
}
.template-preview h4 { font-size: var(--fs-base); color: var(--brand-red); margin-bottom: 8px; }
.template-preview p  { font-size: var(--fs-sm); color: #555; margin-bottom: 10px; }
.preview-steps { display: flex; flex-direction: column; gap: 6px; }
.preview-step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--fs-sm);
    color: #444;
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */

.btn-primary {
    background: var(--brand-red);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 10px 22px;
    font-size: var(--fs-base);
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
    letter-spacing: 0.02em;
}
.btn-primary:hover { background: var(--brand-dark-red); box-shadow: 0 3px 12px rgba(200,49,43,0.25); transform: translateY(-1px); }

/* ─── Responsive overrides for Onboarding ───────────────────────────────── */

@media (max-width: 768px) {
    .dashboard-bottom { grid-template-columns: 1fr; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .section-header { flex-direction: column; align-items: flex-start; }
    .modal-overlay { padding: 0; align-items: flex-end; }
    .modal, .modal-wide { max-width: 100%; border-radius: 8px 8px 0 0; }
    .ob-section { padding: 20px; }
    .sub-tabs { padding: 0 16px; }
    .sub-tab-btn { padding: 10px 12px; font-size: var(--fs-sm); }
}

/* ─── Trainings ──────────────────────────────────────────────────────────── */

/* Employee Table */
.emp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
}
.emp-table th {
    text-align: left;
    padding: 11px 14px;
    background: var(--brand-gray);
    color: var(--brand-muted);
    font-weight: 600;
    border-bottom: 1px solid var(--brand-border);
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.emp-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--brand-border);
    color: var(--brand-text);
}
.emp-table tr:hover td { background: #fafbfc; }

/* Assign employees grid */
.assign-employees-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
}
.emp-assign-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background 0.2s;
    font-size: var(--fs-base);
}
.emp-assign-checkbox:hover { background: #f5f5f5; }
.emp-assign-checkbox input[type="checkbox"] { flex-shrink: 0; }

/* Training section type badges */
.tr-sec-type-badge {
    font-size: var(--fs-lg);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e8f4f8;
    flex-shrink: 0;
    margin-top: 8px;
}
.tr-sec-type-badge.text    { background: #e8f5e9; }
.tr-sec-type-badge.image   { background: #fce4ec; }
.tr-sec-type-badge.quiz    { background: #fff8e1; }

/* Quiz option row in editor */
.quiz-options { display: flex; flex-direction: column; gap: 8px; }
.quiz-option-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.quiz-option-row input[type="text"] {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: var(--fs-base);
}
.quiz-option-row input[type="radio"] { flex-shrink: 0; }

/* Take Training view */
.take-training-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.training-sections { display: flex; flex-direction: column; gap: 20px; }

.training-section {
    border-radius: 10px;
    padding: 18px;
}
.text-section {
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
}
.image-section {
    background: #f0f9ff;
    border: 1px solid #b3e5fc;
    text-align: center;
}
.quiz-section {
    background: #fffde7;
    border: 1px solid #fff176;
}

.training-text-content {
    color: #333;
    line-height: 1.7;
    font-size: var(--fs-base);
}

.training-image {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    margin-bottom: 8px;
}
.training-image-caption {
    font-size: var(--fs-sm);
    color: #666;
    font-style: italic;
}

.quiz-question {
    font-weight: 700;
    color: #333;
    font-size: var(--fs-base);
    margin-bottom: 14px;
}
.quiz-options-display { display: flex; flex-direction: column; gap: 8px; }
.quiz-option-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: white;
    cursor: pointer;
    font-size: var(--fs-base);
    transition: background 0.2s;
}
.quiz-option-display:hover:not(.correct):not(.wrong) { background: #f5f5f5; }
.quiz-option-display.correct { background: #e8f5e9; border-color: #a5d6a7; color: #2e7d32; font-weight: 600; }
.quiz-option-display.wrong   { background: #fce4ec; border-color: #f48fb1; color: #c62828; text-decoration: line-through; }

/* Not-started status badge */
.proc-status-badge.not_started { background: #f3e5f5; color: #6a1b9a; }

/* ─── IT Landscape ───────────────────────────────────────────────────────── */

.it-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.it-tool-card {
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: box-shadow var(--transition-base), transform var(--transition-base);
    box-shadow: var(--shadow-xs);
}

.it-tool-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.it-tool-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.it-tool-name {
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--brand-black);
    line-height: 1.3;
}

.it-tool-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.it-dept-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
    white-space: nowrap;
}

.it-status-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: var(--fs-xs);
    font-weight: 600;
    white-space: nowrap;
}

.it-tool-vendor {
    font-size: var(--fs-sm);
    color: var(--brand-muted);
    font-weight: 500;
}

.it-tool-desc {
    font-size: var(--fs-sm);
    color: var(--brand-text);
    line-height: 1.5;
    flex: 1;
}

.it-tool-people {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-size: var(--fs-sm);
    color: var(--brand-muted);
}

.it-tool-people strong {
    color: var(--brand-text);
    font-weight: 600;
}

.it-tool-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--brand-border);
}

.it-tool-cost {
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.it-cost-value {
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--brand-black);
}

.it-cost-cycle {
    font-size: var(--fs-sm);
    color: var(--brand-muted);
}

.it-tool-meta {
    font-size: var(--fs-sm);
    color: var(--brand-muted);
    background: var(--brand-gray);
    border: 1px solid var(--brand-border);
    border-radius: 4px;
    padding: 2px 8px;
}

.it-tool-actions {
    display: flex;
    gap: 12px;
    padding-top: 8px;
}

.btn-link {
    background: none;
    border: none;
    padding: 0;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--brand-red);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.btn-link:hover { color: var(--brand-dark-red); }

.btn-link-danger { color: #b71c1c; }
.btn-link-danger:hover { color: #7f0000; }

/* Dashboard department rows */
.ls-dept-row {
    display: flex;
    flex-wrap: wrap; /* 1.13.0: German rows are longer; the amount wraps instead of running past the edge */
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--brand-border);
}

.ls-dept-row:last-child { border-bottom: none; }

.ls-dept-count {
    font-size: var(--fs-sm);
    color: var(--brand-muted);
    flex: 1;
}

.ls-dept-cost {
    margin-left: auto;
    white-space: nowrap;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--brand-black);
}

/* Tools overview rows */
.ls-overview-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--brand-border);
}

.ls-overview-row:last-child { border-bottom: none; }

.ls-overview-name {
    font-size: var(--fs-sm);
    color: var(--brand-text);
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ls-overview-cost {
    margin-left: auto;
    font-size: var(--fs-sm);
    color: var(--brand-muted);
    white-space: nowrap;
}

.ls-filter-input {
    flex: 2;
    min-width: 180px;
    padding: 8px 12px;
    border: 2px solid var(--brand-border);
    border-radius: 6px;
    font-size: var(--fs-base);
}

.ls-filter-select {
    flex: 1;
    min-width: 140px;
    padding: 8px 12px;
    border: 2px solid var(--brand-border);
    border-radius: 6px;
    font-size: var(--fs-base);
}

@media (max-width: 768px) {
    .emp-table th, .emp-table td { padding: 8px; font-size: var(--fs-sm); }
    .emp-table th:nth-child(4), .emp-table td:nth-child(4),
    .emp-table th:nth-child(5), .emp-table td:nth-child(5) { display: none; }
    .it-tools-grid { grid-template-columns: 1fr; }
}

/* ─── IT Asset Inventory ─────────────────────────────────────────────────────── */

.asset-table-wrapper {
    overflow: hidden;
    border-radius: var(--radius-md);
    border: 1px solid var(--brand-border);
    box-shadow: var(--shadow-xs);
}

.asset-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.asset-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
    background: #fff;
}

.asset-table thead {
    background: var(--brand-gray);
}

.asset-table th {
    padding: 11px 14px;
    text-align: left;
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--brand-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    border-bottom: 1px solid var(--brand-border);
}

/* H117-2/H121-H9/1.28.0: table header words are longer in German than
   English; let them wrap at word boundaries instead of forcing the table
   wider than its box (1440px). */
.op-table th,
.ec-table th,
.mtg-table th,
.eval-table th,
.po-table th {
    white-space: normal;
}

/* 1.28.0 round 5: single-word German headers (GESCHÄFTSBEREICH, GESELLSCHAFTEN,
   KRITIKALITÄT) have no space to wrap at, so white-space: normal above cannot
   shrink them below the word's own width. Rounds 2-3 tried hyphens: auto (did not
   actually hyphenate in headless Edge) and overflow-wrap: anywhere (did shrink the
   column, but broke headers at arbitrary letters — "GESE/LL-/SCHA/FTEN",
   "ÜBERPRÜFUN/G" — which looked broken). Round 4 put an explicit soft hyphen
   (U+00AD) at a sensible syllable point into the German value of the three
   offending headers (public/i18n-de.js, process-table|… keys); hyphens: manual
   here tells the browser to break ONLY at that soft hyphen (or at a space, as
   white-space: normal already allows) — no mid-word breaks anywhere else.
   Tighter horizontal cell padding buys the rest of the room without a smaller
   font or a removed column. Scoped to .po-table only; same (0,1,1) specificity
   as the shared .asset-table th/td rules above, so source order (this block
   comes after) decides the padding-left/right override (1.23.0 lesson). */
.po-table th {
    hyphens: manual;
}

.po-table th,
.po-table td {
    padding-left: 10px;
    padding-right: 10px;
}

/* 1.28.0 round 5: the criticality dot + label wrapped onto two lines once the
   column narrowed; keep them on one line like the other icon/text pairs in this
   table (e.g. the status badge, which is a single inline-block so it never had
   this problem). */
.po-table .po-criticality-cell {
    white-space: nowrap;
}

.asset-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--brand-border);
    vertical-align: middle;
    color: var(--brand-text);
}

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

.asset-table tbody tr:hover {
    background: #fafaf9;
}

.asset-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.asset-type-icon {
    font-size: var(--fs-lg);
    flex-shrink: 0;
    line-height: 1;
}

.asset-name {
    font-weight: 600;
    color: var(--brand-black);
    font-size: var(--fs-base);
}

.asset-tag {
    font-size: var(--fs-sm);
    color: var(--brand-muted);
    font-family: monospace;
    background: var(--brand-gray);
    border: 1px solid var(--brand-border);
    border-radius: 3px;
    padding: 1px 5px;
    display: inline-block;
    margin-top: 2px;
}

.asset-assigned-name {
    font-weight: 500;
    color: var(--brand-text);
    font-size: var(--fs-base);
}

.asset-assigned-email {
    font-size: var(--fs-sm);
    color: var(--brand-muted);
    margin-top: 2px;
}

.asset-unassigned {
    color: var(--brand-muted);
}

.asset-status-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: var(--fs-xs);
    font-weight: 600;
    white-space: nowrap;
}

.asset-condition-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: var(--fs-xs);
    font-weight: 600;
    white-space: nowrap;
}

/* CRM import preview (1.29.0): possible-duplicate cards above the table,
   spec 2026-10-13-crm-contact-import-checks-design.md D6. Values copied from
   the approved mockup's variant-b.css. Desktop only. */
.cim-summary-line { font-size: 14px; color: #333; margin-bottom: 4px; }
.cim-summary-line b { font-weight: 700; }
.cim-dup-section { margin-bottom: 18px; }
.cim-dup-section h4 { font-size: 14px; font-weight: 700; color: #92400e; margin-bottom: 10px; }
.cim-dup-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid #f59e0b;
    background: #fffbeb;
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}
.cim-dup-col { padding: 12px 16px; }
.cim-dup-col + .cim-dup-col { border-left: 1px dashed #f3d9a4; }
.cim-dup-col h5 { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #92400e; margin-bottom: 6px; font-weight: 700; }
.cim-dup-field { font-size: 13px; color: #333; margin-bottom: 3px; }
.cim-dup-field b { font-weight: 600; }
.cim-dup-diff { color: #b45309; font-weight: 700; }
.cim-dup-radios {
    grid-column: 1 / -1;
    padding: 10px 16px;
    border-top: 1px solid #f3d9a4;
    background: #fff8e6;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cim-dup-radio-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.cim-dup-radio-row select {
    padding: 4px 8px; border: 1.5px solid var(--brand-border); border-radius: 6px; font-size: 12px; font-family: inherit; margin-left: 6px;
}
.cim-table-review-note { color: #92400e; font-size: 12px; font-style: italic; }
.cim-row-note { display: block; }
.cim-table-scroll { max-height: 60vh; overflow: auto; margin-top: 10px; }

/* 1.33.0: the import notice box (same tokens as .cim-dup-card). */
.cim-notice-box { margin-top: 10px; padding: 10px 12px; border: 1px solid #f59e0b; background: #fffbeb; border-radius: 8px; color: #92400e; font-size: 13px; line-height: 1.45; }

/* 1.33.0: the import buttons stay visible at the bottom of the window while the preview scrolls.
   .modal-body has its own 24px bottom padding; bottom: 0 alone leaves that 24px uncovered by this
   element's own box, so a scrolled table row can show through it (measured in a real browser).
   bottom: -24px moves the stuck position down by that padding; padding-bottom grows by the same
   24px so the strip's own opaque background covers it; margin-bottom: -24px cancels that padding's
   contribution to layout, so the modal's size/position is unchanged when the preview doesn't scroll. */
#crm-import-actions { position: sticky; bottom: -24px; background: #fff; padding: 12px 0 36px; margin-bottom: -24px; border-top: 1px solid var(--brand-border); }

.asset-warranty-cell {
    white-space: nowrap;
    font-size: var(--fs-sm);
}

.asset-warranty-expired {
    color: #b71c1c;
    font-weight: 600;
}

.asset-warranty-soon {
    color: #f57f17;
    font-weight: 600;
}

/* Dashboard KPI breakdown rows */
.asset-kpi-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid var(--brand-border);
}

.asset-kpi-row:last-child {
    border-bottom: none;
}

.asset-kpi-icon {
    font-size: var(--fs-md);
    flex-shrink: 0;
    width: 22px;
    text-align: center;
}

.asset-kpi-label {
    font-size: var(--fs-sm);
    color: var(--brand-text);
    min-width: 120px;
    flex-shrink: 0;
}

.asset-kpi-bar-wrap {
    flex: 1;
    background: var(--brand-gray);
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}

.asset-kpi-bar {
    height: 100%;
    background: var(--brand-red);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.asset-kpi-bar-dept {
    background: #1565c0;
}

.asset-kpi-count {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--brand-black);
    min-width: 24px;
    text-align: right;
}

/* Warning KPI card */
.kpi-card-warn {
    border-color: #ffe082;
    background: #fffde7;
}

.kpi-card-warn .kpi-value {
    color: #f57f17;
}

/* Dashboard three-column bottom for assets */
#assets-tab .dashboard-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-top: 24px;
}

@media (max-width: 900px) {
    #assets-tab .dashboard-bottom {
        grid-template-columns: 1fr;
    }
    .asset-table th:nth-child(4),
    .asset-table td:nth-child(4) { display: none; }
}

/* ─── Skills & Talent Module ────────────────────────────────────────────────── */

/* Dashboard three-column bottom for skills */
#skills-tab .dashboard-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-top: 24px;
}

@media (max-width: 900px) {
    #skills-tab .dashboard-bottom {
        grid-template-columns: 1fr;
    }
    .asset-table .skills-hide-mobile { display: none; }
}

/* Skill tags in table cell */
.skill-tags-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    max-width: 280px;
}

.skill-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: var(--fs-xs);
    font-weight: 600;
    white-space: nowrap;
}

.skill-tag-more {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: var(--fs-xs);
    font-weight: 600;
    background: var(--brand-gray);
    color: var(--brand-muted);
    white-space: nowrap;
}

/* Count badge used in dashboard charts */
.skills-count-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: var(--fs-xs);
    font-weight: 700;
    min-width: 28px;
    text-align: center;
    flex-shrink: 0;
}

/* Add-skill row inside the profile modal */
.sp-add-skill-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

.sp-add-skill-row .ls-filter-input,
.sp-add-skill-row .ls-filter-select {
    min-width: 0;
}

/* Skill list inside profile modal */
.sp-skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 32px;
    padding: 6px 0;
}

.sp-no-skills {
    color: var(--brand-muted);
    font-size: var(--fs-sm);
    font-style: italic;
}

.sp-skill-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--brand-gray);
    border: 1px solid var(--brand-border);
    border-radius: 6px;
    padding: 4px 8px;
}

.sp-skill-cat {
    font-size: var(--fs-xs);
    color: var(--brand-muted);
}

.sp-skill-level {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--brand-muted);
}

.sp-remove-skill {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--brand-muted);
    font-size: var(--fs-sm);
    padding: 0 2px;
    line-height: 1;
}

.sp-remove-skill:hover {
    color: var(--brand-red);
}

/* ─── CRM Contacts ──────────────────────────────────────────────────────────── */

.crm-type-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: var(--fs-xs);
    font-weight: 600;
    white-space: nowrap;
}

.crm-email-link {
    color: var(--brand-red);
    text-decoration: none;
    font-size: var(--fs-sm);
}

.crm-email-link:hover {
    text-decoration: underline;
}

/* ─── Sales Pipeline Kanban ─────────────────────────────────────────────────── */

.pipeline-kpi-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.pipeline-kpi-row .kpi-card {
    flex: 1 1 140px;
    min-width: 120px;
}

/* 1.15.0: the two money tiles get twice the room, and an amount never wraps inside itself
   ("CHF / 245,000" at 1440 px). */
.pipeline-kpi-row .kpi-card-money {
    flex: 2 1 200px;
}

.pipeline-kpi-row .kpi-amount {
    white-space: nowrap;
}

.pipeline-kanban {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    align-items: flex-start;
}

.pipeline-column {
    flex: 0 0 220px;
    min-width: 200px;
    background: var(--brand-gray);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--brand-border);
    display: flex;
    flex-direction: column;
}

.pipeline-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    color: #fff;
    font-weight: 700;
    font-size: var(--fs-sm);
}

.pipeline-col-title {
    font-weight: 700;
    letter-spacing: 0.01em;
}

.pipeline-col-count {
    background: rgba(255,255,255,0.25);
    border-radius: 12px;
    padding: 1px 8px;
    font-size: var(--fs-xs);
    font-weight: 700;
}

.pipeline-col-value {
    padding: 4px 14px 6px;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--brand-muted);
    border-bottom: 1px solid var(--brand-border);
    background: #fff;
}

.pipeline-col-cards {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 60px;
}

.pipeline-deal-card {
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    cursor: pointer;
    transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
}

.pipeline-deal-card:hover {
    box-shadow: var(--shadow-sm);
    border-color: #c8b8b8;
}

.deal-card-title {
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--brand-black);
    line-height: 1.3;
    margin-bottom: 3px;
}

.deal-card-company,
.deal-card-party { /* 1.15.0: "via <contracting party>" under the end client */
    font-size: var(--fs-xs);
    color: var(--brand-muted);
    margin-bottom: 2px;
}

.deal-card-contact {
    font-size: var(--fs-xs);
    color: var(--brand-muted);
    margin-bottom: 4px;
}

.deal-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}

.deal-card-value {
    font-weight: 700;
    font-size: var(--fs-sm);
    color: var(--brand-black);
}

/* 1.20.0: a deal's amount in the pipeline currency, its own amount in grey below (spec C4). */
.deal-amount-stack { display: inline-flex; flex-direction: column; line-height: 1.3; }
.deal-amount, .deal-amount-own { white-space: nowrap; }
.deal-amount-own { color: var(--brand-muted); font-weight: 400; font-size: var(--fs-xs); }

/* 1.34.0: the converted value under the count on the On Hold tile (board row and Pipeline Dashboard). */
.pipeline-kpi-row .kpi-sub, #pipeline-dash-kpi-cards .kpi-sub { font-size: var(--fs-sm); color: var(--brand-muted); font-weight: 600; margin-top: 4px; white-space: nowrap; }

/* 1.34.0: the foot of a Won or Lost column: "n in archive" opens the Archive tab (dark red #9B2119 on white, 8.0:1). */
.pipeline-col-foot { padding: 8px 14px; border-top: 1px solid var(--brand-border); background: #fff; font-size: var(--fs-xs); }
.pipeline-archive-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--brand-dark-red); text-decoration: underline; cursor: pointer; }

/* 1.34.0: the Archive tab (spec "Archiv tab", mockup B-archive-de-1440.png). The table fits 1440 px
   without a sideways scroll (measured 1110 of 1110 px in the mockup), so German header words wrap. */
.archive-intro { font-size: var(--fs-sm); color: var(--brand-muted); margin: -4px 0 14px; max-width: 100ch; }
.archive-filters { margin-bottom: 16px; flex-wrap: wrap; gap: 10px; align-items: center; }
.archive-search { flex: none; width: 280px; }
.archive-range { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--brand-muted); font-weight: 600; flex-wrap: nowrap; white-space: nowrap; }
.archive-date { flex: none; min-width: 0; width: 150px; padding: 6px 10px; font-size: var(--fs-sm); }
.filter-bar select.archive-reason { flex: none; width: 210px; max-width: 210px; padding: 6px 10px; font-size: var(--fs-sm); height: 36px; }
.archive-count { font-size: var(--fs-sm); color: var(--brand-muted); margin: 0 0 8px; }
.archive-table th { white-space: normal; }
.archive-row { cursor: pointer; }
.archive-row:hover { background: var(--brand-gray); }

/* 1.34.0: the help line under the loss reason in the deal window (spec "Deal window", mockup deal-window-lost). */
.deal-field-help { display: block; margin-top: 6px; font-size: var(--fs-xs); color: var(--brand-muted); }

/* 1.30.0: the stage chips above the All Deals filters (spec S7, mockup C). The pressed
   state is aria-pressed only; the focus ring comes from the global button:focus-visible. */
.pipeline-stage-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pipeline-stage-chips-label { font-size: var(--fs-sm); color: var(--brand-muted); font-weight: 600; margin-right: 4px; }
.pipeline-stage-chip {
    height: 30px; padding: 0 14px; border-radius: 15px; border: 1px solid var(--brand-border);
    background: #fff; color: var(--brand-text); font-size: var(--fs-sm); font-weight: 600; font-family: inherit;
    white-space: nowrap; cursor: pointer; display: inline-flex; align-items: center; box-sizing: border-box;
}
.pipeline-stage-chip:hover { border-color: #c9ced8; }
.pipeline-stage-chip[aria-pressed="true"] { background: var(--brand-red); border-color: var(--brand-red); color: #fff; }

.deal-card-prob {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--brand-muted);
    background: var(--brand-gray);
    border-radius: 4px;
    padding: 1px 6px;
}

.deal-card-date {
    font-size: var(--fs-xs);
    color: var(--brand-muted);
    margin-top: 4px;
}

.pipeline-empty-col {
    color: var(--brand-muted);
    font-size: var(--fs-xs);
    text-align: center;
    padding: 16px 8px;
}

@media (max-width: 768px) {
    .pipeline-kanban {
        flex-direction: column;
    }
    .pipeline-column {
        flex: none;
        width: 100%;
        min-width: 0;
    }
}

/* ─── Pipeline Dashboard ────────────────────────────────────────────────────── */

.sortable-th {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.sortable-th:hover {
    background: var(--bg-alt, #f4f6fa);
}

.sort-icon {
    margin-left: 4px;
    opacity: 0.35;
    font-size: 0.75em;
}

.sort-icon-active {
    opacity: 1;
    color: var(--accent, #1565c0);
}

.pipeline-spotlight-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 4px;
}

.pipeline-spotlight-card {
    border: 1px solid var(--border-light, #e2e8f0);
    border-radius: 10px;
    padding: 14px;
    background: var(--bg-card, #fff);
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.1s;
}

.pipeline-spotlight-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    transform: translateY(-1px);
}

.spotlight-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.spotlight-tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    letter-spacing: 0.01em;
}

.spotlight-card-title {
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--brand-text);
    margin-bottom: 2px;
    line-height: 1.35;
}

.spotlight-card-company {
    font-size: var(--fs-xs);
    color: var(--brand-muted);
    margin-bottom: 8px;
}

.spotlight-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
    font-size: var(--fs-sm);
}

/* ─── Shared chart bar (CRM dashboard charts) ───────────────────────────────── */

.chart-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.chart-bar-label {
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--brand-text);
    min-width: 80px;
    flex-shrink: 0;
}

.chart-bar-track {
    flex: 1;
    min-width: 80px;
    height: 8px;
    background: var(--brand-border);
    border-radius: 4px;
    overflow: hidden;
}

.chart-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.chart-bar-count {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--brand-muted);
    min-width: 20px;
    text-align: right;
}

/* ─── Recent items list (CRM dashboard recent contacts) ─────────────────────── */

.recent-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--brand-border);
}

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

.recent-item-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.recent-item-name {
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--brand-black);
}

.recent-item-sub {
    font-size: var(--fs-xs);
    color: var(--brand-muted);
    margin-top: 2px;
}

/* ─── Process Ownership Map ─────────────────────────────────────────────────── */

.po-category-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: var(--fs-xs);
    font-weight: 600;
    white-space: nowrap;
}

.po-status-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: var(--fs-xs);
    font-weight: 600;
    white-space: nowrap;
}

.po-status-active   { background: #dcfce7; color: #166534; }
.po-status-inactive { background: #f1f5f9; color: #64748b; }
.po-status-review   { background: #fef9c3; color: #854d0e; }

.po-criticality-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

.po-owner-chip {
    display: inline-block;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--brand-black);
}

.po-backup-chip {
    display: inline-block;
    font-size: var(--fs-xs);
    color: var(--brand-muted);
}

.po-desc-sub {
    font-size: var(--fs-xs);
    color: var(--brand-muted);
    font-weight: 400;
}

.po-owner-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand-border);
    color: var(--brand-black);
    font-weight: 700;
    font-size: var(--fs-sm);
    flex-shrink: 0;
}


.po-entity-badge,
.po-system-badge,
.po-system-role-badge,
.po-step-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: var(--fs-xs);
    font-weight: 600;
    white-space: nowrap;
}

.po-entity-badge {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.po-system-badge {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    margin: 0 6px 6px 0;
}

.po-system-role-badge {
    background: #f5f3ff;
    color: #6d28d9;
    border: 1px solid #ddd6fe;
    margin: 0 6px 6px 0;
}

.po-step-count-badge {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fdba74;
}

.po-badge-stack,
.po-system-stack,
.po-entity-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.po-system-stack.compact,
.po-entity-stack.compact {
    gap: 4px;
}

.po-system-stack.compact .po-system-badge,
.po-entity-stack.compact .po-entity-badge {
    margin: 0;
}

.po-system-entry {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.po-config-section {
    margin: 18px 0;
    padding: 18px;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-md);
    background: #fbfcfe;
}

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

.po-config-header h4 {
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--brand-black);
    margin-bottom: 4px;
}

.po-config-header p,
.section-subtitle,
.po-helper-text {
    font-size: var(--fs-sm);
    color: var(--brand-muted);
}

.po-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.po-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-sm);
    background: white;
}

.po-checkbox-item input {
    accent-color: var(--brand-red);
}

.po-builder-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.po-builder-card {
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--brand-border);
    background: white;
    box-shadow: var(--shadow-xs);
}

.po-builder-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.po-builder-card-title {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--brand-black);
}

.po-inline-note {
    font-size: var(--fs-xs);
    color: var(--brand-muted);
}

.po-empty-builder {
    padding: 18px;
    border: 1px dashed #d1d5db;
    border-radius: var(--radius-sm);
    text-align: center;
    color: var(--brand-muted);
    background: rgba(255, 255, 255, 0.7);
}

.po-builder-card textarea {
    min-height: 78px;
}

.po-mini-input {
    min-height: 44px;
}

.architecture-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-bottom: 16px;
    font-size: var(--fs-sm);
    color: var(--brand-muted);
}

.architecture-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.architecture-shared-dot {
    background: #7c3aed;
}

.architecture-dedicated-dot {
    background: #2563eb;
}

.architecture-wrapper {
    position: relative;
    min-height: 420px;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-lg);
    background: white;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
}

.architecture-stage {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
    gap: 24px;
    padding: 24px;
    min-height: 420px;
}

.architecture-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.architecture-column-title {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--brand-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.architecture-area-card,
.architecture-system-node,
.architecture-process-node {
    border-radius: var(--radius-md);
    border: 1px solid var(--brand-border);
    background: white;
}

.architecture-area-card {
    padding: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
}

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

.architecture-area-title {
    font-size: var(--fs-base);
    font-weight: 700;
    color: var(--brand-black);
}

.architecture-process-list,
.architecture-system-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.architecture-process-node {
    position: relative;
    padding: 14px;
    box-shadow: var(--shadow-xs);
}

.architecture-process-node::after {
    content: '';
    position: absolute;
    right: -9px;
    top: 50%;
    width: 10px;
    height: 2px;
    background: #cbd5e1;
    transform: translateY(-50%);
}

.architecture-process-name,
.architecture-system-name {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--brand-black);
    margin-bottom: 6px;
}

.architecture-process-meta,
.architecture-system-meta {
    font-size: var(--fs-xs);
    color: var(--brand-muted);
    margin-bottom: 8px;
}

.architecture-system-node {
    padding: 14px;
    border-left: 4px solid var(--system-accent, #2563eb);
    box-shadow: var(--shadow-xs);
}

.architecture-system-node.shared {
    background: linear-gradient(180deg, #faf5ff 0%, #ffffff 100%);
}

.architecture-system-node .po-system-role-badge {
    margin: 0;
}

.architecture-connections {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.architecture-connection {
    fill: none;
    stroke-width: 2;
    opacity: 0.55;
}

.architecture-connection.shared {
    stroke-width: 3;
    opacity: 0.78;
}

.architecture-empty,
.architecture-empty-area {
    padding: 28px;
    color: var(--brand-muted);
    text-align: center;
}

.architecture-empty-area {
    border: 1px dashed #d1d5db;
    border-radius: var(--radius-sm);
    background: #f8fafc;
}

@media (max-width: 1100px) {
    .architecture-stage {
        grid-template-columns: 1fr;
    }

    .architecture-connections {
        display: none;
    }
}

/* ─── Architecture Warnings ────────────────────────────────────────────────── */

.architecture-warning-dot {
    background: #f59e0b;
}

.architecture-filter-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: var(--fs-xs);
    color: var(--brand-muted);
    cursor: pointer;
    margin-left: 12px;
}

.architecture-filter-label input[type="checkbox"] {
    cursor: pointer;
}

.architecture-process-warning {
    border-color: #f59e0b !important;
    background: #fffbeb !important;
}

.architecture-warning-icon {
    margin-right: 4px;
    font-size: 14px;
}

.architecture-warning-banner {
    margin-top: 8px;
    padding: 6px 10px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s;
}

.architecture-warning-banner:hover {
    background: #fde68a;
}

.architecture-warning-text {
    font-size: var(--fs-xs);
    color: #92400e;
    font-weight: 500;
}

.architecture-system-inactive {
    border-color: #f59e0b !important;
    background: #fffbeb !important;
}

.architecture-status-warn {
    color: #dc2626;
    font-weight: 600;
}

.arch-detail-section {
    margin-bottom: 16px;
}

.arch-detail-section h4 {
    margin: 0 0 8px;
    font-size: var(--fs-sm);
    font-weight: 700;
}

.arch-detail-row {
    font-size: var(--fs-sm);
    margin-bottom: 4px;
}

.arch-detail-system-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #fef3c7;
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    font-size: var(--fs-sm);
}

/* ─── Admin Configuration ──────────────────────────────────────────────────── */

.admin-config-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.admin-config-tab-btn {
    padding: 6px 14px;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-sm);
    background: white;
    font-size: var(--fs-sm);
    cursor: pointer;
    transition: all 0.15s;
}

.admin-config-tab-btn:hover {
    background: var(--brand-bg-light);
}

.admin-config-tab-btn.active {
    background: var(--brand-red);
    color: white;
    border-color: var(--brand-red);
}

.admin-config-panel {
    background: white;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-md);
    padding: 20px;
}

.admin-config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.admin-config-header h3 {
    margin: 0;
    font-size: var(--fs-lg);
    font-weight: 700;
}

.admin-config-add-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--brand-bg-light);
    border-radius: var(--radius-sm);
}

.admin-config-add-form.hidden {
    display: none;
}

.admin-config-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-config-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-sm);
    background: white;
    transition: background 0.1s;
}

.admin-config-item:hover {
    background: var(--brand-bg-light);
}

.admin-config-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-config-item-name {
    font-weight: 600;
    font-size: var(--fs-sm);
}

.admin-config-item-desc {
    font-size: var(--fs-xs);
    color: var(--brand-muted);
}

.admin-config-item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-sm {
    padding: 4px 10px;
    font-size: var(--fs-xs);
}

/* ─── Partnerships ─────────────────────────────────────────────────────────── */

.pship-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: var(--fs-xs);
    font-weight: 700;
    white-space: nowrap;
}

.pship-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: var(--fs-xs);
    font-weight: 600;
}

.pship-status-active  { background: #e8f5e9; color: #2e7d32; }
.pship-status-pending { background: #fff3e0; color: #e65100; }
.pship-status-inactive { background: #f5f5f5; color: #757575; }

/* Partnership logo + notes */
.pship-name-cell { display: flex; align-items: center; gap: 8px; }
.pship-logo-thumb {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 4px;
    background: #fff;
    border: 1px solid var(--border-color, #e0e0e0);
    flex-shrink: 0;
}
.pship-logo-preview { margin-top: 8px; }
.pship-logo-preview img {
    max-height: 60px;
    max-width: 160px;
    object-fit: contain;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 4px;
    background: #fff;
    padding: 4px;
}
.pship-notes-hint { font-size: var(--fs-sm); color: #888; margin: 4px 0; }
.pship-notes-add { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.pship-notes-add .btn-sm { align-self: flex-start; }
.pship-notes-list { display: flex; flex-direction: column; gap: 8px; }
.pship-note {
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 6px;
    padding: 8px 10px;
    background: #fafafa;
}
.pship-note-text { font-size: var(--fs-sm); white-space: pre-wrap; }
.pship-note-meta { font-size: var(--fs-xs); color: #888; margin-top: 4px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pship-note-btn {
    background: none;
    border: none;
    color: var(--primary-color, #C8312B);
    cursor: pointer;
    font-size: var(--fs-xs);
    padding: 0;
    text-decoration: underline;
}

/* ─── Meetings & Todos ──────────────────────────────────────────────────────── */

.mtg-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: var(--fs-xs);
    font-weight: 700;
    white-space: nowrap;
}

.mtg-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: var(--fs-xs);
    font-weight: 600;
}

.mtg-status-upcoming   { background: #e3f2fd; color: #1565c0; }
.mtg-status-completed  { background: #e8f5e9; color: #2e7d32; }
.mtg-status-cancelled  { background: #f5f5f5; color: #757575; }

.mtg-todo-count {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.mtg-todo-open {
    color: #e65100;
    font-weight: 600;
}

.todo-priority-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: var(--fs-xs);
    font-weight: 700;
    white-space: nowrap;
}

.todo-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: var(--fs-xs);
    font-weight: 600;
}

.todo-status-open       { background: #fdecea; color: #c62828; }
.todo-status-inprogress { background: #fff3e0; color: #e65100; }
.todo-status-done       { background: #e8f5e9; color: #2e7d32; }

.todo-row-done td {
    opacity: 0.6;
    text-decoration: line-through;
}

.todo-row-done .action-cell,
.todo-row-done .todo-status-badge,
.todo-row-done .todo-priority-badge {
    text-decoration: none;
}

.todo-overdue {
    color: #c62828;
    font-weight: 600;
}

.mtg-link {
    color: var(--brand-red, #C8312B);
    text-decoration: none;
    font-weight: 600;
}

.mtg-link:hover {
    text-decoration: underline;
}

.modal-lg {
    max-width: 680px;
    width: 95%;
}

.text-muted-sm {
    color: var(--text-muted);
    font-size: var(--fs-xs);
}

/* ─── Meeting Protocols ─────────────────────────────────────────────────────── */

.protocol-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: var(--fs-xs);
    font-weight: 600;
    white-space: nowrap;
}

.protocol-content-area {
    font-family: inherit;
    resize: vertical;
}

/* ─── Employee Evaluations ──────────────────────────────────────────────────── */

.eval-type-badge,
.eval-status-badge,
.eval-goal-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: var(--fs-xs);
    font-weight: 600;
    white-space: nowrap;
}

.eval-goal-count {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.eval-goal-open {
    color: #e65100;
    font-weight: 600;
}

/* ─── Open Positions ─────────────────────────────────────────────────────────── */

.op-status-badge,
.op-priority-badge,
.op-emp-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: var(--fs-xs);
    font-weight: 600;
    white-space: nowrap;
}

/* Status colours */
.op-status-open        { background: #e3f2fd; color: #1565c0; }
.op-status-in-progress { background: #fff8e1; color: #e65100; }
.op-status-filled      { background: #e8f5e9; color: #2e7d32; }
.op-status-cancelled   { background: #f5f5f5; color: #757575; }

/* Priority colours */
.op-priority-low    { background: #f1f8e9; color: #558b2f; }
.op-priority-medium { background: #e3f2fd; color: #1565c0; }
.op-priority-high   { background: #fff3e0; color: #e65100; }
.op-priority-urgent { background: #fce4ec; color: #c62828; }

/* Employment type badge */
.op-emp-badge { background: #ede7f6; color: #4527a0; }

/* Skill tag variant */
.op-skill-tag { background: #e8eaf6; color: #283593; font-size: var(--fs-xs); }
.op-skill-level { font-style: normal; opacity: 0.75; }

/* ─── Outlook (Assessment of Outlook) ──────────────────────────────────────── */

.outlook-rag-badge,
.outlook-status-badge,
.outlook-task-status-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 12px;
    font-size: var(--fs-xs);
    font-weight: 700;
    white-space: nowrap;
}

.outlook-task-count {
    font-size: var(--fs-xs);
    color: var(--text-muted);
}

.outlook-task-open {
    color: #e65100;
    font-weight: 600;
}

/* ─── Employment Certificates ─────────────────────────────────────────────────── */

.ec-type-badge,
.ec-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: var(--fs-xs);
    font-weight: 600;
    white-space: nowrap;
}

/* ─── Auth Overlay ───────────────────────────────────────────────────────────── */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #111318 0%, #1a1d27 50%, #0f1117 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.auth-card {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 44px 40px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 32px 80px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.05);
}
.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}
.auth-brand h1 {
    font-size: 20px;
    font-weight: 700;
    color: #1C1C1E;
    margin: 0;
}
.auth-tabs {
    display: flex;
    gap: 4px;
    background: var(--brand-gray);
    border-radius: var(--radius-md);
    padding: 4px;
    margin-bottom: 28px;
}
.auth-tab {
    flex: 1;
    padding: 9px 16px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--brand-muted);
    transition: all var(--transition-fast);
}
.auth-tab.active {
    background: #fff;
    color: var(--brand-black);
    box-shadow: var(--shadow-sm);
}
.auth-panel { display: none; }
.auth-panel.active { display: block; }
.auth-message {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 14px;
}
.auth-error { background: #fff0f0; color: #c0392b; border: 1px solid #ffd5d5; }
.auth-success { background: #f0fff4; color: #166534; border: 1px solid #c3fae8; }
.auth-message.hidden { display: none; }
.pw-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.pw-input-wrapper input {
    flex: 1;
    padding-right: 58px;
}
.pw-toggle-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #636366;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 6px;
    border-radius: 4px;
    user-select: none;
    line-height: 1;
}
.pw-toggle-btn:hover {
    background: #f2f2f7;
    color: #1C1C1E;
}
.forgot-pw-link {
    background: none;
    border: none;
    color: #636366;
    cursor: pointer;
    font-size: 13px;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.forgot-pw-link:hover { color: #1C1C1E; }
/* 1.36.0: the sign-up sent, confirm and busy panels in the sign-in card. */
.auth-panel-title { font-size: 18px; font-weight: 700; color: #1C1C1E; margin: 0 0 10px; }
.auth-panel-text { font-size: 14px; line-height: 1.5; color: #374151; margin: 0 0 12px; }

/* ─── Topbar User ────────────────────────────────────────────────────────────── */
.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.topbar-whats-new-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    padding: 6px 14px;
    background: var(--brand-red);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm, 6px);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    white-space: nowrap;
}
.topbar-whats-new-btn:hover {
    background: color-mix(in srgb, var(--brand-red) 85%, black);
    transform: translateY(-1px);
}
.topbar-whats-new-btn svg {
    stroke: #fff;
    flex-shrink: 0;
}
.whats-new-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #ffcc00;
    border-radius: 50%;
    border: 2px solid #fff;
    animation: whats-new-pulse 2s infinite;
}
@keyframes whats-new-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}
.btn-logout {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #fff0f0;
    border: 1px solid #ffd5d5;
    border-radius: var(--radius-sm);
    color: var(--brand-red);
    font-size: 13px;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.btn-logout:hover { background: var(--brand-red); color: #fff; border-color: var(--brand-red); }
/* Phones: the top bar keeps its icons only (the name is in the sidebar, each button
   has a title). German labels are longer and pushed the bar past the screen (1.8.0). */
/* The DE | EN pill (1.8.1), as in the CVPoint app (LanguagePillSwitch): a capsule,
   the active language filled in brand red. The other one uses --brand-muted, not
   CVPoint's lighter grey, so its text keeps AA contrast on white. */
/* Compact (1.8.2): 30px tall like the What's New button; 24px segments keep the
   WCAG 2.2 minimum target. The white track keeps the muted text at AA (4.83:1). */
.lang-pill {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 2px;
    border: 1px solid var(--brand-border);
    border-radius: 999px;
    background: #fff;
    flex-shrink: 0;
}
.lang-pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 24px;
    min-width: 32px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--brand-muted);
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
    padding: 0 8px;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}
.lang-pill-btn:hover { color: var(--brand-text); }
.lang-pill-btn:active { transform: translateY(1px); }
.lang-pill-btn.is-active {
    background: var(--brand-red);
    color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.lang-pill-btn.is-active:hover { color: #fff; }
.lang-pill-btn:focus-visible { outline: 2px solid var(--brand-red); outline-offset: 2px; }
@media (max-width: 600px) {
    .topbar { padding: 0 12px; gap: 10px; }
    .topbar-user { gap: 6px; flex-shrink: 0; }
    .topbar-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .topbar-whats-new-btn > span:not(.whats-new-dot),
    .btn-logout > span { display: none; }
    .topbar-whats-new-btn,
    .btn-logout { padding: 7px 9px; }
}

/* ─── Admin Panel ────────────────────────────────────────────────────────────── */
.admin-only { display: none; }
.admin-users-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}
.admin-users-toolbar-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.admin-users-toolbar-label {
    font-size: 12px;
    color: #636366;
}
.admin-users-toolbar .ls-filter-input {
    min-width: 220px;
    max-width: 320px;
}
.admin-users-summary {
    margin: 0 0 14px;
    font-size: 13px;
    color: #636366;
}
.role-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.role-admin { background: #fff0f0; color: #C8312B; }
.role-user { background: #f0f0ff; color: #5856d6; }
.btn-danger-sm {
    padding: 4px 10px;
    background: #fff0f0;
    color: #C8312B;
    border: 1px solid #ffd5d5;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-danger-sm:hover { background: #C8312B; color: #fff; }
.btn-warning-sm {
    padding: 4px 10px;
    background: #fff8e1;
    color: #b45309;
    border: 1px solid #ffe08a;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}
.btn-warning-sm:hover { background: #b45309; color: #fff; }
.text-muted-sm { font-size: 12px; color: #aeaeb2; }

/* ─── User Permission Cards ──────────────────────────────────────────────────── */
.user-perm-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 20px;
}
.user-perm-card {
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.upc-header {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 18px;
    background: #f2f2f7;
    border-bottom: 1px solid #e5e5ea;
    gap: 10px;
}
.upc-info { flex: 1; min-width: 0; }
.upc-name { font-weight: 700; font-size: 15px; color: #1C1C1E; }
.upc-email { font-size: 12px; color: #636366; margin-top: 2px; }
.upc-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; flex-shrink: 0; }
.upc-role-control {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.upc-role-label {
    font-size: 11px;
    color: #636366;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.upc-role-select {
    min-width: 88px;
    padding: 4px 8px;
    border: 1px solid var(--brand-border);
    border-radius: 6px;
    background: #fff;
    font-size: 12px;
}
.upc-perms {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    padding: 14px 18px;
}
.perm-group {
    background: #fafafa;
    border: 1px solid #e5e5ea;
    border-radius: 8px;
    padding: 8px 10px;
}
.perm-group-header {
    margin-bottom: 6px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e5e5ea;
}
.perm-group-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 11px;
    color: #3C3C43;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    user-select: none;
}
.perm-group-label input[type="checkbox"] { cursor: pointer; flex-shrink: 0; }
.perm-group-items {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.perm-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #1C1C1E;
    cursor: pointer;
    padding: 3px 4px;
    border-radius: 5px;
    transition: background 0.1s;
    user-select: none;
}
.perm-item:hover { background: #f0f0f5; }
.perm-item input[type="checkbox"] { cursor: pointer; flex-shrink: 0; }
.perm-item input[type="checkbox"]:disabled { cursor: default; opacity: 0.6; }
.upc-sales-roles {
    padding: 0 18px 14px;
}
.upc-sales-roles-title {
    font-weight: 700;
    font-size: 11px;
    color: #3C3C43;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
}
.upc-sales-roles-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
}
@media (max-width: 600px) {
    .user-perm-cards { grid-template-columns: 1fr; }
    .upc-perms { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}

/* ─── Modal ──────────────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 8000;
    backdrop-filter: blur(2px);
}
.modal-box {
    background: #fff;
    border-radius: var(--radius-xl);
    padding: 36px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-xl);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}
.modal-header h3 { margin: 0; font-size: 18px; font-weight: 700; }
.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #636366;
    line-height: 1;
    padding: 0;
}
.modal-close:hover { color: #1C1C1E; }

/* ─── User Profile Page ──────────────────────────────────────────────────────── */
.profile-page {
    padding: 32px;
    max-width: 680px;
}
.profile-card {
    background: #fff;
    border-radius: var(--radius-xl);
    border: 1px solid var(--brand-border);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.profile-hero {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px 28px 24px;
    background: linear-gradient(135deg, var(--brand-red) 0%, #9B2119 100%);
}
.profile-avatar-lg {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border: 3px solid rgba(255,255,255,0.4);
}
.profile-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.profile-hero-info { min-width: 0; }
.profile-hero-name {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.profile-hero-email {
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    margin: 0 0 8px;
}
.profile-form {
    padding: 24px 28px 28px;
}
.profile-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.profile-bio-group {
    grid-column: 1 / -1;
}
.profile-pending {
    margin: 0 0 16px;
    font-size: var(--fs-sm);
    color: var(--brand-muted);
}
.profile-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 20px;
}
/* My Profile: "E-mails about my ideas" (1.10.0), its own row below the buttons. */
.profile-notifications {
    padding: 20px 28px 28px; /* the sides and bottom of .profile-form, so it lines up */
    border-top: 1px solid var(--brand-border);
}
.profile-notifications-title {
    margin: 0 0 12px;
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--brand-text);
}
.profile-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--brand-text);
}
.profile-switch {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 36px;
    height: 20px;
    margin: 0;
    flex-shrink: 0;
    border-radius: 999px;
    background: var(--brand-muted); /* off: 4.83:1 on white (WCAG 1.4.11 needs 3:1) */
    cursor: pointer;
    transition: background var(--transition-fast);
}
.profile-switch::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition-fast);
}
.profile-switch:checked {
    background: var(--brand-red);
}
.profile-switch:checked::before { transform: translateX(16px); }
.profile-switch:focus-visible {
    outline: 2px solid var(--brand-red);
    outline-offset: 2px;
}
.profile-hint {
    margin: 6px 0 0 46px;
    font-size: 13px;
    color: var(--brand-muted);
}
/* My Profile: Travel expense details (1.12.0) in their own card (1.12.1): a photo strip on top,
   the text below it on white. Beside the profile card on wide screens, below it otherwise. */
.profile-travel-card[hidden] { display: none; }
.profile-travel-pic, .profile-travel-pic img { display: block; width: 100%; }
.profile-travel-pic img { height: 140px; object-fit: cover; object-position: center 40%; }
.profile-travel-body { padding: 20px 28px 28px; }
@media (min-width: 1200px) {
    .profile-page { display: grid; grid-template-columns: repeat(2, minmax(0, 616px)); gap: 24px; align-items: start; justify-content: center; max-width: none; }
    .profile-page:has(> .profile-travel-card[hidden]) { grid-template-columns: minmax(0, 616px); }
}
@media (max-width: 1199px) {
    .profile-travel-card { margin-top: 24px; }
}
.profile-travel-intro, .profile-travel-note { margin: 0 0 12px; font-size: 13px; color: var(--brand-muted); }
.profile-travel-note { color: var(--brand-text); }
.profile-travel-message { margin: 10px 0 0; font-size: var(--fs-sm); min-height: 1em; }
.profile-travel-message.is-ok { color: #1e6b34; }
.profile-travel-message.is-error { color: var(--brand-red); }
.btn-signout {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff0f0;
    border: 1px solid #ffd5d5;
    border-radius: var(--radius-sm);
    color: var(--brand-red);
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
    margin-left: auto;
}
.btn-signout:hover { background: var(--brand-red); color: #fff; border-color: var(--brand-red); }
@media (max-width: 600px) {
    .profile-page { padding: 16px; }
    .profile-form-grid { grid-template-columns: 1fr; }
    .profile-hero { flex-direction: column; text-align: center; }
    .btn-signout { margin-left: 0; }
}

/* ─── Scrollbar Styling ──────────────────────────────────────────────────────── */
.main-content::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}
.main-content::-webkit-scrollbar-track,
.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}
.main-content::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}
.main-content::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 3px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

/* ─── Selection Color ────────────────────────────────────────────────────────── */
::selection {
    background: rgba(200, 49, 43, 0.15);
    color: var(--brand-black);
}

/* ─── Focus Visible ──────────────────────────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--brand-red);
    outline-offset: 2px;
}

button:focus-visible {
    outline: 2px solid var(--brand-red);
    outline-offset: 2px;
}

/* ─── Smooth transitions for tab switching ───────────────────────────────────── */
.tab-content.active {
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
/* ─── What's New / Changelog ──────────────────────────────────────────────── */

.app-version-badge {
    display: inline-block;
    background: #fff;
    border: 1px solid var(--brand-border);
    color: var(--brand-text);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    margin-left: 12px;
    vertical-align: middle;
}

.whats-new-container {
    max-width: 800px;
}

.whats-new-month {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.whats-new-month:last-child {
    border-bottom: none;
}

.whats-new-month-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.5rem 0;
}

.whats-new-versions {
    margin-bottom: 1rem;
}

.version-tag {
    display: inline-block;
    background: var(--bg-alt, #f0f4f8);
    color: var(--text-secondary, #5f6d7e);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 6px;
    font-family: monospace;
}

.whats-new-category {
    margin-bottom: 1.25rem;
}

/* Release notes from CHANGES.txt (public/release-notes.js) */
/* Colours use the brand tokens; contrast on --brand-gray is ≥ 4.5:1 (AA). */
.release-latest-badge {
    display: inline-block;
    background: var(--brand-red);
    color: #fff;
    font-size: var(--fs-xs);
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Releases sit on a timeline: a 2px rail with one node per release, the latest
   filled brand red. The rail and nodes are decorative; titles, versions and
   dates carry the information. Page background is --brand-gray (#F7F8FA):
   --brand-text 13.14:1, --brand-muted 4.55:1. */
.release-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
}

.release {
    position: relative;
    padding: 0 0 1.75rem 1.75rem;
}

.release::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 1.1rem;
    bottom: 0;
    width: 2px;
    background: #D9DEE5;
}

.release:last-child::before {
    display: none;
}

.release::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0.4rem;
    width: 12px;
    height: 12px;
    box-sizing: border-box;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #9CA3AF;
}

.release.is-latest::after {
    background: var(--brand-red);
    border-color: var(--brand-red);
    box-shadow: 0 0 0 4px rgba(200, 49, 43, 0.14);
}

.release-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.75rem;
}

.release-title {
    margin: 0;
    font-size: var(--fs-md);
    font-weight: 700;
    color: var(--brand-text);
}

.release-meta {
    margin: 0;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--fs-sm);
    color: var(--brand-muted);
}

.release-meta .version-tag {
    margin-right: 0;
}

.release-group {
    margin-top: 0.75rem;
}

.release-group-title {
    margin: 0 0 0.25rem;
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--brand-muted);
    letter-spacing: 0.02em;
}

.release-items {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 70ch;
}

.release-items li {
    position: relative;
    padding-left: 0.9rem;
    margin: 0.2rem 0;
    font-size: var(--fs-base);
    line-height: 1.55;
    color: var(--brand-text);
}

.release-items li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.68em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--brand-muted);
}

.whats-new-category-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 0.5rem 0;
}

.whats-new-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.whats-new-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light, #eef1f6);
    line-height: 1.5;
}

.whats-new-item:last-child {
    border-bottom: none;
}

.whats-new-description {
    color: var(--text);
    font-size: 0.875rem;
}

.whats-new-detail-toggle {
    background: none;
    border: none;
    color: var(--accent);
    font-size: 0.75rem;
    cursor: pointer;
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.15s;
}

.whats-new-detail-toggle:hover {
    background: var(--bg-alt, #f0f4f8);
}

.whats-new-details {
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: var(--bg-alt, #f8f9fb);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary, #5f6d7e);
}

.whats-new-details.hidden {
    display: none;
}

.whats-new-detail-row {
    margin-bottom: 0.25rem;
}

.whats-new-detail-row code {
    background: var(--border-light, #eef1f6);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.75rem;
}

.whats-new-detail-row a {
    color: var(--accent);
    text-decoration: none;
}

.whats-new-detail-row a:hover {
    text-decoration: underline;
}

/* ─── Export Columns Modal ──────────────────────────────────────────────────── */
.export-columns-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.export-columns-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
    max-height: 320px;
    overflow-y: auto;
    padding: 4px 2px;
}

.export-column-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

#export-columns-selection.is-disabled {
    opacity: 0.5;
}

/* ─── CRM / Pipeline notes history ─────────────────────────────────────── */

.notes-history {
    max-height: 180px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 8px;
    background: #fafafa;
    margin-bottom: 6px;
}

.notes-history-item {
    padding: 6px 4px;
    border-bottom: 1px solid #eee;
}

.notes-history-item:last-child {
    border-bottom: none;
}

.notes-history-meta {
    font-size: var(--fs-sm);
    color: #374151;
    margin-bottom: 2px;
}

.notes-history-text {
    font-size: var(--fs-sm);
    color: #111827;
    white-space: pre-wrap;
}

/* ─── Pipeline Resource Plan ─────────────────────────────────────────────── */

.rp-dashboard {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.rp-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.rp-kpi {
    position: relative;
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-lg);
    padding: 16px 18px 14px;
    box-shadow: var(--shadow-xs);
    overflow: hidden;
    transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.rp-kpi::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--rp-accent, var(--brand-muted));
}

.rp-kpi:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.rp-kpi-neutral { --rp-accent: #334155; }
.rp-kpi-info { --rp-accent: #4f46e5; }
.rp-kpi-success { --rp-accent: #16a34a; }
.rp-kpi-warn { --rp-accent: #d97706; }
.rp-kpi-util { --rp-accent: var(--brand-red); }

.rp-kpi-label {
    font-size: var(--fs-xs);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand-muted);
}

.rp-kpi-value {
    font-size: var(--fs-2xl);
    font-weight: 800;
    line-height: 1.15;
    margin-top: 4px;
    color: var(--brand-black);
    font-variant-numeric: tabular-nums;
}

.rp-kpi-hint { font-size: var(--fs-xs); color: var(--brand-muted); margin-top: 2px; }

.rp-meter {
    height: 6px;
    border-radius: 999px;
    background: #eef0f4;
    overflow: hidden;
    margin-top: 8px;
}

.rp-meter > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand-red), #e8645d);
    transition: width var(--transition-slow);
}

.rp-card {
    background: #fff;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    padding: 16px 18px;
}

.rp-card-flush { padding: 0; overflow: hidden; }
.rp-card-flush > .rp-card-header { padding: 16px 18px 12px; margin-bottom: 0; }

.rp-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.rp-card-title { font-size: var(--fs-md); font-weight: 700; color: var(--brand-black); margin: 0; }
.rp-card-subtitle { font-size: var(--fs-sm); color: var(--brand-muted); margin: 2px 0 0; }
.rp-muted { color: var(--brand-muted); font-size: var(--fs-sm); }

.rp-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: var(--fs-xs); color: var(--brand-muted); }
.rp-legend-item { display: inline-flex; align-items: center; gap: 6px; }
.rp-legend-today { width: 2px; height: 12px; background: var(--brand-red); border-radius: 1px; }

.rp-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.rp-dot-free { background: #16a34a; }
.rp-dot-busy { background: #4f46e5; }

/* Timeline */
.rp-timeline-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.rp-timeline { min-width: 760px; }

.rp-tl-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    align-items: center;
    min-height: 40px;
}

.rp-tl-body .rp-tl-row + .rp-tl-row { border-top: 1px dashed #f0f1f4; }

.rp-tl-name {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 12px;
    min-width: 0;
}

.rp-tl-title {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--brand-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rp-tl-lane {
    position: relative;
    height: 40px;
}

.rp-tl-body .rp-tl-lane {
    background-image: linear-gradient(to right, #eef0f4 1px, transparent 1px);
    background-size: calc(100% / var(--rp-months, 12)) 100%;
}

.rp-tl-body .rp-tl-lane::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--rp-today, 0);
    width: 2px;
    background: var(--brand-red);
    opacity: 0.75;
    pointer-events: none;
}

.rp-tl-head { min-height: 0; border-bottom: 1px solid var(--brand-border); }

.rp-tl-months {
    display: grid;
    height: auto;
    padding-bottom: 6px;
}

.rp-tl-month {
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--brand-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding-left: 6px;
    white-space: nowrap;
}

.rp-tl-month-current { color: var(--brand-red); }
.rp-tl-year { font-weight: 500; opacity: 0.7; }

.rp-tl-bar {
    position: absolute;
    top: 9px;
    height: 22px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    color: #fff;
    box-shadow: 0 2px 6px rgba(17, 19, 24, 0.15);
    overflow: hidden;
    z-index: 1;
    transition: filter var(--transition-fast), transform var(--transition-fast);
}

.rp-tl-bar:hover { filter: brightness(1.08); transform: translateY(-1px); }
.rp-tl-bar-clip-left { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.rp-tl-bar-clip-right { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.rp-tl-bar-done { opacity: 0.45; }

.rp-tl-bar-label {
    font-size: var(--fs-xs);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rp-tl-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding-left: 10px;
    font-size: var(--fs-xs);
    font-style: italic;
    color: var(--brand-muted);
}

/* Table */

.rp-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: var(--fs-xs);
    font-weight: 600;
    white-space: nowrap;
}

.rp-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.rp-status-active { background: #dcfce7; color: #15803d; }
.rp-status-upcoming { background: #e0e7ff; color: #4338ca; }
.rp-status-completed { background: #f1f5f9; color: #64748b; }
.rp-status-unscheduled { background: #fef3c7; color: #b45309; }

.rp-period { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rp-period-arrow { color: var(--brand-muted); }

.rp-people { display: flex; flex-wrap: wrap; gap: 6px; }

.rp-person {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px 2px 2px;
    border-radius: 999px;
    background: var(--brand-gray);
    border: 1px solid var(--brand-border);
    font-size: var(--fs-sm);
    font-weight: 500;
    white-space: nowrap;
}

.rp-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.rp-staffing { min-width: 150px; }
.rp-staffing-top { display: flex; align-items: baseline; gap: 2px; font-variant-numeric: tabular-nums; }
.rp-staffing-note { margin-left: auto; padding-left: 8px; font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.rp-staffing .rp-meter { margin-top: 6px; }
.rp-staffing-full .rp-meter > span { background: linear-gradient(90deg, #16a34a, #4ade80); }
.rp-staffing-full .rp-staffing-note { color: #15803d; }
.rp-staffing-partial .rp-meter > span { background: linear-gradient(90deg, #d97706, #fbbf24); }
.rp-staffing-partial .rp-staffing-note { color: #b45309; }
.rp-staffing-empty .rp-staffing-note { color: #b91c1c; }

/* Team availability */
.rp-team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.rp-team-col {
    background: var(--brand-gray);
    border-radius: var(--radius-md);
    padding: 12px 14px;
}

.rp-team-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: var(--fs-sm);
}

.rp-count {
    margin-left: auto;
    min-width: 24px;
    padding: 1px 8px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--brand-border);
    font-size: var(--fs-xs);
    font-weight: 700;
    text-align: center;
}

.rp-team-col .rp-person { background: #fff; }

.rp-load {
    margin-left: 2px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e0e7ff;
    color: #4338ca;
    font-size: 0.6875rem;
    font-weight: 700;
}

.rp-load-high { background: #fee2e2; color: #b91c1c; }

@media (max-width: 768px) {
    .rp-tl-row { grid-template-columns: 140px 1fr; }
    .rp-kpis { grid-template-columns: repeat(2, 1fr); }
}

/* CHF/EUR toggle in the section dashboards (public/money-view.js); the buttons
   reuse the Main Dashboard's .dash-currency styles (dashboard.css). */
.money-toggle { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.money-toggle:empty { display: none; }
.money-rate { font-size: var(--fs-xs); color: var(--brand-muted); }

/* 1.20.0: the CHF/EUR pill at the right end of the Sales Pipeline sub-tab row (spec C1, C3, C11). */
#pipeline-tab .sub-tabs { flex-wrap: wrap; align-items: center; }
#pipeline-tab .sub-tabs .money-toggle { padding: 4px 0; }
#pipeline-tab .sub-tabs .money-rate { white-space: nowrap; }
@media (max-width: 600px) {
    #pipeline-tab .sub-tabs .money-toggle { flex-basis: 100%; justify-content: flex-end; padding: 6px 0 8px; }
}
#pipeline-dash-measure { flex: 0 1 auto; }
