/* ====================================================
   GANTT — YÖNETİCİ GÖRÜNÜMÜ (gantt.html, js/gantt.js)
   Renkler durum sınıflarından gelir: gecikmiş (kırmızı), 30 gün içinde (turuncu), devam ediyor (mavi),
   planlandı (gri), tamamlandı (yeşil). Ana ekranın yazı tipi ve tonlarıyla aynıdır; koyu tema
   ana ekrandaki seçimi izler (body.dark-mode).
   ==================================================== */

:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
    /* feedback.css bu adları kullanır */
    --bg-shell: #ffffff;
    --text-primary: #0f172a;

    --gx-canvas: #f1f3f6;
    --gx-surface: #ffffff;
    --gx-surface-2: #f8fafc;
    --gx-border: #e3e7ee;
    --gx-row-line: #eef1f5;
    --gx-text: #0f172a;
    --gx-text-2: #475569;
    --gx-muted: #8592a6;
    --gx-line: rgba(15, 23, 42, 0.07);
    --gx-line-strong: rgba(15, 23, 42, 0.22);
    --gx-past: rgba(15, 23, 42, 0.035);
    --gx-hover: rgba(37, 99, 235, 0.04);
    --gx-ring: #ffffff;

    --gx-overdue: #dc2626; --gx-overdue-soft: #fee2e2; --gx-overdue-text: #b91c1c;
    --gx-soon: #f59e0b;    --gx-soon-soft: #fef3c7;    --gx-soon-text: #b45309;
    --gx-active: #2563eb;  --gx-active-soft: #dbeafe;  --gx-active-text: #1d4ed8;
    --gx-planned: #94a3b8; --gx-planned-soft: #eef2f6; --gx-planned-text: #475569;
    --gx-done: #16a34a;    --gx-done-soft: #dcfce7;    --gx-done-text: #15803d;
    --gx-nodate: #cbd5e1;
    --gx-finished: #3b82f6;
    --gx-stopped: #475569;
    --gx-bar: #e2e8f0;
    --gx-bar-edge: #cbd5e1;
    --gx-bar-elapsed: #94a3b8;
    --gx-today: #dc2626;
}

body.dark-mode {
    --bg-shell: #111827;
    --text-primary: #f1f5f9;
    --gx-canvas: #0a0f1a;
    --gx-surface: #111827;
    --gx-surface-2: #0f1724;
    --gx-border: #1f2a3c;
    --gx-row-line: #182234;
    --gx-text: #f1f5f9;
    --gx-text-2: #a3b1c6;
    --gx-muted: #6b7a90;
    --gx-line: rgba(255, 255, 255, 0.06);
    --gx-line-strong: rgba(255, 255, 255, 0.2);
    --gx-past: rgba(255, 255, 255, 0.025);
    --gx-hover: rgba(96, 165, 250, 0.06);
    --gx-ring: #111827;
    --gx-overdue-soft: rgba(220, 38, 38, 0.2);  --gx-overdue-text: #fca5a5;
    --gx-soon-soft: rgba(245, 158, 11, 0.2);    --gx-soon-text: #fcd34d;
    --gx-active-soft: rgba(37, 99, 235, 0.24);  --gx-active-text: #93c5fd;
    --gx-planned-soft: rgba(148, 163, 184, 0.16); --gx-planned-text: #cbd5e1;
    --gx-done-soft: rgba(22, 163, 74, 0.2);     --gx-done-text: #86efac;
    --gx-bar: #1e293b;
    --gx-bar-edge: #334155;
    --gx-bar-elapsed: #64748b;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: var(--font-sans);
    background: var(--gx-canvas);
    color: var(--gx-text);
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
}

button, select, input { font-family: inherit; }

.gantt-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}
body.test-mode .gantt-container { height: calc(100vh - 30px); }

