/* faz1/gantt.css · the Olaylar window (faz1/gantt.js, docs/faz1/GANTT.md). Selectors start with .f1g-, #f1-gantt or the
 * dock attribute on #f1-app (data-gantt: none | left | mid | right | all, the effective dock for the current layout).
 * The stage grid gets a second row of height --f1g-h; the panels the window does not sit under span both rows.
 * Transitions: none on the grid rows (the shell re-measures every module after a dock change). */

#f1-app {
  --gk-talep: #b7700b; --gk-onay: #23946a; --gk-belge: #66717f; --gk-mesaj: #5267d8; --gk-odeme: #a07a00; --gk-alarm: #cc4236;
  --gk-tahmin: #8a93a1; --f1g-stripe: rgba(32, 38, 48, .025); --f1g-break: rgba(32, 38, 48, .07); --f1g-now: var(--saffron, #c0691a);
}
:root[data-film-theme="dark"] #f1-app {
  --gk-talep: #e8a33f; --gk-onay: #57c79a; --gk-belge: #a3adbb; --gk-mesaj: #94a6ff; --gk-odeme: #e2bf3c; --gk-alarm: #f2766b;
  --gk-tahmin: #8b95a6; --f1g-stripe: rgba(255, 255, 255, .025); --f1g-break: rgba(255, 255, 255, .06); --f1g-now: #e99a4b;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-film-theme]) #f1-app {
    --gk-talep: #e8a33f; --gk-onay: #57c79a; --gk-belge: #a3adbb; --gk-mesaj: #94a6ff; --gk-odeme: #e2bf3c; --gk-alarm: #f2766b;
    --gk-tahmin: #8b95a6; --f1g-stripe: rgba(255, 255, 255, .025); --f1g-break: rgba(255, 255, 255, .06); --f1g-now: #e99a4b;
  }
}

/* ------------------------------------------------------------------ dock: a second grid row below one panel or all three */
@media (min-width: 1000px) {
  #f1-app #f1-panel-left { grid-column: 1; grid-row: 1; }
  #f1-app #f1-panel-mid { grid-column: 2; grid-row: 1; }
  #f1-app #f1-panel-right { grid-column: 3; grid-row: 1; }
  #f1-app:is([data-gantt="left"], [data-gantt="mid"], [data-gantt="right"], [data-gantt="all"]) #f1-stage {
    grid-template-rows: minmax(0, 1fr) var(--f1g-h, 160px); row-gap: 12px;
  }
  #f1-app[data-gantt="left"] :is(#f1-panel-mid, #f1-panel-right),
  #f1-app[data-gantt="mid"] :is(#f1-panel-left, #f1-panel-right),
  #f1-app[data-gantt="right"] :is(#f1-panel-left, #f1-panel-mid) { grid-row: 1 / span 2; }
  #f1-app #f1-gantt { grid-row: 2; }
  #f1-app[data-gantt="left"] #f1-gantt { grid-column: 1; }
  #f1-app[data-gantt="mid"] #f1-gantt { grid-column: 2; }
  #f1-app[data-gantt="right"] #f1-gantt { grid-column: 3; }
  #f1-app[data-gantt="all"] #f1-gantt { grid-column: 1 / -1; }
}
@media (max-width: 999px) { #f1-app #f1-gantt { height: 260px; } }
#f1-app:not(:is([data-gantt="left"], [data-gantt="mid"], [data-gantt="right"], [data-gantt="all"])) #f1-gantt { display: none; }
/* "Anlatıma dön" sits above the window */
#f1-app:is([data-gantt="mid"], [data-gantt="all"]) #f1-return { bottom: calc(var(--f1g-h, 160px) + 30px); }

/* ------------------------------------------------------------------ the card */
#f1-gantt {
  position: relative; z-index: 2; min-width: 0; min-height: 0; display: flex; flex-direction: column;
  background: var(--pro-panel); border: 1px solid var(--pro-line); border-radius: 14px; box-shadow: var(--f1-shadow);
  font: 12px/1.3 var(--f1-sans); color: var(--pro-ink);
}
#f1-gantt .f1g-split { position: absolute; left: 24px; right: 24px; top: -11px; height: 10px; cursor: ns-resize; z-index: 3; touch-action: none; }
#f1-gantt .f1g-split::after {
  content: ''; position: absolute; left: 50%; top: 3px; width: 44px; height: 4px; margin-left: -22px; border-radius: 2px;
  background: var(--pro-line); opacity: 0; transition: opacity .15s;
}
#f1-gantt .f1g-split:hover::after, #f1-gantt.f1g-resizing .f1g-split::after { opacity: 1; background: var(--pro-accent); }

