/* MevvCrew panel. Layout: dark ink sidebar + main. Brand: Bricolage Grotesque headings, Inter body, JetBrains Mono ids.
 * Colours are variables: light on :root, dark under [data-theme="dark"] and under the system preference unless the
 * user chose light. Every text/background pair is >= 4.5:1. Pills with white text use #d1262a (white on the exact
 * brand red #ed2f32 is 4.16:1); the brand red itself stays for accents. */
:root {
  --ink: #12141b; --surface: #f1f3f6; --card: #ffffff; --text: #12141b; --muted: #5d6470; --line: #e3e6eb; --line-soft: #eef0f3;
  --brand: #ed2f32; --pill: #d1262a; --pill-text: #ffffff; --brand-text: #a3191d; --link: #265896; --link-hover: #1b3f6c;
  --chip-blue-bg: #eaf2ff; --chip-blue: #265896; --chip-red-bg: #ffe3e3; --chip-red: #a3191d;
  --chart-bar: #265896; --chart-bar-soft: #a9c1e3; --chart-grid: #e3e6eb;
  --series-1: #265896; --series-2: #c05621; --series-3: #8b3fb5; --series-4: #2b8a3e;
  --ok: #2b8a3e; --ok-on: #ffffff; --warn-text: #8a4b00; --warn-bg: #fff1dc; --input: #ffffff; --ok-bg: #e3f5e6; --ok-text: #1e6b30;
  --backdrop: rgba(18, 20, 27, .45);
  --side-bg: #12141b; --side-text: #c9ccd4; --side-muted: #8a8f9c; --side-line: #2c303b; --side-on-bg: #ffffff; --side-on-text: #12141b;
  --kpi-dark-bg: #12141b; --kpi-dark-text: #ffffff; --kpi-dark-muted: #c4c8d2; --bar-bg: #2c303b; --bar: #ff6b6b;
  --radius: 20px; --shadow: 0 1px 2px rgba(18, 20, 27, .04);
  /* Spacing scale (Ali 19.11): sections and cards are spaced with these, never with one-off margins. */
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Bricolage Grotesque", Inter, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --surface: #0d0f14; --card: #141821; --text: #e9ecef; --muted: #9aa3ae; --line: #2a2f3a; --line-soft: #1f2430;
  --pill: #ff6b6b; --pill-text: #12141b; --brand-text: #ff6b6b; --link: #8fb4ff; --link-hover: #bcd3ff;
  --chip-blue-bg: #16243d; --chip-blue: #bcd3ff; --chip-red-bg: #3a1517; --chip-red: #ffb4b4;
  --chart-bar: #8fb4ff; --chart-bar-soft: #3d5a85; --chart-grid: #2a2f3a;
  --series-1: #5b8ad6; --series-2: #d06d2a; --series-3: #9a6cd0; --series-4: #2fa34c;
  --ok: #69db7c; --ok-on: #12141b; --warn-text: #ffd08a; --warn-bg: #3a2a10; --input: #0d0f14; --ok-bg: #13301b; --ok-text: #8ce99a; --backdrop: rgba(0, 0, 0, .6);
  --side-bg: #090b0f; --side-line: #232733; --side-on-bg: #e9ecef; --side-on-text: #12141b;
  --kpi-dark-bg: #1d2230; color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface: #0d0f14; --card: #141821; --text: #e9ecef; --muted: #9aa3ae; --line: #2a2f3a; --line-soft: #1f2430;
    --pill: #ff6b6b; --pill-text: #12141b; --brand-text: #ff6b6b; --link: #8fb4ff; --link-hover: #bcd3ff;
    --chip-blue-bg: #16243d; --chip-blue: #bcd3ff; --chip-red-bg: #3a1517; --chip-red: #ffb4b4;
    --chart-bar: #8fb4ff; --chart-bar-soft: #3d5a85; --chart-grid: #2a2f3a;
    --series-1: #5b8ad6; --series-2: #d06d2a; --series-3: #9a6cd0; --series-4: #2fa34c;
    --ok: #69db7c; --ok-on: #12141b; --warn-text: #ffd08a; --warn-bg: #3a2a10; --input: #0d0f14; --ok-bg: #13301b; --ok-text: #8ce99a; --backdrop: rgba(0, 0, 0, .6);
    --side-bg: #090b0f; --side-line: #232733; --side-on-bg: #e9ecef; --side-on-text: #12141b;
    --kpi-dark-bg: #1d2230; color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--surface); color: var(--text); font: 15px/1.5 var(--font); overflow-wrap: anywhere; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .22em; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); }
a:hover { color: var(--link-hover); text-decoration-color: currentColor; }
/* --- links (Ali 20.11 15:27: "link güzel durmuyor"): one rule for every <a> in the panel, v1 and v2 alike.
   .btn (.ghost, .sm)  an action: open, see all, download, go to a setting
   .btn.ghost.sm.ext   a page outside mevvCrew (a document, a policy, a receipt): a short label and ↗, the address in title
   .ref                a thing: a task, an agent, a run or session, an item key, a slug; a chip, never underlined (.mono for ids)
   .title-link         the title of a row or card that opens its detail: plain bold text, underlined only on hover (.quiet: normal weight)
   .crumb              the eyebrow above a page title that leads back to its parent
   .chip-link          a link around a chip or a pill
   .link               a link inside a sentence: the link colour with a thin, soft underline (the default above)
   Tab strips, the sidebar and the chat list style their own links. test/links-lint.test.cjs keeps bare <a> out of the views. --- */
a.ref { display: inline-flex; align-items: center; gap: var(--space-1); max-width: 100%; min-height: 26px; padding: 2px 10px; border-radius: 999px;
  background: var(--line-soft); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); font-size: .84em; font-weight: 500; line-height: 1.35;
  text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
a.ref.mono { font-family: var(--font-mono); font-size: .8em; }
a.ref:hover { background: var(--chip-blue-bg); color: var(--chip-blue); }
/* A chip keeps its size wherever it sits: :is() takes its weightiest argument, so this outranks every "links get 44 px" rule of a container. */
:is(table.grid td, body) a.ref { min-height: 26px; margin-block: 0; padding-block: 2px; }
a.title-link { color: var(--text); font-weight: 600; text-decoration: none; }
a.title-link.quiet { font-weight: inherit; }
a.title-link:hover { color: var(--link); text-decoration: underline; text-decoration-color: currentColor; }
a.crumb { color: var(--muted); font-weight: 500; text-decoration: none; }
a.crumb:hover { color: var(--text); text-decoration: underline; }
a.chip-link, a.pill, a.chip, a.badge, a.act-quote, a.flow-name, a.thumb-link { text-decoration: none; }
a.act-quote:hover, a.flow-name:hover { text-decoration: underline; }
.btn.ext::after { content: "↗" / ""; font-weight: 500; }
/* Onaylar → Geçmiş (Ali 20.11 15:27): the content column takes the room; outcome, decider, content hash and result stay
   on one line (chips, a short hash with the full one in its title). On a phone the rows stack, so this is wide screens only. */
@media (min-width: 601px) {
  table.history th:not(:first-child), table.history td:not(:first-child) { width: 1%; white-space: nowrap; }
  table.history td .ref { max-width: 14rem; }
  table.history td .body-text { white-space: pre-wrap; min-width: 10rem; }
}
h1, h2, h3 { font-family: var(--font-head); letter-spacing: -.01em; }
h1 { font-size: 2rem; line-height: 1.1; margin: 4px 0 18px; font-weight: 700; }
h2 { font-size: 1.2rem; margin: 0 0 12px; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

/* --- logo: an image, inverted on dark surfaces --- */
.logo-invert img { filter: brightness(0) invert(1); display: block; }
.logo-adapt img { display: block; }
:root[data-theme="dark"] .logo-adapt img { filter: brightness(0) invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .logo-adapt img { filter: brightness(0) invert(1); } }
/* The wordmark "mevvCrew" (Ali 20.11 14:22, 15:18): the headline font of the landing page (Bricolage Grotesque 700),
   tracked a little tighter like its headlines, next to the crew mark. */
.crew-word { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; line-height: 1; letter-spacing: -.025em; }
.crew-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: #ffffff; text-decoration: none; }
.side .crew-brand, .side .crew-brand:hover { color: #ffffff; }
/* "by" footer: the Mevvsoft logo, small and quiet, always as an image. */
.by { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--side-muted); padding-top: 4px; }
.by img { opacity: .6; display: block; }
.data-loc { font-size: .75rem; color: var(--side-muted); text-decoration: none; }
.data-loc:hover, .data-loc:focus-visible { text-decoration: underline; }
.auth-main .by { justify-content: center; color: var(--muted); }
.mark-dark { display: none; }
:root[data-theme="dark"] .mark-light { display: none; }
:root[data-theme="dark"] .mark-dark { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mark-light { display: none; }
  :root:not([data-theme="light"]) .mark-dark { display: inline; }
}

/* --- shell: sidebar + main --- */
.shell { display: flex; min-height: 100vh; }
.side { flex: 0 0 248px; background: var(--side-bg); color: var(--side-text); padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; }
.side a { color: var(--side-text); }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; min-height: 44px; }
.side-brand a { display: inline-flex; align-items: center; min-height: 44px; }
.side-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--side-muted); padding: 6px 10px 4px; }
.pano { margin: 0 4px 14px; }
.pano summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--side-line); border-radius: 999px; color: #ffffff; }
.pano summary::-webkit-details-marker { display: none; }
.pano .dot { width: 8px; height: 8px; border-radius: 4px; background: var(--brand); }
.pano .pano-name { flex: 1; font-weight: 600; }
.pano .caret { color: var(--side-muted); }
.pano-list { padding: 6px 0 0; }
.pano-list form { margin: 0; }
.pano-list button { width: 100%; text-align: left; justify-content: space-between; background: none; border: 0; color: var(--side-text); min-height: 44px; padding: 0 18px; border-radius: 999px; font: inherit; cursor: pointer; }
.pano-list button:hover { background: var(--side-line); color: #ffffff; }
.side-note { color: var(--side-muted); font-size: .85rem; padding: 4px 18px; margin: 0; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; justify-content: space-between; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; text-decoration: none; font-size: .95rem; }
.side-nav a:hover { background: var(--side-line); color: #ffffff; }
.side-nav a.on { background: var(--side-on-bg); color: var(--side-on-text); font-weight: 600; }
.side-nav .count { background: var(--pill); color: var(--pill-text); font-size: 12px; font-weight: 600; border-radius: 10px; padding: 1px 8px; }
.side-group { margin: 2px 0; }
.side-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 44px; padding: 0 14px; border-radius: 999px; color: var(--side-muted); font-size: .84rem; font-weight: 600; }
.side-group > summary::-webkit-details-marker { display: none; }
.side-group > summary:hover { background: var(--side-line); color: #ffffff; }
.side-group > summary::after { content: ""; flex: none; width: 6px; height: 6px; margin-right: 4px;
  border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.side-group[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
.side-group-items { display: flex; flex-direction: column; gap: 2px; padding: 2px 0 4px 10px; }
.side-group > summary:focus-visible { outline-offset: -3px; }
@media (prefers-reduced-motion: reduce) { .side-group > summary::after { transition: none; } }
.side-foot { margin-top: auto; padding: 16px 10px 0; border-top: 1px solid var(--side-line); display: flex; flex-direction: column; gap: 10px; font-size: .9rem; }
.side-foot form { margin: 0; }
.who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 16px; background: #265896; color: #ffffff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.who-name { min-width: 0; overflow-wrap: anywhere; }
.side-tools { display: flex; align-items: center; gap: 8px; }
.side-tools .side-logout { margin-left: auto; }
.side .icon-btn, .topbar .icon-btn { background: transparent; border-color: var(--side-line); color: var(--side-text); }
.side .icon-btn:hover, .topbar .icon-btn:hover { background: var(--side-line); color: #ffffff; }

.main { flex: 1 1 auto; min-width: 0; padding: 28px 40px; display: flex; flex-direction: column; gap: var(--space-5); }
.main > * { width: 100%; max-width: 1200px; }
.main > h1 { margin-bottom: 0; }

/* --- theme and language buttons (sidebar and login): 44 px icon pills --- */
.theme-toggle { display: inline-flex; margin: 0; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--text); font: 600 .8rem var(--font); cursor: pointer; text-decoration: none; }
.icon-btn svg { flex: none; display: block; }
.theme-toggle .icon-btn { padding: 0; width: 44px; }
.lang-menu { position: relative; }
.lang-menu > summary { list-style: none; }
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-code { letter-spacing: .04em; }
.lang-list { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; width: 200px; max-height: min(70vh, 540px); overflow-y: auto;
  margin: 0; padding: 6px; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 12px 32px rgba(18, 20, 27, .18); display: flex; flex-direction: column; gap: 2px; }
.lang-menu.up .lang-list { top: auto; bottom: calc(100% + 6px); left: 0; right: auto; }
.lang-list button { justify-content: flex-start; width: 100%; min-height: 44px; border: 0; background: transparent; color: var(--text); font-weight: 500; padding: 0 14px; }
.lang-list button:hover { background: var(--line-soft); }
.lang-list button[aria-current="true"] { background: var(--chip-blue-bg); color: var(--chip-blue); font-weight: 700; }

/* --- auth pages (login, setup, error without a session): ink panel + card --- */
.auth { display: flex; flex-wrap: wrap; min-height: 100vh; }
.auth-panel { flex: 1 1 420px; background: var(--side-bg); color: #ffffff; padding: max(56px, env(safe-area-inset-top, 0px)) 64px 56px max(64px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; justify-content: space-between; gap: 28px; overflow: hidden; }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand .crew-word { font-size: 1.75rem; }
.auth-pitch { max-width: 520px; }
.auth-pitch h1, .auth-pitch .auth-pitch-h { font-family: var(--font-head); font-weight: 700; margin: 0; font-size: 3rem; line-height: 1.05; letter-spacing: -.02em; color: #ffffff; }
.auth-points { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; font-size: 1rem; color: #c4c8d2; }
.auth-points li { display: flex; gap: 12px; align-items: center; }
.pt { flex: none; width: 10px; height: 10px; border-radius: 5px; }
.pt.red { background: #ff6b6b; } .pt.blue { background: #8fb4ff; } .pt.white { background: #ffffff; }
.auth-watermark { align-self: flex-end; opacity: .08; filter: brightness(0) invert(1); margin: -40px -20px -40px 0; }
.auth-main { position: relative; flex: 1 1 480px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px max(24px, env(safe-area-inset-right, 0px)) max(48px, env(safe-area-inset-bottom, 0px)) 24px; gap: 24px; }
.auth-card { width: 100%; max-width: 400px; border-radius: 24px; padding: 36px; display: flex; flex-direction: column; }
.auth-card h2 { font-size: 1.75rem; margin: 0 0 8px; }
.auth-card label { margin-top: 12px; }
.card-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.card-brand .crew-word { font-size: 1.25rem; }
.auth-card input[type=text], .auth-card input[type=password] { min-height: 48px; font-size: 16px; background: var(--surface); }
input.code { font-family: var(--font-mono); font-weight: 500; font-size: 18px; letter-spacing: .2em; }
button.block, .btn.block { width: 100%; min-height: 50px; font-size: 1rem; }
.auth-card button.block { margin-top: var(--space-5); }
.auth-tools { position: absolute; top: 16px; right: 16px; display: flex; gap: 8px; align-items: flex-start; }
.auth-tools .icon-btn { border-color: transparent; }

/* --- page header and KPI cards --- */
.page-head { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between; }
.page-head > h1, .page-head > div > h1 { margin: 0; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.head-actions .btn, .head-actions button { margin: 0; }
.head-actions .filters { flex-wrap: nowrap; }
.head-actions .filters input, .head-actions .filters select { flex: 1 1 160px; min-width: 0; }
.btn .ico, button .ico { margin-right: 6px; }
.btn > span + .ico, button > span + .ico { margin: 0 0 0 6px; }
.icon-btn .ico { margin: 0; }
.page-head .meta { margin: 6px 0 0; }
.btn.back-link { margin-left: calc(-1 * var(--space-3)); }
.eyebrow { font-size: .9rem; color: var(--muted); }
.page-head h1 { font-size: 1.9rem; letter-spacing: -.02em; }
.page-head .eyebrow + h1 { margin-top: 6px; font-size: 2.3rem; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { background: var(--card); border-radius: var(--radius); padding: 20px; text-decoration: none; color: var(--text); box-shadow: var(--shadow); display: block; }
.kpi-label { font-size: .85rem; color: var(--muted); }
.kpi-value { font-family: var(--font-head); font-size: 2.1rem; font-weight: 700; margin-top: 6px; line-height: 1.1; }
.kpi-note { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.kpi-note.alert { color: var(--brand-text); }
.kpi.dark { background: var(--kpi-dark-bg); color: var(--kpi-dark-text); }
.kpi.dark .kpi-label, .kpi.dark .kpi-note { color: var(--kpi-dark-muted); }
.bar { height: 6px; background: var(--bar-bg); border-radius: 3px; margin-top: 10px; overflow: hidden; }
.bar span { display: block; height: 6px; background: var(--bar); border-radius: 3px; }
.bar .w0 { width: 0; } .bar .w10 { width: 10%; } .bar .w20 { width: 20%; } .bar .w30 { width: 30%; } .bar .w40 { width: 40%; }
.bar .w50 { width: 50%; } .bar .w60 { width: 60%; } .bar .w70 { width: 70%; } .bar .w80 { width: 80%; } .bar .w90 { width: 90%; } .bar .w100 { width: 100%; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.stats-grid .card { margin: 0; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.stats-grid .stat-val { font-family: var(--font-head); font-size: 1.85rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
@media (max-width: 859px) { .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.split { display: flex; flex-wrap: wrap; align-items: start; gap: var(--space-5); }
.split > .split-col { flex: 1 1 300px; }
.split > .wide { flex: 2 1 520px; min-width: 0; }
.split > .narrow-col { flex: 1 1 300px; min-width: 0; }
/* A column of a split that holds several cards (home board, item page, reports, shared item) spaces them like the page (Ali 19.11). */
.split-col, .split > div.wide, .split > div.narrow-col { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; }
.split-col > *, .split > div.wide > *, .split > div.narrow-col > * { margin: 0; }
/* Trello-style vertical card packing for multi-card grids with uneven card heights. */
.masonry-cols { display: block; }
.masonry-cols > .card { break-inside: avoid; margin-bottom: var(--space-5); }
.masonry-cols > .card:last-child { margin-bottom: 0; }
@media (min-width: 960px) { .masonry-cols { columns: 2; column-gap: var(--space-5); } }

/* --- cards, rows, lists --- */
.card { background: var(--card); border-radius: var(--radius); padding: 20px 22px; margin: 0; box-shadow: var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.card.flush { padding: 0; }
.card.flush > .card-head { padding: 18px 22px 8px; }
.narrow { max-width: 440px; margin: 0 auto; }
.rows { display: grid; gap: 12px; }
.row { margin: 0; }
.row-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dim { opacity: .7; }
.badge, .chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--chip-blue-bg); color: var(--chip-blue); }
.chip.red, .badge.red { background: var(--chip-red-bg); color: var(--chip-red); }
.badge.muted { background: var(--line-soft); color: var(--muted); }
.line { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.line:last-child { border-bottom: 0; }
.line.alert { color: var(--warn-text); background: var(--warn-bg); border-radius: 14px; padding: 10px 14px; border: 0; margin-bottom: 6px; font-weight: 600; }
.line.approval a { color: var(--text); text-decoration: none; font-weight: 500; }
ul.plain, ul.team { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 4px 0; }
ul.team li { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 4px; background: #b5bac4; margin-right: 8px; }
.status-dot.on { background: var(--ok); }
ul.events li { border-bottom: 1px solid var(--line-soft); padding: 8px 0; }
.pre { white-space: pre-wrap; background: var(--surface); padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); overflow-wrap: anywhere; margin: 6px 0; }
pre.copy { white-space: pre-wrap; background: var(--surface); padding: 12px; border-radius: 14px; border: 1px solid var(--line); }
.preview { font-size: 1.02rem; }

/* --- tables --- */
.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: .93rem; }
table.grid th { text-align: left; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; padding: 10px 12px; }
table.grid td { padding: 12px; border-top: 1px solid var(--line-soft); vertical-align: top; }
table.grid th:first-child, table.grid td:first-child { padding-left: 22px; }
table.grid th:last-child, table.grid td:last-child { padding-right: 22px; }
.card:not(.flush) table.grid th:first-child, .card:not(.flush) table.grid td:first-child { padding-left: 0; }
.card:not(.flush) table.grid th:last-child, .card:not(.flush) table.grid td:last-child { padding-right: 0; }

/* --- forms and buttons --- */
label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: .9rem; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=datetime-local], input[type=date], input[type=url], select, textarea {
  width: 100%; min-height: 44px; padding: 0 18px; font: inherit; color: var(--text); background-color: var(--input);
  border: 1px solid var(--line); border-radius: 999px;
}
/* select looks like the inputs: pill, 44 px, single chevron drawn via SVG (no native duplicate across Chrome/WebKit/Tauri/Capacitor). */
select { -webkit-appearance: none; -moz-appearance: none; appearance: none; padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.5L6 6l4.5-4.5' fill='none' stroke='%235d6470' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 16px center; background-size: 12px 8px; background-repeat: no-repeat; }
select::-ms-expand { display: none; }
select::picker-icon { display: none; }
:root[data-theme="dark"] select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.5L6 6l4.5-4.5' fill='none' stroke='%239aa3ae' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1.5 1.5L6 6l4.5-4.5' fill='none' stroke='%239aa3ae' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
}
textarea { min-height: 110px; padding: 12px 18px; border-radius: 20px; }
.btn, button { min-height: 44px; padding: 0 20px; font: 600 .92rem var(--font); border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; text-align: center; overflow-wrap: break-word; word-break: normal; }
.btn.primary, button.primary { background: var(--pill); color: var(--pill-text); border-color: var(--pill); }
.btn.dark, button.dark { background: var(--ink); color: #ffffff; border-color: var(--ink); }
.btn.danger, button.danger { background: transparent; color: var(--brand-text); border-color: var(--brand-text); }
.card .btn, .card button[type=submit] { margin-top: 14px; }
.card .actions .btn, .card .actions button, .card form.inline button { margin-top: 0; }
button.link { background: none; border: 0; color: var(--link); padding: 0 8px; min-height: 44px; font-weight: 500; }
/* --- buttons (Ali 20.11 12:22): one system for every control. <a class="btn"> goes somewhere, <button> does
   something. Default is secondary (outline on the card colour); .primary is filled; .ghost is tertiary (no border,
   link colour, for back, cancel, "see all" and the quieter action under a form); .danger; .sm is smaller text and
   padding (the 44 px target stays). An .ico before or after the label is the icon slot. States use the tokens:
   hover, pressed, the focus ring (:focus-visible above) and disabled (button:disabled or a.btn[aria-disabled]). --- */
.btn:hover, button:not([class]):hover, button.secondary:hover { background-color: var(--line-soft); color: var(--text); }
.btn.primary:hover, button.primary:hover, .btn.dark:hover, button.dark:hover { filter: brightness(.92); }
.btn.primary:hover, button.primary:hover { background-color: var(--pill); color: var(--pill-text); }
.btn.dark:hover, button.dark:hover { background-color: var(--ink); color: #ffffff; }
.btn.danger:hover, button.danger:hover { background: var(--chip-red-bg); color: var(--brand-text); }
/* A ghost button has a faint pill at rest, so it reads as a button and never as a bare link (Ali 20.11 15:27). */
.btn.ghost, button.ghost { background: var(--line-soft); border-color: transparent; color: var(--link); }
.btn.ghost:hover, button.ghost:hover { background: var(--line); color: var(--link-hover); }
.btn.sm, button.sm { padding: 0 var(--space-4); font-size: .86rem; }
.btn.ghost.sm, button.ghost.sm { padding: 0 var(--space-3); }
.btn.sm .ico, button.sm .ico { width: 18px; height: 18px; }
.btn:active, button:active { transform: translateY(1px); }
.btn[aria-disabled="true"], button:disabled { opacity: .55; cursor: not-allowed; transform: none; filter: none; }
a.btn[aria-disabled="true"] { pointer-events: none; }
.card .btn.sm, .card .btn.ghost { margin-top: 0; }
p > .btn.sm, .hint > .btn.sm { vertical-align: middle; }
.empty-act { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
form.inline { display: inline; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.actions form { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
/* Approve and reject (Ali 23.11 12:20, "O n a y l a" one letter per line): a label never wraps and the two buttons stay
   side by side. In a table the actions cell takes the room its buttons need; at 600px and below the row is a card and
   the buttons sit under the content. */
.decide-buttons { display: inline-flex; flex-wrap: nowrap; gap: 8px; align-items: center; }
.decide-buttons > button, .decide-buttons > .btn { flex: none; white-space: nowrap; overflow-wrap: normal; word-break: normal; }
@media (min-width: 601px) { table.grid td.decide-cell { width: 1%; } }
/* The approvals tables (Onaylar, Genel bakış): a long agent name wraps instead of widening the table, and with less
   than 720px of room (a narrow window with the side menu) the rows become the phone's cards with the buttons under the
   content. */
.table-wrap.decide-table { container-type: inline-size; }
.decide-table td .pill, .decide-table td .chip { white-space: normal; overflow-wrap: anywhere; }
@container (max-width: 719px) {
  .decide-table table.grid thead { display: none; }
  .decide-table table.grid, .decide-table table.grid tbody, .decide-table table.grid tr, .decide-table table.grid td { display: block; width: 100%; }
  .decide-table table.grid tr { padding: 10px 16px; border-top: 1px solid var(--line-soft); }
  .decide-table table.grid td, .decide-table table.grid td:first-child, .decide-table table.grid td:last-child { border: 0; padding: 3px 0; height: auto; }
  .decide-table table.grid td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: .82rem; }
  .decide-table table.grid td.decide-cell { width: 100%; padding-top: 8px; }
}
/* A decided approval opens with its decision (Ali 23.11 12:21): who, when, the note; "Kararı değiştir" is a quiet
   link that opens the form only while the agent has not taken the decision. */
.decision-box .decision-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; font-size: 1.05rem; }
.decision-box .decision-note { margin: 10px 0 0; white-space: pre-wrap; }
.decision-box .decision-final { margin: 10px 0 0; }
.decision-change { margin-top: 8px; }
.decision-change > summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.decision-change[open] > summary { color: var(--muted); }
.decide-change-form { display: flex; flex-direction: column; gap: 8px; }
.decide-change-form .actions { margin-top: 4px; }
label.check { display: inline-flex; gap: 8px; align-items: center; font-weight: 400; margin: 0; min-height: 44px; }
label.check input { flex: none; }
fieldset { border: 1px solid var(--line); border-radius: 16px; margin: 12px 0; padding: 8px 14px; }
details summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; }
.filters button { margin: 0; }
.filters select, .filters input { flex: 1 1 180px; }
.error { color: var(--brand-text); font-weight: 600; }
.notice { color: var(--ok); font-weight: 600; }
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); font-size: .88em; }
.break { word-break: break-all; }
.qr { display: block; margin: 8px auto; background: #ffffff; padding: 6px; border-radius: 12px; max-width: 100%; height: auto; }
.parts { counter-reset: part; display: grid; gap: 10px; }
.part { display: flex; gap: 10px; align-items: flex-start; }
.part .pre { flex: 1; margin: 0; }

/* --- phone: a top bar over one column (the sidebar is a drawer, below), no sideways page scroll --- */
@media (max-width: 600px) {
  body { font-size: 15px; }
  .shell { flex-direction: column; }
  .side-tools { margin-left: auto; }
  .lang-menu.up .lang-list { top: calc(100% + 6px); bottom: auto; left: auto; right: 0; }
  .main { padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px)); gap: 16px; }
  .page-head h1, h1 { font-size: 1.6rem; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-value { font-size: 1.6rem; }
  .card { padding: 16px; }
  .card.flush > .card-head { padding: 14px 16px 6px; }
  table.grid thead { display: none; }
  table.grid, table.grid tbody, table.grid tr, table.grid td { display: block; width: 100%; }
  table.grid tr { padding: 10px 16px; border-top: 1px solid var(--line-soft); }
  .card:not(.flush) table.grid tr { padding: 10px 0; }
  table.grid td, table.grid td:first-child, table.grid td:last-child { border: 0; padding: 2px 0; }
  table.grid td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: .82rem; }
  .actions button, .actions .btn { flex: 1 1 auto; }
  /* Login/setup: the panel shrinks to a compact header (mark, word, headline). */
  .auth-panel { flex: 0 0 auto; width: 100%; padding: calc(20px + env(safe-area-inset-top, 0px)) 16px 22px; gap: 14px; }
  .auth-brand .crew-word { font-size: 1.4rem; }
  .auth-brand img { width: 36px; height: 36px; }
  .auth-pitch h1, .auth-pitch .auth-pitch-h { font-size: 1.6rem; }
  .auth-points, .auth-watermark { display: none; }
  .auth-main { padding: 72px 16px 28px; justify-content: flex-start; }
  .auth-card { padding: 24px 20px; }
}
.card-empty { padding: 0 22px 18px; margin: 0; }
/* Tap targets >= 44 px for standalone links. */
.card-head a, p > a:only-child, .muted > a, .kpi-note a { display: inline-flex; align-items: center; min-height: 44px; }
.card-head a { min-width: 44px; justify-content: center; }
table.grid td a, .row-head a { display: inline-flex; align-items: center; min-height: 44px; }
/* Headers wrap between words, never inside one (long German or Russian labels). */
table.grid th { white-space: normal; overflow-wrap: normal; word-break: normal; hyphens: manual; }

/* --- compact layout (Ali 18:21): list first, create/edit forms behind a header button --- */
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ico { flex: none; display: inline-block; vertical-align: middle; }
.empty { display: flex; align-items: center; gap: 8px; margin: 0; padding: 14px 22px; color: var(--muted); min-height: 44px; }
.card:not(.flush) > .empty { padding: 4px 0; }

/* rows: 44 px, middle-aligned */
table.grid td { padding: 8px 12px; height: 44px; vertical-align: middle; }
table.grid th { padding: 10px 12px 6px; }
.row-actions { text-align: right; white-space: nowrap; width: 1%; }
.row-actions form, .row-actions .inline { display: inline-flex; }
td .lease { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.alerts { display: grid; gap: 6px; }
.alerts .line.alert { display: flex; align-items: center; gap: 10px; margin: 0; padding: 0 6px 0 14px; min-height: 44px; }
.alerts .when { font-weight: 400; }
ul.list { list-style: none; margin: 0; padding: 0; }
ul.list > li { padding: 10px 22px; border-top: 1px solid var(--line-soft); display: grid; gap: 2px; }
ul.list > li:first-child { border-top: 0; }
ul.list .row-head { min-height: 44px; }
ul.list .row-actions { margin-left: auto; display: inline-flex; gap: 4px; width: auto; }
/* An open invite's Tekrar gönder and İptal et (Ali 23.11 16:12): on a phone they wrap under the name. */
ul.list .inv-actions { flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); }
/* An inbox message's Okundu, Tamamlandı and Gelen kutusuna geri al (Ali 24.11 17:10): labelled, they wrap under the subject on a phone. */
ul.list .ack-actions { flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); }
.ack-search { margin: var(--space-3) 0; }
.flash.ack-moved { flex-wrap: wrap; }
.flash.ack-moved > span { flex: 1 1 12em; }
.flash.ack-moved .btn { white-space: nowrap; }
.card.flush > .flash { margin: 0 22px 12px; }
.body-text { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); font-size: .93rem; }
ul.tokens li { display: flex; align-items: center; gap: 8px; padding: 0; min-height: 44px; }
ul.list .actions { margin-top: 4px; }

/* status pills */
.pill { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; line-height: 1.2;
  background: var(--chip-blue-bg); color: var(--chip-blue); white-space: nowrap; }
.pill.muted, .pill.s-done, .pill.a-superseded, .pill.m-done, .pill.m-read, .pill.r-cancelled { background: var(--line-soft); color: var(--muted); }
.pill.red, .pill.s-blocked, .pill.a-rejected, .pill.r-failure { background: var(--chip-red-bg); color: var(--chip-red); }
.pill.warn, .pill.s-waiting_approval, .pill.a-pending { background: var(--warn-bg); color: var(--warn-text); }
.pill.s-in_progress, .pill.a-approved, .pill.r-success { background: var(--ok-bg); color: var(--ok-text); }

/* icon actions inside rows: borderless 44 px circles */
.icon-btn.ghost { border-color: transparent; background: transparent; color: var(--muted); padding: 0; width: 44px; }
.icon-btn.ghost:hover { background: var(--line-soft); color: var(--text); }
.line.alert .icon-btn.ghost { color: var(--warn-text); }

/* forms: max 560 px, two columns for short pairs on wide screens */
.form-card { max-width: 560px; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 16px; max-width: 560px; margin: 0; }
.form-grid .field { min-width: 0; }
.form-grid label { margin-top: 10px; }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; margin-top: 18px; }
.card .form-actions button[type=submit] { margin-top: 0; }
@media (min-width: 900px) {
  .form-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .form-grid .full { grid-column: 1 / -1; }
}

/* dialog: side drawer >= 900 px, centred 600-899 px, full-screen sheet < 600 px */
dialog.sheet { padding: 0; border: 0; color: var(--text); background: var(--card); width: min(560px, calc(100% - 32px)); max-height: calc(100% - 48px);
  border-radius: 24px; box-shadow: 0 24px 64px rgba(18, 20, 27, .3); overflow: auto; }
dialog.sheet::backdrop { background: var(--backdrop); }
.sheet-inner { padding: 8px 24px 24px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; background: var(--card); padding: 12px 0 4px; z-index: 1; }
.sheet-head h2 { margin: 0; }
body:has(dialog[open]) { overflow: hidden; }
@media (min-width: 900px) {
  dialog.sheet { margin: 0 0 0 auto; height: 100%; max-height: 100%; width: 560px; max-width: 100%; border-radius: 24px 0 0 24px; }
}
@media (max-width: 600px) {
  dialog.sheet { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; border-radius: 0; padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); }
  .sheet-inner { padding: 4px 16px 24px; }
  .page-head h1 { font-size: 1.6rem; }
  .head-actions { width: 100%; }
  .head-actions > .btn, .head-actions > form { flex: 1 1 auto; }
  .empty { padding: 12px 16px; }
  ul.list > li { padding: 10px 16px; }
  ul.list .inv-actions { margin-left: 0; justify-content: flex-start; }
  .card.flush > .flash { margin: 0 16px 12px; }
  table.grid td, table.grid td:first-child, table.grid td:last-child { height: auto; padding: 3px 0; }
  td.row-actions { width: auto; text-align: left; }
  .alerts .line.alert { padding-left: 12px; }
}

/* --- members and invites (spec 5.13, 5.14) --- */
.pano-new { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; color: var(--side-text); text-decoration: none; font-size: .9rem; }
.pano-new:hover { background: var(--side-line); color: #ffffff; }
.pano-new .ico { margin: 0; }
.row-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
/* A select in a row is as wide as its longest option in the page's language, never cut ("Onay ist", Ali 20.11 20:18). */
.row-form select { flex: 0 0 auto; width: auto; min-width: 9rem; max-width: 100%; }
/* A visible label in a flex row keeps its words on one line and never shrinks: the panel's overflow-wrap: anywhere
   lets a flex item shrink to one letter a line (Ali 20.11 20:18, "Kural"). test/form-rows.test.cjs keeps every row
   class that holds a visible label in this list. */
:is(.row-form, .actions, .filters, .grant-row, .ask-inline, .head-actions, .form-actions) > label:not(.sr-only):not(.check) { flex: none; margin: 0; white-space: nowrap; overflow-wrap: normal; }
/* Buttons inside flex rows never crush to 1-char columns; long labels wrap cleanly by word on narrow viewports. */
:where(.row-form, .actions, .actions form, .filters, .grant-row, .ask-inline, .head-actions, .form-actions, .gallery-add, .store-actions, .ao-confirm, .bridge-form) > :where(button, .btn) { flex-shrink: 0; max-width: 100%; }
.trule-add > label { margin: 0 0 var(--space-1); }
.trule-row > #tr-pattern { flex: 2 1 240px; min-width: 0; }
.trule-row > #tr-note { flex: 1 1 160px; min-width: 0; }
@media (max-width: 600px) { .trule-row > #tr-pattern { flex-basis: 100%; } }
.card .row-form button[type=submit] { margin-top: 0; }
.grant-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grant-row select { flex: 0 1 180px; }
fieldset legend { font-weight: 600; font-size: .9rem; padding: 0 6px; }
fieldset .form-grid { max-width: none; }
.pill.i-pending { background: var(--warn-bg); color: var(--warn-text); }
.pill.i-used { background: var(--ok-bg); color: var(--ok-text); }
.pill.i-revoked, .pill.i-expired { background: var(--line-soft); color: var(--muted); }
.auth-card input[readonly] { color: var(--muted); }
.pill.ml-sent { background: var(--ok-bg); color: var(--ok-text); }
.pill.ml-sending { background: var(--chip-blue-bg); color: var(--chip-blue); }
.pill.ml-failed { background: var(--chip-red-bg); color: var(--chip-red); }
.pill.ml-off, .pill.ml-limited { background: var(--warn-bg); color: var(--warn-text); }
.auth-card .small { margin: 4px 0 0; }

/* --- Ayarlar: budgets (spec 5.18) --- */
/* The tab bar itself is the Messages one (.tabs below); the history tabs only add a count badge. */
.tabs a { gap: 6px; }
/* Ayarlar (Ali 20.11 20:02, "bunlar da yan yana olsun çok aşağıya gidiyor"): narrow cards and the work profile's
   groups sit side by side on wide screens. They flow in columns at least 340 px wide (two or three on a desktop, one
   on a phone), down then across in DOM order. The profile name, the save button and wide tables keep the full width. */
.settings-grid { columns: 340px auto; column-gap: var(--space-5); }
.settings-grid > * { break-inside: avoid; margin: 0; min-width: 0; }
/* A card packs under the one above with the shared gap; a column's first card has no gap above it (an unforced
   column break drops the margin). No row-height holes after a short card (Ali 20.11 20:48). */
.settings-grid > * + * { margin-top: var(--space-5); }
.settings-grid > .form-card { max-width: none; }
.card.wide-form { max-width: none; }
.prof-grid { columns: 320px auto; column-gap: var(--space-5); }
.prof-grid > fieldset, .prof-grid > .field { break-inside: avoid; margin: 0; min-width: 0; }
.prof-grid > :is(fieldset, .field) + :is(fieldset, .field) { margin-top: var(--space-3); }
.prof-grid > .field:first-child { column-span: all; max-width: 560px; margin-bottom: var(--space-3); }
.prof-grid > .field:first-child + * { margin-top: 0; }
.budget-grid { columns: 340px auto; column-gap: var(--space-4); }
.budget-grid > :not(dialog) { break-inside: avoid; margin: 0; min-width: 0; }
.budget-grid > * + :not(dialog) { margin-top: var(--space-4); }
.budget-card .card-head { align-items: flex-start; }
.budget-spend { margin: 2px 0 0; }
.budget-spend strong { font-family: var(--font-head); font-size: 1.8rem; }
.bar.light { background: var(--line-soft); }
.bar.light span { background: var(--pill); }
dl.facts { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 14px 0 6px; }
dl.facts dt { font-size: .78rem; color: var(--muted); }
dl.facts dd { margin: 0; font-weight: 600; }
table.grid.compact td { height: auto; padding: 6px 12px; }
.small-head { font-size: .9rem; margin: 14px 0 4px; }
ul.charges li { font-size: .88rem; }
.price-row { display: flex; gap: 10px; align-items: flex-end; }
.price-row .price { flex: 0 0 140px; min-width: 0; }
.price-row label { margin-top: 6px; }
.price-row { flex-wrap: wrap; }
.price-row .grow { flex: 1 1 140px; }
.price-row .price-note { flex: 1 1 140px; min-width: 0; }
.reconcile-line { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.report-period { max-width: 360px; flex-wrap: nowrap; }
.report-period select { flex: 1 1 auto; min-width: 0; }
.report-period button { flex: none; white-space: nowrap; }
table.grid tfoot td { border-top: 2px solid var(--line); }
.report-net { padding: 4px 22px 16px; margin: 0; }
.report-net dd.neg { color: var(--brand-text); }
.report-net dd.pos { color: var(--ok-text); }
.report-note { margin: 0 22px 18px; }
.pill .ico { width: 14px; height: 14px; margin-right: 4px; }
@media (max-width: 600px) { .report-net { padding: 4px 16px 14px; } .report-note { margin: 0 16px 14px; } table.grid tfoot { display: block; } table.grid tfoot td { border-top: 0; } table.grid tfoot tr { border-top: 2px solid var(--line); } }

/* --- history tabs: Onaylar → Geçmiş, Görevler → Biten --- */
.tabs .count { background: var(--pill); color: var(--pill-text); font-size: 12px; font-weight: 600; border-radius: 10px; padding: 1px 8px; }
.history-filters { display: grid; gap: 8px; }
.search-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; max-width: 960px; }
.search-row.filters { flex-wrap: nowrap; max-width: 720px; }
.search-row input { flex: 1 1 200px; min-width: 0; }
.search-row select { flex: 1 1 160px; min-width: 0; }
.search-row button { flex: none; }
.filter-box { background: var(--card); border-radius: var(--radius); padding: 0 18px; box-shadow: var(--shadow); }
.filter-box > summary { font-weight: 600; }
.filter-box[open] { padding-bottom: 14px; }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr)); gap: 0 12px; }
.filter-grid label { margin-top: 6px; }
.filter-box .actions .btn, .filter-box .actions button { margin-top: 0; }
table.grid.history td { vertical-align: top; }
.chain { overflow-wrap: anywhere; }
details.owners summary { min-height: 44px; color: var(--link); font-size: .85rem; font-weight: 600; }
ol.segments { margin: 0 0 6px; padding-left: 20px; font-size: .85rem; display: grid; gap: 4px; }
.pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.pager-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pager .btn { gap: 6px; }
.pager .btn .ico { margin: 0; }

/* --- intro video: help "Başlarken", the invite page ("Crew nedir?"), /intro and the tour's first step --- */
.intro-video { margin: 0; max-width: 820px; }
.intro-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 16px; background: #12141b; }
.intro-video figcaption { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: .88rem; color: var(--muted); font-weight: 600; }
.intro-video.compact video { border-radius: 12px; }
details.what-is { margin: 4px 0 6px; border: 1px solid var(--line); border-radius: 16px; padding: 0 12px; }
details.what-is > summary { gap: 8px; font-weight: 600; color: var(--link); }
details.what-is[open] { padding-bottom: 12px; }
.auth-card.intro-card { max-width: 720px; }
.auth-card.intro-card .intro-video { margin: 8px 0; }

/* --- help center --- */
input[type=search] { width: 100%; min-height: 44px; padding: 0 18px; font: inherit; color: var(--text); background-color: var(--input); border: 1px solid var(--line); border-radius: 999px; -webkit-appearance: none; appearance: none; }
.help-search { max-width: 720px; flex-wrap: nowrap; }
.help-search input { flex: 1 1 auto; min-width: 0; }
.note { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 12px 16px; border-radius: 16px; background: var(--chip-blue-bg); color: var(--chip-blue); font-weight: 500; }
.note .ico { margin-top: 2px; }
ul.help-list > li { padding: 0; }
.help-link { display: flex; flex-direction: column; gap: 2px; padding: 12px 22px; min-height: 44px; text-decoration: none; color: var(--text); }
.help-link strong { color: var(--link); font-weight: 600; }
.help-link:hover strong { color: var(--link-hover); text-decoration: underline; }
[hidden] { display: none !important; }
.help-body { max-width: 820px; font-size: 1rem; line-height: 1.65; }
.help-body > :first-child { margin-top: 0; }
.help-body h2 { font-size: 1.3rem; margin: 28px 0 10px; }
.help-body h3 { font-size: 1.08rem; margin: 22px 0 8px; }
.help-body p, .help-body ul, .help-body ol { margin: 0 0 12px; }
.ide-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 8px 0; border-top: 1px solid var(--line); }
.ide-row:first-child { border-top: 0; }
.ide-row > strong { min-width: 190px; }
.ide-row .link { margin-left: auto; }
.connect-tools .copy-row + .copy-row { margin-top: 8px; }
.connect-tools .n8n-row input { flex: 1 1 200px; min-width: 0; font-family: var(--font-mono); font-size: .9rem; }
.connect-pair .copy-row { margin-top: 12px; }
.connect-pair pre.copy { overflow-wrap: anywhere; font-size: .82rem; }
.pair-status { margin-top: 14px; }
.pair-status .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.help-body .shot img { display: block; max-width: min(100%, 520px); height: auto; border: 1px solid var(--line, #ddd); border-radius: 10px; }
.help-body li { margin: 4px 0; }
.help-body code { font-family: var(--font-mono); font-size: .88em; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; }
.help-body pre { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; overflow-x: auto; max-width: 100%; margin: 0 0 14px; }
.help-body pre code { background: none; border: 0; padding: 0; font-size: .85rem; white-space: pre; }
.help-body blockquote { margin: 14px 0; padding: 10px 16px; border-left: 4px solid var(--link); background: var(--chip-blue-bg); border-radius: 0 14px 14px 0; }
.help-body blockquote p { margin: 0; color: var(--text); }
.help-body a { display: inline; }
.help-toc { max-width: 820px; }
.help-toc ul { columns: 2; column-gap: 24px; }
.help-toc li { break-inside: avoid; padding: 0; }
.help-toc a { display: inline-flex; align-items: center; min-height: 44px; }
.help-pager { display: flex; justify-content: space-between; gap: 12px; max-width: 820px; flex-wrap: wrap; }
.help-pager .btn { gap: 6px; max-width: 100%; }
.help-pager .btn .ico { margin: 0; }

/* --- help training & promo videos (article embeds and /help gallery) --- */
.help-videos { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; max-width: 820px; margin: 0; }
.help-videos-multi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.help-video-gallery { display: flex; flex-direction: column; gap: 14px; }
.help-video-gallery-head { display: flex; flex-direction: column; gap: 4px; }
.help-video-gallery-head h2 { margin: 0; font-size: 1.2rem; }
.help-video-gallery-head p { margin: 0; }
.help-video-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.help-video { display: flex; flex-direction: column; margin: 0; min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; }
.help-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #12141b; }
.help-video figcaption { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1 1 auto; min-width: 0; }
.help-video-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.help-video-title { font-size: .96rem; font-weight: 600; color: var(--text); line-height: 1.35; overflow-wrap: break-word; }
.help-video-desc { line-height: 1.45; overflow-wrap: break-word; }
.help-video-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: auto; padding-top: 6px; }
@media (max-width: 760px) {
  .help-videos-multi, .help-video-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .help-link { padding: 12px 16px; }
  .help-toc ul { columns: 1; }
  .help-pager .btn { flex: 1 1 100%; }
}

/* --- page intros: a dismissible card under the title, "?" next to the title reopens it --- */
.title-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.title-row h1 { margin: 0; min-width: 0; }
.page-head .eyebrow + .title-row { margin-top: 6px; }
.page-head .eyebrow + .title-row h1 { font-size: 2.3rem; }
.intro-toggle { flex: none; color: var(--muted); }
.intro-toggle[aria-expanded="true"] { color: var(--link); }
.intro { display: flex; gap: 14px; align-items: flex-start; background: var(--chip-blue-bg); color: var(--text); border-radius: var(--radius); padding: 16px 12px 16px 20px; }
.intro-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 20px; background: var(--card); color: var(--link); }
.intro-text { flex: 1 1 auto; min-width: 0; }
.intro-text h2 { font-size: 1.05rem; margin: 2px 0 4px; }
.intro-text h2:focus { outline: none; }
.intro-text p { margin: 0 0 4px; max-width: 760px; }
.intro-text a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; }
.intro-text a .ico { margin: 0; }
.intro-text .btn.ghost { margin-left: calc(-1 * var(--space-3)); }
.intro-close { flex: none; margin: -6px 0 0; }
.intro-close .icon-btn { color: var(--text); }
@media (max-width: 600px) {
  .intro { padding: 12px 6px 12px 14px; gap: 10px; }
  .intro-icon { display: none; }
  .page-head .eyebrow + .title-row h1 { font-size: 1.6rem; }
}

/* --- first-run tour (spec 5.12) --- */
/* Without JS: a card fixed at the bottom right with every step listed. */
dialog.tour { position: fixed; inset: auto 16px 16px auto; margin: 0; z-index: 50; width: min(420px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow: auto;
  padding: 0; border: 1px solid var(--line); border-radius: 24px; background: var(--card); color: var(--text); box-shadow: 0 24px 64px rgba(18, 20, 27, .3); }
dialog.tour::backdrop { background: transparent; }
.tour-inner { padding: 20px 22px 18px; display: flex; flex-direction: column; gap: 8px; }
.tour-kicker { margin: 0; font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-text); }
.tour-title-all { margin: 0; font-size: 1.2rem; }
.tour-steps { margin: 0; padding: 0 0 0 20px; display: flex; flex-direction: column; gap: 10px; }
.tour-step h3 { margin: 0 0 2px; font-size: 1rem; }
.tour-step p { margin: 0; color: var(--text); }
.tour-counter { margin: 4px 0 0; font-family: var(--font-mono); font-size: .85rem; color: var(--muted); }
.tour-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 0; }
.tour-actions .tour-skip { margin-left: auto; }
/* With JS: one step at a time, placed beside its target on wide screens. */
dialog.tour.tour-js { inset: auto; }
dialog.tour.tour-js .tour-title-all { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
dialog.tour.tour-js .tour-steps { list-style: none; padding: 0; }
dialog.tour.tour-js .tour-step h3 { font-size: 1.2rem; margin-bottom: 4px; }
/* The ring: inset so a scrolling nav row cannot clip it; light blue on the ink sidebar is >= 3:1 in both themes. */
.tour-target { box-shadow: inset 0 0 0 3px #8fb4ff, 0 0 0 3px #8fb4ff; border-radius: 999px; position: relative; z-index: 1; }
details.pano.tour-target { border-radius: 999px; }
@media (max-width: 600px) {
  dialog.tour, dialog.tour.tour-js { inset: auto 0 0 0; width: 100%; max-width: 100%; max-height: 60vh; border-radius: 24px 24px 0 0; border-width: 1px 0 0; }
  .tour-inner { padding: 16px 16px 20px; }
  .tour-actions button { flex: 1 1 auto; }
  .tour-actions .tour-skip { margin-left: 0; }
  .tour-target { box-shadow: inset 0 0 0 3px #8fb4ff; }
}
.help-search button { flex: none; white-space: nowrap; }

/* --- one-time token page: the value in a read-only field, the Keychain command without it --- */
.token-card { max-width: 760px; }
.copy-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.copy-row input { flex: 1 1 280px; min-width: 0; font-family: var(--font-mono); font-size: .9rem; }
.card .copy-row button[type=button] { margin-top: 0; }
.note.warn-note { background: var(--warn-bg); color: var(--warn-text); }

/* --- form helper text and field errors (refused posts come back on the form) --- */
.hint { margin: 4px 0 0 4px; font-size: .82rem; color: var(--muted); }
.field-error { display: flex; gap: 6px; align-items: flex-start; margin: 6px 0 0 4px; font-size: .85rem; font-weight: 600; color: var(--brand-text); }
.field-error .ico { width: 16px; height: 16px; margin-top: 2px; }
.field-error a { display: inline-flex; align-items: center; min-height: 44px; }
[aria-invalid="true"] { border-color: var(--brand-text); }
button:disabled { opacity: .55; cursor: not-allowed; }

/* --- agent rows: token block with a visible create button and per-token revoke --- */
.token-block { margin-top: 8px; padding: 10px 14px; border: 1px solid var(--line-soft); border-radius: 16px; display: grid; gap: 4px; }
.token-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.token-block p { margin: 0; }
button.small-btn { min-height: 44px; padding: 0 14px; font-size: .85rem; }
.card .token-block button { margin-top: 0; }
.mcp-setup { margin-top: 18px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.mcp-setup h2 { font-size: 1.05rem; }
.mcp-setup pre { white-space: pre; overflow-x: auto; max-width: 100%; }
.combo-filter { width: 100%; min-height: 44px; margin: 0 0 6px; }

/* --- sidebar (Ali 21:04; 20.11 11:26): a full-height column. Logo and Pano stay at the top, live state, user and
   the Mevvsoft logo at the bottom, only the menu between them scrolls (in itself, never the page). The menu reaches
   the side's edges so its scroll bar sits in the side's padding, not on the items. dvh keeps the bottom above a
   mobile browser's toolbar. crew.js sets data-scrolled: a line under the Pano then. The side itself still scrolls
   as a last resort (a very short window with an open Pano list).
   From 601 px it is fixed beside the page. On a phone it is a drawer (Ali 20.11): the top bar's menu button opens
   it over a backdrop, crew.js closes it and keeps focus inside; without JS the button is a link and :target opens
   it, the close link goes back to #. --- */
.topbar, .side .drawer-close { display: none; }
.side > * { flex: none; }
.side > .side-nav { flex: 1 1 auto; min-height: 0; margin: 0 -14px; padding: 0 14px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.side > .side-nav > a, .side > .side-nav > details { flex: none; }
.side > .side-nav::before { content: ""; flex: none; position: sticky; top: 0; z-index: 1; height: 1px; margin-bottom: -3px; }
.side > .side-nav[data-scrolled]::before { background: var(--side-line); }
.pano-list { max-height: 40vh; overflow-y: auto; overscroll-behavior: contain; }
.side { height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
@media (min-width: 601px) {
  .shell { align-items: flex-start; }
  .side { position: sticky; top: 0; padding-left: max(14px, env(safe-area-inset-left, 0px)); }
  .main { padding-right: max(40px, env(safe-area-inset-right, 0px)); }
}
@media (max-width: 600px) {
  .topbar { display: flex; align-items: center; gap: var(--space-3); position: sticky; top: 0; z-index: 20; min-height: 60px;
    padding: calc(var(--space-2) + env(safe-area-inset-top, 0px)) max(var(--space-4), env(safe-area-inset-right, 0px)) var(--space-2) max(var(--space-4), env(safe-area-inset-left, 0px));
    background: var(--side-bg); color: var(--side-text); }
  /* Under the status bar (Ali 20.11 14:41): an app web view that insets its content (Capacitor contentInset
     automatic) still draws scrolled content above the bar. The bar's own colour reaches up over that area. */
  .topbar::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 120px; background: var(--side-bg); pointer-events: none; }
  /* In the phone app the status bar's text follows the phone's light or dark mode (not the page): the band too. */
  @media (prefers-color-scheme: light) { .in-app .topbar::before { background: #ffffff; } }
  .topbar .crew-brand { flex: none; gap: var(--space-2); }
  .topbar .crew-word { font-size: 1.1rem; }
  .topbar-pano { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: var(--space-2); color: #ffffff; font-weight: 600; }
  .topbar-pano .dot { flex: none; width: 8px; height: 8px; border-radius: 4px; background: var(--brand); }
  .topbar-pano .pano-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }
  .topbar .drawer-open { flex: none; padding: 0; width: 44px; }
  .side { position: fixed; z-index: 40; top: 0; bottom: 0; left: 0; width: min(320px, 86vw);
    padding: max(var(--space-4), env(safe-area-inset-top, 0px)) 14px max(var(--space-4), env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px));
    transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s; }
  .side[data-open], .side:target { transform: none; visibility: visible; transition: transform .2s ease; }
  .side-brand { justify-content: space-between; padding-right: 0; }
  .side .drawer-close { display: inline-flex; flex: none; padding: 0; width: 44px; }
  .drawer-backdrop { position: fixed; inset: 0; z-index: 39; background: var(--backdrop); }
  body:has(.side[data-open]), body:has(.side:target) { overflow: hidden; }
}
/* Store shells (iOS, iPadOS, Android apps): the server renders no purchase; a backup for anything marked data-purchase. */
.store-shell [data-purchase] { display: none !important; }
.drawer-backdrop[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .side { transition: none !important; } }
/* Inside a scrolling list an outer ring would be cut off at the edges. */
.side-nav a:focus-visible, .pano-list :focus-visible { outline-offset: -3px; }

/* --- tabs and a one-line success notice (Messages: Gelen / Gonderilen) --- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px; text-decoration: none; color: var(--text); font-weight: 500; border: 1px solid var(--line); background: var(--card); }
.tabs a.on { background: var(--chip-blue-bg); color: var(--chip-blue); border-color: transparent; font-weight: 700; }
.chip-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.chip-row .chip-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 var(--space-4); border-radius: 999px;
  border: 1px solid var(--line); background: var(--card); color: var(--text); font-weight: 500; font-size: .9rem; text-decoration: none; }
.chip-row .chip-link:hover { background: var(--line-soft); }
.chip-row .chip-link.on { background: var(--chip-blue-bg); color: var(--chip-blue); border-color: transparent; font-weight: 700; }
.flash { display: flex; gap: 8px; align-items: center; margin: 0; padding: 12px 16px; border-radius: 16px; background: var(--ok-bg); color: var(--ok-text); font-weight: 600; }
.pill.sm-read, .pill.sm-done { background: var(--ok-bg); color: var(--ok-text); }
ul.replies { list-style: none; margin: 6px 0 0; padding: 0 0 0 14px; border-left: 3px solid var(--line); display: grid; gap: 8px; }

/* --- team chat (spec 5.15): list + conversation side by side at >= 900 px; one at a time below --- */
.chat { display: flex; flex-direction: column; gap: 16px; }
.chat-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 900px) {
  .chat-grid { grid-template-columns: 280px minmax(0, 1fr); }
  .chat-list { position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
  .chat-back { display: none; }
}
@media (max-width: 899px) {
  .chat[data-pane="list"] .chat-conv { display: none; }
  .chat[data-pane="conv"] .chat-list { display: none; }
}
.chat-list { padding: 14px 10px; }
.chat-list-h { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 8px 12px 4px; font-family: var(--font); }
.chat-links { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 2px; }
.chat-links a { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 12px; border-radius: 999px; text-decoration: none; color: var(--text); }
.chat-links a:hover { background: var(--line-soft); }
.chat-links a.on { background: var(--chip-blue-bg); color: var(--chip-blue); font-weight: 700; }
.chat-links a.fresh .chat-link-name::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 4px; background: var(--pill); margin-left: 8px; vertical-align: middle; }
.chat-link-name { min-width: 0; overflow-wrap: anywhere; }
.chat-links .count, .side-nav .count { flex: none; }
.count { background: var(--pill); color: var(--pill-text); font-size: 12px; font-weight: 700; border-radius: 10px; padding: 1px 8px; }
.count.mention { background: var(--chip-red); color: var(--card); }
.chat-none { margin: 0 12px 8px; }
.chat-conv { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.conv-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; border-bottom: 1px solid var(--line-soft); padding-bottom: 8px; }
.conv-head h2 { margin: 0; flex: 1 1 auto; min-width: 0; }
.conv-topic { flex-basis: 100%; margin: 0; }
.conv-archive { margin-left: auto; }
.older { margin: 0; text-align: center; }
.older .btn .ico { transform: none; }
.older .btn.newest .ico { transform: rotate(180deg); }
ol.msgs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.msg { display: flex; gap: 10px; padding: 8px 6px; border-radius: 14px; }
.msg:target { background: var(--chip-blue-bg); }
.msg-avatar { flex: none; width: 36px; height: 36px; border-radius: 18px; background: #265896; color: #ffffff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.msg-agent .msg-avatar { background: var(--line-soft); }
.msg-main { flex: 1 1 auto; min-width: 0; }
.msg-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.msg-author { font-weight: 700; font-size: .95rem; }
.agent-badge { font-size: .68rem; letter-spacing: .06em; padding: 2px 8px; background: var(--chip-red-bg); color: var(--chip-red); }
/* CORE-09 risk pills. */
.risk-high { background: var(--chip-red-bg); color: var(--chip-red); }
.amount-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); margin: var(--space-1) 0; }
.amount { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text); overflow-wrap: anywhere; }
.amount-line.big { margin: 0 0 var(--space-3); }
.amount-line.big .amount { font-size: 1.75rem; line-height: 1.2; }
.pill.needs { white-space: normal; background: var(--chip-red-bg); color: var(--chip-red); }
.spend-rules { margin: var(--space-2) 0; padding-left: var(--space-5); }
.spend-row { align-items: flex-end; }
.spend-row > .field { display: flex; flex-direction: column; gap: var(--space-1); flex: 1 1 140px; min-width: 0; }
.spend-row > .field > label { margin: 0; }
.spend-row > .field:first-child { flex: 0 0 7rem; }
@media (max-width: 600px) { .spend-row > .field, .spend-row > .field:first-child { flex-basis: 100%; } }
.risk-low { background: var(--line-soft); color: var(--muted); }
/* Güncellemeler and Senden beklenenler (Ali 19.11 13:53). */
ol.updates { list-style: none; display: flex; flex-direction: column; gap: var(--space-1); margin: 0; padding: 0; }
/* Links in a line keep its height and still give a 44 px tap target. */
.upd a, .for-you-head a:not(.chip-link), .trule-calls a { display: inline-block; padding-block: 14px; margin-block: -14px; }
.for-you-head .chip-link { display: inline-flex; align-items: center; min-height: 44px; margin-block: -10px; text-decoration: none; }
.trule-calls a { padding-inline: 14px; margin-inline: -14px; }
.trule-del { min-width: 44px; }
.upd { padding: var(--space-2) var(--space-3); border-radius: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.upd time { margin-right: var(--space-2); }
.upd-agent { background: var(--surface); border-left: 3px solid var(--line); border-radius: 0 12px 12px 0; }
.upd-say { border-left-color: var(--chip-blue); }
.upd-who { font-weight: 600; }
.upd-body { margin-top: var(--space-1); }
.upd-badge { font-size: .68rem; letter-spacing: .04em; padding: 2px 8px; background: var(--warn-bg); color: var(--warn-text); }
.for-you { border-left: 4px solid var(--warn-text); }
ol.for-you-list { list-style: none; display: flex; flex-direction: column; gap: var(--space-4); margin: 0; padding: 0; }
.for-you-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-2); }
.for-you-steps { margin-top: var(--space-2); white-space: pre-wrap; }
.for-you-done { margin-top: var(--space-2); }
/* One action row per item (Ali 18:18): the note grows on the left, two equal buttons on the right; under it on a phone. */
.for-you-act { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2); align-items: start; margin-top: var(--space-2); }
.for-you-act textarea { width: 100%; min-height: 64px; max-height: 240px; resize: vertical; border-radius: 16px; padding: 10px 14px; font: inherit; line-height: 1.4; overflow-y: auto; }
.for-you-buttons { display: grid; grid-template-columns: repeat(2, minmax(7.5rem, 1fr)); gap: var(--space-2); }
.for-you-buttons button { min-height: 44px; justify-content: center; white-space: nowrap; }
.for-you-act .for-you-err, .for-you-act .attach { grid-column: 1 / -1; }
.for-you-err[hidden] { display: none; }
button.btn-done { background: var(--ok); color: var(--ok-on); border-color: var(--ok); font-weight: 700; }
button.btn-problem { background: var(--pill); color: var(--pill-text); border-color: var(--pill); font-weight: 700; }
@media (max-width: 640px) {
  .for-you-act { grid-template-columns: 1fr; }
  .for-you-buttons { grid-template-columns: 1fr 1fr; }
  .for-you-buttons button { min-width: 0; white-space: normal; }
}
.for-you-problem { margin-top: var(--space-2); }
.for-you-problem > summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--muted); }
.for-you-problem form { margin-top: var(--space-1); }
ul.for-you-recent { margin: 0 0 var(--space-3); padding: 0; }
/* The overview (Ali 20.11 12:14): "Senden beklenenler" folds to one header row (title, count, the most urgent item)
   that opens the rest under it; nothing waiting is one slim line. "Crew'a sor" is one line above it. */
.for-you.fold { padding-block: var(--space-2); }
.for-you.fold .card-head { margin: 0; }
.for-you.fold .card-head h2 { flex: 1 1 auto; min-width: 0; }
.card-head .fy-toggle { display: flex; justify-content: flex-start; align-items: center; gap: var(--space-2); min-height: 44px; color: var(--text); text-decoration: none; }
.fy-toggle:hover { color: var(--text); }
.fy-toggle:hover .fy-title { text-decoration: underline; }
.fy-title { flex: none; }
.fy-toggle .count { flex: none; }
.fy-next { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; font: 500 .92rem var(--font); color: var(--muted); }
.fy-caret { flex: none; margin-left: auto; display: inline-flex; color: var(--muted); transform: rotate(180deg); transition: transform .15s ease; }
.fy-toggle[aria-expanded="true"] .fy-caret { transform: none; }
.fy-body { padding: var(--space-2) 0 var(--space-3); }
.fy-body[hidden] { display: none; }
.for-you-slim { display: flex; align-items: center; gap: var(--space-2); margin: 0; min-height: 44px; padding: 0 var(--space-1); color: var(--muted); font-size: .92rem; }
.for-you-slim .ico { color: var(--ok); }
.ask-home { display: flex; flex-direction: column; gap: var(--space-2); padding-block: var(--space-3); }
.ask-home h2 { margin: 0; font-size: 1rem; }
.ask-home h2 a { display: inline-block; padding-block: 12px; margin-block: -12px; color: var(--text); text-decoration: none; }
.ask-home h2 a:hover { text-decoration: underline; }
.ask-home .empty { padding: 0; }
.card.ask-home .btn { margin-top: 0; }
.ask-home p { margin: 0; }
.ask-inline { display: flex; gap: var(--space-2); margin: 0; }
.ask-inline input { flex: 1 1 auto; min-width: 0; }
.card .ask-inline button[type=submit] { flex: none; margin: 0; }
@media (max-width: 600px) {
  .fy-toggle { flex-wrap: wrap; row-gap: 0; padding-block: var(--space-1); }
  .fy-next { order: 4; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .fy-caret { transition: none; } }
/* A composer's placeholder stays on one line (Ali 20.11 15:27: it was cut in half in the project chat). */
.composer-box textarea::placeholder, .composer textarea::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Each "Senden beklenenler" item folds (Ali 20.11 15:29): closed, one row (title, project, who asked, age) with Yaptım
   beside it; open, the steps, the note and both buttons, and the quick Yaptım steps aside. */
ol.for-you-list { gap: 0; }
.for-you-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2); align-items: start; border-top: 1px solid var(--line-soft); padding-block: var(--space-1); }
.for-you-item:first-child { border-top: 0; }
.fy-item { min-width: 0; }
.fy-item > summary.fy-row { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); min-height: 44px; padding-inline: var(--space-1); border-radius: 12px; cursor: pointer; }
.fy-item > summary.fy-row::-webkit-details-marker { display: none; }
.fy-row:hover .fy-name { color: var(--link); }
.fy-chev { flex: none; display: inline-flex; color: var(--muted); transform: rotate(180deg); transition: transform .15s ease; }
.fy-chev .ico { width: 16px; height: 16px; }
.fy-item[open] .fy-chev { transform: none; }
.fy-name { min-width: 0; overflow-wrap: anywhere; }
.fy-meta { white-space: nowrap; }
.fy-detail { padding: 0 0 var(--space-2) var(--space-1); }
.fy-links { display: flex; flex-wrap: wrap; gap: var(--space-1); margin: 0 0 var(--space-1) calc(-1 * var(--space-3)); }
.fy-quick { margin: 0; align-self: start; }
.fy-quick button { min-height: 44px; }
.for-you-item:has(> details[open]) .fy-quick { display: none; }
.fy-all { display: flex; justify-content: flex-end; margin: 0; }
.fy-all[hidden] { display: none; }
/* "Beklemede (n)" (Ali 20.11): the blocked items fold at the bottom, each with its last note and no Yaptım. */
.fy-held { border-top: 1px solid var(--line-soft); margin-top: var(--space-2); padding-top: var(--space-1); }
.fy-held > summary.fy-held-row { list-style: none; display: flex; align-items: center; gap: var(--space-2); min-height: 44px; padding-inline: var(--space-1); border-radius: 12px; cursor: pointer; color: var(--muted); }
.fy-held > summary.fy-held-row::-webkit-details-marker { display: none; }
.fy-held[open] > summary .fy-chev { transform: none; }
.fy-held-intro { margin: 0 0 var(--space-2) var(--space-1); }
ul.fy-held-list { list-style: none; display: flex; flex-direction: column; gap: var(--space-3); margin: 0; padding: 0 0 var(--space-2) var(--space-1); }
.fy-held-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); margin: 0; }
.fy-held-head .title-link { overflow-wrap: anywhere; }
.fy-held-when { margin: var(--space-1) 0 0; }
.fy-held-note { margin-top: var(--space-1); white-space: pre-wrap; overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .fy-chev { transition: none; } }
.toast { position: fixed; left: 50%; bottom: var(--space-5); transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: var(--space-1); max-width: calc(100vw - 32px); padding: var(--space-2) var(--space-4); border-radius: 14px; background: #12141b; color: #ffffff; border: 1px solid #2a2f3a; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.toast[hidden] { display: none; }
/* CORE-15 screenshots. */
.attach { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); flex: 1 1 100%; min-width: 0; }
form:has(> .attach) { flex-wrap: wrap; }
form:has(> .attach) > input[type=text] { flex: 1 1 12rem; min-width: 0; }
.attach[hidden] { display: none; }
.attach-pick { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 44px; cursor: pointer; color: var(--chip-blue); font-weight: 600; }
.attach-pick:focus-within { outline: 2px solid var(--chip-blue); outline-offset: 2px; border-radius: 8px; }
ul.attach-list { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; flex-basis: 100%; }
ul.attach-list li { display: flex; align-items: center; gap: var(--space-1); }
ul.attach-list img { border-radius: 8px; border: 1px solid var(--line); object-fit: cover; }
ul.attach-list .link { min-height: 44px; }
.attach-err { color: var(--chip-red); }
form.attach-drop { outline: 2px dashed var(--chip-blue); outline-offset: 4px; border-radius: 12px; }
.attach-thumbs { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-1); }
.attach-thumbs a { display: inline-block; min-height: 44px; }
.attach-thumbs img { width: 160px; height: auto; max-height: 120px; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
/* Chat safety (lib/chat-safety): Bildir under someone else's screenshot; a report's excerpt on Sohbet → Şikayetler. */
.thumb-item { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.attach-thumbs a.thumb-report { min-height: 36px; }
.report-excerpt { margin: var(--space-2) 0; padding: var(--space-2) var(--space-3); border-left: 3px solid var(--line); background: var(--surface);
  border-radius: 0 10px 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.toast button.ghost.toast-undo { margin: 0; color: #bcd3ff; background: transparent; }
.toast button.ghost.toast-undo:hover { background: #2a2f3a; color: #ffffff; }
ul.for-you-recent li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
ul.for-you-recent .link { min-height: 44px; }
/* Agents' coordination lines (Ali 19.11 13:53): a task update or a message between agents, set apart from people's chat. */
.msg-coord { background: var(--surface); border-left: 3px solid var(--line); border-radius: 0 14px 14px 0; padding-block: var(--space-1); }
.msg-coord .msg-avatar { width: 28px; height: 28px; }
.msg-coord .msg-body { font-size: .92rem; color: var(--muted); }
.msg-kind-say { border-left-color: var(--chip-blue); }
.msg-kind-say .msg-body { color: var(--text); }
.coord-badge { font-size: .68rem; letter-spacing: .04em; padding: 2px 8px; background: var(--chip-blue-bg); color: var(--chip-blue); }
.msg-body { overflow-wrap: anywhere; line-height: 1.5; }
.msg-body p { margin: 0; }
.msg-body code { font-family: var(--font-mono); font-size: .86em; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px; }
.msg-body pre { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; overflow-x: auto; max-width: 100%; margin: 4px 0; }
.msg-body pre code { background: none; border: 0; padding: 0; white-space: pre; }
.msg-body a { overflow-wrap: anywhere; }
.mention { background: var(--warn-bg); color: var(--warn-text); border-radius: 6px; padding: 0 3px; font-weight: 600; }
.msg-deleted .msg-body { font-style: italic; }
.msg-actions { display: flex; gap: 4px; margin-top: 2px; }
.link-btn, .btn.link-btn { background: var(--line-soft); border: 0; border-radius: 999px; color: var(--link); padding: 0 10px; min-height: 44px; min-width: 44px; justify-content: center; font: 500 .85rem var(--font); cursor: pointer; display: inline-flex; align-items: center; text-decoration: none; border-radius: 999px; }
.link-btn:hover { background: var(--line); }
.link-btn.danger-text { color: var(--brand-text); }
.card .msg-actions button, .card .msg-actions .btn, .card .conv-head button { margin-top: 0; }
.msg-actions { align-items: center; }
.composer { position: sticky; bottom: 0; background: var(--card); padding: 10px 0 calc(4px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line-soft); display: grid; gap: 6px; }
.composer textarea { min-height: 76px; resize: vertical; }
.composer-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card .composer button[type=submit] { margin-top: 0; }
.composer .error { margin: 0; }
@media (max-width: 600px) {
  .chat-list { padding: 8px 4px; }
  .msg { padding: 8px 2px; }
  .composer-row .muted { flex-basis: 100%; }
  .composer-row button { flex: 1 1 auto; }
}

/* --- home: who is doing what (Ali 20:57). Presence has text, not colour alone. --- */
.team-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px 12px; }
.team-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.team-doing { min-width: 0; text-align: right; overflow-wrap: anywhere; }
.team-doing a { display: inline-flex; align-items: center; min-height: 44px; }
.presence { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); min-width: 92px; }
.presence-dot { width: 10px; height: 10px; border-radius: 5px; background: transparent; border: 2px solid #8a8f9c; flex: none; }
.p-online .presence-dot { background: var(--ok); border-color: var(--ok); }
.p-online .presence-text { color: var(--ok-text); font-weight: 600; }
.p-idle .presence-dot { background: #e8a33a; border-color: #e8a33a; }
.p-idle .presence-text { color: var(--warn-text); font-weight: 600; }
.p-session .presence-dot { background: transparent; border-color: #e8a33a; }
.p-session .presence-text { color: var(--warn-text); font-weight: 600; }
.team-sub { font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 14px 0 0; font-family: var(--font); }
ul.people li { padding: 6px 0; min-height: 44px; }
.team-empty { margin: 0 0 4px; }
@media (max-width: 600px) { .team-doing { text-align: left; flex-basis: 100%; } }
.msg-chat { justify-self: start; }
.card .msg-chat button { margin-top: 0; }
/* A Linear issue handed to Crew (views/partials/linear-card.ejs): its fields, never the raw promptContext. */
.linear-card { display: grid; gap: 8px; margin-top: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); overflow-wrap: anywhere; min-width: 0; }
.linear-card .linear-head { margin: 0; }
.linear-card .linear-meta { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
.linear-card .linear-label { margin: 0 0 2px; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.linear-card .md-ext > :first-child { margin-top: 0; }
.linear-card .md-ext > :last-child { margin-bottom: 0; }
.linear-card .md-ext p, .linear-card .md-ext ul, .linear-card .md-ext ol, .linear-card .md-ext blockquote { margin: 0 0 6px; }
.linear-card .md-ext pre { white-space: pre-wrap; background: var(--surface); padding: 8px 10px; border-radius: 10px; margin: 0 0 6px; }
.linear-card .linear-comments li { padding: 6px 0; border-top: 1px solid var(--line-soft); }
.linear-card .linear-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.linear-card .linear-actions > .btn { margin: 0; }
.linear-card .linear-reply[open] { flex-basis: 100%; }
.linear-card .linear-reply > summary { list-style: none; width: max-content; max-width: 100%; }
.linear-card .linear-reply > summary::-webkit-details-marker { display: none; }
.linear-card .linear-reply-form { display: grid; gap: 6px; margin-top: 8px; }
.linear-card .linear-reply-form textarea { width: 100%; min-height: 88px; font: inherit; }

/* --- live regions: a row that arrived without a reload slides in (no motion when the user asked for less) --- */
.live-new { animation: live-in .6s ease-out; }
tr.live-new td { background: var(--chip-blue-bg); }
@keyframes live-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .live-new { animation: none; } }
.side-tools [data-notify-toggle][aria-pressed="true"] { color: #ffffff; border-color: #8fb4ff; }
/* Four tools in the sidebar footer (theme, language, notifications, logout): they wrap instead of squeezing. */
.side-tools { flex-wrap: wrap; gap: 6px; }
.lang-code { white-space: nowrap; }
/* The live mark in the sidebar footer: a dot and a word (green live, blue polling, amber reconnecting, grey offline). */
.live-state { display: flex; align-items: center; gap: 8px; margin: 0; font-size: .8rem; color: var(--side-muted); }
.live-dot { width: 8px; height: 8px; border-radius: 4px; background: #8a8f9c; flex: none; }
.live-state[data-state="sse"] .live-dot { background: #69db7c; }
.live-state[data-state="poll"] .live-dot { background: #8fb4ff; }
.live-state[data-state="connecting"] .live-dot { background: #e8a33a; }
.help-toc a { min-width: 44px; }
/* --- connect a computer (spec 5.17): the code to compare, the request facts, one row per tool --- */
.connect-ask h2 { margin-top: 0; }
.user-code { font-size: 1.9rem; font-weight: 700; letter-spacing: .12em; margin: 12px 0; overflow-wrap: anywhere; }
.user-code-input { text-transform: uppercase; letter-spacing: .08em; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 18px; margin: 0; }
.facts dt { color: var(--muted); font-size: .82rem; }
.facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.tool-rows { max-width: 720px; }
.tool-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.tool-row:first-of-type { border-top: 0; }
.tool-row .check { min-height: 44px; display: flex; align-items: center; gap: 8px; }
@media (min-width: 760px) { .tool-row { grid-template-columns: 200px minmax(0, 1fr) 200px; align-items: end; } .tool-row > p { grid-column: 1 / -1; } }
.device-remove { margin-top: 6px; }
.device-remove summary { color: var(--brand-text); font-weight: 600; }
/* CLI install steps on /connect (DEV-05): long signed links wrap instead of widening the page. */
.cli-install pre.copy { overflow-wrap: anywhere; font-size: .82rem; }
.cli-os { border: 1px solid var(--line); border-radius: 16px; padding: 0 12px; margin: 10px 0; }
.cli-os[open] { padding-bottom: 12px; }
.cli-os > summary { font-weight: 600; gap: 8px; }
.valid-until time { font-weight: 600; font-variant-numeric: tabular-nums; }
.device-remove form { padding: 4px 0 8px; }
.device-remove p { margin: 0; flex-basis: 100%; }
.native-check { font-weight: 600; }
.actions .native-check, form.inline .native-check { margin-right: 6px; }
.lang-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 12px; }
.note.native-self { background: var(--ok-bg); color: var(--ok-text); }
/* Bağlantılar (spec 5.23) */
.pill.c-active { background: var(--ok-bg); color: var(--ok-text); }
.pill.c-reauth { background: var(--warn-bg); color: var(--warn-text); }
.pill.c-revoked { background: var(--line-soft); color: var(--muted); }
.conn-setup { border-left: 4px solid var(--warn-text); }
.conn-setup h2 { margin-top: 0; }
.conn-env li { margin: 2px 0; }
.conn-row { padding: 12px 0; border-top: 1px solid var(--line-soft); }
.conn-row:first-of-type { border-top: 0; }
.conn-connect { padding-top: 12px; border-top: 1px solid var(--line-soft); }
.conn-connect .check { display: flex; gap: 8px; align-items: flex-start; min-height: 44px; }
.conn-policies { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 4px 0 8px; }
.conn-policies a { display: inline-flex; align-items: center; min-height: 44px; }
.quota-bucket .small-head { margin-top: 0; }
.conn-quota { margin-top: 16px; }

/* Bildirimler (Track C) */
.notify-grid { columns: 320px auto; column-gap: var(--space-4); margin-bottom: var(--space-4); }
.notify-grid > * { break-inside: avoid; margin: 0; min-width: 0; }
.notify-grid > * + * { margin-top: var(--space-4); }
.notify-card { display: flex; flex-direction: column; gap: 6px; }
.notify-card .card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.notify-card ul.list > li { padding-left: 0; padding-right: 0; }
.notify-card .actions, .notify-add .form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.notify-card .note, .note.notify-steps { display: block; margin: 4px 0; }
.notify-card .note p, .note.notify-steps p { margin: 4px 0; }
ol.steps { margin: 6px 0; padding-left: 1.3em; }
ol.steps li { margin: 4px 0; overflow-wrap: anywhere; }
.quiet-row { display: flex; flex-wrap: wrap; gap: 12px; }
.quiet-row .field { flex: 1 1 140px; min-width: 0; }
.quiet-row select, .quiet-row input { width: 100%; }
.notify-add { margin-top: 12px; border-top: 1px solid var(--line-soft); padding-top: 8px; }
button.intent { outline: 3px solid var(--link); outline-offset: 3px; }
.quiet-row input[type=time] { width: 100%; min-height: 44px; padding: 0 18px; font: inherit; color: var(--text); background-color: var(--input); border: 1px solid var(--line); border-radius: 999px; }
.notify-prefs label.check, .notify-add label.check { display: flex; }
.quiet-row .field.zone { flex: 2 1 240px; }
.notify-add { max-width: 560px; }
.notify-add fieldset { margin-top: 12px; }
/* Activity (OBS-01), the agent page and the run replay (OBS-02). */
.section-title { font-size: 1.05rem; margin: 22px 0 10px; }
ul.list.activity > li { gap: 4px; }
.act-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-height: 44px; }
.act-head a { display: inline-flex; align-items: center; min-height: 44px; }
.act-time { margin-left: auto; white-space: nowrap; }
.act-text { overflow-wrap: anywhere; line-height: 1.5; }
.act-text a { overflow-wrap: anywhere; }
.act-quote { color: var(--text); }
.pill.t-call, .pill.t-message, .pill.rk-tool, .pill.rk-output { background: var(--chip-blue-bg); color: var(--chip-blue); }
.pill.t-task, .pill.t-decision, .pill.t-member, .pill.rk-step, .pill.rk-note { background: var(--line-soft); color: var(--muted); }
.pill.t-approval { background: var(--warn-bg); color: var(--warn-text); }
.pill.t-chat, .pill.t-run, .pill.rs-ok { background: var(--ok-bg); color: var(--ok-text); }
.pill.t-charge, .pill.rs-error, .pill.rk-error { background: var(--chip-red-bg); color: var(--chip-red); }
.pill.rs-skipped { background: var(--line-soft); color: var(--muted); }
.pill.rs-running { background: var(--warn-bg); color: var(--warn-text); }
dl.agent-facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px 18px; margin: 10px 0 0; }
dl.agent-facts dt { color: var(--muted); font-size: .82rem; margin-top: 8px; }
dl.agent-facts dd { margin: 0; overflow-wrap: anywhere; }
dl.agent-facts dd ul.plain li { padding: 2px 0; }
@media (min-width: 760px) { dl.agent-facts { grid-template-columns: 180px minmax(0, 1fr); } dl.agent-facts dt { margin-top: 0; padding-top: 2px; } }
.replay-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 16px 0 10px; }
.replay-bar[hidden] { display: none; }
.replay-speed { display: inline-flex; align-items: center; gap: 6px; }
.replay-speed select { width: auto; min-height: 44px; }
ol.replay { list-style: none; margin: 0; padding: 0; }
ol.replay > li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 10px 22px; border-top: 1px solid var(--line-soft); }
ol.replay > li:first-child { border-top: 0; }
ol.replay > li.rp-current { background: var(--chip-blue-bg); }
ol.replay > li[hidden] { display: none; }
.rp-at { color: var(--muted); padding-top: 3px; }
.rp-body { overflow-wrap: anywhere; line-height: 1.5; }
.rp-body .act-text { display: inline; }
.rp-detail { white-space: pre-wrap; background: var(--surface); padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); margin: 6px 0 0; font-size: .85rem; overflow-wrap: anywhere; }
.rp-hint { padding: 0 22px 14px; margin: 0; }
@media (max-width: 600px) { ol.replay > li { padding: 10px 16px; grid-template-columns: 52px minmax(0, 1fr); } .act-time { margin-left: 0; flex-basis: 100%; } }
@media (prefers-reduced-motion: no-preference) { ol.replay > li.rp-current { transition: background-color .3s; } }
/* Maliyet (OBS-04): filters, KPI deltas, column charts (one series, one hue; the selected month in the full hue). */
.usage-filters { align-items: flex-end; }
.usage-filters .field { min-width: 180px; }
.usage-filters .field-btn { min-width: 0; }
#live-usage { display: grid; gap: 22px; }
.delta-up { color: var(--warn-text); font-weight: 600; }
.delta-down { color: var(--ok-text); font-weight: 600; }
.chart { margin: 4px 0 0; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "y plot" ". x"; gap: 4px 8px; max-width: 760px; }
.chart-svg { grid-area: plot; width: 100%; height: auto; display: block; overflow: visible; }
.chart-y { grid-area: y; display: flex; flex-direction: column; justify-content: space-between; font-size: .75rem; color: var(--muted); text-align: right; padding: 0 0 2px; }
.chart-x { grid-area: x; display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); }
.chart .grid { stroke: var(--chart-grid); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .axis { stroke: var(--muted); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .cbar { fill: var(--chart-bar); }
.chart .cbar.soft { fill: var(--chart-bar-soft); }
.chart .hit-area { fill: transparent; }
.chart .hit:hover .cbar { fill: var(--link-hover); }
.chart-table { margin-top: 10px; }
.chart-table summary { min-height: 44px; display: inline-flex; align-items: center; padding: 0 var(--space-4); border-radius: 999px; background: var(--line-soft); color: var(--link); font-weight: 600; font-size: .86rem; cursor: pointer; list-style: none; }
.chart-table summary::-webkit-details-marker { display: none; }
.chart-table summary:hover { background: var(--line); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; gap: 22px; }
@media (min-width: 1000px) { .grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.card.flush > .card-head.pad, .card.flush > .pad { padding-left: 22px; padding-right: 22px; }
.card.flush > p.pad { padding-bottom: 14px; margin: 0; }
@media (max-width: 600px) { .card.flush > .card-head.pad, .card.flush > .pad { padding-left: 16px; padding-right: 16px; } .usage-filters .field { min-width: 0; flex: 1 1 140px; } #live-usage { gap: 16px; } }
/* İlk adımlar (TEAM-07) and ownership on the members and agents screens. */
a.strong, .strong { font-weight: 700; }
.first-steps .card-head { flex-wrap: wrap; }
.first-steps .steps-progress { margin-left: auto; }
.first-steps .intro-close { margin: 0; }
.first-steps > p { margin: 0 0 6px; }
ol.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
ol.steps .step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; align-items: start; padding: 6px 0; }
ol.steps .step .step-title { font-weight: 600; }
ol.steps .step .btn.step-title { margin-left: calc(-1 * var(--space-3)); font-size: .95rem; }
ol.steps .step span.step-title { display: inline-flex; align-items: center; min-height: 44px; }
ol.steps .step-mark { display: inline-flex; width: 28px; height: 28px; border-radius: 14px; align-items: center; justify-content: center; margin-top: 8px; background: var(--chip-blue-bg); color: var(--chip-blue); }
ol.steps .step-mark .ico { width: 16px; height: 16px; }
ol.steps .step.done .step-mark { background: var(--ok-bg); color: var(--ok-text); }
ol.steps .step.done .step-title { color: var(--muted); text-decoration: line-through; }
.owns { display: block; }
.owns a { display: inline-flex; align-items: center; min-height: 44px; }
.owner-form select { width: auto; max-width: 180px; }
@media (min-width: 900px) { ol.steps { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; } }
/* Etkinlik → Ajanlar (OBS-07): the window chips sit under the main tabs. */
.tabs.sub { margin-top: -8px; }
.tabs.sub a { font-size: .85rem; }
.presence.compact { min-width: 0; }
dl.agent-facts dd .act-text { display: inline; }
.conn-approval h2 { margin-top: 0; }
/* Projects and roadmaps (spec 5.20) */
.project-card h2 { margin: 0; font-size: 1.15rem; }
.project-card h2 a { color: var(--text); text-decoration: none; }
.project-pct { margin: 10px 0 0; font-family: var(--font-head); font-size: 1.6rem; }
.mini-progress { display: inline-flex; align-items: center; gap: 8px; min-width: 120px; }
.mini-progress .bar { flex: 1 1 70px; margin: 0; min-width: 60px; }
.burndown { width: 100%; height: auto; display: block; margin: 6px 0; }
.burndown .bd-line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; }
.burndown .bd-area { fill: var(--brand); opacity: .12; }
.burndown .bd-axis, .burndown .bd-grid { stroke: var(--line); stroke-width: 1; }
.burndown .bd-grid { stroke-dasharray: 3 4; }
.burndown .bd-label { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.kpi-value.kpi-date { font-size: 1.4rem; }
.card-head.pad { padding: 18px 22px 8px; }
.pill.r-done { background: var(--ok-bg); color: var(--ok-text); }
.pill.r-in_progress { background: var(--warn-bg); color: var(--warn-text); }
.pill.r-planned, .pill.r-evaluate, .pill.s-cancelled, .pill.s-superseded { background: var(--line-soft); color: var(--muted); }
.who-list li, .ms-list li { padding: 10px 0; border-top: 1px solid var(--line-soft); }
.who-list li:first-child, .ms-list li:first-child { border-top: 0; }
.who-line { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 4px; }
.roadmap-filters { margin: 18px 0 12px; }
/* A list whose filter is loading in place (crew.js regionFilters): dimmed, still where it was, never blank. */
.filter-loading { opacity: .55; transition: opacity .15s ease; cursor: progress; }
@media (prefers-reduced-motion: reduce) { .filter-loading { transition: none; } }
/* Forms and links that change only their region (crew.js partialUpdates): a waiting answer and the form's own line. */
.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; vertical-align: -1px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; border-right-color: currentColor; opacity: .6; } }
.ask-pending .ask-bubble.muted { display: flex; align-items: center; gap: 6px; }
.partial-msg:empty { display: none; }
.partial-msg { margin: 8px 0; }
.know-answer:empty { display: none; }
.item-composer { position: static; }
.item-msgs { max-height: 520px; overflow-y: auto; }
.report-body h3 { font-size: 1rem; margin: 18px 0 6px; }
.report-body ul { margin: 0; padding-left: 20px; }
.wide-form { max-width: none; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media print {
  .side, .no-print, .skip-link, .live-state, dialog { display: none !important; }
  .shell, main { display: block !important; margin: 0 !important; padding: 0 !important; }
  .card { box-shadow: none !important; border: 1px solid #ccc; break-inside: avoid; }
  body { background: #fff !important; color: #000 !important; }
}
/* Tap targets of the roadmap lists (44 px, the panel's rule). */
.eyebrow a, .who-list a, .report-body a, ul.plain li > a, dl.facts dd a, .row-head > a.mono, .ms-list a { display: inline-flex; align-items: center; min-height: 44px; }
table.grid td a.mono, .who-list a.mono, dl.facts dd a.mono { min-width: 44px; }
select[multiple], select[size] { width: 100%; background-image: none; padding-right: 18px; }
select[multiple] option { overflow: hidden; text-overflow: ellipsis; }
/* --- account menu (Ali 00:33): the user row opens profile, theme, language, help and logout. Upward popover in
   the sidebar, also in the phone drawer (20.11); /account shows the same list as a page (no-JS fallback). --- */
.account-row { position: relative; display: flex; align-items: center; gap: 6px; }
.account-trigger { flex: 1 1 auto; min-width: 0; min-height: 44px; padding: 6px 8px; margin: 0 -8px; border-radius: 14px; color: var(--side-text); text-decoration: none; }
.account-trigger:hover, .account-trigger[aria-expanded="true"] { background: var(--side-line); color: #ffffff; }
.who-caret { margin-left: auto; display: inline-flex; opacity: .7; }
.who-caret .ico { width: 16px; height: 16px; }
.bell-count { position: absolute; top: -4px; right: -4px; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--pill); color: var(--pill-text); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.account-row [data-notify-toggle], .account-row [data-bell] { position: relative; flex: none; padding: 0; width: 44px; }
/* The bell's panel (Ali 20.11 15:33): above the account row like the account menu, inside the sidebar (also the phone
   drawer); unread rows first with a red dot, each row a link to its target, settings and the full list at the bottom. */
.bell-pop { position: absolute; z-index: 31; left: -6px; right: -6px; bottom: calc(100% + 8px); display: flex; flex-direction: column; max-height: min(72vh, 560px);
  background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 32px rgba(18, 20, 27, .28); }
.bell-pop[hidden] { display: none; }
.bell-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-2) var(--space-2) var(--space-1) var(--space-3); }
.bell-head h2 { margin: 0; font-size: 1rem; }
.bell-head .ghost { margin: 0; }
.bell-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--space-1); }
.bell-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
a.bell-link { display: grid; gap: 2px; padding: var(--space-2) var(--space-3); border-radius: 12px; color: var(--text); text-decoration: none; }
a.bell-link:hover, a.bell-link:focus-visible { background: var(--line-soft); }
.bell-kind { display: flex; align-items: center; gap: var(--space-1); font-size: .75rem; font-weight: 600; color: var(--muted); }
.bell-dot { width: 8px; height: 8px; border-radius: 4px; background: var(--pill); flex: none; }
.bell-title { font-size: .9rem; line-height: 1.35; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.is-unread .bell-title { font-weight: 600; }
.bell-meta { font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }
.bell-none { display: flex; align-items: center; gap: var(--space-2); margin: 0; padding: var(--space-3); }
.bell-loading { margin: 0; padding: var(--space-3); }
.bell-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-1); padding: var(--space-1) var(--space-2) var(--space-2); border-top: 1px solid var(--line-soft); }
.bell-foot .btn { margin: 0; }
.bell-card .bell-list { padding: var(--space-1); }
.notify-tab { margin-bottom: var(--space-5); }
.side .account-row [data-notify-toggle][aria-pressed="true"] { color: #ffffff; border-color: #8fb4ff; }
.account-menu { display: flex; flex-direction: column; gap: 2px; }
.account-menu.pop { position: absolute; z-index: 30; left: -6px; right: -6px; bottom: calc(100% + 8px); max-height: min(78vh, 560px); overflow-y: auto;
  padding: 6px; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 32px rgba(18, 20, 27, .28); font-size: .95rem; }
.account-menu[hidden] { display: none; }
.account-menu .am-item { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; color: var(--text); font: 500 .95rem var(--font); text-decoration: none; cursor: pointer; text-align: left; }
.account-menu .am-item:hover, .account-menu .am-item:focus-visible, .account-menu .am-opt:hover { background: var(--line-soft); color: var(--text); }
.am-item .ico, .am-label .ico { flex: none; color: var(--muted); }
.am-value { margin-left: auto; color: var(--muted); font-size: .85rem; }
.am-label { display: flex; align-items: center; gap: 10px; padding: 8px 12px 4px; color: var(--muted); font-size: .8rem; font-weight: 600; }
.am-group { display: flex; flex-direction: column; }
.am-form { margin: 0; }
.am-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 2px 6px 6px; }
.am-langs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; margin: 0; padding: 2px 6px 6px; }
.am-langs[hidden] { display: none; }
.account-menu .am-opt { min-width: 0; min-height: 44px; padding: 0 4px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--text); font: 500 .88rem var(--font); cursor: pointer; overflow-wrap: normal; word-break: keep-all; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-menu .am-langs .am-opt { border-color: transparent; padding: 0 10px; text-align: left; justify-content: flex-start; }
.account-menu .am-opt[aria-checked="true"], .account-menu .am-opt[aria-current="true"] { background: var(--chip-blue-bg); color: var(--chip-blue); border-color: transparent; font-weight: 700; }
.am-sep { height: 1px; margin: 4px 6px; background: var(--line); }
.account-menu .am-logout, .account-menu .am-logout .ico { color: var(--brand-text); }
.am-backdrop { display: none; }
.account-menu.page { max-width: 520px; }
.account-menu.page .am-langs { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* --- account pages under /auth (IAM-04): links under the login card, the "mail is off" note --- */
.auth-card input[type=email] { min-height: 48px; font-size: 16px; background: var(--surface); }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; margin: 16px 0 0; }
.auth-links:has(> .btn.ghost) { flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.auth-links .btn.block { width: 100%; }
.notice-box { margin: 8px 0 0; padding: 12px 16px; border-radius: 16px; background: var(--warn-bg); color: var(--warn-text); font-weight: 600; }
.auth-card .flash { margin-top: 8px; }

/* --- plan screen and pricing page (BIZ-06, BIZ-03): no prices, placeholders only --- */
.plan-name { font-size: 1.8rem; margin: 4px 0; }
.plan-trial { margin: 8px 0; padding: 12px 16px; border-radius: 16px; background: var(--chip-blue-bg); color: var(--chip-blue); font-weight: 600; }
.plan-limits tr.full td { color: var(--warn-text); }
.pricing h1 { margin-bottom: 6px; }
.pricing-card { max-width: 1100px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 18px 0; }
.plan-tile { border: 1px solid var(--line); }
.plan-tile h2 { margin: 0 0 6px; }
.plan-price { margin: 0 0 12px; color: var(--muted); font-weight: 600; }
.plan-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.plan-list li { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line-soft); padding-top: 6px; }
/* Prices (Ali 19.11 22:24): the small-team offer line, the struck-through old monthly price, a price on a checkout button. */
.plan-offer { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: var(--space-2) 0; padding: var(--space-3) var(--space-4); border-radius: 16px; background: var(--ok-bg); color: var(--ok-text); font-weight: 600; }
.plan-offer .ico { width: 18px; height: 18px; flex: none; }
.plan-offer .pill { background: var(--card); }
.plan-offer > span:not(.pill) { flex: 1 1 12rem; min-width: 0; }
.plan-price s { font-weight: 400; }
.plan-price s, .plan-price-now { white-space: nowrap; }
.plan-price-now { color: var(--text); }
.plan-deal { margin: calc(-1 * var(--space-2)) 0 var(--space-3); }
.btn.priced { flex-direction: column; gap: 0; padding: var(--space-1) 20px; line-height: 1.25; text-align: center; }
.btn-price { font-weight: 400; font-size: .82rem; opacity: .9; }
.btn-price s { opacity: .75; }
.plan-list li > span, .plan-list li > strong { overflow-wrap: normal; }
.plan-list li > strong { text-align: right; }
.plan-faq details { border-top: 1px solid var(--line); padding: 4px 0; }
.plan-faq summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
/* Signup honeypot (BIZ-01): off screen, never focusable by keyboard; Google/Microsoft buttons under the login form. */
.hp { display: none; }
.auth-or { display: flex; align-items: center; gap: 10px; margin: var(--space-4) 0 0; color: var(--muted); font-size: .85rem; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.oidc-btn { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 8px; text-decoration: none; }
/* The sign-in cards (Ali 20.11 20:00, "düzenli durmuyor butonlar"): one column; every full-width control sits on the
   inputs' own edges (no control pokes out); controls of a group are 8 px apart, groups 16 px. The secondary actions
   (e-mail link, forgotten password, back to sign-in) are equal full-width ghost buttons, the provider buttons carry
   the provider's own mark (partials/oidc-icon). Login, sign-up, e-mail link, forgotten password, reset, the code step. */
.auth-card .oidc-btn { margin: var(--space-2) 0 0; }
.auth-card .oidc-mark { flex: none; display: block; }
.auth-card .auth-links { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); margin: var(--space-4) 0 0; }
.auth-card .auth-links > .btn { width: 100%; margin: 0; justify-content: center; text-align: center; white-space: normal; }
.auth-card .auth-links > .btn.ghost.sm { padding: 0 var(--space-4); }
.pill.ok { background: var(--ok-bg); color: var(--ok-text); }
/* Dev tools (INT-01/02/04/05): settings cards and the task's "Bağlı işler" card. */
/* Geliştirme araçları (Ali 24.11 20:00, "çok fazla boşluk var"): the cards flow in columns at least 340 px wide, down
   then across in DOM order, so a short card packs under the one above instead of floating at the top of a row as tall
   as the Linear card. The grid takes the whole width of the main area (one column on a phone, three on a 1440 px
   laptop, four on a 2000 px screen); a column stays under twice the minimum. */
.main > .integ-grid { max-width: none; }
.integ-grid { columns: 340px auto; column-gap: 16px; margin-top: 16px; }
.integ-grid > * { break-inside: avoid; margin: 0; }
.integ-grid > * + * { margin-top: 16px; }
/* public/js/crew-columns.js pins each column's first card, so a fold that opens grows only its own column. */
[data-pin-columns] > [data-col-start] { break-before: column; }
.integ-grid > [data-col-start] { margin-top: 0; }
.integ-card { min-width: 0; }
.integ-card .copy-row { margin-bottom: 4px; }
.integ-card > .actions.integ-actions { margin-top: 12px; }
/* Bağlantıyı dene and Bağlantıyı kaldır on one line in a 340 px column (the 44 px target stays). */
.integ-card > .actions.integ-actions button { padding: 0 var(--space-4); }
/* The folds under the main facts and buttons (Bağlantı ayarları, Webhook, Linear ajanı): one line each, a chevron on
   the right; consecutive folds read as one list. */
.integ-card details.integ-form, .integ-card details.integ-fold { margin-top: 12px; border-top: 1px solid var(--line-soft); }
.integ-card :is(details.integ-form, details.integ-fold) + :is(details.integ-form, details.integ-fold) { margin-top: 0; }
.integ-card :is(details.integ-form, details.integ-fold) > summary { list-style: none; gap: 8px; font-weight: 600; }
.integ-card :is(details.integ-form, details.integ-fold) > summary::-webkit-details-marker { display: none; }
.integ-card :is(details.integ-form, details.integ-fold) > summary::after { content: ""; flex: none; width: 7px; height: 7px; margin: 0 6px 3px auto;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.integ-card :is(details.integ-form, details.integ-fold)[open] > summary::after { transform: rotate(-135deg); margin-bottom: -3px; }
.integ-card :is(details.integ-form, details.integ-fold)[open] { padding-bottom: 8px; }
.integ-card details.integ-fold > summary + .facts { margin-top: 0; }
/* "Başka bir X projesi bağla": a quiet button at the foot of that provider's last card; its form opens under it. */
.integ-card details.integ-add { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.integ-card details.integ-add > summary { list-style: none; display: inline-flex; gap: 6px; width: max-content; max-width: 100%; padding: 0 var(--space-3);
  border-radius: 999px; background: var(--line-soft); color: var(--link); font-size: .86rem; font-weight: 600; }
.integ-card details.integ-add > summary::-webkit-details-marker { display: none; }
.integ-card details.integ-add > summary:hover { background: var(--line); color: var(--link-hover); }
.integ-card details.integ-add > summary .ico { width: 18px; height: 18px; flex: none; }
@media (prefers-reduced-motion: reduce) { .integ-card :is(details.integ-form, details.integ-fold) > summary::after { transition: none; } }
.integ-card .integ-token-kinds { margin: 4px 0 8px 4px; padding-left: 18px; display: grid; gap: 4px; }
.integ-card .integ-token-kinds li { overflow-wrap: anywhere; }
.integ-secret { margin: 10px 0; padding: 12px; border-radius: 16px; background: var(--warn-bg); }
.integ-secret .error { margin: 0 0 6px; }
.integ-paste input { flex: 1 1 200px; min-width: 0; }
.integ-mode { display: flex; flex-wrap: wrap; gap: 0 16px; }
.pill.ig-ok { background: var(--ok-bg); color: var(--ok-text); }
.pill.ig-open { background: var(--chip-blue-bg); color: var(--chip-blue); }
.task-links .link-list { margin: 0 0 8px; }
.task-links .link-row { border-bottom: 1px solid var(--line-soft); padding: 10px 0; min-width: 0; }
.task-links .link-row .row-head a { min-height: 44px; }
.task-links .link-title { margin: 4px 0 0; }
.task-links .link-row .actions { margin-top: 6px; }
.task-links .link-form { max-width: 560px; }
/* Work profiles (spec 5.21): the new Pano form's three steps. */
.pano-steps fieldset.step { padding: 12px 16px 16px; }
.pano-steps .step-no { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 999px; background: var(--line-soft); font-size: .8rem; margin-right: 4px; }
.pano-steps .form-grid { max-width: none; }
.prof-group > label.check { display: flex; }
.prof-local { padding: 6px 0; border-top: 1px solid var(--line); }
.prof-local:first-of-type { border-top: 0; }
.prof-local > p { margin: 0 0 6px 30px; }
.prof-local .mono { overflow-wrap: anywhere; }
/* --- AI: Crew'a sor (a chat-like thread: question right, answer left, the newest at the bottom) --- */
.ask-thread { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 14px; }
.ask-thread > li { display: grid; gap: 6px; scroll-margin-top: 16px; }
.ask-bubble { padding: 10px 14px; border-radius: 16px; overflow-wrap: anywhere; max-width: min(680px, 100%); }
.ask-thread .ask-q { justify-self: end; background: var(--line-soft); font-weight: 600; white-space: pre-wrap; }
.ask-thread .ask-a { justify-self: start; background: var(--surface); border: 1px solid var(--line); }
.ask-thread .ask-a .small { margin: 6px 0 0; }
.ask-thread > li:target .ask-a { box-shadow: 0 0 0 2px var(--link); }
.ask-form textarea { min-height: 88px; }
.ai-stack { display: grid; gap: 16px; margin-bottom: 16px; }
.pill.q-approval { background: var(--warn-bg); color: var(--warn-text); }
.pill.q-approved, .pill.q-uploaded { background: var(--line-soft); color: var(--text); }
.pill.q-published { background: var(--ok-bg); color: var(--ok-text); }
.pill.q-rejected, .pill.q-superseded { background: var(--chip-red-bg); color: var(--chip-red); }
/* Epic folding and project chat (Ali 19.11) */
details.epic-card > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 12px; min-height: 44px; }
details.epic-card > summary::-webkit-details-marker { display: none; }
details.epic-card > summary h2 { margin: 0; display: flex; align-items: center; gap: 8px; }
details.epic-card > summary h2::before { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; flex: none; }
details.epic-card[open] > summary h2::before { transform: rotate(45deg); }
details.epic-card > summary:focus-visible { outline: 3px solid var(--link); outline-offset: -3px; border-radius: var(--radius); }
details.epic-card:not([open]) > summary { padding-bottom: 18px; }
.epic-sum { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
#project-chat .composer-row label { margin: 0; }
#project-chat .composer-row select { flex: 1 1 200px; }
@media (prefers-reduced-motion: reduce) { details.epic-card > summary h2::before { transition: none; } }

/* Project page layout (Ali 19.11 10:54): one vertical rhythm from the spacing scale; at >= 1024 px the project chat is
   a sticky right panel with its own scroll, below that it opens from the "Sohbet" toggle (or #project-chat). */
.project-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.project-main { display: flex; flex-direction: column; gap: var(--space-5); min-width: 0; container-type: inline-size; }
.project-main > *, #live-project-items > * { margin: 0; }
#live-project-items { display: flex; flex-direction: column; gap: var(--space-4); }
.split-top { align-items: flex-start; gap: var(--space-4); }
.project-summary { display: flex; flex-direction: column; gap: var(--space-4); }
.summary-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-4); }
.stat { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.stat-label { font-size: .82rem; color: var(--muted); }
.stat-value { font-family: var(--font-head); font-size: 1.6rem; line-height: 1.1; }
.stat-value.stat-date { font-size: 1.15rem; }
.stat-note { font-size: .8rem; color: var(--muted); }
.stat .bar { margin: 0; }
.summary-ms { display: flex; flex-direction: column; gap: var(--space-2); border-top: 1px solid var(--line-soft); padding-top: var(--space-3); }
.summary-h { font-size: 1rem; margin: 0; }
.ms-inline { display: flex; flex-direction: column; gap: var(--space-2); }
.ms-inline li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); }
.ms-inline li > form { margin-left: auto; }
.more-btn { align-self: flex-start; }
.has-more:not(.show-all) [data-more] { display: none !important; }
.pchat-panel { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.pchat-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.pchat-head h2 { margin: 0; }
.pchat-panel .hint { margin: 0; }
.pchat-scroll { overflow-y: auto; min-height: 120px; flex: 1 1 auto; }
.pchat-panel .composer { position: static; padding: var(--space-3) 0 0; }
@container (max-width: 700px) {
  .project-main table.grid.items-table thead { display: none; }
  .project-main table.grid.items-table, .project-main table.grid.items-table tbody { display: block; width: 100%; }
  .project-main table.grid.items-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 var(--space-3); padding: var(--space-2) var(--space-4); border-top: 1px solid var(--line-soft); }
  .project-main table.grid.items-table td, .project-main table.grid.items-table td:first-child, .project-main table.grid.items-table td:last-child { display: block; border: 0; padding: 0; height: auto; width: auto; }
  .project-main table.grid.items-table td::before { content: none !important; }
  .project-main table.grid.items-table td:nth-child(1) { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--space-2); }
  .project-main table.grid.items-table td:nth-child(3), .project-main table.grid.items-table td:nth-child(5) { display: none; }
  .project-main table.grid.items-table td:nth-child(4) { justify-self: end; }
}
@media (min-width: 1024px) {
  .project-layout { grid-template-columns: minmax(0, 1fr) minmax(300px, 360px); }
  .pchat-panel { position: sticky; top: var(--space-5); max-height: calc(100vh - 2 * var(--space-5)); overflow: hidden; }
  .pchat-toggle, .pchat-close { display: none !important; }
}
@media (max-width: 1023.98px) {
  .pchat-panel { display: none; }
  .pchat-panel:target, .project-layout.chat-open .pchat-panel {
    display: flex; position: fixed; inset: 0; z-index: 60; border-radius: 0; padding: var(--space-4); overflow: hidden; max-height: none;
    padding-top: calc(var(--space-4) + env(safe-area-inset-top, 0px)); padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
  }
}
/* Member project scope (Ali 19.11) */
/* Closed by default (Ali 23.11 16:11): the summary line and a quiet Düzenle pill; the whole line is the disclosure button. */
.scope-pick > summary { list-style: none; cursor: pointer; min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); border-radius: 12px; }
.scope-pick > summary::-webkit-details-marker { display: none; }
.scope-sum { min-width: 0; overflow-wrap: anywhere; }
.scope-edit { flex: none; display: inline-flex; align-items: center; gap: var(--space-1); min-height: 32px; padding: 0 var(--space-3); border-radius: 999px; background: var(--line-soft); color: var(--link); font-size: .86rem; font-weight: 600; white-space: nowrap; }
.scope-pick > summary:hover .scope-edit { background: var(--line); color: var(--link-hover); }
.scope-chev { display: inline-flex; transform: rotate(180deg); transition: transform .15s ease; }
.scope-chev .ico { width: 14px; height: 14px; }
.scope-pick[open] .scope-chev { transform: none; }
.scope-pick:not([open]) .scope-edit-open, .scope-pick[open] .scope-edit-closed { display: none; }
@media (prefers-reduced-motion: reduce) { .scope-chev { transition: none; } }
.scope-form { display: flex; flex-direction: column; gap: var(--space-2); padding-top: var(--space-2); }
.scope-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-2) var(--space-4); }
.scope-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); font-weight: 400; }
.scope-row select { flex: 0 1 170px; }
.scope-set { display: flex; flex-direction: column; gap: var(--space-2); }
.row-form button { white-space: nowrap; }
/* Bakım → Anlık görüntüler (OPS-07). */
ol.snap-steps { margin: var(--space-2) 0 var(--space-3); padding-left: 1.3em; display: grid; gap: var(--space-1); }
/* NOTIF-09: diff and test run on an approval */
.approval-change { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: var(--space-2) 0; }
.approval-change p { flex-basis: 100%; margin: 0; }
.approval-change.compact { margin: var(--space-1) 0 0; }
.pre.diff.diff-ready { white-space: normal; padding: 0; background: none; border: 0; }
.diff-file { border: 1px solid var(--line); border-radius: 14px; margin: var(--space-2) 0; background: var(--surface); overflow: hidden; }
.diff-file > summary { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; min-height: 44px; padding: var(--space-1) var(--space-3); cursor: pointer; }
.diff-name { overflow-wrap: anywhere; font-size: .85rem; }
.diff-add { color: var(--ok-text); font-weight: 600; font-size: .85rem; }
.diff-del { color: var(--chip-red); font-weight: 600; font-size: .85rem; }
.diff-body { margin: 0; padding: var(--space-1) 0; overflow-x: auto; white-space: pre; font: .8rem/1.45 var(--font-mono); background: var(--card); border-top: 1px solid var(--line); }
.diff-body .dl { display: block; padding: 0 var(--space-3); min-width: max-content; }
.diff-body .dl.add { background: var(--ok-bg); color: var(--ok-text); }
.diff-body .dl.del { background: var(--chip-red-bg); color: var(--chip-red); }
.diff-body .dl.hunk { color: var(--link); }
/* Agent map (AGT-11) */
.amap-grid { columns: 340px auto; column-gap: var(--space-4); }
.amap-grid > * { break-inside: avoid; margin: 0; min-width: 0; }
.amap-grid > * + * { margin-top: var(--space-4); }
.amap-grid > [data-col-start] { margin-top: 0; }
.amap-agents li { display: grid; gap: var(--space-1); padding: var(--space-2) 0; }
.amap-panes { border-top: 1px solid var(--line-soft); margin-top: var(--space-2); padding-top: var(--space-2); }
.amap-panes h3 { margin: 0 0 var(--space-1); }
.amap-panes li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); padding: var(--space-1) 0; }
/* Linear agent block on the Linear card (INT-05). */
.integ-agent > summary .pill { font-weight: 600; }
.integ-agent-form { max-width: 420px; }
.task-links .link-review { margin-top: var(--space-2); }
.task-links .link-review .pre { margin: var(--space-2) 0; }