/* ---------- Üst bant ---------- */
.gx-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px 12px;
}
.gx-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.gx-back {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--gx-border);
    background: var(--gx-surface);
    color: var(--gx-text);
    display: grid;
    place-items: center;
    text-decoration: none;
}
.gx-back:hover { border-color: var(--gx-muted); }
.gx-titles { min-width: 0; }
.gx-kicker { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #7c3aed; }
.gx-titles h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 1px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-sub { font-size: 12.5px; color: var(--gx-text-2); display: flex; flex-wrap: wrap; align-items: center; }
.gx-sep { margin: 0 7px; color: var(--gx-muted); }
.gx-asof { color: var(--gx-muted); }

.gx-top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.gx-scope { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--gx-muted); }
.gx-scope select {
    height: 36px;
    min-width: 230px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid var(--gx-border);
    background: var(--gx-surface);
    color: var(--gx-text);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
}

/* ---------- Ortak kontroller ---------- */
.gx-btn {
    height: 32px;
    padding: 0 12px;
    border-radius: 9px;
    border: 1px solid var(--gx-border);
    background: var(--gx-surface);
    color: var(--gx-text);
    font-size: 12.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}
.gx-btn:hover { border-color: var(--gx-muted); }
.gx-btn-primary { background: #0f172a; border-color: #0f172a; color: #fff; }
body.dark-mode .gx-btn-primary { background: #f1f5f9; border-color: #f1f5f9; color: #0f172a; }
.gx-top-actions .gx-btn { height: 36px; }

.gx-seg { display: inline-flex; background: var(--gx-row-line); border-radius: 10px; padding: 3px; gap: 2px; }
.gx-seg button {
    height: 28px;
    padding: 0 11px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--gx-text-2);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.gx-seg button:hover { color: var(--gx-text); }
.gx-seg button.active { background: var(--gx-surface); color: var(--gx-text); box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12); }
.gx-top-actions .gx-seg button { height: 30px; }

.gx-select, .gx-search {
    height: 32px;
    border-radius: 9px;
    border: 1px solid var(--gx-border);
    background: var(--gx-surface);
    color: var(--gx-text);
    padding: 0 10px;
    font-size: 12.5px;
    font-weight: 500;
}
.gx-search { width: 230px; }
.gx-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--gx-text-2); cursor: pointer; user-select: none; }
.gx-check input { width: 15px; height: 15px; accent-color: var(--gx-overdue); margin: 0; }
.gx-link { border: 0; background: none; color: var(--gx-active); font-size: 12.5px; font-weight: 600; cursor: pointer; text-decoration: underline; padding: 0 4px; }
.gx-link[hidden] { display: none; }

:is(.gx-btn, .gx-seg button, .gx-chip, .gx-kpi, .gx-row, .gx-back, .gx-x):focus-visible { outline: 2px solid var(--gx-active); outline-offset: 2px; }