.f1g-head {
  flex: none; height: 30px; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 12px; min-width: 0;
  border-bottom: 1px solid var(--pro-line);
}
.f1g-title { font-size: 13px; font-weight: 650; white-space: nowrap; }
.f1g-when { font-size: 11.5px; color: var(--pro-text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; font-variant-numeric: tabular-nums; }
.f1g-when b { color: var(--f1g-now); font-weight: 650; }
.f1g-count { font-size: 11px; color: var(--pro-muted); white-space: nowrap; }
.f1g-sp { flex: 1 1 auto; min-width: 4px; }
.f1g-tools { display: flex; align-items: center; gap: 4px; flex: none; }
.f1g-tools button, .f1g-dock button {
  height: 22px; min-width: 24px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--pro-line); background: var(--pro-panel); color: var(--pro-text2);
  font: 600 11px/1 var(--f1-sans); display: inline-flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap;
}
.f1g-tools button:hover, .f1g-dock button:hover { color: var(--pro-accent); border-color: var(--pro-accent); }
.f1g-tools button[aria-pressed="true"], .f1g-dock button[aria-pressed="true"] { background: var(--pro-focus); color: var(--pro-accent); border-color: var(--pro-accent); }
.f1g-tools button.f1g-hot { color: var(--f1g-now); border-color: var(--f1g-now); }
.f1g-tools svg, .f1g-dock svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.f1g-dock { display: inline-flex; border: 1px solid var(--pro-line); border-radius: 7px; overflow: hidden; }
.f1g-dock button { border: 0; border-radius: 0; min-width: 24px; padding: 0 4px; }
.f1g-dock button + button { border-left: 1px solid var(--pro-line); }
.f1g-dock svg rect { stroke-width: 1.1; }
.f1g-dock svg .f1g-di-on { fill: currentColor; stroke: none; }
#f1-gantt.f1g-narrow .f1g-when, #f1-gantt.f1g-narrow .f1g-count, #f1-gantt.f1g-narrow .f1g-txt { display: none; }
#f1-gantt.f1g-tiny .f1g-zoom { display: none; }

.f1g-body { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; border-radius: 0 0 13px 13px; }
.f1g-names { position: absolute; left: 0; top: 0; bottom: 0; overflow: hidden; border-right: 1px solid var(--pro-line); background: var(--pro-panel); z-index: 2; }
.f1g-names-in { position: absolute; left: 0; right: 0; top: 0; }
.f1g-corner {
  position: absolute; left: 0; right: 0; top: 0; z-index: 2; display: flex; align-items: center; padding: 0 8px; background: var(--pro-panel);
  border-bottom: 1px solid var(--pro-line); font-size: 10px; color: var(--pro-muted); letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; overflow: hidden;
}
.f1g-grp {
  position: absolute; left: 0; right: 0; display: flex; align-items: flex-end; padding: 0 8px 1px; font-size: 9.5px; font-weight: 650;
  letter-spacing: .05em; text-transform: uppercase; color: var(--pro-muted); white-space: nowrap; overflow: hidden;
}
.f1g-name {
  position: absolute; left: 0; right: 0; display: flex; align-items: center; gap: 5px; padding: 0 6px 0 8px; font-size: 11.5px; color: var(--pro-ink);
  white-space: nowrap; overflow: hidden; cursor: default;
}
.f1g-name span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.f1g-name i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--pro-line); }
.f1g-name[data-group="kisi"] i { background: var(--gk-mesaj); opacity: .55; }
.f1g-name[data-group="makine"] i { background: var(--gk-alarm); opacity: .6; border-radius: 1px; }
.f1g-name[data-group="sistem"] i { background: var(--gk-belge); opacity: .6; border-radius: 1px; }
.f1g-name.f1g-cur-row span { font-weight: 650; }
.f1g-name.f1g-focus-row { background: var(--pro-focus); color: var(--pro-accent); }
.f1g-name:hover { background: var(--pro-soft); }