/* Akışlar (FLOW-01): the list, the builder rail, the flow page and the run timeline. Spacing from the --space scale. */
.flow-list { list-style: none; margin: 0; padding: 0; }
.flow-row { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3) var(--space-5); border-top: 1px solid var(--line-soft); }
.flow-row:first-child { border-top: 0; }
.flow-row-main, .flow-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.flow-name { font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; }
.flow-row-meta a { display: inline-flex; align-items: center; min-height: 44px; }
.flow-gate-note { display: inline-flex; align-items: center; gap: var(--space-1); }
.flow-gate-note svg, .rail-gate-box svg, .add-row svg, .flow-timeline svg { width: 16px; height: 16px; flex: none; }
.flow-builder { display: flex; flex-direction: column; gap: var(--space-5); }
.flow-builder > .card, .flow-rail .card { margin: 0; }
.flow-rail { list-style: none; margin: 0; padding: 0 0 0 var(--space-5); position: relative; display: flex; flex-direction: column; gap: var(--space-4); }
.flow-rail::before { content: ""; position: absolute; left: 9px; top: var(--space-4); bottom: var(--space-4); width: 2px; background: var(--line); }
.flow-rail.compact { padding-left: var(--space-5); gap: var(--space-2); margin-top: var(--space-4); }
.rail-node { position: relative; }
.rail-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-weight: 600; margin: 0 0 var(--space-2); }
.flow-rail.compact .rail-head { margin: 0; font-weight: 400; min-height: 32px; }
.rail-dot { position: absolute; left: calc(-1 * var(--space-5)); display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 999px;
  background: var(--card); border: 2px solid var(--line); font-size: .7rem; font-weight: 700; color: var(--muted); }
