/* ============================================================================
   OFİS 4.2 — PROJE ÇALIŞMA ALANI (Linear disiplini)
   workspace-hero, özet istatistikleri, progress, bölüm ızgarası, proje listesi
   ========================================================================== */

/* ———————————————————————— HERO ———————————————————————— */
.project-workspace {
  display: grid;
  gap: 16px;
  max-width: 1200px;
}
.workspace-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 20px 22px 18px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-1);
}
.workspace-hero .card-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.workspace-hero .card-kicker > span:first-child {
  font-size: .7rem; font-weight: 700;
  letter-spacing: .08em;
  color: var(--faint);
  text-transform: uppercase;
}
.workspace-hero h3 {
  margin: 0 0 6px;
  font-size: 1.5rem; font-weight: 700;
  letter-spacing: -.02em;
}
.workspace-hero > div > p {
  color: var(--muted);
  font-size: .9rem;
  max-width: 66ch;
  margin-bottom: 16px;
}
.workspace-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
  min-width: 170px;
}
.workspace-actions .button,
.workspace-actions .button-secondary,
.workspace-actions .button-ghost { justify-content: center; }
@media (max-width: 860px) {
  .workspace-hero { grid-template-columns: 1fr; }
  .workspace-actions { flex-direction: row; flex-wrap: wrap; min-width: 0; }
}

/* özet istatistikleri — Linear stat şeridi */
.workspace-summary {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-top: 1px solid var(--line-soft);
  padding-top: 14px;
  flex-wrap: wrap;
}
.workspace-summary > span {
  display: grid;
  gap: 2px;
  padding: 2px 20px 2px 0;
  margin-right: 20px;
  border-right: 1px solid var(--line-soft);
  min-width: 92px;
}
.workspace-summary > span:last-child { border-right: none; margin-right: 0; }
.workspace-summary strong {
  display: block;
  font-size: 1.35rem; font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  line-height: 1.15;
}
.workspace-summary small {
  display: block;
  font-size: .73rem;
  color: var(--faint);
  letter-spacing: .02em;
}

/* gerçek progress bar (ofs.js enjekte eder) */
.ofs-progress {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ofs-progress .bar {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: var(--surface-muted);
  overflow: hidden;
}
.ofs-progress .bar > i {
  display: block;
  height: 100%;
  width: var(--p, 0%);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #7c5cd6));
  transition: width .6s var(--ease);
}
.ofs-progress .pct {
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 36px;
  text-align: right;
}

/* ———————————————————————— BÖLÜM IZGARASI ———————————————————————— */
.workspace-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.workspace-grid .workspace-section-primary { grid-column: span 1; }
@media (max-width: 980px) { .workspace-grid { grid-template-columns: 1fr; } }
.workspace-grid .workspace-section {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.workspace-grid .workspace-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  margin: 0;
}
.workspace-grid .workspace-section > header h4 {
  margin: 0;
  font-size: .92rem; font-weight: 650;
}
.workspace-grid .workspace-section > header small,
.workspace-grid .workspace-section > header span {
  color: var(--faint);
  font-size: .76rem;
  margin-left: 8px;
}
.workspace-grid .workspace-section > header > div { display: flex; align-items: baseline; gap: 2px; }
.workspace-grid .workspace-section .list { padding: 6px 8px; }
.workspace-grid .workspace-section .empty-state { flex: 1; }

/* milestone satırları */
.milestone-list { padding: 6px 8px; display: grid; gap: 2px; }
.milestone-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border-radius: var(--radius-m);
  text-align: left;
}
.milestone-row:hover { background: var(--surface-soft); }
.milestone-row strong { display: block; font-size: .88rem; }
.milestone-row small { display: block; color: var(--faint); font-size: .75rem; }
.milestone-row time { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }

/* ———————————————————————— PROJE LİSTESİ TAŞMA DÜZELTMELERİ ———————————————————————— */
.project-card {
  min-width: 0;
  overflow: hidden;
}
.project-card h3, .project-card h4, .project-card strong, .project-card .list-row-title {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.project-card time, .project-card .card-meta {
  white-space: nowrap;
  color: var(--faint);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
}
/* liste görünümünde satır içi düzen */
.record-line .project-health, .list-row .project-health { margin-left: auto; }
.list-row-title strong, .record-line strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.list-row, .record-line { min-width: 0; }

/* proje filtre çubuğu tek sıra */
#project-search, .project-filters { min-width: 0; }

/* ============================================================================
   PROJE LİSTESİ — FAZ 2a son cila
   ========================================================================== */
.project-control-panel {
  display: flex; align-items: end; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.project-control-panel .filter-search { flex: 2 1 220px; }
.project-control-panel .filter-field { flex: 1 1 150px; }

/* sağlık rozetleri */
.project-health {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: .7rem; font-weight: 700; letter-spacing: .03em;
}
.project-health.critical { color: var(--red); background: color-mix(in srgb, var(--red) 9%, transparent); }
.project-health.warning { color: var(--gold); background: color-mix(in srgb, var(--gold) 11%, transparent); }
.project-health.done { color: var(--green); background: color-mix(in srgb, var(--green) 11%, transparent); }
.project-health.muted { color: var(--faint); background: var(--surface-muted); }
.project-health.neutral { color: var(--accent); background: var(--accent-soft); }

/* sinyal satırı: etiket + değer çiftleri */
.project-signal-row {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px solid var(--line-soft);
}
.project-signal-row > span {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  font-size: .8rem;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.project-signal-row small {
  color: var(--faint);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* card-meta ayraçları */
.project-card .card-meta {
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.project-card .card-meta > span + span::before {
  content: "·";
  margin-right: 10px;
  color: var(--control-line);
}

/* proje başlığı tıklanabilir hissi */
.project-card h3 { cursor: pointer; }
.project-card h3:hover { color: var(--accent); }