.f1g-svg { position: absolute; top: 0; bottom: 0; right: 0; display: block; overflow: hidden; color: var(--pro-line); touch-action: none; user-select: none; }
.f1g-svg text { font-family: var(--f1-sans); }
.f1g-stripe { fill: var(--f1g-stripe); }
.f1g-grpline { stroke: var(--pro-line); stroke-width: 1; }
.f1g-break { fill: url(#f1g-hatch); }
.f1g-break-bg { fill: var(--f1g-break); }
.f1g-tick { stroke: var(--pro-line); stroke-width: 1; opacity: .7; }
.f1g-tick.f1g-day { opacity: 1; stroke: var(--pro-muted); stroke-opacity: .45; }
.f1g-rulerbg { fill: var(--pro-panel); }
.f1g-rulerline { stroke: var(--pro-line); }
.f1g-tl { font-size: 9.5px; fill: var(--pro-muted); font-variant-numeric: tabular-nums; }
.f1g-tl.f1g-major { font-size: 10px; font-weight: 650; fill: var(--pro-text2); }
.f1g-brk-l { font-size: 9px; fill: var(--pro-muted); }
.f1g-now-line { stroke: var(--f1g-now); stroke-width: 1.5; }
.f1g-now-tri { fill: var(--f1g-now); }
.f1g-now-chip rect { fill: var(--pro-panel); stroke: var(--f1g-now); stroke-width: 1; }
.f1g-now-chip text { font-size: 9.5px; font-weight: 650; fill: var(--f1g-now); font-variant-numeric: tabular-nums; }
.f1g-empty { position: absolute; left: 0; right: 0; top: 40%; text-align: center; font-size: 12px; color: var(--pro-text2); pointer-events: none; }

/* marks: --gk per kind family */
.f1g-ev { --gk: var(--gk-belge); color: var(--gk); cursor: default; }
.f1g-ev[data-kind="talep"] { --gk: var(--gk-talep); }
.f1g-ev:is([data-kind="onay"], [data-kind="imza"]) { --gk: var(--gk-onay); }
.f1g-ev:is([data-kind="mesaj"], [data-kind="sesli"], [data-kind="arama"]) { --gk: var(--gk-mesaj); }
.f1g-ev[data-kind="odeme"] { --gk: var(--gk-odeme); }
.f1g-ev:is([data-kind="sensor"], [data-kind="makine"]) { --gk: var(--gk-alarm); }
.f1g-ev[data-tone="red"] { --gk: var(--st-crit); }
.f1g-ev[data-tone="warn"] { --gk: var(--st-warn); }
.f1g-ev .f1g-hit { fill: transparent; }
.f1g-ev .f1g-bg { fill: var(--pro-panel); stroke: var(--gk); stroke-width: 1.4; }
.f1g-ev[data-kind="imza"] .f1g-bg, .f1g-ev[data-kind="odeme"] .f1g-bg, .f1g-ev[data-kind="makine"] .f1g-bg { fill: color-mix(in srgb, var(--gk) 14%, var(--pro-panel)); }
.f1g-ev use { color: var(--gk); }
.f1g-ev .f1g-part { fill: none; stroke: var(--part-bugun, #c26a12); stroke-width: 2; stroke-linecap: round; }
.f1g-ev .f1g-halo { fill: var(--gk); opacity: 0; transform-box: fill-box; transform-origin: center; }
.f1g-ev.f1g-cur .f1g-halo { animation: f1g-pulse 1.8s ease-in-out infinite; }
.f1g-ev.f1g-cur .f1g-bg { stroke-width: 2; }
@keyframes f1g-pulse { 0% { opacity: .32; transform: scale(.75); } 70% { opacity: 0; transform: scale(1.5); } 100% { opacity: 0; transform: scale(1.5); } }
.f1g-ev.f1g-fut { opacity: .38; }
.f1g-ev.f1g-dim { opacity: .22; }
.f1g-ev.f1g-foc .f1g-bg { stroke-width: 2.2; }
.f1g-ev.f1g-pred { --gk: var(--gk-tahmin); }
.f1g-ev.f1g-pred .f1g-bg { fill: transparent; stroke-dasharray: 2.4 1.8; stroke-width: 1.3; }
.f1g-ev.f1g-pred use { opacity: .75; }
.f1g-ev .f1g-cap { font-size: 10.5px; fill: var(--pro-text2); }
.f1g-ev.f1g-cur .f1g-cap { fill: var(--pro-ink); font-weight: 600; }
.f1g-ev.f1g-pred .f1g-cap { font-style: italic; fill: var(--gk-tahmin); }
.f1g-badge rect { fill: var(--gk); }
.f1g-badge text { font-size: 8.5px; font-weight: 700; fill: var(--pro-panel); }
.f1g-ev:hover .f1g-bg { stroke-width: 2.4; }
@media (prefers-reduced-motion: reduce) { .f1g-ev.f1g-cur .f1g-halo { animation: none; opacity: .18; transform: scale(1.2); } }

.f1g-bar { fill: color-mix(in srgb, var(--gk) 30%, transparent); }
.f1g-bar.f1g-pred { fill: none; stroke-dasharray: 3 2; stroke: var(--gk-tahmin); stroke-opacity: .8; }
.f1g-since { stroke: var(--gk); stroke-width: 1.4; stroke-opacity: .35; stroke-dasharray: 1 2.2; stroke-linecap: round; }
.f1g-conn { stroke: var(--gk); stroke-width: 1; stroke-opacity: .45; stroke-dasharray: 2 2; }
.f1g-conn-dot { fill: var(--pro-panel); stroke: var(--gk); stroke-width: 1.2; }
.f1g-wrap.f1g-fut { opacity: .38; }
.f1g-wrap.f1g-dim { opacity: .2; }
.f1g-link { fill: none; stroke: var(--pro-muted); stroke-width: 1; stroke-opacity: .5; }
.f1g-link.f1g-fut { stroke-opacity: .2; }
.f1g-link.f1g-hot { stroke: var(--pro-accent); stroke-opacity: .8; stroke-width: 1.3; }
.f1g-arrow { fill: var(--pro-muted); }

/* reveal and grow (frame.gantt.reveal, .grow; Leo 2026-10-17 night, H13h): the card grows upward over the panels (a
   negative top margin inside its grid row; the panels keep their size), rows come closer when needed, a line sweeps the
   chart while the records appear */
/* above the panels' own layers (document 20, circles 30, the flow navigator 33), below the story's cards, notes and cursor */
#f1-gantt.f1g-grown { z-index: 34; box-shadow: 0 -12px 34px rgba(20, 30, 40, .16), var(--f1-shadow); }
#f1-gantt.f1g-compact .f1g-name { font-size: 10.5px; }
#f1-gantt.f1g-compact .f1g-grp { font-size: 9px; }
.f1g-sweep { fill: none; stroke: var(--pro-accent); stroke-width: 1.5; opacity: 0; pointer-events: none; }

/* legend */
.f1g-legend {
  position: absolute; right: 8px; bottom: calc(100% + 8px); z-index: 5; width: 320px; max-height: 60vh; overflow: auto; padding: 10px 12px;
  background: var(--pro-panel); border: 1px solid var(--pro-line); border-radius: 10px; box-shadow: var(--f1-shadow); font-size: 11.5px;
}
.f1g-legend h3 { margin: 0 0 6px; font-size: 12px; }
.f1g-legend ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; }
.f1g-legend li { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--pro-text2); }
.f1g-legend li svg { flex: none; width: 18px; height: 18px; overflow: visible; }
.f1g-legend p { margin: 8px 0 0; color: var(--pro-text2); line-height: 1.4; }

/* bottom bar button */
#f1-controls > button.f1g-barbtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
@media (max-width: 1599px) { #f1-controls > button.f1g-barbtn .f1g-txt { display: none; } }