.rail-trigger .rail-dot { background: var(--brand); border-color: var(--brand); }
.rail-step.has-error > fieldset, .flow-rail fieldset.has-error { border-color: var(--chip-red); }
.rail-gate-box { display: flex; align-items: flex-start; gap: var(--space-2); margin: 0; padding: var(--space-2) var(--space-3); border-radius: var(--radius);
  background: var(--warn-bg); color: var(--warn-text); font-size: .88rem; }
.flow-rail fieldset { border: 1px solid var(--line); min-width: 0; }
.flow-rail fieldset > legend { padding: 0 var(--space-1); }
.choice-row { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); }
.choice { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; font-weight: 400; margin: 0; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 var(--space-4); margin-bottom: var(--space-2); }
.trigger-opts { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--line-soft); }
.step-tools { display: flex; justify-content: flex-end; gap: var(--space-1); margin-top: var(--space-2); }
.icon-btn.ghost.danger { color: var(--brand-text); }
.add-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.add-row .btn { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 44px; }
.flow-runs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-1); }
.flow-runs li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.flow-runs a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
.tag-list { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-1); margin: 0 0 var(--space-3); padding: 0; }
.danger-zone { margin-top: var(--space-4); }
.danger-zone summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--brand-text); }
.danger-zone form { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.pill.fr-succeeded, .pill.fs-succeeded { background: var(--ok-bg); color: var(--ok-text); }
.pill.fr-failed, .pill.fr-rejected, .pill.fs-failed { background: var(--chip-red-bg); color: var(--chip-red); }
.pill.fr-waiting, .pill.fr-queued, .pill.fr-running, .pill.fs-waiting, .pill.fs-running { background: var(--warn-bg); color: var(--warn-text); }
.pill.fr-stopped, .pill.fr-cancelled, .pill.fs-stopped { background: var(--line-soft); color: var(--muted); }
.flow-timeline .rp-body > svg { vertical-align: -3px; margin-right: var(--space-1); }
@media (max-width: 600px) { .flow-row { padding: var(--space-3) var(--space-4); } .flow-rail { padding-left: var(--space-5); } }
.hook-box { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--line-soft); }
.hook-url { overflow-wrap: anywhere; background: var(--surface); padding: var(--space-2) var(--space-3); border-radius: var(--radius); border: 1px solid var(--line); }
/* Uygulamalar (/apps): skill pack and connector cards (Track S). */
.store-grid { columns: 320px auto; column-gap: var(--space-4); }
.store-grid > * { break-inside: avoid; margin: 0; min-width: 0; }
.store-grid > * + * { margin-top: var(--space-4); }
.store-grid > [data-col-start] { margin-top: 0; }
.store-card { min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.store-card p { margin: 0; }
/* Galeri (FLOW-09) and team packages (FLOW-12) */
.gallery { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.gallery-add { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.gallery-shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--space-3); }
.gallery-shots figure { margin: 0; display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.gallery-shots img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; }
.team-install { display: flex; flex-direction: column; gap: var(--space-4); }
.team-items .actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.dry-steps { margin: 0; padding-left: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); }
.dry-steps p { margin: 0 0 var(--space-1); }
.dry-body { white-space: pre-wrap; word-break: break-word; max-height: 18rem; overflow: auto; margin: 0; padding: var(--space-2); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font-size: .85rem; }
.store-perms { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.store-perms li { padding: var(--space-2) var(--space-3); border-radius: 12px; background: var(--line-soft); }
.store-perms li.new { background: var(--warn-bg); color: var(--warn-text); }
.store-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.store-confirm { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); margin-top: var(--space-4); }
.store-confirm .actions { margin-top: 0; width: 100%; }
/* Kalite (OBS-08): eval cases, the score trend (one hue per label, legend under the chart). */
ol.eval-cases { list-style: none; margin: 0; padding: 0; }
ol.eval-cases > li { padding: var(--space-3) var(--space-5); border-top: 1px solid var(--line-soft); display: grid; gap: var(--space-1); }
ol.eval-cases > li:first-child { border-top: 0; }
.eval-input { white-space: pre-wrap; overflow-wrap: anywhere; }
#live-eval-set { display: grid; gap: var(--space-5); }
ol.eval-cases { border-bottom: 1px solid var(--line-soft); }
.eval-add { padding-bottom: var(--space-4); padding-top: var(--space-3); }
.grade-form { display: inline-flex; gap: var(--space-2); }
.chart .trend { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart .dot { stroke: var(--card); stroke-width: 2; }
/* Fixed order, validated (dataviz validator, light on #fcfcfb and dark on #141821): blue, orange, purple, green. */
.chart .s0 { stroke: var(--series-1); } .chart .dot.s0 { fill: var(--series-1); }
.chart .s1 { stroke: var(--series-2); } .chart .dot.s1 { fill: var(--series-2); }
.chart .s2 { stroke: var(--series-3); } .chart .dot.s2 { fill: var(--series-3); }
.chart .s3 { stroke: var(--series-4); } .chart .dot.s3 { fill: var(--series-4); }
ul.legend { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-4); margin: var(--space-2) 0 0; padding: 0; font-size: .85rem; }
ul.legend .key { display: inline-block; width: var(--space-4); height: 3px; border-radius: 2px; margin-right: var(--space-2); vertical-align: middle; }
ul.legend .key.s0 { background: var(--series-1); } ul.legend .key.s1 { background: var(--series-2); } ul.legend .key.s2 { background: var(--series-3); } ul.legend .key.s3 { background: var(--series-4); }
@media (max-width: 600px) { ol.eval-cases > li { padding: var(--space-3) var(--space-4); } #live-eval-set { gap: var(--space-4); } }
/* Chat app group bridges on Geliştirme araçları (INT-15): a card of the column flow like the others. */
.bridge-steps { margin: var(--space-2) 0 var(--space-1); padding-left: 1.3em; display: grid; gap: var(--space-1); }
.bridge-steps code { overflow-wrap: anywhere; }
.integ-bridges .link-row { padding: var(--space-3) 0; border-top: 1px solid var(--line-soft); }
.integ-bridges .link-row:first-child { border-top: 0; padding-top: var(--space-1); }
.bridge-label { overflow-wrap: anywhere; }
.bridge-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-2) var(--space-3); margin-top: var(--space-2); }
.bridge-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-2) var(--space-3); flex: 1 1 320px; }
.bridge-form .check { min-height: 44px; display: inline-flex; align-items: center; gap: var(--space-1); }
.bridge-agents { display: grid; gap: var(--space-1); flex: 1 1 200px; max-width: 320px; }
.tpl-card h3 { margin: 0; font-size: 1rem; }
.tpl-flows { margin: 0 0 var(--space-3); padding-left: var(--space-4); display: flex; flex-direction: column; gap: var(--space-1); }
.tour-tpl { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
/* n8n, Zapier and Make on Geliştirme araçları (INT-14): a card of the column flow like the others. */
.auto-events { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); border: 0; padding: 0; margin: var(--space-2) 0; }
/* Ayarlar → Güvenlik ve veri (Track SEC) */
.card.flush > form.pad { padding-bottom: var(--space-4); }
.amap-expose { display: inline-flex; margin-left: var(--space-2); }
.amap-expose button { min-height: 44px; }
/* Bağlantılar: one tab per channel with its state chip (Ali 19.11 17:43). */
.conn-tabs { margin: var(--space-3) 0 var(--space-4); }
.conn-tabs a { gap: var(--space-2); padding: 0 var(--space-3) 0 var(--space-4); }
.conn-tabs .pill { font-size: .72rem; }
.conn-panel[hidden] { display: none; }
.conn-need { margin: var(--space-3) 0; padding: var(--space-3) var(--space-4); border-radius: var(--radius); background: var(--warn-bg); color: var(--warn-text); }
.conn-need ul { margin: var(--space-1) 0 0; padding-left: 1.2em; display: grid; gap: var(--space-1); }
.conn-need p { margin: 0; }
.conn-admin { margin-top: var(--space-2); }
.conn-admin summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.conn-admin code { overflow-wrap: anywhere; }
.conn-connect button:disabled { opacity: 1; background: var(--line-soft); color: var(--muted); border-color: var(--line); }
.conn-why { margin-top: var(--space-1); }
.conn-elsewhere { margin-top: var(--space-4); }
@media (max-width: 600px) { .conn-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: var(--space-1); } .conn-tabs a { flex: none; } }