/* ---------- Özet kartları ---------- */
.gx-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    padding: 0 16px 12px;
}
.gx-kpi {
    --tone: var(--gx-planned);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 12px 14px 12px 17px;
    border-radius: 12px;
    border: 1px solid var(--gx-border);
    background: var(--gx-surface);
    color: inherit;
    font: inherit;
    text-align: left;
    overflow: hidden;
}
.gx-kpi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--tone); }
button.gx-kpi { cursor: pointer; transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s; }
button.gx-kpi:hover { border-color: var(--tone); box-shadow: 0 6px 18px -8px rgba(15, 23, 42, 0.25); transform: translateY(-1px); }
button.gx-kpi.active { border-color: var(--tone); box-shadow: 0 0 0 2px var(--tone) inset; }
.gx-kpi-overdue, .gx-kpi-h-off_track { --tone: var(--gx-overdue); }
.gx-kpi-soon, .gx-kpi-h-at_risk { --tone: var(--gx-soon); }
.gx-kpi-done, .gx-kpi-calm, .gx-kpi-h-on_track { --tone: var(--gx-done); }
.gx-kpi-h-finished { --tone: var(--gx-finished); }
.gx-kpi-h-not_started, .gx-kpi-neutral { --tone: var(--gx-planned); }
.gx-kpi-h-discontinued { --tone: var(--gx-stopped); }
.gx-kpi-label { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--gx-muted); }
.gx-kpi-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.gx-kpi-value .gx-hdot { align-self: center; width: 12px; height: 12px; }
.gx-kpi-big { font-size: 30px; line-height: 1.05; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.gx-kpi-overdue .gx-kpi-big { color: var(--gx-overdue); }
.gx-kpi-soon .gx-kpi-big { color: var(--gx-soon-text); }
.gx-kpi-h-off_track .gx-kpi-big { color: var(--gx-overdue); }
.gx-kpi-unit { font-size: 13px; font-weight: 600; color: var(--gx-text-2); letter-spacing: 0; }
.gx-kpi-sub { font-size: 12px; line-height: 1.45; color: var(--gx-text-2); }
.gx-kpi-sub b { color: var(--gx-text); }
.gx-kpi-overdue .gx-kpi-sub b { color: var(--gx-overdue-text); }
.gx-kpi-note { color: var(--gx-muted); font-size: 11.5px; }
.gx-meter { display: block; flex-basis: 100%; height: 6px; border-radius: 3px; background: var(--gx-row-line); overflow: hidden; }
.gx-meter-fill { display: block; height: 100%; border-radius: 3px; }
.gx-duo { display: flex; flex-basis: 100%; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--gx-text-2); letter-spacing: 0; }
.gx-duo b { color: var(--gx-text); font-variant-numeric: tabular-nums; }
.gx-stack { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; margin: 2px 0; }
.gx-stack-seg { display: block; height: 100%; }
.gx-hchip { display: inline-flex; align-items: center; gap: 4px; margin-right: 9px; font-size: 11.5px; white-space: nowrap; }
.gx-hchip .gx-hdot { width: 8px; height: 8px; }

/* ---------- Araç çubukları ---------- */
.gx-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    flex-wrap: wrap;
    padding: 0 16px 10px;
}
.gx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gx-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--gx-border);
    background: var(--gx-surface);
    color: var(--gx-text-2);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.gx-chip:hover { border-color: var(--gx-muted); color: var(--gx-text); }
