﻿@font-face {
    font-family: 'Dana';
    src: url('../Font/Dana/dana-light.woff2') format('woff2');
    font-style: normal;
    font-weight: 300;
    font-display: swap;
}
@font-face {
    font-family: 'Dana';
    src: url('../Font/Dana/dana-regular.woff2') format('woff2');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Dana';
    src: url('../Font/Dana/dana-medium.woff2') format('woff2');
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'Dana';
    src: url('../Font/Dana/dana-demibold.woff2') format('woff2');
    font-style: normal;
    font-weight: 600;
    font-display: swap;
}
@font-face {
    font-family: 'Dana';
    src: url('../Font/Dana/dana-bold.woff2') format('woff2');
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

/* =========================================================================
   GISP Intelligence Workspace — shared design tokens
   ========================================================================= */

:root {
    --gisp-graphite: #435058;
    --gisp-gray: #848C8E;
    --gisp-lime: #DCF763;
    --gisp-stone: #BFB7B6;
    --gisp-canvas: #F1F2EE;
    --status-info: #6F8791;
    --status-success: #6F8A68;
    --status-warning: #D89A4A;
    --status-danger: #C9655A;
    --status-critical: #A94B45;

    --bp-ink: var(--gisp-canvas);
    --bp-ink-2: #E8EAE6;
    --bp-panel: #FFFFFF;
    --bp-panel-solid: #FFFFFF;
    --bp-panel-2: #EDEEEA;
    --bp-line: rgba(67, 80, 88, .16);
    --bp-line-soft: rgba(67, 80, 88, .09);
    --bp-text: var(--gisp-graphite);
    --bp-muted: #687479;
    --bp-faint: var(--gisp-gray);

    --bp-signal: #687629;
    --bp-signal-dim: rgba(220, 247, 99, .25);
    --bp-azure: var(--status-info);
    --bp-azure-dim: rgba(111, 135, 145, .13);
    --bp-alert: var(--status-warning);
    --bp-alert-dim: rgba(216, 154, 74, .13);
    --bp-critical: var(--status-critical);
    --bp-critical-dim: rgba(169, 75, 69, .12);
    --bp-good: var(--status-success);
    --bp-good-dim: rgba(111, 138, 104, .13);

    --bp-font-display: 'Dana', Tahoma, Arial, sans-serif;
    --bp-font-body:    'Dana', Tahoma, Arial, sans-serif;
    --bp-font-mono:    'Dana', Tahoma, Arial, sans-serif;

    --bp-radius: 16px;
    --bp-radius-sm: 10px;
    --bp-blur: 10px;
    --bp-side-w: 260px;
    --bp-frame-pad: 0px;
    --bp-shadow-sm: 0 4px 14px rgba(67, 80, 88, .07);
    --bp-shadow: 0 12px 32px rgba(67, 80, 88, .09);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    color: var(--bp-text);
    font-family: var(--bp-font-body);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

body {
    background: var(--gisp-canvas);
    padding: var(--bp-frame-pad);
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
table { border-collapse: collapse; width: 100%; }

/* Sign in — intentionally separate from the application shell. */
.bp-login-page { min-height: 100vh; padding: 24px; background: radial-gradient(circle at 12% 16%, rgba(248, 176, 164, .92), transparent 38%), radial-gradient(circle at 89% 82%, rgba(31, 91, 164, .92), transparent 46%), linear-gradient(135deg, #b98498 0%, #a090b0 48%, #486eab 100%); display: grid; place-items: center; overflow: hidden; }
.bp-login-shell { width: min(100%, 430px); }
.bp-login-card { position: relative; padding: 76px 36px 28px; color: #18243c; border: 1px solid rgba(255, 255, 255, .56); border-radius: 28px; background: linear-gradient(145deg, rgba(255, 255, 255, .76), rgba(239, 242, 251, .62)); box-shadow: 0 24px 60px rgba(20, 40, 82, .28), inset 0 1px 0 rgba(255,255,255,.72); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.bp-login-logo-wrap { position: absolute; left: 50%; top: 0; width: 180px; height: 104px; padding: 10px 14px; border-radius: 18px; background: #0c2d58; box-shadow: 0 12px 28px rgba(18, 45, 86, .28); transform: translate(-50%, -50%); display: grid; place-items: center; }
.bp-login-logo { width: 152px; height: 84px; object-fit: contain; border-radius: 10px; background: transparent; }
.bp-login-logo-text { color: #fff; font-size: 20px; font-weight: 700; letter-spacing: .4px; }
.bp-login-heading { text-align: center; margin-bottom: 24px; }
.bp-login-eyebrow { color: #315275; font-size: 10px; letter-spacing: 2px; font-weight: 700; }
.bp-login-heading h1 { margin: 7px 0 8px; font-family: var(--bp-font-display); font-size: 30px; line-height: 1.1; letter-spacing: -.6px; }
.bp-login-heading p { margin: 0; color: #52637a; font-size: 14px; }
.bp-login-form { display: grid; gap: 16px; }
.bp-login-field { display: grid; gap: 6px; }
.bp-login-field > label { color: #33465f; font-size: 12px; font-weight: 700; }
.bp-login-input-wrap { display: flex; align-items: center; min-height: 48px; overflow: hidden; background: rgba(32, 71, 112, .9); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.bp-login-input-wrap > span { width: 48px; align-self: stretch; display: grid; place-items: center; color: #fff; background: rgba(8, 35, 70, .72); font-size: 14px; }
.bp-login-input-wrap input { min-width: 0; flex: 1; align-self: stretch; padding: 0 14px; border: 0; outline: 0; color: #fff; background: transparent; font: inherit; }
.bp-login-input-wrap input::placeholder { color: rgba(255,255,255,.68); }
.bp-login-input-wrap:focus-within { outline: 3px solid rgba(12, 45, 88, .24); outline-offset: 2px; }
.bp-login-remember { display: flex; align-items: center; gap: 8px; color: #52637a; font-size: 12px; cursor: pointer; }
.bp-login-remember input { width: 14px; height: 14px; accent-color: #0c2d58; }
.bp-login-submit { min-height: 48px; border: 0; color: #fff; background: linear-gradient(90deg, #123966, #235b9b); box-shadow: 0 10px 20px rgba(25, 71, 122, .25); font-family: var(--bp-font-display); font-size: 14px; font-weight: 700; letter-spacing: .8px; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease; }
.bp-login-submit:hover { transform: translateY(-1px); box-shadow: 0 13px 26px rgba(25, 71, 122, .32); }
.bp-login-submit span { margin-left: 8px; }
.bp-login-error { color: #a31e3b; font-size: 12px; font-weight: 600; }
.bp-login-error:empty { display: none; }
.bp-login-foot { margin: 22px 0 0; text-align: center; color: #697991; font-size: 11px; }
@media (max-width: 480px) { .bp-login-page { padding: 18px; } .bp-login-card { padding: 70px 24px 24px; } }

/* Shared application form foundation. */
:is(.bp-content, .bp-record-drawer) form > p { margin: 0 0 12px; }
:is(.bp-content, .bp-record-drawer) form > p > label,
:is(.bp-content, .bp-record-drawer) .bp-form-label {
    display: block;
    margin-bottom: 6px;
    color: var(--bp-muted);
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
}
:is(.bp-content, .bp-record-drawer) input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
:is(.bp-content, .bp-record-drawer) select,
:is(.bp-content, .bp-record-drawer) textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    border: 1px solid var(--bp-line);
    border-radius: var(--bp-radius-sm);
    color: var(--bp-text);
    background: var(--bp-panel-solid);
    box-shadow: none;
    font-family: var(--bp-font-body);
    font-size: 14px;
    line-height: 1.35;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
:is(.bp-content, .bp-record-drawer) textarea { min-height: 88px; resize: vertical; font-family: var(--bp-font-mono); }
:is(.bp-content, .bp-record-drawer) select {
    cursor: pointer;
    appearance: auto;
    background-color: var(--bp-panel-solid);
}
:is(.bp-content, .bp-record-drawer) select option { color: var(--bp-text); background: var(--bp-panel-solid); }
:is(.bp-content, .bp-record-drawer) input::placeholder,
:is(.bp-content, .bp-record-drawer) textarea::placeholder { color: var(--bp-faint); opacity: 1; }
:is(.bp-content, .bp-record-drawer) input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,
:is(.bp-content, .bp-record-drawer) select:focus,
:is(.bp-content, .bp-record-drawer) textarea:focus {
    outline: none;
    border-color: #77852F;
    background: var(--bp-panel-solid);
    box-shadow: 0 0 0 3px rgba(220, 247, 99, .32);
}
:is(.bp-content, .bp-record-drawer) input[type="checkbox"],
:is(.bp-content, .bp-record-drawer) input[type="radio"] { accent-color: var(--bp-signal); }

/* ---------------------------------------------------------------------
   Shared application shell
   --------------------------------------------------------------------- */

.bp-shell {
    display: grid;
    grid-template-columns: var(--bp-side-w) 1fr;
    min-height: 100vh;
    background: var(--gisp-canvas);
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

/* ---------------------------------------------------------------------
   Sidebar / menu
   --------------------------------------------------------------------- */

.bp-side {
    background: #F8F8F5;
    border-right: 1px solid var(--bp-line);
    display: flex;
    flex-direction: column;
    padding: 24px 16px 18px;
    position: sticky;
    top: 0;
    height: 100%;
    transition: margin-left .2s ease;
}

.bp-shell.bp-collapsed .bp-side { margin-left: calc(-1 * var(--bp-side-w)); }

.bp-logo {
    display: block;
    padding: 4px 8px 24px;
    text-decoration: none;
}

.bp-logo-image {
    display: block;
    width: min(100%, 176px);
    height: auto;
    object-fit: contain;
}
.bp-logo-text {
    color: var(--gisp-graphite);
    font-size: 21px;
    font-weight: 700;
    letter-spacing: .4px;
}

.bp-logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--gisp-lime);
    color: var(--gisp-graphite);
    font-family: var(--bp-font-display);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.5px;
    box-shadow: var(--bp-shadow-sm);
}

.bp-logo-sub { font-family: var(--bp-font-mono); font-size: 10px; letter-spacing: 1.5px; color: var(--bp-faint); }

.bp-nav { display: flex; flex-direction: column; gap: 5px; flex: 1; overflow-y: auto; }

.bp-nav-item, .bp-nav-parent {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: #5E696E;
    font-family: var(--bp-font-body);
    font-size: 13.5px;
    font-weight: 500;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
}

.bp-nav-item:hover, .bp-nav-parent:hover { background: #E9EBE7; color: var(--bp-text); }
.bp-nav-item.is-active {
    background: var(--bp-signal-dim);
    color: var(--gisp-graphite);
    box-shadow: none;
}

.bp-ico { width: 16px; text-align: center; opacity: 0.85; font-size: 13px; }

.bp-nav-parent { justify-content: space-between; }
.bp-chevron { transition: transform .15s ease; color: var(--bp-faint); }
.bp-nav-group.is-open .bp-chevron { transform: rotate(90deg); }

.bp-nav-children {
    display: none;
    flex-direction: column;
    padding-left: 30px;
    border-left: 1px solid var(--bp-line-soft);
    margin: 2px 0 6px 22px;
}
.bp-nav-group.is-open .bp-nav-children { display: flex; }

.bp-nav-child {
    padding: 7px 10px;
    font-size: 13px;
    color: var(--bp-muted);
    border-radius: 8px;
}
.bp-nav-child:hover { color: var(--gisp-graphite); background: #E9EBE7; }
.bp-nav-child.is-active { color: var(--gisp-graphite); background: var(--bp-signal-dim); box-shadow: none; font-weight: 600; }

.bp-side-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 12px 4px;
    font-family: var(--bp-font-mono);
    font-size: 11px;
    color: var(--bp-faint);
    border-top: 1px solid var(--bp-line-soft);
    margin-top: 10px;
}

.bp-pulse-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--bp-signal);
    box-shadow: 0 0 0 0 var(--bp-signal-dim);
    animation: bp-pulse-dot 2.2s infinite;
    flex-shrink: 0;
}
@keyframes bp-pulse-dot {
    0%   { box-shadow: 0 0 0 0 rgba(104, 118, 41, .38); }
    70%  { box-shadow: 0 0 0 6px rgba(104, 118, 41, 0); }
    100% { box-shadow: 0 0 0 0 rgba(104, 118, 41, 0); }
}

/* ---------------------------------------------------------------------
   Up bar
   --------------------------------------------------------------------- */

.bp-main { display: flex; flex-direction: column; min-width: 0; }

.bp-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 72px;
    padding: 14px 30px;
    border-bottom: 1px solid var(--bp-line);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(var(--bp-blur));
    -webkit-backdrop-filter: blur(var(--bp-blur));
    position: sticky;
    top: 0;
    z-index: 5;
}

.bp-burger {
    background: #F4F5F1; border: 1px solid var(--bp-line); color: var(--bp-text);
    border-radius: 10px; width: 34px; height: 34px; cursor: pointer; font-size: 16px;
    display: none;
}

.bp-search {
    flex: 1;
    max-width: 460px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #F7F8F5;
    border: 1px solid var(--bp-line);
    border-radius: 12px;
    padding: 10px 14px;
}
.bp-search-ico { color: var(--bp-faint); }
.bp-search input {
    background: transparent; border: none; outline: none; color: var(--bp-text);
    font-family: var(--bp-font-body); font-size: 13px; width: 100%;
}
.bp-search input::placeholder { color: var(--bp-faint); }

.bp-top-right { display: flex; align-items: center; gap: 14px; margin-left: auto; }

.bp-datetime {
    font-family: var(--bp-font-mono);
    font-size: 12.5px;
    color: var(--bp-muted);
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.bp-icon-btn {
    position: relative;
    background: #F7F8F5;
    border: 1px solid var(--bp-line);
    border-radius: 50%;
    width: 38px; height: 38px;
    cursor: pointer;
    color: var(--bp-text);
    font-size: 14px;
}
.bp-icon-btn:hover { background: #E9EBE7; border-color: rgba(67, 80, 88, .24); }
.bp-notification-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.bp-notification-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.bp-badge {
    position: absolute; top: -4px; right: -4px;
    background: var(--bp-critical); color: #200609;
    font-family: var(--bp-font-mono); font-size: 10px; font-weight: 700;
    border-radius: 10px; padding: 1px 5px; line-height: 1.4;
    box-shadow: 0 0 0 2px var(--bp-ink);
}
.bp-notification-unread { background: rgba(216, 154, 74, .10); }

.bp-account {
    display: flex; align-items: center; gap: 9px; cursor: pointer;
    padding-block: 4px; padding-inline: 4px 10px; border-radius: 999px;
    border: 1px solid transparent;
}
.bp-account:hover { background: var(--bp-panel-2); border-color: var(--bp-line); }
.bp-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--bp-signal-dim);
    border: 1px solid var(--bp-line);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--bp-font-mono); font-size: 11.5px; font-weight: 600; color: var(--gisp-graphite);
}
.bp-account-text { display: flex; flex-direction: column; line-height: 1.2; }
.bp-account-name { font-size: 12.5px; font-weight: 600; }
.bp-account-role { font-size: 11px; color: var(--bp-faint); }

/* ---------------------------------------------------------------------
   Content area
   --------------------------------------------------------------------- */

.bp-content { padding: 26px 28px 60px; }

.bp-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.bp-eyebrow {
    font-family: var(--bp-font-mono);
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--bp-signal);
}

.bp-page-head h1 {
    font-family: var(--bp-font-display);
    font-size: 26px;
    margin: 4px 0 4px;
    font-weight: 600;
}

.bp-subtext { color: var(--bp-muted); font-size: 13.5px; margin: 0; }

.bp-command-center .bp-card-head { gap: 12px; flex-wrap: wrap; }
.bp-command-center .bp-kpi-label,
.bp-command-center .bp-kpi-delta,
.bp-command-center .bp-card-foot { overflow-wrap: anywhere; }
.bp-command-center .bp-table th { text-align: start; }
.bp-nav-parent,
.bp-nav-child { line-height: 1.55; overflow-wrap: anywhere; }

/* Signature element: a live pulse strip, the "heartbeat" of the Brain */
.bp-pulse-strip { width: 220px; height: 40px; opacity: 0.9; }
.bp-pulse-svg { width: 100%; height: 100%; }
.bp-pulse-svg polyline {
    fill: none;
    stroke: var(--bp-signal);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 620;
    stroke-dashoffset: 620;
    animation: bp-draw 3.6s ease-in-out infinite;
    filter: drop-shadow(0 0 5px rgba(104, 118, 41, .30));
}
.bp-dead-signal { display: none; }
.bp-openrouter-pulse.is-checking.bp-pulse-dot,
.bp-openrouter-pulse.is-dead.bp-pulse-dot { background: #9aa9bf; box-shadow: none; animation: none; }
.bp-openrouter-pulse.is-checking .bp-pulse-svg polyline,
.bp-openrouter-pulse.is-dead .bp-pulse-svg polyline { display: none; }
.bp-openrouter-pulse.is-checking .bp-dead-signal,
.bp-openrouter-pulse.is-dead .bp-dead-signal { display: block; stroke: #9aa9bf; stroke-width: 2; opacity: .55; }
.bp-openrouter-pulse.is-live .bp-pulse-svg polyline { display: block; }
.bp-openrouter-pulse.is-live .bp-dead-signal { display: none; }
@keyframes bp-draw {
    0%   { stroke-dashoffset: 620; opacity: .35; }
    45%  { stroke-dashoffset: 0;   opacity: 1; }
    55%  { stroke-dashoffset: 0;   opacity: 1; }
    100% { stroke-dashoffset: -620; opacity: .35; }
}
@media (prefers-reduced-motion: reduce) {
    .bp-pulse-svg polyline { animation: none; stroke-dashoffset: 0; }
    .bp-pulse-dot { animation: none; }
}

/* KPI row */
.bp-kpi-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}
.bp-kpi {
    background: var(--bp-panel);
    border: 1px solid var(--bp-line);
    border-radius: var(--bp-radius-sm);
    padding: 15px 16px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    box-shadow: var(--bp-shadow-sm);
}
.bp-kpi-link { color: inherit; transition: transform .15s ease, border-color .15s ease; }
.bp-kpi-link:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--bp-signal) 42%, var(--bp-line)); }
.bp-kpi-label { font-size: 11.5px; color: var(--bp-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.bp-kpi-value { font-family: var(--bp-font-mono); font-size: 24px; font-weight: 600; }
.bp-kpi-delta {
    display: inline-flex;
    width: fit-content;
    font-size: 11px;
    font-family: var(--bp-font-mono);
    padding: 2px 9px;
    border-radius: 999px;
}
.bp-kpi-delta.up { color: var(--bp-good); background: var(--bp-good-dim); }
.bp-kpi-delta.down-good { color: var(--bp-good); background: var(--bp-good-dim); }
.bp-kpi-delta.flat { color: var(--bp-faint); background: var(--bp-panel-2); }

/* Grids */
.bp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.bp-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 16px; }

/* Cards */
.bp-card {
    background: var(--bp-panel);
    border: 1px solid var(--bp-line);
    border-radius: var(--bp-radius);
    padding: 18px 20px;
    box-shadow: var(--bp-shadow-sm);
}
.bp-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.bp-card-head h2 { font-family: var(--bp-font-display); font-size: 15px; font-weight: 600; margin: 0; }
.bp-card-head h2 a { color: inherit; }
.bp-card-head h2 a:hover { color: var(--bp-signal); }
.bp-tag {
    font-family: var(--bp-font-mono);
    font-size: 10.5px;
    color: var(--bp-signal);
    background: var(--bp-signal-dim);
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}
.bp-card-foot { margin: 10px 0 0; font-size: 11.5px; color: var(--bp-faint); font-family: var(--bp-font-mono); }

/* Status list (Knowledge Layers) */
.bp-status-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--bp-line-soft); }
.bp-status-list li:last-child { border-bottom: none; }
.bp-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.bp-dot.ok { background: var(--bp-good); box-shadow: 0 0 8px rgba(111, 138, 104, .35); }
.bp-dot.warn { background: var(--bp-alert); box-shadow: 0 0 8px rgba(216, 154, 74, .35); }
.bp-dot.err { background: var(--bp-critical); box-shadow: 0 0 8px rgba(169, 75, 69, .35); }
.bp-status-name { flex: 1; font-size: 13px; }
.bp-status-meta { font-family: var(--bp-font-mono); font-size: 11px; color: var(--bp-faint); }

/* Skill usage bars */
.bp-skill-list li { padding: 8px 0; }
.bp-skill-name { display: block; font-size: 13px; margin-bottom: 6px; }
.bp-bar-track { background: #E5E7E2; border-radius: 999px; height: 6px; overflow: hidden; }
.bp-bar-fill { background: var(--bp-signal); height: 100%; border-radius: 999px; }

/* Table (Projects) */
.bp-table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--bp-faint);
    font-weight: 600;
    padding: 0 0 8px;
    border-bottom: 1px solid var(--bp-line);
}
.bp-table td { padding: 10px 0; border-bottom: 1px solid var(--bp-line-soft); font-size: 13px; }
.bp-table tr:last-child td { border-bottom: none; }
.bp-models-card { margin-bottom: 16px; min-width: 0; }
.bp-models-card .bp-card-head { flex-wrap: wrap; gap: 8px; }
.bp-models-card .bp-table-wrap { max-width: 100%; overflow-x: auto; }
.bp-models-card .bp-table { width: 100%; min-width: 700px; }
.bp-models-card .bp-table th, .bp-models-card .bp-table td { padding-inline: 8px; text-align: start; }
.bp-models-card .bp-table td form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bp-models-card .bp-table td form input[name="notes"] { min-width: 12rem; flex: 1 1 12rem; }
.bp-model-filters { display: grid; grid-template-columns: minmax(12rem, 2fr) repeat(2, minmax(10rem, 1fr)) auto; gap: 10px; align-items: end; margin-block: 12px; }
.bp-model-filters label { display: grid; gap: 5px; min-width: 0; font-size: 12px; color: var(--bp-muted); }
.bp-model-filters input, .bp-model-filters select { width: 100%; min-width: 0; }
@media (max-width: 900px) { .bp-model-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .bp-model-filters { grid-template-columns: minmax(0, 1fr); } }
.bp-qualification-sample { margin-block: 8px; max-width: 30rem; }
.bp-qualification-sample pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 12rem; overflow-y: auto; }

.bp-chip {
    font-family: var(--bp-font-mono);
    font-size: 10.5px;
    padding: 3px 10px;
    border-radius: 999px;
    white-space: nowrap;
}
.stage-build     { background: var(--bp-alert-dim); color: var(--bp-alert); }
.stage-review    { background: rgba(154,164,190,0.14); color: var(--bp-muted); }
.stage-live      { background: var(--bp-good-dim); color: var(--bp-good); }
.stage-discovery { background: rgba(154,164,190,0.14); color: var(--bp-muted); }

/* Feed (Alerts) */
.bp-feed li { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--bp-line-soft); }
.bp-feed li:last-child { border-bottom: none; }
.bp-feed-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.sev-high   { background: var(--bp-critical); box-shadow: 0 0 8px rgba(169, 75, 69, .35); }
.sev-medium { background: var(--bp-alert); box-shadow: 0 0 8px rgba(216, 154, 74, .35); }
.sev-info   { background: var(--status-info); box-shadow: 0 0 8px rgba(111, 135, 145, .35); }
.bp-feed-body { display: flex; flex-direction: column; gap: 3px; }
.bp-feed-text { font-size: 13px; }
.bp-feed-time { font-family: var(--bp-font-mono); font-size: 11px; color: var(--bp-faint); }

/* Idea Center strip */
.bp-idea-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
.bp-idea-strip h2 { font-family: var(--bp-font-display); font-size: 17px; margin: 4px 0 0; font-weight: 600; }

.bp-btn-ghost {
    border: 1px solid var(--bp-line);
    color: var(--gisp-graphite);
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.bp-btn-ghost:hover { background: #E9EBE7; border-color: rgba(67, 80, 88, .28); }
.bp-btn-ghost:disabled { cursor: not-allowed; opacity: .45; box-shadow: none; }

.bp-btn-solid {
    background: var(--gisp-graphite);
    color: #FFFFFF;
    border: none;
    font-weight: 600;
    padding: 11px 20px;
    border-radius: 999px;
    font-size: 13px;
    cursor: pointer;
    font-family: var(--bp-font-body);
    box-shadow: var(--bp-shadow-sm);
}
.bp-btn-solid:hover { background: #354047; }

/* Compact record lists and focused editors. The existing page shell stays unchanged. */
.bp-record-tools { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin:0 0 14px; }
.bp-record-tools .bp-record-spacer { flex:1; }
.bp-record-search { width:min(260px,100%); border:1px solid var(--bp-line); background:#F7F8F5; border-radius:10px; padding:9px 12px; font:inherit; font-size:13px; }
.bp-record-table-wrap { overflow-x:auto; }
.bp-record-table { width:100%; border-collapse:collapse; table-layout:fixed; }
.bp-record-table th { text-align:start; color:var(--bp-faint); font-size:11px; text-transform:uppercase; letter-spacing:.4px; border-bottom:1px solid var(--bp-line); padding:9px 11px; }
.bp-record-table td { padding:10px 11px; font-size:13px; border-bottom:1px solid var(--bp-line-soft); vertical-align:middle; overflow-wrap:anywhere; }
.bp-record-table tr[data-list-row]:hover td { background:#F8F9F4; }
.bp-record-table tr[data-list-row]:has([data-list-open],[data-list-toggle]) { cursor:pointer; }
.bp-record-table tr[data-list-row]:has([aria-expanded="true"]) td { background:#F1F5E8; }
.bp-record-table tr[data-list-detail] td { background:#F7F9F4; padding:15px 18px; }
.bp-record-table tr:last-child td { border-bottom:0; }
.bp-record-title { display:block; font-weight:600; color:var(--bp-text); line-height:1.35; }
.bp-record-meta { display:block; color:var(--bp-faint); font-size:11px; margin-top:3px; }
.bp-record-excerpt { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; font-weight:600; }
.bp-record-actions { display:flex; align-items:center; gap:5px; white-space:nowrap; }
.bp-record-icon { display:inline-grid; place-items:center; width:32px; height:32px; padding:0; background:#fff; border:1px solid var(--bp-line); border-radius:8px; color:var(--bp-text); font-size:16px; cursor:pointer; text-decoration:none; }
.bp-record-icon:hover { background:#E9EBE7; }
.bp-record-pill { display:inline-flex; align-items:center; gap:6px; border-radius:999px; background:#EDF0EB; padding:5px 9px; font-size:11px; white-space:nowrap; }
.bp-record-pill::before { content:""; width:6px; height:6px; border-radius:50%; background:currentColor; }
.bp-record-pill.is-good { color:#5B7856; background:#EBF2E9; }
.bp-record-pill.is-warning { color:#9B6A2F; background:#FCF2E6; }
.bp-record-pill.is-info { color:#5D7984; background:#EAF0F3; }
.bp-record-detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.bp-record-detail-grid > div { padding:10px 12px; background:#fff; border:1px solid var(--bp-line); border-radius:10px; }
.bp-record-detail-grid small { display:block; color:var(--bp-faint); text-transform:uppercase; font-size:10px; margin-bottom:3px; }
.bp-record-detail-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:13px; }
.bp-record-detail-actions form { display:inline-flex; align-items:center; gap:8px; flex-wrap:wrap; }
.bp-record-detail-actions .bp-btn-ghost { padding:7px 12px; font-size:12px; }
.bp-record-longtext { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.6; margin:0 0 12px; }
.bp-user-activity-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(185px,1fr)); gap:12px; margin:14px 0; }
.bp-user-activity-grid > div { display:grid; gap:5px; padding:14px; border:1px solid var(--bp-line); border-radius:10px; background:var(--bp-panel-2); }
.bp-user-activity-grid strong { font-size:1.1rem; }
.bp-user-activity-grid span { color:var(--bp-muted); font-size:.85rem; }
.bp-user-activity-summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(210px,1fr)); gap:9px; }
.bp-user-activity-summary > div { display:flex; justify-content:space-between; gap:12px; padding:10px 12px; border-bottom:1px solid var(--bp-line); }
.bp-record-editor { display:grid; gap:12px; }
.bp-record-editor .bp-field { margin:0; }
.bp-record-editor textarea { width:100%; }
.bp-record-editor select,.bp-record-editor input { max-width:100%; }
.bp-record-drawer { position:fixed; inset:0 0 0 auto; width:min(600px,100vw); max-width:none; height:100dvh; max-height:none; margin:0; padding:24px; border:0; border-left:1px solid var(--bp-line); background:#fff; box-shadow:-12px 0 36px rgba(67,80,88,.16); overflow-y:auto; color:var(--bp-text); }
.bp-record-drawer::backdrop { background:rgba(35,47,51,.28); }
.bp-record-drawer[open] { animation:bp-record-enter .2s ease-out; }
@keyframes bp-record-enter { from { transform:translateX(100%); } to { transform:translateX(0); } }
html[dir="rtl"] .bp-record-drawer { inset:0 auto 0 0; border-left:0; border-right:1px solid var(--bp-line); box-shadow:12px 0 36px rgba(67,80,88,.16); }
html[dir="rtl"] .bp-record-drawer[open] { animation-name:bp-record-enter-rtl; }
@keyframes bp-record-enter-rtl { from { transform:translateX(-100%); } to { transform:translateX(0); } }
.bp-record-drawer-head { display:flex; justify-content:space-between; gap:12px; align-items:start; padding-bottom:15px; border-bottom:1px solid var(--bp-line); margin-bottom:16px; }
.bp-record-drawer-head h2 { margin:4px 0; font-size:21px; }
.bp-record-drawer-head .bp-record-icon { flex:none; }
.bp-record-drawer details[data-list-panel] > summary { display:none; }
.bp-record-drawer details[open] > *:not(summary) { margin-bottom:10px; }
.bp-record-drawer form { display:grid; gap:11px; }
.bp-record-drawer form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),.bp-record-drawer form select,.bp-record-drawer form textarea { max-width:100%; }
.bp-record-table [data-list-fulltext],.bp-record-table [data-list-summary] { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:420px; }
.bp-record-empty { color:var(--bp-muted); padding:16px 10px; }
@media(max-width:800px) { .bp-record-detail-grid { grid-template-columns:1fr; } .bp-record-table { min-width:670px; } .bp-record-drawer { padding:16px; } }
.bp-btn-danger {
    background: #fff1f3;
    border: 1px solid #d96a7c;
    color: #a53b4f;
    border-radius: 999px;
    padding: 9px 18px;
    font-family: var(--bp-font-body);
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.bp-btn-danger:hover { background: #ffe3e8; }

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 3px solid rgba(104, 118, 41, .42);
    outline-offset: 2px;
}

/* =========================================================================
   Shared components for interior pages (Brain sub-pages, Settings, etc.)
   ========================================================================= */

/* Kanban (Idea Center, Projects board) */
.bp-kanban { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bp-kanban-col {
    background: var(--bp-panel);
    backdrop-filter: blur(var(--bp-blur));
    -webkit-backdrop-filter: blur(var(--bp-blur));
    border: 1px solid var(--bp-line);
    border-radius: var(--bp-radius);
    padding: 14px;
    display: flex; flex-direction: column; gap: 10px;
}
.bp-kanban-col h3 { font-family: var(--bp-font-display); font-size: 12.5px; margin: 0 0 4px; display: flex; justify-content: space-between; align-items: center; color: var(--bp-muted); text-transform: uppercase; letter-spacing: .5px; }
.bp-kanban-count { font-family: var(--bp-font-mono); font-size: 11px; background: var(--bp-panel-2); padding: 2px 9px; border-radius: 999px; color: var(--bp-faint); }
.bp-kanban-card { background: rgba(255,255,255,0.04); border: 1px solid var(--bp-line-soft); border-radius: 12px; padding: 11px 13px; display: flex; flex-direction: column; gap: 6px; }
.bp-kanban-card .bp-kc-title { font-size: 13px; font-weight: 600; }
.bp-kanban-card .bp-kc-meta { font-family: var(--bp-font-mono); font-size: 10.5px; color: var(--bp-faint); }

/* Forms (Settings pages, Customize) */
.bp-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.bp-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.bp-field label { font-size: 11.5px; color: var(--bp-muted); text-transform: uppercase; letter-spacing: .4px; }
.bp-field input, .bp-field select, .bp-field textarea {
    background: rgba(255,255,255,0.04); border: 1px solid var(--bp-line); border-radius: var(--bp-radius-sm);
    padding: 10px 12px; color: var(--bp-text); font-family: var(--bp-font-body); font-size: 13px;
}
.bp-field textarea { resize: vertical; min-height: 90px; font-family: var(--bp-font-mono); }
.bp-field input:focus, .bp-field select:focus, .bp-field textarea:focus { outline: 2px solid var(--bp-signal); outline-offset: 1px; }
.bp-field-hint { font-size: 11px; color: var(--bp-faint); }
.bp-validation { color: #c2354c; font-size: 11px; font-weight: 600; }
.bp-project-coach { margin-bottom: 16px; border-color: color-mix(in srgb, var(--bp-signal) 28%, var(--bp-line)); }
.bp-project-coach p { color: var(--bp-muted); max-width: 860px; }
.bp-project-coach ol { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; counter-reset: project-coach; }
.bp-project-coach li { counter-increment: project-coach; position: relative; min-height: 76px; padding: 11px 11px 11px 39px; border: 1px solid var(--bp-line-soft); border-radius: var(--bp-radius-sm); color: var(--bp-faint); font-size: 11px; line-height: 1.45; }
.bp-project-coach li::before { content: counter(project-coach); position: absolute; left: 11px; top: 11px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: var(--bp-signal); background: var(--bp-signal-dim); font-family: var(--bp-font-mono); font-size: 10px; }
.bp-project-coach strong { color: var(--bp-text); display: block; }
.bp-project-form { max-width: 960px; }
.bp-project-team-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
@media (max-width: 950px) { .bp-project-coach ol, .bp-project-team-fields { grid-template-columns: 1fr; } }

/* Toggle rows (Notifications, Reminders) */
.bp-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--bp-line-soft); gap: 16px; }
.bp-toggle-row:last-child { border-bottom: none; }
.bp-toggle-text .t-name { font-size: 13px; font-weight: 600; display: block; }
.bp-toggle-text .t-desc { font-size: 12px; color: var(--bp-faint); }
.bp-switch { position: relative; width: 38px; height: 22px; flex-shrink: 0; display: inline-block; }
.bp-switch input { opacity: 0; width: 0; height: 0; }
.bp-switch .bp-slider { position: absolute; inset: 0; background: #E5E7E2; border: 1px solid var(--bp-line); border-radius: 999px; transition: .15s; cursor: pointer; }
.bp-switch .bp-slider::before { content: ''; position: absolute; width: 16px; height: 16px; left: 2px; top: 1px; background: var(--bp-faint); border-radius: 50%; transition: .15s; }
.bp-switch input:checked + .bp-slider { background: var(--bp-signal-dim); border-color: var(--bp-signal); }
.bp-switch input:checked + .bp-slider::before { transform: translateX(16px); background: var(--bp-signal); box-shadow: 0 0 8px rgba(104, 118, 41, .30); }

/* Model access retains its conventional accessible blue operational state. */
.bp-model-summary { display: flex; align-items: center; gap: 10px; margin: 14px 0; color: var(--bp-faint); font-size: 12px; }
.bp-model-summary span { padding: 5px 10px; border-radius: 999px; background: rgba(23, 53, 91, .08); }
.bp-model-summary .bp-model-summary-allowed { color: #0c66b4; background: rgba(35, 132, 232, .13); font-weight: 700; }
.bp-model-group td { padding: 14px 12px 10px; color: #0c66b4; background: rgba(35, 132, 232, .075); border-bottom: 1px solid rgba(35, 132, 232, .18); }
.bp-model-group strong { display: block; font-size: 12px; letter-spacing: .3px; text-transform: uppercase; }
.bp-model-group span { color: var(--bp-faint); font-size: 11px; }
.bp-model-group.is-blocked td { color: #667085; background: rgba(102, 112, 133, .055); border-color: rgba(102, 112, 133, .14); }
.bp-model-toggle-form { display: inline-flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 0; }
.bp-model-state { min-width: 76px; color: #78849a; font-size: 11px; font-weight: 600; text-align: right; white-space: nowrap; }
.bp-model-state.is-allowed { color: #0c66b4; }
.bp-model-switch { position: relative; display: inline-block; width: 58px; height: 30px; flex: 0 0 auto; cursor: pointer; }
.bp-model-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.bp-model-slider { position: absolute; inset: 0; border: 1px solid #d0d5dd; border-radius: 999px; background: #d7dbe0; box-shadow: inset 0 1px 2px rgba(16, 24, 40, .11); transition: background .18s ease, border-color .18s ease; }
.bp-model-slider::before { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(16, 24, 40, .22); transition: transform .18s ease; }
.bp-model-switch input:checked + .bp-model-slider { border-color: #1976d2; background: linear-gradient(135deg, #1688f2, #146bc6); }
.bp-model-switch input:checked + .bp-model-slider::before { transform: translateX(28px); }
.bp-model-switch input:focus-visible + .bp-model-slider { outline: 3px solid rgba(25, 118, 210, .25); outline-offset: 2px; }

/* Department cards */
.bp-dept-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.bp-dept-card {
    background: var(--bp-panel);
    backdrop-filter: blur(var(--bp-blur));
    -webkit-backdrop-filter: blur(var(--bp-blur));
    border: 1px solid var(--bp-line);
    border-radius: var(--bp-radius);
    padding: 18px;
    display: flex; flex-direction: column; gap: 8px;
}
.bp-dept-card h3 { font-family: var(--bp-font-display); font-size: 15px; margin: 0; }
.bp-dept-stat { font-family: var(--bp-font-mono); font-size: 22px; font-weight: 600; }
.bp-dept-label { font-size: 11px; color: var(--bp-faint); text-transform: uppercase; letter-spacing: .4px; }

/* Theme swatches */
.bp-swatch-row { display: flex; gap: 12px; flex-wrap: wrap; }
.bp-swatch { width: 56px; height: 56px; border-radius: 14px; border: 2px solid transparent; cursor: pointer; }
.bp-swatch.is-selected { border-color: var(--bp-signal); box-shadow: 0 0 0 3px var(--bp-signal-dim); }

/* Chat bubbles (shared by full-page + floating panel) */
.bp-chat-bubble { max-width: 78%; padding: 11px 15px; border-radius: 16px; font-size: 13px; line-height: 1.5; }
.bp-chat-bubble.from-user {
    align-self: flex-end;
    background: var(--bp-signal-dim);
    color: var(--bp-text);
    border: 1px solid rgba(104, 118, 41, .22);
    border-bottom-right-radius: 4px;
}
.bp-chat-bubble.from-assistant {
    align-self: flex-start;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--bp-line);
    border-bottom-left-radius: 4px;
}
.bp-chat-bubble p { margin: 0 0 9px; }
.bp-chat-bubble p:last-child { margin-bottom: 0; }
.bp-chat-bubble h4 { margin: 0 0 9px; font-family: var(--bp-font-display); font-size: 13px; }
.bp-chat-bubble ul, .bp-chat-bubble ol { margin: 0 0 9px; padding-left: 19px; }
.bp-chat-bubble li { margin: 3px 0; }
.bp-chat-bubble code { font-family: var(--bp-font-mono); font-size: .92em; }
.bp-chat-time { font-family: var(--bp-font-mono); font-size: 10px; color: var(--bp-faint); margin-top: 4px; }

/* Skill / knowledge cards */
.bp-tile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.bp-tile {
    background: var(--bp-panel);
    backdrop-filter: blur(var(--bp-blur));
    -webkit-backdrop-filter: blur(var(--bp-blur));
    border: 1px solid var(--bp-line);
    border-radius: var(--bp-radius);
    padding: 16px;
    display: flex; flex-direction: column; gap: 8px;
}
.bp-tile-top { display: flex; justify-content: space-between; align-items: flex-start; }
.bp-tile h3 { font-family: var(--bp-font-display); font-size: 14px; margin: 0; }
.bp-tile p { font-size: 12.5px; color: var(--bp-muted); margin: 0; line-height: 1.5; }

/* =========================================================================
   Assistant chat — floating launcher (all pages) + full-page variant
   ========================================================================= */

.bp-fab {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 40;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: var(--gisp-graphite);
    border: 1px solid rgba(67, 80, 88, .28);
    cursor: pointer;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 12px 28px rgba(67, 80, 88, .22);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.bp-fab:hover { transform: translateY(-2px); background: #354047; box-shadow: 0 16px 32px rgba(67, 80, 88, .26); }

.bp-fab-ring {
    position: absolute;
    inset: -6px;
    border-radius: 22px;
    border: 2px solid var(--gisp-lime);
    opacity: 0;
    animation: bp-fab-pulse 2.6s infinite;
    pointer-events: none;
}
@keyframes bp-fab-pulse {
    0%   { opacity: .55; transform: scale(0.9); }
    70%  { opacity: 0;   transform: scale(1.3); }
    100% { opacity: 0;   transform: scale(1.3); }
}
@media (prefers-reduced-motion: reduce) {
    .bp-fab-ring { animation: none; opacity: 0; }
}

.bp-chat-panel {
    position: fixed;
    right: 28px;
    bottom: 100px;
    z-index: 39;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 560px;
    max-height: calc(100vh - 150px);
    background: #FFFFFF;
    border: 1px solid var(--bp-line);
    border-radius: var(--bp-radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 56px rgba(67, 80, 88, .20);
    opacity: 0;
    transform: translateY(14px) scale(0.98);
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease;
}
.bp-chat-panel.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Platform Guide uses the same light surface hierarchy as the workspace. */
body:not(.bp-login-page) .bp-chat-panel {
    background: #FFFFFF;
    border-color: var(--bp-line);
    box-shadow: 0 24px 56px rgba(67, 80, 88, .20);
    color: var(--bp-text);
}
body:not(.bp-login-page) .bp-chat-panel .bp-chat-head,
body:not(.bp-login-page) .bp-chat-panel .bp-chat-composer { border-color: var(--bp-line-soft); }
body:not(.bp-login-page) .bp-chat-panel .bp-chat-head-title strong { color: var(--bp-text); }
body:not(.bp-login-page) .bp-chat-panel .bp-chat-head-sub { color: var(--bp-muted); }
body:not(.bp-login-page) .bp-chat-panel .bp-chat-close { background: #F7F8F5; border-color: var(--bp-line); color: var(--bp-muted); }
body:not(.bp-login-page) .bp-chat-panel .bp-chat-bubble.from-assistant { background: #F7F8F5; border-color: var(--bp-line-soft); color: var(--bp-text); }
body:not(.bp-login-page) .bp-chat-panel .bp-chat-bubble.from-user { background: var(--bp-signal-dim); border-color: rgba(104, 118, 41, .22); color: var(--bp-text); }
body:not(.bp-login-page) .bp-chat-panel .bp-chat-composer textarea { background: #FFFFFF; border-color: var(--bp-line); color: var(--bp-text); }
body:not(.bp-login-page) .bp-chat-panel .bp-chat-composer textarea::placeholder { color: var(--bp-faint); }

.bp-chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--bp-line);
    flex-shrink: 0;
}
.bp-chat-head-title { display: flex; align-items: center; gap: 9px; }
.bp-chat-head-title strong { font-family: var(--bp-font-display); font-size: 13.5px; display: block; }
.bp-chat-head-sub { font-family: var(--bp-font-mono); font-size: 10px; color: var(--bp-faint); }
.bp-chat-close {
    background: var(--bp-panel-2); border: 1px solid var(--bp-line); color: var(--bp-muted); cursor: pointer;
    font-size: 14px; width: 28px; height: 28px; border-radius: 50%;
}
.bp-chat-close:hover { color: var(--bp-text); background: rgba(255,255,255,0.1); }

.bp-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bp-chat-composer {
    border-top: 1px solid var(--bp-line);
    padding: 10px 12px;
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
    gap: 8px;
}
.bp-chat-composer textarea {
    flex: 1;
    resize: none;
    max-height: 120px;
    min-height: 40px;
    overflow-y: hidden;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--bp-line);
    border-radius: 14px;
    padding: 10px 14px;
    color: var(--bp-text);
    font-family: var(--bp-font-body);
    font-size: 13px;
    line-height: 1.4;
}
.bp-chat-composer textarea:focus { outline: 2px solid var(--bp-signal); outline-offset: 1px; }

.bp-chat-send {
    width: 38px; height: 38px; border-radius: 50%; border: none; flex-shrink: 0;
    background: var(--gisp-graphite); color: #FFFFFF; cursor: pointer; font-size: 15px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 6px 16px rgba(67, 80, 88, .18);
}
.bp-chat-send:hover { opacity: .9; }
.bp-chat-send:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.bp-chat-send svg, .bp-chat-mic svg { width: 17px; height: 17px; fill: currentColor; }
.bp-chat-mic svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bp-chat-mic {
    width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
    background: #F1F2EE; color: var(--gisp-graphite); border: 1px solid var(--bp-line);
    cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.bp-chat-mic:hover { background: #E7E9E4; }
.bp-chat-mic.is-listening { background: var(--status-info); border-color: var(--status-info); color: #fff; box-shadow: 0 0 0 4px rgba(111, 135, 145, .16); animation: bp-mic-listening 1.2s ease-in-out infinite; }
.bp-chat-mic:disabled { opacity: .42; cursor: not-allowed; }
@keyframes bp-mic-listening { 50% { transform: scale(1.08); } }

.bp-chat-typing { display: flex; gap: 4px; padding: 6px 0; }
.bp-chat-typing span {
    width: 6px; height: 6px; border-radius: 50%; background: var(--bp-faint);
    animation: bp-typing-dot 1.2s infinite;
}
.bp-chat-typing span:nth-child(2) { animation-delay: .15s; }
.bp-chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes bp-typing-dot {
    0%, 60%, 100% { transform: translateY(0); opacity: .4; }
    30% { transform: translateY(-3px); opacity: 1; }
}
.bp-chat-bubble.is-reasoning {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 208px;
    color: #334c70;
}
.bp-chat-bubble.is-reasoning .bp-chat-typing { flex: 0 0 auto; }
.bp-chat-bubble.is-reasoning .bp-chat-typing span { background: #2879d7; }
.bp-reasoning-copy { display: grid; gap: 2px; }
.bp-reasoning-copy strong { font-size: 12.5px; color: #1d385f; }
.bp-reasoning-copy small { color: #7185a4; font-size: 11px; line-height: 1.35; }
@media (prefers-reduced-motion: reduce) {
    .bp-chat-typing span { animation: none; opacity: .82; }
}

/* Full-page chat variant (Brain > Assistant) */
.bp-chat-full {
    display: flex;
    flex-direction: column;
    height: clamp(560px, calc(100dvh - 210px), 840px);
    min-height: 420px;
    background: var(--bp-panel);
    backdrop-filter: blur(var(--bp-blur));
    -webkit-backdrop-filter: blur(var(--bp-blur));
    border: 1px solid var(--bp-line);
    border-radius: var(--bp-radius);
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 14px 40px rgba(0,0,0,0.3);
}
.bp-assistant-head-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.bp-model-diagnostics { position: relative; }
.bp-model-diagnostics summary, .bp-assistant-icon { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--bp-line); border-radius: 10px; background: var(--bp-panel-2); color: var(--bp-muted); cursor: pointer; }
.bp-model-diagnostics summary { list-style: none; }
.bp-model-diagnostics summary::-webkit-details-marker { display: none; }
.bp-model-diagnostics summary svg, .bp-assistant-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bp-diagnostics-panel { position: absolute; inset-inline-end: 0; top: calc(100% + 7px); z-index: 8; display: grid; gap: 10px; width: min(300px, calc(100vw - 28px)); max-height: min(360px, calc(100dvh - 92px)); overflow: auto; padding: 12px; border: 1px solid var(--bp-line); border-radius: 12px; background: var(--bp-panel-solid); box-shadow: 0 16px 36px rgba(40,57,91,.2); }
.bp-diagnostics-panel > label:first-child { display: grid; gap: 5px; min-width: 0; color: var(--bp-muted); font-size: 11px; }
.bp-diagnostics-panel select { position: static; width: 100%; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.bp-diagnostics-panel small { color: var(--bp-faint); line-height: 1.45; }
.bp-capability-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--bp-muted); font-size: 11px; }
.bp-capability-row strong { color: var(--bp-good); }
.bp-capability-row strong.is-unavailable { color: var(--bp-alert); }
.bp-auto-speak { display: flex; align-items: center; gap: 7px; color: var(--bp-muted); font-size: 11px; }
.bp-auto-speak input { width: auto; }
.bp-assistant-icon .bp-icon-restore { display: none; }
.bp-assistant-workspace.is-expanded .bp-assistant-icon .bp-icon-expand { display: none; }
.bp-assistant-workspace.is-expanded .bp-assistant-icon .bp-icon-restore { display: block; }
.bp-chat-composer { position: relative; }
.bp-composer-action { display: grid; place-items: center; flex: 0 0 46px; width: 46px; height: 46px; padding: 0; border: 1px solid var(--bp-line); border-radius: 13px; background: var(--bp-panel-2); color: var(--bp-muted); cursor: pointer; }
.bp-composer-action svg, .bp-chat-send svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bp-composer-action:disabled { cursor: not-allowed; opacity: .42; }
.bp-composer-action.is-recording { color: #fff; background: #a31e3b; border-color: #a31e3b; animation: bp-recording-pulse 1.2s ease-in-out infinite; }
.bp-composer-action.is-processing .bp-control-state { display: block; width: 12px; height: 12px; border: 2px solid currentColor; border-block-start-color: transparent; border-radius: 50%; animation: bp-control-spin .8s linear infinite; }
.bp-control-state { display: none; position: absolute; }
.bp-voice-status { position: absolute; inset-inline-start: 14px; inset-block-end: calc(100% + 7px); z-index: 4; max-width: min(420px, calc(100vw - 40px)); padding: 7px 10px; border: 1px solid var(--bp-line); border-radius: 9px; color: var(--bp-muted); background: var(--bp-panel-solid); box-shadow: 0 8px 20px rgba(40,57,91,.12); font-size: 10.5px; text-align: start; }
.bp-voice-status[hidden] { display: none; }
.bp-assistant-workspace[data-voice-state="listening"] .bp-voice-status { color: #a31e3b; font-weight: 700; }
.bp-voice-playback { display: inline-flex; align-items: center; gap: 3px; margin-top: 2px; }
.bp-voice-playback button { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--bp-muted); cursor: pointer; }
.bp-voice-playback button:hover, .bp-message-reply:hover, .bp-attachment-reply:hover { color: var(--bp-signal); background: var(--bp-signal-dim); }
.bp-voice-playback svg, .bp-message-reply svg, .bp-attachment-reply svg, .bp-inline-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bp-voice-playback .bp-audio-listen { color: var(--bp-signal); }
.bp-voice-playback .bp-audio-pause, .bp-voice-playback .bp-audio-stop { display: none; }
.bp-voice-playback.is-active .bp-audio-listen { display: none; }
.bp-voice-playback.is-active .bp-audio-pause, .bp-voice-playback.is-active .bp-audio-stop { display: inline-grid; }
@keyframes bp-recording-pulse { 50% { box-shadow: 0 0 0 5px rgba(163, 30, 59, .14); } }
@keyframes bp-control-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .bp-composer-action.is-recording, .bp-composer-action.is-processing .bp-control-state { animation: none; } }
.bp-composer-state { padding: 8px 14px 0; border-top: 1px solid var(--bp-line-soft); }
.bp-composer-state > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 10px; border-inline-start: 3px solid var(--bp-signal); background: var(--bp-panel-2); }
.bp-composer-state #assistantAttachmentPreview { flex-wrap: wrap; justify-content: flex-start; }
.bp-composer-state #assistantReplyPreview img { flex: 0 0 52px; width: 52px; height: 40px; object-fit: cover; border-radius: 6px; }
.bp-attachment-chip { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; padding: 4px 7px; border: 1px solid var(--bp-line-soft); border-radius: 8px; background: var(--bp-panel); }
.bp-attachment-chip img { width: 52px; height: 40px; object-fit: cover; border-radius: 6px; }
.bp-attachment-chip small { max-width: 240px; }
.bp-attachment-chip button { margin-inline-start: auto; }
.bp-governance-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; align-items: end; margin-block: 12px 18px; }
.bp-governance-filters label { display: grid; gap: 5px; color: var(--bp-muted); font-size: .9rem; }
.bp-tag-warning { border-color: #b7791f; color: #8a4b08; background: #fff8e6; }
.bp-composer-state span { display: grid; min-width: 0; }
.bp-composer-state small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--bp-muted); }
.bp-composer-state button { border: 0; background: transparent; color: var(--bp-muted); font-size: 18px; cursor: pointer; }
.bp-message { position: relative; display: flex; flex-direction: column; align-items: flex-start; }
.bp-message:has(.from-user) { align-items: flex-end; }
.bp-message-reference { width: min(74%, 620px); padding: 7px 10px; border: 1px solid var(--bp-line-soft); border-radius: 10px 10px 3px 3px; background: var(--bp-panel-2); color: var(--bp-muted); text-align: start; cursor: pointer; }
.bp-message-reference strong, .bp-message-reference span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bp-message-reference img { float: inline-start; width: 42px; height: 34px; margin-inline-end: 8px; object-fit: cover; border-radius: 6px; }
.bp-message-reply { display: grid; place-items: center; width: 34px; height: 34px; margin-top: 2px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--bp-muted); cursor: pointer; }
.bp-inline-icon { display: inline-grid; place-items: center; flex: 0 0 auto; }
.bp-message-sources { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 5px; }
.bp-message-source { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--bp-line-soft); border-radius: 10px; background: var(--bp-panel-2); overflow: hidden; }
.bp-message-sources a, .bp-pending-confirmation { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; padding: 5px 8px; color: var(--bp-signal); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-message-sources img { width: 42px; height: 34px; margin: -5px 0 -5px -8px; object-fit: cover; }
[dir="rtl"] .bp-message-sources img { margin: -5px -8px -5px 0; }
.bp-attachment-reply { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; padding: 0; border: 0; background: transparent; color: var(--bp-muted); cursor: pointer; }
.bp-message-retry { min-height: 34px; margin-top: 4px; padding: 5px 11px; border: 1px solid var(--bp-line); border-radius: 999px; background: var(--bp-panel-2); color: var(--bp-signal); cursor: pointer; }
.bp-message-source:focus-within, .bp-attachment-reply:focus-visible, .bp-message-retry:focus-visible { outline: 2px solid var(--bp-signal); outline-offset: 2px; }
.bp-pending-confirmation { margin-top: 10px; }
.bp-message.is-referenced { animation: bp-reference-pulse 1.5s ease; }
.bp-message.is-send-failed { opacity: .72; }
@keyframes bp-reference-pulse { 50% { background: var(--bp-signal-dim); } }
body.bp-assistant-expanded { overflow: hidden; }
.bp-assistant-workspace.is-expanded { position: fixed; inset: 0; z-index: 100; height: 100dvh; min-height: 0; margin: 0; border: 0; border-radius: 0; background: var(--bp-panel); }
.bp-assistant-workspace.is-expanded .bp-chat-body { width: min(100%, 900px); margin-inline: auto; }
.bp-assistant-workspace.is-expanded .bp-chat-composer, .bp-assistant-workspace.is-expanded .bp-composer-state { width: min(100%, 940px); margin-inline: auto; }
.bp-assistant-workspace .bp-chat-bubble.from-assistant { width: 100%; max-width: 100%; }
.bp-assistant-workspace .bp-chat-bubble.from-user { width: fit-content; max-width: 50%; }
.bp-chat-full .bp-chat-body { padding: 22px; }
.bp-chat-full .bp-chat-composer { padding: 14px 18px; }
.bp-assistant-workspace .bp-chat-composer textarea { min-height: 46px; max-height: min(45dvh, 420px); }
.bp-assistant-workspace .bp-chat-send { width: 46px; height: 46px; }
html[dir="rtl"] .bp-assistant-workspace .bp-chat-send svg { transform: scaleX(-1); }

/* The assistant landing workspace fills the space beside the navigation. */
.bp-assistant-page .bp-main { height: 100dvh; overflow: hidden; }
.bp-assistant-page .bp-content { display: flex; flex-direction: column; flex: 1; min-height: 0; padding: 0; }
.bp-assistant-page .bp-assistant-workspace { flex: 1; width: 100%; height: auto; min-height: 0; margin: 0; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
.bp-assistant-page .bp-assistant-workspace .bp-chat-head { position: relative; z-index: 10; }
.bp-assistant-page .bp-assistant-workspace .bp-chat-body { min-height: 0; }
.bp-assistant-history { position: relative; }
.bp-assistant-history > summary { cursor: pointer; list-style: none; white-space: nowrap; }
.bp-assistant-history > summary::-webkit-details-marker { display: none; }
.bp-assistant-history-panel { position: absolute; inset-inline-end: 0; top: calc(100% + 10px); z-index: 20; width: min(600px, calc(100vw - 32px)); max-height: min(72dvh, 680px); overflow-y: auto; margin: 0; box-shadow: 0 16px 38px rgba(40,57,91,.2); }
.bp-project-chat { height: 520px; min-height: 380px; }
.bp-project-chat-actions { display: flex; align-items: center; gap: 8px; }
.bp-project-chat-actions .bp-btn-ghost { padding: 6px 10px; font-size: 11px; }
@media (max-width: 620px) { .bp-project-chat { height: 480px; } .bp-project-chat-actions .bp-btn-ghost { padding: 5px 7px; } }

.bp-project-editor details > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.bp-project-editor details > summary::-webkit-details-marker { display: none; }
.bp-project-editor summary strong { display: block; font-family: var(--bp-font-display); font-size: 15px; }
.bp-project-editor summary small { display: block; margin-top: 4px; color: var(--bp-faint); font-size: 11px; }
.bp-project-editor details[open] > summary { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--bp-line-soft); }
.bp-context-link-form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--bp-line-soft); }
.bp-project-add-source { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--bp-line-soft); }
.bp-project-add-source summary { cursor: pointer; color: var(--bp-signal); font-size: 12px; font-weight: 600; }
.bp-project-add-source form { margin-top: 14px; }
.bp-project-date [hidden] { display: none !important; }
.bp-project-date { position: relative; min-width: 0; }
.bp-meeting-date [hidden] { display: none !important; }
.bp-meeting-date { position: relative; min-width: 0; }
.bp-meeting-clock { display: flex; align-items: center; gap: 10px; margin-top: 8px; color: var(--bp-muted); font-size: 13px; }
.bp-meeting-clock input { width: min(170px, 100%); }
.bp-date-modes { display: inline-flex; gap: 3px; padding: 3px; margin: 0 0 8px; border: 1px solid var(--bp-line); border-radius: 10px; background: var(--bp-surface, #fff); }
.bp-date-modes button { border: 0; border-radius: 7px; background: transparent; color: var(--bp-muted); padding: 6px 10px; cursor: pointer; font: inherit; font-size: 12px; }
.bp-date-modes button.is-active { background: var(--bp-signal-dim); color: var(--bp-text); font-weight: 700; }
.bp-date-modes button:disabled { opacity: .5; cursor: not-allowed; }
.bp-persian-value { display: block; width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--bp-line); border-radius: var(--bp-radius-sm); background: var(--bp-surface, #fff); color: var(--bp-text); font: inherit; text-align: start; cursor: pointer; }
.bp-persian-popover { position: absolute; z-index: 40; inset-inline-start: 0; top: 100%; width: min(330px, calc(100vw - 38px)); margin-top: 6px; padding: 12px; border: 1px solid var(--bp-line); border-radius: 12px; background: var(--bp-surface, #fff); box-shadow: 0 16px 42px rgba(30, 40, 42, .18); }
.bp-persian-month-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; direction: ltr; margin-bottom: 10px; }
.bp-persian-month-bar strong { direction: rtl; color: var(--bp-text); font-size: 13px; }
.bp-persian-month-bar button, .bp-persian-today { border: 1px solid var(--bp-line); border-radius: 8px; background: transparent; color: var(--bp-text); padding: 5px 10px; cursor: pointer; font: inherit; }
.bp-persian-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; text-align: center; }
.bp-persian-weekday { color: var(--bp-muted); font-size: 11px; padding: 6px 0; }
.bp-persian-day { border: 0; border-radius: 8px; background: transparent; color: var(--bp-text); min-height: 32px; cursor: pointer; font: inherit; font-size: 12px; }
.bp-persian-day:hover, .bp-persian-day.is-selected { background: var(--bp-signal-dim); color: var(--bp-text); }
.bp-persian-day.is-today { outline: 1px solid var(--bp-signal); outline-offset: -2px; }
.bp-persian-today { display: block; margin: 9px 0 0 auto; font-size: 12px; }

.bp-topic-link {
    width: 100%;
    padding: 7px 0;
    border: 0;
    color: var(--bp-signal);
    background: transparent;
    text-align: left;
    font: inherit;
    cursor: pointer;
}
.bp-topic-link:hover { text-decoration: underline; }

/* Administrator governance confirmation cards */
.bp-confirmation-card { margin-top: 14px; padding: clamp(15px, 2vw, 22px); overflow: hidden; }
.bp-confirmation-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.bp-confirmation-header h3 { margin: 4px 0 0; font-family: var(--bp-font-display); font-size: clamp(16px, 2vw, 22px); line-height: 1.35; overflow-wrap: anywhere; }
.bp-confirmation-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.bp-candidate-proposition { margin-top: 14px; padding: clamp(14px, 2vw, 20px); border: 1px solid rgba(104, 118, 41, .3); border-inline-start: 5px solid var(--bp-signal); border-radius: var(--bp-radius-sm); background: var(--bp-signal-dim); }
.bp-candidate-proposition > span { color: var(--bp-signal); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.bp-candidate-proposition p { margin: 9px 0 0; color: var(--bp-text); font-size: clamp(16px, 2vw, 20px); font-weight: 650; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.bp-candidate-summary, .bp-candidate-source dl, .bp-technical-details dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0 0; }
.bp-candidate-summary > div, .bp-candidate-source dl > div, .bp-technical-details dl > div { min-width: 0; padding: 10px 12px; border: 1px solid var(--bp-line-soft); border-radius: 9px; background: var(--bp-panel-2); }
.bp-candidate-summary dt, .bp-candidate-source dt, .bp-technical-details dt { color: var(--bp-faint); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.bp-candidate-summary dd, .bp-candidate-source dd, .bp-technical-details dd { margin: 4px 0 0; color: var(--bp-text); line-height: 1.5; overflow-wrap: anywhere; }
.bp-candidate-reason { margin-top: 16px; padding: 14px 16px; border-radius: 10px; background: #F7F8F5; }
.bp-candidate-reason strong { color: var(--bp-text); }
.bp-candidate-reason p { margin: 5px 0 0; line-height: 1.65; }
.bp-candidate-source { margin-top: 18px; }
.bp-candidate-source h4, .bp-candidate-comparison h4 { margin: 0; font-family: var(--bp-font-display); font-size: 13px; }
.bp-source-message { margin-top: 10px; }
.bp-source-message summary, .bp-technical-details summary { color: var(--bp-signal); cursor: pointer; font-weight: 650; }
.bp-source-message blockquote { margin: 10px 0 0; padding: 12px 14px; border-inline-start: 3px solid var(--bp-line); background: var(--bp-panel-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.bp-source-link { display: inline-flex; margin-top: 10px; min-height: 40px; align-items: center; color: var(--bp-signal); font-weight: 650; }
.bp-candidate-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.bp-candidate-comparison > div { min-width: 0; padding: 14px; border: 1px solid var(--bp-line); border-radius: 10px; }
.bp-candidate-comparison p { margin: 8px 0 0; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.bp-approval-consequence { margin: 18px 0 0; padding: 11px 14px; border-radius: 9px; color: #33420d; background: var(--bp-signal-dim); font-weight: 700; }
.bp-governance-actions { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.bp-governance-actions details > summary { list-style: none; cursor: pointer; }
.bp-governance-actions details > summary::-webkit-details-marker { display: none; }
.bp-governance-edit[open], .bp-governance-reject[open] { flex: 1 0 100%; order: 2; padding: 14px; border: 1px solid var(--bp-line); border-radius: 10px; background: var(--bp-panel-2); }
.bp-governance-edit[open] > summary, .bp-governance-reject[open] > summary { display: inline-flex; margin-bottom: 14px; }
.bp-governance-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bp-governance-form label, .bp-governance-reject label { display: grid; gap: 5px; color: var(--bp-muted); font-size: 11px; font-weight: 650; }
.bp-governance-form select[multiple] { min-height: 126px; }
.bp-governance-form .bp-form-span { grid-column: 1 / -1; }
.bp-effective-preview { padding: 15px; border: 1px solid rgba(104,118,41,.32); border-radius: 11px; background: var(--bp-signal-dim); }
.bp-effective-preview > div:first-child { display: grid; gap: 4px; }
.bp-effective-preview > div:first-child strong { font-family: var(--bp-font-display); font-size: 16px; overflow-wrap: anywhere; }
.bp-effective-preview dl { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; margin: 12px 0; }
.bp-effective-preview dl > div { min-width: 0; padding: 9px 10px; border-radius: 8px; background: rgba(255,255,255,.5); }
.bp-effective-preview dt, .bp-effective-content > span { color: var(--bp-faint); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.bp-effective-preview dd { margin: 4px 0 0; overflow-wrap: anywhere; }
.bp-effective-content { padding: 11px; border-inline-start: 3px solid var(--bp-signal); background: var(--bp-panel-solid); }
.bp-effective-content p { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.bp-effective-preview small { display: block; margin-top: 9px; color: var(--bp-muted); }
.bp-governance-reject form { display: flex; align-items: end; gap: 10px; }
.bp-governance-reject label { flex: 1; }
.bp-technical-details { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--bp-line-soft); }
.bp-technical-details dd { font-family: var(--bp-font-mono); font-size: 10px; }

/* Command Center calendar */
.bp-calendar-add { position: relative; }
.bp-calendar-add > summary { list-style: none; cursor: pointer; }
.bp-calendar-add > summary::-webkit-details-marker { display: none; }
.bp-calendar-add[open] > summary { margin-bottom: 10px; }
.bp-calendar-form { position: absolute; z-index: 12; right: 0; top: 44px; width: min(660px, calc(100vw - 56px)); padding: 18px; border: 1px solid var(--bp-line); border-radius: var(--bp-radius); background: var(--bp-panel-solid); box-shadow: 0 22px 48px rgba(40, 57, 91, .22); }
.bp-calendar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px; align-items: start; }
.bp-calendar-main { padding: 16px; overflow: hidden; }
.bp-calendar-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.bp-calendar-head h2 { margin: 0; font-family: var(--bp-font-display); font-size: 18px; }
.bp-calendar-head .bp-btn-ghost { min-width: 38px; padding: 7px 12px; text-align: center; }
.bp-calendar-weekdays, .bp-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.bp-calendar-weekdays { border: 1px solid var(--bp-line-soft); border-bottom: 0; border-radius: var(--bp-radius-sm) var(--bp-radius-sm) 0 0; overflow: hidden; }
.bp-calendar-weekdays span { padding: 8px 9px; color: var(--bp-faint); background: var(--bp-panel-2); font-family: var(--bp-font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .4px; }
.bp-calendar-day { min-height: 108px; padding: 7px; border-right: 1px solid var(--bp-line-soft); border-bottom: 1px solid var(--bp-line-soft); background: rgba(255,255,255,.018); display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.bp-calendar-day:nth-child(7n + 1) { border-left: 1px solid var(--bp-line-soft); }
.bp-calendar-day.is-muted { opacity: .38; }
.bp-calendar-day.is-today { background: var(--bp-azure-dim); }
.bp-calendar-date { width: 22px; height: 22px; display: grid; place-items: center; color: var(--bp-muted); border-radius: 50%; font-family: var(--bp-font-mono); font-size: 10px; }
.bp-calendar-day.is-today .bp-calendar-date { color: #fff; background: var(--bp-azure); }
.bp-calendar-event { display: block; overflow: hidden; padding: 3px 5px; border-left: 3px solid var(--bp-faint); border-radius: 5px; color: var(--bp-text); background: var(--bp-panel-2); font-size: 10px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.bp-calendar-event:hover { filter: brightness(.96); text-decoration: underline; }
.type-deadline { border-color: var(--bp-critical); background: var(--bp-critical-dim); }
.type-meeting { border-color: var(--bp-azure); background: var(--bp-azure-dim); }
.type-work_period { border-color: var(--bp-good); background: var(--bp-good-dim); }
.type-birthday { border-color: var(--bp-alert); background: var(--bp-alert-dim); }
.type-special_day { border-color: var(--bp-signal); background: var(--bp-signal-dim); }
.type-reminder { border-color: var(--bp-faint); }
.bp-calendar-key { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.bp-calendar-key span { padding: 4px 7px; border-left: 3px solid var(--bp-faint); border-radius: 5px; color: var(--bp-muted); background: var(--bp-panel-2); font-size: 10px; }
.bp-calendar-upcoming { padding: 16px; }
.bp-calendar-upcoming .bp-status-list li { align-items: flex-start; gap: 9px; }
.bp-calendar-mini-date { min-width: 70px; color: var(--bp-signal); font-family: var(--bp-font-mono); font-size: 10px; line-height: 1.5; }
.bp-calendar-upcoming .bp-status-name { display: block; }
.bp-calendar-google { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--bp-line-soft); }
.bp-calendar-google strong { font-family: var(--bp-font-display); font-size: 13px; }
.bp-calendar-google p { margin: 7px 0 10px; color: var(--bp-faint); font-size: 11px; line-height: 1.55; }
.bp-check { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; color: var(--bp-muted); font-size: 12px; cursor: pointer; }
.bp-check input { accent-color: var(--bp-signal); }

/* White-label organization configuration */
.bp-check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0 18px; }
.bp-check-card { display: flex; align-items: flex-start; gap: 10px; min-height: 70px; padding: 13px; border: 1px solid var(--bp-line); border-radius: var(--bp-radius-sm); background: var(--bp-panel-2); color: var(--bp-text); cursor: pointer; }
.bp-check-card:hover { border-color: var(--bp-signal); }
.bp-check-card input { width: auto; min-width: 16px; margin: 3px 0 0; accent-color: var(--bp-azure); }
.bp-check-card span { display: grid; gap: 4px; }
.bp-check-card strong { font-family: var(--bp-font-display); font-size: 13px; }
.bp-check-card small { color: var(--bp-faint); font-size: 11px; line-height: 1.4; }

/* Command Center checklists */
.bp-checklist-runs { display: grid; gap: 14px; }
.bp-checklist-run { padding: 15px; border: 1px solid var(--bp-line-soft); border-radius: var(--bp-radius-sm); background: var(--bp-panel-2); }
.bp-checklist-run > div > strong { display: block; font-family: var(--bp-font-display); font-size: 15px; }
.bp-checklist-run > div > p { margin: 8px 0 0; color: var(--bp-muted); font-size: 12px; }
.bp-checklist-run ul { display: grid; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.bp-checklist-run li { display: flex; align-items: flex-start; gap: 8px; padding-top: 7px; border-top: 1px solid var(--bp-line-soft); }
.bp-checklist-run li form { margin: 0; }
.bp-step-toggle { width: 23px; height: 23px; padding: 0; border: 1px solid var(--bp-azure); border-radius: 50%; color: var(--bp-azure); background: transparent; cursor: pointer; line-height: 1; }
.bp-checklist-run li.is-done .bp-step-toggle { color: #fff; background: var(--bp-azure); }
.bp-checklist-run li.is-done strong { color: var(--bp-faint); text-decoration: line-through; }
.bp-checklist-run li span { display: grid; gap: 2px; color: var(--bp-text); font-size: 12px; }
.bp-checklist-run li small { color: var(--bp-faint); font-size: 11px; }

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */

@media (max-width: 1100px) {
    .bp-kpi-row { grid-template-columns: repeat(3, 1fr); }
    .bp-grid-3 { grid-template-columns: 1fr 1fr; }
    .bp-dept-grid { grid-template-columns: repeat(2, 1fr); }
    .bp-kanban { grid-template-columns: 1fr; }
    .bp-form-grid { grid-template-columns: 1fr; }
    .bp-tile-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .bp-shell { grid-template-columns: 1fr; }
    .bp-side {
        position: fixed; left: 0; z-index: 20; margin-left: calc(-1 * var(--bp-side-w));
    }
    .bp-shell.bp-nav-open .bp-side { margin-left: 0; box-shadow: 0 0 0 999px rgba(0,0,0,0.5); }
    .bp-burger { display: block; }
    .bp-grid-2, .bp-grid-3 { grid-template-columns: 1fr; }
    .bp-kpi-row { grid-template-columns: repeat(2, 1fr); }
    .bp-pulse-strip { display: none; }
    .bp-calendar-layout { grid-template-columns: 1fr; }
    .bp-check-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .bp-tile-grid { grid-template-columns: 1fr; }
    .bp-chat-panel { right: 14px; left: 14px; width: auto; bottom: 88px; }
    .bp-fab { right: 18px; bottom: 18px; }
    .bp-assistant-workspace { position: fixed; inset: 0; z-index: 45; height: 100dvh; min-height: 0; margin: 0; border: 0; border-radius: 0; padding-bottom: env(safe-area-inset-bottom); }
    .bp-assistant-workspace .bp-chat-head { padding-top: calc(10px + env(safe-area-inset-top)); }
    .bp-assistant-workspace .bp-chat-body { padding: 12px; }
    .bp-assistant-workspace .bp-chat-composer { padding: 9px max(9px, env(safe-area-inset-right)) max(9px, env(safe-area-inset-bottom)) max(9px, env(safe-area-inset-left)); }
    .bp-assistant-workspace .bp-chat-bubble.from-user { max-width: 88%; }
    .bp-assistant-workspace .bp-chat-head-sub { max-width: 45vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .bp-assistant-workspace #assistantMaximize { display: none; }
    .bp-assistant-workspace .bp-composer-action, .bp-assistant-workspace .bp-chat-send { flex-basis: 48px; width: 48px; height: 48px; }
    .bp-assistant-workspace .bp-composer-action svg, .bp-assistant-workspace .bp-chat-send svg { width: 25px; height: 25px; }
    .bp-voice-playback button, .bp-message-reply, .bp-attachment-reply { width: 44px; height: 44px; }
    .bp-diagnostics-panel { position: fixed; inset-inline: 14px; top: calc(62px + env(safe-area-inset-top)); width: auto; max-height: calc(100dvh - 82px - env(safe-area-inset-top)); }
    .bp-confirmation-header { display: grid; }
    .bp-confirmation-badges { justify-content: flex-start; }
    .bp-candidate-summary, .bp-candidate-source dl, .bp-technical-details dl, .bp-candidate-comparison, .bp-governance-form { grid-template-columns: 1fr; }
    .bp-governance-form .bp-form-span { grid-column: auto; }
    .bp-effective-preview dl { grid-template-columns: 1fr; }
    .bp-governance-actions { display: grid; grid-template-columns: 1fr; }
    .bp-governance-actions form > button, .bp-governance-actions summary { width: 100%; justify-content: center; text-align: center; }
    .bp-governance-reject form { align-items: stretch; flex-direction: column; }
    .bp-calendar-form { position: static; width: 100%; margin-top: 10px; }
    .bp-calendar-day { min-height: 84px; padding: 5px; }
    .bp-calendar-event { padding: 2px 3px; font-size: 9px; }
    .bp-calendar-weekdays span { padding: 6px 3px; font-size: 9px; text-align: center; }
    body { padding: 0; }
    .bp-shell { border-radius: 0; min-height: 100vh; box-shadow: none; }
}

/* ---------------------------------------------------------------------
   Direction, accessibility, and shared control support
   --------------------------------------------------------------------- */
body:not(.bp-login-page) {
    color: var(--bp-text);
    background: var(--gisp-canvas);
}

.bp-login-page {
    background: var(--gisp-canvas);
}
.bp-login-card {
    color: var(--gisp-graphite);
    border-color: rgba(67, 80, 88, .16);
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--bp-shadow);
}
.bp-login-logo-wrap { background: var(--gisp-graphite); }
.bp-login-eyebrow,
.bp-login-heading p,
.bp-login-field > label,
.bp-login-remember,
.bp-login-foot { color: var(--bp-muted); }
.bp-login-submit {
    color: var(--gisp-graphite);
    background: var(--gisp-lime);
    box-shadow: var(--bp-shadow-sm);
}
.bp-login-submit:hover { box-shadow: var(--bp-shadow); }
.bp-login-input-wrap { background: var(--gisp-graphite); }
.bp-login-input-wrap > span { background: rgba(0, 0, 0, .14); }
.bp-login-language { display: flex; justify-content: flex-end; margin-block-end: 14px; }

:focus-visible {
    outline: 3px solid rgba(104, 118, 41, .42);
    outline-offset: 2px;
}

.bp-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.bp-language-switcher { margin: 0; }
.bp-language-switcher select {
    min-height: 36px;
    padding: 6px 10px;
    border: 1px solid var(--bp-line);
    border-radius: 10px;
    color: var(--bp-text);
    background: #F7F8F5;
    font: 500 12px/1.4 var(--bp-font-body);
    cursor: pointer;
}

.bp-side {
    border-right: 0;
    border-inline-end: 1px solid var(--bp-line);
    transition: margin-inline-start .2s ease;
}
.bp-shell.bp-collapsed .bp-side {
    margin-left: 0;
    margin-inline-start: calc(-1 * var(--bp-side-w));
}
.bp-nav-item,
.bp-nav-parent,
.bp-nav-child,
.bp-topic-link { text-align: start; }
.bp-nav-item,
.bp-nav-child { border-inline-start: 3px solid transparent; }
.bp-nav-item.is-active,
.bp-nav-child.is-active {
    border-inline-start-color: #93A63B;
    box-shadow: none;
}
.bp-nav-parent .bp-chevron {
    margin-left: 0;
    margin-inline-start: auto;
}
.bp-nav-children {
    padding-left: 0;
    padding-inline-start: 28px;
    border-left: 0;
    border-inline-start: 1px solid var(--bp-line-soft);
    margin: 4px 20px 8px 0;
    margin-inline-start: 20px;
    margin-inline-end: 0;
}
.bp-top-right {
    margin-left: 0;
    margin-inline-start: auto;
}
.bp-badge {
    right: auto;
    inset-inline-end: -4px;
}
.bp-fab,
.bp-chat-panel {
    right: auto;
    inset-inline-end: 28px;
}
[dir="rtl"] .bp-chevron,
[dir="rtl"] .bp-directional-icon { transform: scaleX(-1); }
[dir="rtl"] .bp-nav-group.is-open .bp-chevron { transform: scaleX(-1) rotate(90deg); }
.bp-login-submit span {
    margin-left: 0;
    margin-inline-start: 8px;
}

@media (max-width: 860px) {
    .bp-side {
        left: auto;
        inset-inline-start: 0;
        margin-left: 0;
        margin-inline-start: calc(-1 * var(--bp-side-w));
        box-shadow: 8px 0 30px rgba(67, 80, 88, .14);
    }
    [dir="rtl"] .bp-side { box-shadow: -8px 0 30px rgba(67, 80, 88, .14); }
    .bp-shell.bp-nav-open .bp-side {
        margin-left: 0;
        margin-inline-start: 0;
    }
}

@media (max-width: 640px) {
    .bp-chat-panel {
        left: auto;
        right: auto;
        inset-inline: 14px;
    }
    .bp-fab {
        right: auto;
        inset-inline-end: 18px;
    }
    .bp-topbar { padding-inline: 16px; }
    .bp-datetime,
    .bp-account-text { display: none; }
}

/* Keep authors on consistent physical sides while preserving the text direction. */
html[dir="rtl"] .bp-assistant-workspace .bp-message { align-items: flex-end; }
html[dir="rtl"] .bp-assistant-workspace .bp-message:has(.from-user) { align-items: flex-start; }
html[dir="rtl"] .bp-assistant-workspace .bp-chat-bubble.from-user { align-self: flex-start; }
html[dir="rtl"] .bp-assistant-workspace .bp-chat-bubble.from-assistant { align-self: flex-end; }
.bp-assistant-workspace .bp-message-sources { max-width: 78%; }
.bp-assistant-workspace .bp-message-source { min-width: 0; max-width: 100%; }
.bp-composer-state[hidden], .bp-composer-state > [hidden] { display: none !important; }
.bp-composer-state #assistantAttachmentPreview { padding: 4px 0; border: 0; background: transparent; }
.bp-composer-state .bp-send-status { margin: 4px 0 8px; color: var(--bp-text); font-size: 12px; overflow-wrap: anywhere; }
.bp-topic-toolbar, .bp-topic-filters, .bp-topic-bulk, .bp-topic-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.bp-topic-toolbar { justify-content: space-between; margin: .75rem 0; }
.bp-topic-filters .is-active { border-color: var(--bp-accent, #667b1f); box-shadow: inset 0 0 0 1px var(--bp-accent, #667b1f); }
.bp-topic-row { display: grid !important; grid-template-columns: auto minmax(10rem, 1fr) auto; align-items: center; gap: .65rem; }
.bp-topic-row > input { inline-size: 1.1rem; block-size: 1.1rem; }
.bp-topic-actions { justify-content: flex-end; }
.bp-topic-actions .bp-btn-ghost { padding: .35rem .55rem; font-size: .82rem; }
@media (max-width: 640px) {
    .bp-topic-toolbar { align-items: stretch; flex-direction: column; }
    .bp-topic-row { grid-template-columns: auto 1fr; }
    .bp-topic-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Mobile shell: keep navigation available above the assistant workspace. */
.bp-mobile-nav-close, .bp-nav-backdrop { display: none; }
@media (max-width: 860px) {
    .bp-shell, .bp-shell.bp-collapsed { grid-template-columns: minmax(0, 1fr); }
    .bp-topbar { flex: 0 0 auto; gap: 8px; padding: 8px 12px; min-height: 60px; z-index: 30; }
    .bp-topbar .bp-search, .bp-topbar .bp-datetime, .bp-topbar .bp-account-text { display: none; }
    .bp-top-right { gap: 8px; min-width: 0; }
    .bp-burger { display: block; flex: 0 0 44px; width: 44px; height: 44px; font-size: 26px; }
    .bp-side, .bp-shell.bp-collapsed .bp-side {
        position: fixed; inset-block: 0; inset-inline-start: 0; inset-inline-end: auto;
        width: min(320px, calc(100vw - 48px)); height: 100dvh; margin: 0;
        padding: max(12px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
        z-index: 130; overflow-y: auto; overscroll-behavior: contain; visibility: hidden;
    }
    .bp-shell.bp-nav-open .bp-side { visibility: visible; margin: 0; box-shadow: var(--bp-shadow); }
    .bp-mobile-nav-close { display: block; align-self: flex-end; min-height: 44px; padding: 8px 12px; border: 1px solid var(--bp-line); border-radius: 10px; background: var(--bp-panel); color: var(--bp-text); font: inherit; cursor: pointer; }
    .bp-nav-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 120; background: #0006; border: 0; padding: 0; }
    .bp-side .bp-nav { flex-shrink: 0; }
    .bp-content { padding: 16px 12px 28px; min-width: 0; }
    .bp-card, .bp-grid-2 > *, .bp-grid-3 > * { min-width: 0; }
    .bp-page-head, .bp-card-head { flex-wrap: wrap; gap: 10px; }
    .bp-table { display: block; max-width: 100%; overflow-x: auto; }
    .bp-assistant-page .bp-assistant-workspace,
    .bp-assistant-page .bp-assistant-workspace.is-expanded {
        position: relative; inset: auto; z-index: auto; height: auto; min-height: 0; padding-bottom: 0;
        backdrop-filter: none; -webkit-backdrop-filter: none;
    }
    .bp-assistant-workspace .bp-chat-head { flex-wrap: wrap; gap: 8px; padding: 10px 12px; flex-shrink: 0; }
    .bp-assistant-workspace .bp-chat-head > :first-child { min-width: 0; max-width: 100%; }
    .bp-assistant-workspace .bp-chat-head-sub { max-width: calc(100vw - 70px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .bp-assistant-head-actions { flex: 1 1 100%; flex-wrap: wrap; min-width: 0; }
    .bp-assistant-head-actions > * { max-width: 100%; }
    .bp-assistant-head-actions .bp-btn-ghost { white-space: normal; overflow-wrap: anywhere; min-height: 44px; }
    .bp-assistant-workspace #assistantMaximize { display: none; }
    .bp-assistant-history-panel, .bp-diagnostics-panel { position: fixed; inset-inline: 12px; top: 180px; width: auto; max-height: calc(100dvh - 205px); overflow: auto; z-index: 40; }
    .bp-assistant-workspace .bp-chat-body { overflow-x: hidden; overflow-y: auto; min-width: 0; }
    .bp-chat-bubble { overflow-wrap: anywhere; min-width: 0; }
    .bp-chat-bubble pre { max-width: 100%; overflow-x: auto; }
    .bp-assistant-workspace .bp-chat-composer { flex-shrink: 0; gap: 6px; }
    .bp-assistant-workspace .bp-chat-composer textarea { min-width: 0; font-size: 16px; }
    .bp-assistant-workspace .bp-composer-action, .bp-assistant-workspace .bp-chat-send { flex: 0 0 44px; width: 44px; height: 44px; }
}

.bp-dictation-status{font-size:.9rem;padding:8px 12px;white-space:normal;overflow-wrap:anywhere}.bp-chat-mic.is-recording{outline:2px solid #d33}.bp-chat-mic.is-processing{opacity:.65}

/* Entry feedback stays inside the active editor, above its fields. */
.bp-entry-notice{padding:14px 16px;margin-block:12px;border:1px solid #9ba9aa;border-radius:12px;background:#f5f8f8;color:#243d40;overflow-wrap:anywhere;scroll-margin-block:18px}
.bp-entry-notice.is-error{border-color:#b95656;background:#fff2f1;color:#7e2222}
.bp-entry-notice.is-success{border-color:#368569;background:#edf8f1;color:#20563f}
.bp-entry-notice:focus{outline:2px solid currentColor;outline-offset:2px}
.bp-entry-notice ul{margin-block:8px 0;padding-inline-start:22px}
.bp-entry-error-link{font:inherit;color:inherit;background:none;border:0;text-align:start;padding:3px 0;cursor:pointer;text-decoration:underline}
.bp-entry-field-error{display:block;color:#9a2929;font-size:.88rem;margin-block:5px}
[data-entry-invalid],.bp-culture-trigger[aria-invalid="true"]{outline:2px solid #b95656;outline-offset:1px}
form[aria-busy="true"] button[type="submit"]{opacity:.65;cursor:wait}

/* Readable answer tables, contained within full-width assistant responses. */
.bp-chat-bubble.from-assistant { min-width: 0; overflow-wrap: anywhere; }
.bp-message { min-width: 0; max-width: 100%; }
.bp-response-table { width: 100%; max-width: 100%; overflow-x: auto; margin-block: 14px 6px; border: 1px solid var(--bp-line-soft); border-radius: 10px; overscroll-behavior-inline: contain; }
.bp-response-table:focus-visible { outline: 2px solid var(--bp-signal); outline-offset: 2px; }
.bp-response-table table { display: table; width: 100%; border-collapse: collapse; font-size: inherit; line-height: 1.7; }
.bp-response-table th, .bp-response-table td { padding: 10px 12px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--bp-line-soft); min-width: 100px; max-width: 340px; overflow-wrap: break-word; }
.bp-response-table th { background: var(--bp-panel-2); font-weight: 700; white-space: nowrap; }
.bp-response-table tr:nth-child(even) td { background: var(--bp-panel-2); }
.bp-response-table tr:last-child td { border-bottom: 0; }
.bp-chat-bubble.from-assistant a { color: var(--bp-signal); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.bp-chat-bubble.from-assistant a:focus-visible { outline: 2px solid var(--bp-signal); outline-offset: 2px; }
.bp-chat-bubble .bp-response-table-hint { font-size: 11px; color: var(--bp-muted); margin-block: 0 12px; }
.bp-chat-bubble pre { white-space: pre; max-width: 100%; overflow-x: auto; padding: 12px; background: var(--bp-panel-2); border-radius: 8px; }

/* Drawers are mounted under body; labels and sections retain the shared theme. */
.bp-record-drawer form > label { display:grid; gap:7px; min-width:0; color:var(--bp-muted); font-size:12px; }
.bp-record-drawer textarea { font-family:var(--bp-font-body); line-height:1.7; }
.bp-record-drawer details:not([data-list-panel]) > summary { display:list-item; cursor:pointer; font-weight:600; padding-block:10px; }
.bp-idea-filters { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,1fr) auto auto; gap:12px; align-items:end; margin-block:16px; }
.bp-idea-filters > label { display:grid; gap:7px; min-width:0; }
.bp-idea-filters > .bp-idea-mine { display:flex; gap:7px; align-items:center; min-height:46px; }
.bp-record-table tr.bp-idea-created { background:var(--bp-signal-soft,#f4f9df); }
@media(max-width:800px) { .bp-idea-filters { grid-template-columns:minmax(0,1fr); } }