/* ADE-01 usage windows (views/partials/usage-windows.ejs) */
.usage-windows { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-2); }
.uw-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); }
.uw-name { flex: 1 1 12rem; min-width: 0; }
.uw-meter { width: 8rem; height: 0.75rem; }
/* ADE-06: a project's live sessions. */
.lsess-list { display: flex; flex-direction: column; gap: var(--space-3); }
.lsess { padding: var(--space-3); border: 1px solid var(--line-soft); border-radius: 12px; display: flex; flex-direction: column; gap: var(--space-1); }
.lsess[data-state="permission"] { border-color: var(--warn-text); }
.lsess-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.lsess-perms { display: flex; flex-direction: column; gap: var(--space-1); }
/* AGT-17 / ADE-09: the end-to-end viewer. */
.e2e-list { display: flex; flex-direction: column; gap: var(--space-2); }
.e2e-viewer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.e2e-device-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1); }
.e2e-sessions-col { display: flex; flex-direction: column; gap: var(--space-3); }
.e2e-entries { display: flex; flex-direction: column; gap: var(--space-2); padding: 0; margin: 0; }
.e2e-entry { display: flex; flex-direction: column; gap: var(--space-1); }
.e2e-text { white-space: pre-wrap; overflow-wrap: anywhere; }
/* AGT-17 pairing: the safety code, big, with the terminal step (Ali 20.11 14:02). */
.e2e-pairing { display: flex; flex-direction: column; gap: var(--space-3); }
.e2e-pair-card { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); padding: var(--space-4); border: 1px dashed var(--line); border-radius: 12px; text-align: center; }
.e2e-pair-card p { margin: 0; }
.e2e-code { font-size: 40px; line-height: 1.1; font-weight: 700; letter-spacing: .08em; user-select: all; }
.e2e-step { overflow-wrap: anywhere; }
.e2e-step code { padding: 0 var(--space-1); }
.e2e-copy { margin: 0 var(--space-1); }
.e2e-paired-now { margin: 0; font-weight: 600; color: var(--ok-text); }