.gx-chip-n { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: var(--gx-row-line); color: var(--gx-text-2); font-variant-numeric: tabular-nums; }
.gx-chip.active { background: #0f172a; border-color: #0f172a; color: #fff; }
body.dark-mode .gx-chip.active { background: #f1f5f9; border-color: #f1f5f9; color: #0f172a; }
.gx-chip.active .gx-chip-n { background: rgba(255, 255, 255, 0.22); color: inherit; }
.gx-chip-overdue.active { background: var(--gx-overdue); border-color: var(--gx-overdue); color: #fff; }
.gx-chip-soon.active { background: var(--gx-soon); border-color: var(--gx-soon); color: #1f1300; }
.gx-chip-active.active { background: var(--gx-active); border-color: var(--gx-active); color: #fff; }
.gx-chip-planned.active { background: #64748b; border-color: #64748b; color: #fff; }
.gx-chip-done.active { background: var(--gx-done); border-color: var(--gx-done); color: #fff; }
.gx-chip.active .gx-dia { box-shadow: 0 0 0 1.5px #fff; }
.gx-chip-company .gx-cdot { width: 9px; height: 9px; }
.gx-chip-company.active { background: var(--gx-active-soft); border-color: var(--gx-active); color: var(--gx-active-text); }
body.dark-mode .gx-chip-company.active { background: var(--gx-active-soft); border-color: var(--gx-active); color: var(--gx-active-text); }

.gx-view { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gx-view-label { font-size: 12px; font-weight: 600; color: var(--gx-muted); }
.gx-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.gx-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 11.5px; color: var(--gx-text-2); }
.gx-lg-title { font-weight: 700; color: var(--gx-muted); }
.gx-lg { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.gx-lg-tail { display: inline-block; width: 24px; height: 4px; border-radius: 2px; background: repeating-linear-gradient(90deg, rgba(220, 38, 38, 0.7) 0 6px, rgba(220, 38, 38, 0.25) 6px 10px); }
.gx-lg-bar { position: relative; display: inline-block; width: 28px; height: 9px; border-radius: 5px; overflow: hidden; background: var(--gx-bar); box-shadow: inset 0 0 0 1px var(--gx-bar-edge); }
.gx-lg-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 55%; background: var(--gx-bar-elapsed); }
.gx-lg-today { display: inline-block; width: 2px; height: 14px; background: var(--gx-today); }

/* Elmas işaret ve renk sınıfları */
.gx-dia { display: inline-block; width: 9px; height: 9px; border-radius: 1.5px; transform: rotate(45deg); flex: 0 0 auto; }
.gx-bg-overdue { background: var(--gx-overdue); }
.gx-bg-soon { background: var(--gx-soon); }
.gx-bg-active { background: var(--gx-active); }
.gx-bg-planned { background: var(--gx-planned); }
.gx-bg-done { background: var(--gx-done); }
.gx-bg-nodate { background: var(--gx-nodate); }
.gx-bg-time { background: #64748b; }
.gx-tx-overdue { color: var(--gx-overdue-text); }
.gx-tx-soon { color: var(--gx-soon-text); }
.gx-tx-active { color: var(--gx-active-text); }
.gx-tx-planned { color: var(--gx-muted); }
.gx-tx-done { color: var(--gx-done-text); }

.gx-hdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.gx-h-off_track, .gx-hbg-off_track { background: var(--gx-overdue); }
.gx-h-at_risk, .gx-hbg-at_risk { background: var(--gx-soon); }
.gx-h-on_track, .gx-hbg-on_track { background: var(--gx-done); }
.gx-h-not_started, .gx-hbg-not_started { background: var(--gx-planned); }
.gx-h-finished, .gx-hbg-finished { background: var(--gx-finished); }
.gx-h-discontinued, .gx-hbg-discontinued { background: var(--gx-stopped); }
.gx-cdot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; flex: 0 0 auto; }

/* ---------- Tahta ---------- */
.gx-board {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    margin: 0 16px 16px;
    border-radius: 12px;
    border: 1px solid var(--gx-border);
    background: var(--gx-surface);
    overflow: hidden;
}
.gx-scroll { position: absolute; inset: 0; overflow: auto; }
.gx-canvas { --gx-left: 560px; min-height: 100%; }
.gx-grid { position: relative; min-height: 100%; }

.gx-message { padding: 56px 24px; text-align: center; color: var(--gx-text-2); font-size: 14px; }
.gx-message-error { color: var(--gx-overdue-text); }
.gx-empty { position: sticky; left: 0; width: min(760px, 100%); padding: 48px 24px; color: var(--gx-text-2); }
.gx-empty p { margin: 0 0 12px; font-size: 14px; }

/* Başlık (yapışkan) */
.gx-head {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    background: var(--gx-surface);
    border-bottom: 1px solid var(--gx-border);
    box-shadow: 0 1px 0 var(--gx-border);
}
.gx-head-left {
    position: sticky;
    left: 0;
    z-index: 6;
    flex: 0 0 var(--gx-left);
    width: var(--gx-left);
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 128px;
    gap: 10px;
    align-items: end;
    padding: 0 14px 8px;
    background: var(--gx-surface);
    border-right: 1px solid var(--gx-border);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gx-muted);
}
.gx-resizer { position: absolute; top: 0; bottom: 0; right: -4px; width: 8px; cursor: col-resize; z-index: 7; }
.gx-resizer:hover, body.gx-resizing .gx-resizer { background: rgba(37, 99, 235, 0.25); }
body.gx-resizing { cursor: col-resize; user-select: none; }

/* clip: kenardaki yıl etiketi taşıp yatay kaydırma açmasın; hidden olsaydı yapışkan etiket bozulurdu */
.gx-scale { position: relative; flex: 0 0 auto; height: 50px; overflow: clip; }
.gx-scale.gx-scale-days { height: 68px; }
.gx-scale-row { position: relative; height: 24px; }
.gx-scale-days-row { height: 18px; }
.gx-y, .gx-m, .gx-d { position: absolute; top: 0; height: 100%; white-space: nowrap; overflow: hidden; }
.gx-y { border-left: 1px solid var(--gx-line-strong); line-height: 24px; font-size: 12.5px; font-weight: 800; color: var(--gx-text); overflow: visible; }
/* Yıl adı, yılın başı ekran dışındayken de görünür kalır */
.gx-y span { position: sticky; left: calc(var(--gx-left) + 7px); display: inline-block; padding: 0 7px; }
.gx-m { border-left: 1px solid var(--gx-line); line-height: 24px; font-size: 11px; font-weight: 600; text-align: center; color: var(--gx-text-2); text-transform: capitalize; }
.gx-d { line-height: 18px; font-size: 9.5px; text-align: center; color: var(--gx-muted); }
.gx-d-wk { color: var(--gx-faint, #b6c0cf); }
.gx-d-today { color: #fff; background: var(--gx-today); border-radius: 3px; font-weight: 700; }
.gx-today-pill {
    position: absolute;
    bottom: 3px;
    transform: translateX(-50%);
    z-index: 2;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--gx-today);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35);
    pointer-events: none;
}
.gx-scale-days .gx-today-pill { bottom: auto; top: 26px; }

/* Arka plan: geçmiş, ızgara, bugün çizgisi */
.gx-body { position: relative; }
.gx-bg { position: absolute; top: 0; bottom: 0; left: var(--gx-left); pointer-events: none; z-index: 0; }
.gx-past { position: absolute; top: 0; bottom: 0; left: 0; background: var(--gx-past); }
.gx-gl { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid var(--gx-line); }
.gx-gl-year { border-left-color: var(--gx-line-strong); }
.gx-wk { position: absolute; top: 0; bottom: 0; background: var(--gx-past); }
.gx-today-line { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--gx-today); opacity: 0.85; }

/* Satırlar */
.gx-row { position: relative; display: flex; border-bottom: 1px solid var(--gx-row-line); }
.gx-left {
    position: sticky;
    left: 0;
    z-index: 2;
    flex: 0 0 var(--gx-left);
    width: var(--gx-left);
    min-width: 0;
    display: grid;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    background: var(--gx-surface);
    border-right: 1px solid var(--gx-border);
}
.gx-track { position: relative; flex: 1 0 auto; }
.gx-row:hover .gx-track { background: var(--gx-hover); }
.gx-toggle { cursor: pointer; }

.gx-chev { width: 18px; height: 18px; display: grid; place-items: center; color: var(--gx-muted); }
.gx-chev-off { visibility: hidden; }
.gx-chev::before { content: ''; width: 6px; height: 6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(-45deg); transition: transform 0.15s; }
.open > .gx-left .gx-chev::before { transform: rotate(45deg); margin-top: -3px; }

.gx-row-project { min-height: 56px; }
.gx-row-project > .gx-left { grid-template-columns: 18px 10px minmax(0, 1fr) auto; background: var(--gx-surface-2); }
.gx-row-project:hover > .gx-left { background: var(--gx-row-line); }
.gx-row-project + .gx-row-project, .gx-row-ob + .gx-row-project, .gx-row-company + .gx-row-project { border-top: 1px solid var(--gx-border); }
.gx-pname { display: flex; flex-direction: column; min-width: 0; }
.gx-pname b { font-size: 14.5px; font-weight: 800; letter-spacing: -0.01em; }
.gx-pname small, .gx-cname small { font-size: 11.5px; color: var(--gx-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-pstat { display: flex; align-items: center; gap: 8px; }
.gx-hpill { padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #fff; white-space: nowrap; }
.gx-hbg-at_risk.gx-hpill { color: #1f1300; }
.gx-pcount { font-size: 12px; font-weight: 600; color: var(--gx-text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.gx-badge { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; color: #fff; font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }

.gx-row-company { min-height: 36px; }
.gx-row-company > .gx-left { grid-template-columns: 18px 8px minmax(0, 1fr) auto; padding-left: 26px; }
.gx-row-company:hover > .gx-left { background: var(--gx-surface-2); }
.gx-cname { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.gx-cname b { font-size: 12.5px; font-weight: 700; white-space: nowrap; }

.gx-row-ob { min-height: 46px; cursor: pointer; }
.gx-row-ob > .gx-left { grid-template-columns: 72px minmax(0, 1fr) 128px; }
.gx-row-ob:hover > .gx-left { background: var(--gx-surface-2); }
.gx-row-ob.gx-k-overdue > .gx-left { box-shadow: inset 3px 0 0 var(--gx-overdue); }
.gx-row-ob.gx-k-soon > .gx-left { box-shadow: inset 3px 0 0 var(--gx-soon); }
.gx-row-ob.selected > .gx-left { background: var(--gx-active-soft); box-shadow: inset 3px 0 0 var(--gx-active); }
.gx-row-ob.selected .gx-track { background: var(--gx-hover); }
.gx-code { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--gx-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-otitle { display: flex; flex-direction: column; min-width: 0; }
.gx-t1 { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-t2 { font-size: 11.5px; color: var(--gx-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-t2 .gx-sep { margin: 0 5px; }
.gx-crit { font-weight: 700; color: var(--gx-text-2); }
.gx-crit.hot { color: var(--gx-overdue-text); }
.gx-k-done .gx-t1 { color: var(--gx-text-2); }
.gx-when { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.gx-due { padding-left: 2px; font-size: 11.5px; color: var(--gx-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }

.gx-pill { display: inline-flex; align-items: center; justify-self: start; max-width: 100%; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-pill-overdue { background: var(--gx-overdue-soft); color: var(--gx-overdue-text); }
.gx-pill-soon { background: var(--gx-soon-soft); color: var(--gx-soon-text); }
.gx-pill-active { background: var(--gx-active-soft); color: var(--gx-active-text); }
.gx-pill-planned { background: var(--gx-planned-soft); color: var(--gx-planned-text); }
.gx-pill-done { background: var(--gx-done-soft); color: var(--gx-done-text); }
.gx-pill-nodate { background: var(--gx-planned-soft); color: var(--gx-muted); }
.gx-pill-lg { font-size: 14px; padding: 5px 12px; }

/* Çizimler */
.gx-pbar { position: absolute; top: 50%; height: 12px; margin-top: -6px; border-radius: 6px; overflow: hidden; background: var(--gx-bar); box-shadow: inset 0 0 0 1px var(--gx-bar-edge); }
.gx-pbar-elapsed { position: absolute; left: 0; top: 0; bottom: 0; background: var(--gx-bar-elapsed); }
.gx-pbar-label { position: absolute; top: 50%; z-index: 4; transform: translateY(-50%); padding: 1px 7px; border-radius: 999px; background: var(--gx-surface); box-shadow: 0 0 0 1px var(--gx-border); font-size: 11px; font-weight: 700; color: var(--gx-text-2); white-space: nowrap; pointer-events: none; }
.gx-mk {
    position: absolute;
    top: 50%;
    z-index: 1;
    border-radius: 2px;
    transform: translate(-50%, -50%) rotate(45deg);
    box-shadow: 0 0 0 2px var(--gx-ring);
    cursor: pointer;
    transition: transform 0.12s;
}
.gx-mk:hover { transform: translate(-50%, -50%) rotate(45deg) scale(1.35); z-index: 3; }
.gx-mk-label-before { transform: translate(-100%, -50%) !important; }
.gx-mk-label { position: absolute; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: 11px; font-weight: 600; white-space: nowrap; pointer-events: none; }
.gx-tail {
    position: absolute;
    top: 50%;
    height: 4px;
    margin-top: -2px;
    border-radius: 2px;
    background: repeating-linear-gradient(90deg, rgba(220, 38, 38, 0.6) 0 6px, rgba(220, 38, 38, 0.22) 6px 10px);
    pointer-events: none;
}

/* ---------- Ayrıntı paneli ---------- */
.gx-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 8;
    width: 390px;
    max-width: 92%;
    overflow: auto;
    padding: 16px 18px 76px;   /* alttaki Geri Bildirim düğmesine yer */
    background: var(--gx-surface);
    border-left: 1px solid var(--gx-border);
    box-shadow: -16px 0 36px -16px rgba(15, 23, 42, 0.28);
}
.gx-panel[hidden] { display: none; }
.gx-panel-head { display: flex; align-items: center; gap: 8px; }
.gx-panel-head .gx-code { font-size: 13px; }
.gx-type { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--gx-row-line); color: var(--gx-text-2); }
.gx-x { margin-left: auto; width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--gx-border); background: var(--gx-surface); color: var(--gx-text); font-size: 19px; line-height: 1; cursor: pointer; }
.gx-panel-title { font-size: 17px; font-weight: 700; line-height: 1.35; margin: 10px 0 12px; }
.gx-panel-status { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; border-radius: 10px; background: var(--gx-surface-2); border: 1px solid var(--gx-row-line); font-size: 13px; color: var(--gx-text-2); }
.gx-stale { margin-top: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid #fed7aa; background: #fff7ed; color: #9a3412; font-size: 12.5px; line-height: 1.45; }
body.dark-mode .gx-stale { border-color: rgba(251, 146, 60, 0.4); background: rgba(251, 146, 60, 0.12); color: #fdba74; }
.gx-dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 12px; margin: 16px 0; font-size: 13px; }
.gx-dl dt { color: var(--gx-muted); font-weight: 600; }
.gx-dl dd { margin: 0; overflow-wrap: anywhere; }
.gx-panel-desc h3 { margin: 0 0 4px; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--gx-muted); }
.gx-panel-desc p { margin: 0 0 16px; font-size: 13px; line-height: 1.55; color: var(--gx-text-2); white-space: pre-wrap; }

/* ---------- İpucu ---------- */
.gx-tip {
    position: fixed;
    z-index: 60;
    width: 330px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 12px;
    box-shadow: 0 14px 34px -10px rgba(0, 0, 0, 0.45);
    pointer-events: none;
}
.gx-tip[hidden] { display: none; }
body.dark-mode .gx-tip { background: #1e293b; border: 1px solid #334155; }
.gx-tip-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gx-tip-code { font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: #fff; }
.gx-tip-title { margin: 6px 0 2px; font-size: 13px; font-weight: 600; line-height: 1.35; color: #fff; }
.gx-tip-meta { margin-bottom: 8px; color: #94a3b8; }
.gx-tip-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 10px; }
.gx-tip-grid span { color: #94a3b8; }
.gx-tip-grid b { color: #f1f5f9; font-weight: 600; }
.gx-tip .gx-pill-overdue { background: #fecaca; color: #991b1b; }
.gx-tip .gx-pill-soon { background: #fde68a; color: #92400e; }
.gx-tip .gx-pill-active { background: #bfdbfe; color: #1e40af; }
.gx-tip .gx-pill-planned { background: #e2e8f0; color: #334155; }
.gx-tip .gx-pill-done { background: #bbf7d0; color: #166534; }

/* ---------- Dar ekranlar ---------- */
/* Faz 14d: OpenProject kartıyla altı kart */
.gx-kpis.has-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

@media (max-width: 1360px) {
    .gx-kpis, .gx-kpis.has-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    /* Dar ekranda sayfa kayar; tahta ekranın büyük kısmını alır */
    html, body { height: auto; overflow: auto; }
    .gantt-container, body.test-mode .gantt-container { height: auto; }
    .gx-board { flex: none; height: 82vh; }
    .gx-top { flex-direction: column; align-items: stretch; }
    .gx-top-actions { justify-content: flex-start; }
    .gx-kpis, .gx-kpis.has-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gx-head-left, .gx-row-ob > .gx-left { grid-template-columns: 60px minmax(0, 1fr) 112px; }
    .gx-search { width: 100%; }
    .gx-scope select { min-width: 0; flex: 1; }
}
@media (max-width: 560px) {
    .gx-kpis, .gx-kpis.has-6 { grid-template-columns: minmax(0, 1fr); }
    .gx-pcount { display: none; }
}