/* Approval attachments (views/partials/approval-files.ejs): inline video, images with a lightbox, audio, Markdown,
   diffs, text and PDF. One column on a phone, media never wider than the card. */
.afiles { display: grid; gap: var(--space-4); margin: var(--space-4) 0 0; }
.afile { margin: 0; display: grid; gap: var(--space-2); min-width: 0; }
.afile-media { display: block; width: 100%; max-height: 70vh; border-radius: 14px; background: #000; }
.afile-audio { width: 100%; }
.afile-thumb { display: block; max-width: 100%; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); cursor: zoom-in; justify-self: start; }
.afile-thumb img { display: block; max-width: 100%; max-height: 360px; height: auto; }
.afile-md { border: 1px solid var(--line); border-radius: 14px; padding: var(--space-3) var(--space-4); max-height: 60vh; overflow: auto; }
.afile-text { max-height: 50vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.afile-pdf > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.afile-frame { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.afile-cap { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.afile-name { font-weight: 600; overflow-wrap: anywhere; }
.afile-gone { margin: var(--space-2) 0 0; }
.afile-localpath { display: flex; gap: var(--space-2); align-items: flex-start; }
.afile-meter { width: 100%; height: 12px; margin: var(--space-2) 0 var(--space-4); }
.fy-approval { border-top: 1px solid var(--line); margin-top: var(--space-3); padding-top: var(--space-3); display: grid; gap: var(--space-2); }
.fy-approval-head { margin: 0; }
dialog.lightbox { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
dialog.lightbox::backdrop { background: rgba(0, 0, 0, .85); }
dialog.lightbox img { display: block; max-width: 96vw; max-height: 90vh; width: auto; height: auto; border-radius: 10px; }
dialog.lightbox .lightbox-close { position: fixed; top: var(--space-4); right: var(--space-4); min-width: 44px; min-height: 44px; }

/* Ajan sırası (views/settings-agents.ejs, views/partials/agent-availability.ejs) */
.ao-list { margin: var(--space-2) 0; padding-left: 1.4em; display: flex; flex-direction: column; gap: var(--space-2); }
.ao-entry { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-1) var(--space-2); }
.ao-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); }
.ao-actions form.inline, .ao-add { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); }
.ao-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin: var(--space-2) 0; }
.ao-confirm p { margin: 0; flex: 1 1 16rem; }
.ao-modes { display: inline-flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); }
.lsess-fix { margin: var(--space-2) 0 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: var(--space-1); }
.lsess-fix code { overflow-wrap: anywhere; }

/* Setup checklists (INT-17, views/partials/setup-checklist.ejs). Spacing from the --space scale. */
.setup-list { border-top: 1px solid var(--line-soft); padding: var(--space-3) 0; }
.setup-list > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; min-height: 44px; }
.setup-steps { padding-left: var(--space-5); margin: var(--space-3) 0 0; display: grid; gap: var(--space-3); }
.setup-step .row-head { flex-wrap: wrap; gap: var(--space-2); }
.setup-step p { margin: var(--space-1) 0 0; }
.setup-step .actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.setup-how { margin-top: var(--space-1); }
.setup-how ul { margin: var(--space-1) 0 0; padding-left: var(--space-1); display: grid; gap: var(--space-1); }

/* TEAM-12 org chart (views/agent-org.ejs, views/partials/org-agent-node.ejs) */
#live-agent-org { display: flex; flex-direction: column; gap: var(--space-4); }
.org-grid { columns: 380px auto; column-gap: var(--space-4); }
.org-grid > * { break-inside: avoid; margin: 0; min-width: 0; }
.org-grid > * + * { margin-top: var(--space-4); }
.org-grid > [data-col-start] { margin-top: 0; }
.org-tree { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: grid; gap: var(--space-2); }
.org-sub { margin-left: var(--space-4); padding-left: var(--space-3); border-left: 2px solid var(--line-soft); }
.org-node { display: grid; gap: var(--space-2); }
.org-card { padding: var(--space-2) var(--space-3); border: 1px solid var(--line-soft); border-radius: var(--radius); display: grid; gap: var(--space-2); }
.org-agent-name { font-weight: 600; }
.org-edit > summary { cursor: pointer; min-height: 36px; display: inline-flex; align-items: center; }
.org-form { margin-top: var(--space-2); }

/* Visual Flow DAG (views/partials/flow-dag.ejs) */
.flow-dag-wrap { margin: var(--space-4) 0; padding: var(--space-3); border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); display: grid; gap: var(--space-2); min-width: 0; }
.flow-dag-head { flex-wrap: wrap; gap: var(--space-2); }
.flow-dag-scroll { overflow-x: auto; max-width: 100%; padding-bottom: var(--space-1); }
.flow-dag-svg { display: block; max-width: none; height: auto; }
.flow-dag-node, .dag-node { cursor: default; }
.flow-dag-edge, .dag-edge { vector-effect: non-scaling-stroke; }
.flow-dag-details { margin-top: var(--space-1); }
.flow-dag-details > summary { cursor: pointer; min-height: 36px; display: inline-flex; align-items: center; }
.flow-dag-list { margin: var(--space-2) 0 0; padding-left: var(--space-5); display: grid; gap: var(--space-1); }

/* APP-02 safe voice dictation: 44 px touch target, subtle red pulse while recording, respects reduced motion. */
.voice-btn { flex: none; align-self: center; width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; border-radius: 50%; margin: 0; }
.voice-btn[hidden] { display: none; }
.card .ask-inline .voice-btn, .card .composer .voice-btn { margin-top: 0; }
.composer-actions { display: inline-flex; align-items: center; gap: var(--space-2); margin-left: auto; }
@media (max-width: 600px) {
  .composer-actions { flex: 1 1 auto; justify-content: flex-end; }
  .composer-actions .voice-btn { flex: none; }
}
.voice-btn.recording { color: var(--brand-text); background: var(--chip-red-bg); border-color: var(--brand); animation: voice-pulse 1.4s ease-in-out infinite; }
.voice-btn.recording:hover { color: var(--brand-text); background: var(--chip-red-bg); }
@keyframes voice-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 38%, transparent); }
  50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--brand) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .voice-btn.recording { animation: none; box-shadow: 0 0 0 2px var(--brand); }
}

/* Compact secondary tab bar directly below hub tabs (.tabs + .tabs.subtabs). */
.tabs.subtabs { gap: 6px; margin-top: calc(-1 * var(--space-2)); padding-top: 2px; }
.tabs.subtabs a { min-height: 34px; padding: 0 13px; font-size: .85rem; background: transparent; border-color: var(--line-soft); color: var(--muted); }
.tabs.subtabs a:hover { background: var(--line-soft); color: var(--text); }
.tabs.subtabs a.on { background: var(--chip-blue-bg); color: var(--chip-blue); border-color: transparent; font-weight: 600; }

/* Cmd+K / Ctrl+K Quick Jump trigger in sidebar and modal command palette. */
.side .cmdk-trigger { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 36px; padding: 0 12px; margin: 0 0 10px; border-radius: 10px; border: 1px solid var(--side-line);
  background: transparent; color: var(--side-muted); font: 500 .86rem/1 var(--font); cursor: pointer; text-align: left; }
.side .cmdk-trigger:hover { background: var(--side-line); color: #ffffff; }
.side .cmdk-trigger kbd { font: 600 .74rem/1 var(--font-mono); padding: 3px 6px; border-radius: 5px; border: 1px solid var(--side-line); color: inherit; }

.cmdk-dialog { width: min(560px, calc(100vw - 24px)); max-height: min(72vh, 520px); padding: 0; margin: 12vh auto auto;
  border: 1px solid var(--line); border-radius: 14px; background: var(--card); color: var(--text);
  box-shadow: 0 24px 64px rgba(0, 0, 0, .35); overflow: hidden; }
.cmdk-dialog[open] { display: flex; flex-direction: column; }
.cmdk-dialog::backdrop { background: rgba(9, 11, 15, .55); backdrop-filter: blur(2px); }
.cmdk-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.cmdk-input { flex: 1 1 auto; min-width: 0; min-height: 36px; border: 0; background: transparent; color: var(--text); font-size: .95rem; padding: 0; box-shadow: none; }
.cmdk-input:focus { outline: none; box-shadow: none; }
.cmdk-esc { flex: none; font: 600 .74rem/1.4 var(--font-mono); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line); color: var(--muted); }
.cmdk-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.cmdk-list li[hidden] { display: none; }
.cmdk-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 0 12px;
  border-radius: 8px; text-decoration: none; color: var(--text); font-weight: 500; }
.cmdk-list li.on .cmdk-link, .cmdk-link:hover { background: var(--chip-blue-bg); color: var(--chip-blue); }
.cmdk-group { flex: none; font-size: .78rem; color: var(--muted); font-weight: 500; }
.cmdk-list li.on .cmdk-group, .cmdk-link:hover .cmdk-group { color: inherit; }
.cmdk-empty { margin: 0; padding: 18px 16px; text-align: center; }

/* Live project conversations (.project-tabs, .conv-*) */
.project-tabs { margin: 0 0 var(--space-4); }
.conv-filters { margin: 0 0 var(--space-4); }
.conv-filters .chip-link.on { background: var(--chip-blue-bg); color: var(--chip-blue); border-color: transparent; font-weight: 700; }
.conv-chip-n { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; padding: 1px 6px; border-radius: 4px; background: var(--line-soft); font-size: .75rem; font-weight: 600; line-height: 1.25; font-variant-numeric: tabular-nums; }
.conv-filters .chip-link.on .conv-chip-n { background: color-mix(in srgb, currentColor 14%, transparent); }
.conv-list { display: flex; flex-direction: column; gap: var(--space-3); }
.conv-card { padding: 0; overflow: hidden; }
.conv-details { display: block; }
.conv-head { list-style: none; cursor: pointer; padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.conv-head::-webkit-details-marker { display: none; }
.conv-head:hover { background: var(--line-soft); }
.conv-head-main { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.conv-title { font-size: .96rem; font-weight: 600; color: var(--text); flex: 1 1 200px; min-width: 0; }
.conv-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.conv-meta > span:not(:last-child)::after { content: "·"; margin-left: var(--space-2); color: var(--muted); }
.conv-client { font-weight: 600; background: var(--chip-blue-bg); color: var(--chip-blue); }
.conv-c-antigravity { background: var(--chip-red-bg); color: var(--chip-red); }
.conv-c-claude { background: var(--warn-bg); color: var(--warn-text); }
.conv-c-codex, .conv-c-opencode { background: var(--ok-bg); color: var(--ok-text); }
.conv-turns { border-top: 1px solid var(--line-soft); padding: var(--space-3) var(--space-4) var(--space-4); background: var(--surface); }
.conv-turn-list { display: flex; flex-direction: column; gap: var(--space-2); }
.conv-turn { padding: var(--space-3); border-radius: 12px; border: 1px solid var(--line-soft); background: var(--card); display: flex; flex-direction: column; gap: var(--space-1); }
.conv-turn.conv-role-user { border-left: 3px solid var(--link); }
.conv-turn.conv-role-assistant { border-left: 3px solid var(--ok); }
.conv-turn.conv-role-tool, .conv-turn.conv-role-note { border-left: 3px solid var(--line); }
.conv-turn-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.conv-role-tag { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.conv-role-user .conv-role-tag { color: var(--link); }
.conv-role-assistant .conv-role-tag { color: var(--ok-text); }
.conv-turn-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .92rem; line-height: 1.5; color: var(--text); }
.conv-turn-summary { margin: var(--space-1) 0 0; }
.conv-empty { display: flex; flex-direction: column; gap: var(--space-2); }
.conv-cmd { margin: 0; }
.conv-cmd code { display: inline-block; padding: 6px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-family: var(--font-mono); font-size: .88rem; }
.conv-recent .card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-3); }
.conv-recent .card-head h2 { margin: 0; }
.conv-recent-empty { margin: 0; }
.conv-recent-list { display: flex; flex-direction: column; gap: var(--space-2); }
.conv-recent-item { padding: var(--space-3); border: 1px solid var(--line-soft); border-radius: 12px; display: flex; flex-direction: column; gap: var(--space-1); }
.conv-recent-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.conv-recent-meta { margin-left: auto; }
.conv-snippet { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .conv-recent-meta { margin-left: 0; width: 100%; }
}

/* Alert action bar & muted alerts (.alerts-head, .alert-row, .alert-mutes) */
.alerts { margin-bottom: var(--space-3); }
.alerts-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: 2px 4px; }
.alerts-title { font-size: .82rem; font-weight: 700; color: var(--warn-text); letter-spacing: .01em; }
.alerts .line.alert.alert-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 14px; min-height: 44px; flex-wrap: nowrap; }
.alert-main { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; }
.alert-main svg { flex: none; }
.alert-msg { min-width: 0; overflow-wrap: anywhere; }
.alert-actions { display: flex; align-items: center; gap: 6px; flex: none; flex-wrap: nowrap; }
.alert-btn { color: var(--warn-text); border-color: color-mix(in srgb, var(--warn-text) 28%, transparent); white-space: nowrap; min-height: 30px; padding: 3px 10px; font-size: .8rem; font-weight: 600; }
.alert-btn:hover { background: color-mix(in srgb, var(--warn-text) 12%, transparent); border-color: color-mix(in srgb, var(--warn-text) 45%, transparent); color: var(--warn-text); }
.alert-dismiss-all { color: var(--muted); white-space: nowrap; min-height: 28px; padding: 2px 10px; font-size: .8rem; }
.alert-seen-pill { flex: none; }
.alert-mutes { margin-bottom: var(--space-3); padding: 0; overflow: hidden; }
.alert-mutes-summary { cursor: pointer; padding: 11px 16px; font-size: .88rem; font-weight: 600; color: var(--muted); list-style: none; display: flex; align-items: center; justify-content: space-between; }
.alert-mutes-summary::-webkit-details-marker { display: none; }
.alert-mutes-summary:hover { color: var(--text); }
.alert-mutes[open] .alert-mutes-summary { border-bottom: 1px solid var(--line-soft); color: var(--text); }
ul.list.alert-mutes-list > li.alert-mute-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px; }
.alert-mute-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.alert-mute-label { font-size: .9rem; color: var(--text); overflow-wrap: anywhere; }
@media (max-width: 720px) {
  .alerts .line.alert.alert-row { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 12px; }
  .alert-actions { flex-wrap: wrap; justify-content: flex-end; }
  ul.list.alert-mutes-list > li.alert-mute-row { flex-wrap: wrap; }
}

/* SHIP-18 Closed Autonomous Delivery (AMIL Loop) & ADE-05 Plan Card */
.closed-loop-card .card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.closed-loop-card .card-head h2 { margin: 0; }
.cl-lead { margin: 4px 0 0; }
.cl-subhead { font-size: .88rem; font-weight: 700; margin: 0 0 var(--space-2); color: var(--text); }
.cl-stages { list-style: none; margin: 0 0 var(--space-4); padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); }
.cl-stage { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); min-width: 0; }
.cl-stage-num { flex: none; width: 22px; height: 22px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; background: var(--line-soft); color: var(--text); font-family: var(--font-mono); }
.cl-stage-label { font-size: .84rem; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.cl-cli-box { margin-bottom: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--line-soft); }
.cl-cli-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-2); }
.cl-cli-item { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface); }
.cl-cli-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cl-cli-row code { font-size: .8rem; overflow-x: auto; white-space: nowrap; flex: 1 1 auto; min-width: 0; }
.cl-handoff { margin-bottom: var(--space-4); padding: var(--space-3); border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.cl-handoff-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: var(--space-2); }
.cl-handoff-head .cl-subhead { margin: 0; }
.cl-handoff-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--space-2); }
.cl-handoff-summary { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; line-height: 1.5; }
.cl-reviews { padding-top: var(--space-3); border-top: 1px solid var(--line-soft); }
.cl-review-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.cl-review-table th, .cl-review-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.cl-review-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.pill.cl-v-approve, .pill.cl-qa-pass { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok-text); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.pill.cl-v-request_changes { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn-text); border-color: color-mix(in srgb, var(--warn) 38%, transparent); }
.pill.cl-v-block, .pill.cl-qa-fail { background: color-mix(in srgb, var(--err) 15%, transparent); color: var(--err-text); border-color: color-mix(in srgb, var(--err) 35%, transparent); }
.plan-card { display: flex; flex-direction: column; gap: 6px; flex-basis: 100%; }
.plan-card.compact { flex-basis: auto; }
.plan-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.plan-progress { width: 100%; max-width: 280px; height: 8px; accent-color: var(--ok); }
.plan-steps { margin: 4px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: .88rem; }
.plan-step-completed { color: var(--muted); text-decoration: line-through; }
.plan-step-in_progress { font-weight: 600; color: var(--text); }
@media (max-width: 900px) {
  .cl-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .cl-stages { grid-template-columns: 1fr; }
}

/* Remote SHIP-18 Autopilot trigger, Live Conversation steering, and Quiet Overview Assistant strip */
.cl-remote-box { margin-bottom: var(--space-4); padding: var(--space-3); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.cl-remote-hint { margin: 0; }
.cl-remote-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-2); }
.cl-remote-form .field { flex: 1 1 150px; min-width: 130px; margin: 0; }
.cl-remote-form .cl-remote-action { flex: none; min-width: 0; }
.conv-steer { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--line-soft); }
.conv-steer input[type="text"] { flex: 1 1 auto; min-width: 0; }
.conv-steer button { flex: none; }
.asst-card { padding: 10px 14px; }
.asst-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-width: 0; }
.asst-strip-title { margin: 0; font-size: .86rem; font-weight: 700; white-space: nowrap; }
.asst-strip-metrics { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .84rem; font-variant-numeric: tabular-nums; }
.asst-metric { color: var(--muted); text-decoration: none; white-space: nowrap; }
.asst-metric:hover { color: var(--text); text-decoration: underline; }
.asst-metric.is-warn { color: var(--warn-text); font-weight: 600; }
.asst-sep { color: var(--line); user-select: none; }
.asst-strip-stuck { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.asst-stuck-title { font-weight: 600; }
.asst-stuck-reason { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }
.asst-strip-open { margin-left: auto; flex: none; }
.asst-strip-actions { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; flex: none; }
.asst-strip-actions .asst-strip-open { margin-left: 0; }
.asst-strip-actions .voice-btn { width: 34px; height: 34px; min-width: 34px; min-height: 34px; }
@media (max-width: 600px) {
  .conv-steer { flex-wrap: wrap; }
  .conv-steer button[type="submit"] { width: 100%; }
  .conv-steer .voice-btn { width: 44px; flex: none; }
  .asst-strip-open, .asst-strip-actions { margin-left: 0; }
  .asst-stuck-reason { max-width: 100%; white-space: normal; }
}

/* Interactive Multi-Choice Decision Cards ("Seçenekli Onay / Karar Kartları") */
.actions form.choice-form, .choice-form { display: flex; flex-direction: column; align-items: stretch; gap: 8px; width: 100%; margin: 0; }
.decide-cell .choice-form { min-width: 260px; max-width: 440px; }
.choice-fieldset { border: 0; padding: 0; margin: 0 0 var(--space-3); }
.choice-fieldset > legend { font-weight: 600; font-size: .92rem; margin-bottom: var(--space-2); color: var(--text); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; width: 100%; }
.decide-cell .choice-grid { grid-template-columns: 1fr; }
.choice-grid.choice-readonly { margin: var(--space-3) 0; }
.choice-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); text-align: left; font: inherit; line-height: 1.35; cursor: pointer; transition: border-color .14s ease, background-color .14s ease; }
button.choice-opt:hover { border-color: var(--link); background: var(--surface); }
button.choice-opt:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.choice-readonly .choice-opt { cursor: default; }
.choice-opt.recommended { border-color: var(--ok); background: var(--ok-bg); }
button.choice-opt.recommended:hover { border-color: var(--ok-text); background: color-mix(in srgb, var(--ok-bg) 82%, var(--card)); }
.choice-opt.is-chosen { border-color: var(--ok); box-shadow: inset 3px 0 0 var(--ok); }
.choice-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; width: 100%; }
.choice-id { display: inline-flex; align-items: center; justify-content: center; padding: 1px 7px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); font-family: var(--font-mono); font-size: .78rem; font-weight: 700; color: var(--text); flex: none; }
.choice-opt.recommended .choice-id { background: var(--card); border-color: color-mix(in srgb, var(--ok) 45%, var(--line)); color: var(--ok-text); }
.choice-label { font-weight: 600; font-size: .9rem; color: var(--text); overflow-wrap: anywhere; }
.choice-rec { margin-left: auto; display: inline-flex; align-items: center; padding: 1px 8px; border-radius: 999px; background: var(--ok-bg); color: var(--ok-text); border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); font-size: .74rem; font-weight: 700; white-space: nowrap; }
.choice-desc { font-size: .82rem; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.choice-foot { display: flex; align-items: center; gap: 8px; width: 100%; }
.choice-note { flex: 1 1 auto; min-width: 0; font-size: .86rem; padding: 6px 10px; min-height: 34px; }
.choice-reject { flex: none; color: var(--muted); white-space: nowrap; }
.pill.choice-picked { background: var(--ok-bg); color: var(--ok-text); border-color: color-mix(in srgb, var(--ok) 35%, transparent); font-weight: 600; }
.conv-choices { display: flex; flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-4); }
.conv-choices-title { margin: 0; font-size: .95rem; font-weight: 700; color: var(--text); }
.choice-card { display: flex; flex-direction: column; gap: var(--space-2); }
.choice-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.choice-card-sub { margin: 0; }
.conv-inline-choices { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--line-soft); }
.conv-choice-card { padding: var(--space-3); border-radius: 12px; border: 1px solid var(--line); background: var(--card); }
.choice-card-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.choice-opt.is-deny { border-color: color-mix(in srgb, var(--err) 45%, var(--line)); }
button.choice-opt.is-deny:hover { border-color: var(--err); background: color-mix(in srgb, var(--err) 10%, var(--card)); }
.choice-opt.is-deny .choice-id { color: var(--err-text); border-color: color-mix(in srgb, var(--err) 40%, var(--line)); }

/* Remote Control Composer, Collapsible Tool Cards, Cancel Bar & Inline System Permission Cards */
.conv-composer { display: flex; flex-direction: column; gap: var(--space-3); margin-bottom: var(--space-4); }
.conv-composer-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.conv-composer-title { margin: 0; font-size: .98rem; font-weight: 700; color: var(--text); }
.conv-daemon-status { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.conv-engines-badge { font-size: .78rem; font-weight: 600; }
.conv-daemon-pill { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 600; }
.conv-daemon-pill.is-online { background: var(--ok-bg); color: var(--ok-text); border-color: color-mix(in srgb, var(--ok) 38%, transparent); }
.conv-daemon-pill.is-offline { background: var(--surface); color: var(--muted); border-color: var(--line); }
.conv-daemon-pill code { font-size: .78rem; padding: 0 4px; border-radius: 4px; background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }
.conv-daemon-dot { width: 8px; height: 8px; border-radius: 999px; flex: none; background: var(--muted); }
.conv-daemon-pill.is-online .conv-daemon-dot { background: var(--ok); }
.conv-composer-form { display: flex; flex-direction: column; gap: var(--space-2); margin: 0; }
.conv-composer-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.conv-engines { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.conv-engine-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: .82rem; font-weight: 600; cursor: pointer; transition: border-color .14s ease, background-color .14s ease; }
.conv-engine-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.conv-engine-chip:hover { border-color: var(--link); }
.conv-engine-chip:has(input:focus-visible) { outline: 2px solid var(--link); outline-offset: 2px; }
.conv-engine-chip:has(input:checked) { background: var(--chip-blue-bg); color: var(--chip-blue); border-color: color-mix(in srgb, var(--chip-blue) 45%, transparent); }
.conv-engine-chip.is-dim { opacity: .72; }
.conv-engine-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--ok); flex: none; }
.conv-device-pick { display: inline-flex; align-items: center; margin: 0; }
.conv-device-pick select { font-size: .82rem; min-height: 32px; padding: 4px 10px; }
.conv-composer-input { display: flex; align-items: flex-end; gap: var(--space-2); }
.conv-composer-input textarea { flex: 1 1 auto; min-width: 0; min-height: 54px; resize: vertical; font: inherit; line-height: 1.45; }
.conv-composer-submit { flex: none; white-space: nowrap; }

.conv-turn.conv-role-tool { padding: 0; overflow: hidden; background: var(--surface); }
.conv-tool { display: block; }
.conv-tool-summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 8px 12px; min-height: 34px; font-size: .84rem; color: var(--text); }
.conv-tool-summary::-webkit-details-marker { display: none; }
.conv-tool-summary:hover { background: var(--line-soft); }
.conv-tool-icon { flex: none; font-size: .85rem; color: var(--muted); }
.conv-tool-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; color: var(--text); }
.conv-tool-time { flex: none; margin-left: auto; }
.conv-tool-output { margin: 0; padding: 10px 12px; border-top: 1px solid var(--line-soft); background: var(--card); color: var(--text); font-size: .8rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 340px; overflow-y: auto; }
.conv-turn.conv-role-system { border-left: 3px solid var(--warn); background: color-mix(in srgb, var(--warn-bg) 40%, var(--card)); }

.conv-footer { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--line-soft); }
.conv-footer .conv-steer { flex: 1 1 auto; min-width: 0; margin-top: 0; padding-top: 0; border-top: 0; }
.conv-cancel { flex: none; margin: 0; }
.conv-cancel-btn { color: var(--err-text); border-color: color-mix(in srgb, var(--err) 35%, var(--line)); white-space: nowrap; }
.conv-cancel-btn:hover { background: color-mix(in srgb, var(--err) 12%, transparent); border-color: var(--err); color: var(--err-text); }

.perm-card { border-color: color-mix(in srgb, var(--warn) 65%, var(--err)); border-left: 4px solid var(--err); background: color-mix(in srgb, var(--warn-bg) 36%, var(--card)); }
.perm-tool-badge { background: var(--warn-bg); color: var(--warn-text); border-color: color-mix(in srgb, var(--warn) 48%, transparent); font-weight: 700; font-size: .78rem; }
.perm-cmd { margin: 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-size: .82rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 200px; overflow-y: auto; }

@container (max-width: 719px) {
  .decide-cell .choice-form { min-width: 0; max-width: 100%; }
}
@media (max-width: 600px) {
  .choice-grid { grid-template-columns: 1fr; }
  .choice-foot { flex-wrap: wrap; }
  .choice-reject { width: 100%; }
  .conv-composer-input { flex-direction: column; align-items: stretch; }
  .conv-composer-input .voice-btn { align-self: flex-end; }
  .conv-composer-submit { width: 100%; }
  .conv-footer { flex-wrap: wrap; }
  .conv-cancel, .conv-cancel-btn { width: 100%; }
}

/* Voice-to-Agent live status pill & .is-recording state */
.voice-btn.is-recording { color: var(--brand-text); background: var(--chip-red-bg); border-color: var(--brand); animation: voice-pulse 1.4s ease-in-out infinite; }
.voice-btn.is-recording:hover { color: var(--brand-text); background: var(--chip-red-bg); }
.voice-status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--chip-red-bg); color: var(--brand-text); border: 1px solid color-mix(in srgb, var(--brand) 42%, transparent); font-size: .78rem; font-weight: 600; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  .voice-btn.is-recording { animation: none; box-shadow: 0 0 0 2px var(--brand); }
}

/* Inline Colorized Diff Viewer + Line-Click Agent Commenting (views/partials/diff-view.ejs) */
.diff-viewer { display: flex; flex-direction: column; gap: var(--space-2); margin: var(--space-2) 0; min-width: 0; }
.diff-viewer.is-compact { margin: var(--space-1) 0 0; }
.diff-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 40px; padding: 6px 12px; cursor: pointer; background: var(--surface); }
.diff-stats { display: inline-flex; align-items: center; gap: 6px; flex: none; font-family: var(--font-mono); font-size: .78rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.diff-stat-add { padding: 1px 6px; border-radius: 999px; background: var(--ok-bg); color: var(--ok-text); }
.diff-stat-del { padding: 1px 6px; border-radius: 999px; background: var(--chip-red-bg); color: var(--chip-red); }
.diff-scroll { overflow-x: auto; max-width: 100%; border-top: 1px solid var(--line); background: var(--card); }
.diff-table { width: 100%; border-collapse: collapse; table-layout: auto; font: .8rem/1.5 var(--font-mono); margin: 0; }
.diff-table td { padding: 1px 8px; vertical-align: top; border: 0; }
.diff-num { width: 1%; min-width: 38px; text-align: right; color: var(--muted); user-select: none; font-variant-numeric: tabular-nums; opacity: .82; white-space: nowrap; border-right: 1px solid var(--line-soft); padding: 1px 6px; }
.diff-code { white-space: pre; padding: 1px 10px 1px 6px; color: var(--text); position: relative; }
.diff-sign { display: inline-block; width: 14px; user-select: none; opacity: .75; }
.diff-row.diff-add td { background: var(--ok-bg); color: var(--ok-text); }
.diff-row.diff-add .diff-num { color: var(--ok-text); }
.diff-row.diff-del td { background: var(--chip-red-bg); color: var(--chip-red); }
.diff-row.diff-del .diff-num { color: var(--chip-red); }
.diff-row.diff-ctx td { background: transparent; color: var(--text); }
.diff-hunk-row td { background: var(--surface); color: var(--link); font-weight: 600; padding-top: 3px; padding-bottom: 3px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.diff-cmt-btn { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; min-width: 20px; min-height: 20px; padding: 0; margin: 0 6px 0 0; border-radius: 5px; border: 1px solid var(--line); background: var(--card); color: var(--link); font: 700 .8rem/1 var(--font-mono); cursor: pointer; opacity: .48; transition: opacity .12s ease, background-color .12s ease, border-color .12s ease; vertical-align: middle; }
.diff-row:hover .diff-cmt-btn, .diff-cmt-btn:focus-visible, .diff-cmt-btn:hover { opacity: 1; background: var(--chip-blue-bg); border-color: var(--link); color: var(--chip-blue); }
.diff-cmt-row td.diff-cmt-cell { padding: 8px 12px; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); white-space: normal; }
.diff-cmt-form { display: flex; flex-direction: column; gap: 8px; margin: 0; font-family: var(--font); }
.diff-cmt-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .78rem; }
.diff-cmt-loc { padding: 2px 7px; border-radius: 6px; background: var(--chip-blue-bg); color: var(--chip-blue); font-weight: 700; }
.diff-cmt-snippet { color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 480px; }
.diff-cmt-input-row { display: flex; flex-direction: column; gap: 6px; }
.diff-cmt-input { width: 100%; min-height: 48px; resize: vertical; font: .86rem/1.45 var(--font); padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--text); }
.diff-cmt-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.diff-cmt-status { margin-right: auto; }
.diff-cmt-err { color: var(--err-text); font-weight: 600; }
.diff-cmt-ok { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.diff-truncated { margin: 2px 0 0; }
.diff-preview-fold { margin-top: 6px; }
.diff-preview-fold > summary { cursor: pointer; font-weight: 600; }
.conv-tool-diff { padding: 8px 12px; border-top: 1px solid var(--line-soft); background: var(--card); }
.conv-tool-diff .conv-tool-output { border-top: 0; padding: 6px 0; max-height: 180px; }
