/* ==========================================================================
   VGA AI Office paneli
   Tasarim dili sitelerin panelinden (education/site/src/styles/panel.css):
   duz yuzeyler, ince cizgiler, 2px kose, Archivo + IBM Plex.
   Vurgu rengi euvga.net logosundan: lacivert #002466 ve parlama mavisi #0a86c2.
   ========================================================================== */
@import url("/static/fonts/fonts.css");

:root {
  --a-navw: 232px;

  /* yuzeyler */
  --a-bg: #fff;
  --a-bg2: #f3f5f9;
  --a-side: #fff;
  --a-card: #fff;
  --a-field: #fff;
  --a-hover: #f8f9fc;
  --a-accent: #eef2f8;

  /* metin */
  --a-fg: #0b1220;
  --a-muted: #576072;
  --a-inv: #00143c;
  --a-inv-fg: #fff;

  /* cizgi */
  --a-line: #d6dbe5;
  --a-strong: #0b1220;
  --a-control: #8a93a6;

  /* marka: euvga.net logosu */
  --a-navy: #002466;
  --a-navy-deep: #00143c;
  --a-primary: #002466;
  --a-primary-hover: #00143c;
  --a-glow: #0a86c2;
  --a-focus: #0a86c2;

  /* durum */
  --a-danger: #c1121f;
  --a-success: #1e7a3c;
  --a-warn: #a86400;
  --a-info: #0a6c9c;

  /* yazi */
  --a-display: "Archivo", "IBM Plex Sans", system-ui, sans-serif;
  --a-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --a-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --a-bg: #0c111b;
    --a-bg2: #111827;
    --a-side: #0c111b;
    --a-card: #0f1522;
    --a-field: #111827;
    --a-hover: #141c2b;
    --a-accent: #17223a;
    --a-fg: #e8ecf3;
    --a-muted: #9aa4b6;
    --a-inv: #e8ecf3;
    --a-inv-fg: #0b1220;
    --a-line: #263043;
    --a-strong: #e8ecf3;
    --a-control: #4f5a6e;
    --a-primary: #1f6fd1;
    --a-primary-hover: #2b7fe6;
    --a-glow: #38b6ef;
    --a-focus: #38b6ef;
    --a-danger: #ff6b6f;
    --a-success: #5fc07f;
    --a-warn: #e0a34a;
    --a-info: #6cc4ee;
    color-scheme: dark;
  }
}

/* --- Taban ----------------------------------------------------------------- */
* { box-sizing: border-box; }
html { background: var(--a-bg); }
body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  background: var(--a-bg);
  color: var(--a-fg);
  font-family: var(--a-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.bare { display: block; background: var(--a-bg2); }
::selection { background: var(--a-navy); color: #fff; }
a { color: var(--a-fg); text-underline-offset: 2px; }
a:hover { color: var(--a-glow); }
h1, h2, h3 { font-family: var(--a-display); color: var(--a-fg); letter-spacing: 0; overflow-wrap: break-word; }
h1 { margin: 0; font-weight: 900; font-stretch: 78%; font-size: clamp(26px, 3vw, 30px); line-height: 1.05; }
h2 { margin: 0 0 12px; font-weight: 800; font-stretch: 84%; font-size: 20px; line-height: 1.2; }
h3 { margin: 16px 0 8px; font-weight: 800; font-stretch: 84%; font-size: 16px; line-height: 1.25; }
code { font-family: var(--a-mono); font-size: 12px; }
:focus-visible { outline: 2px solid var(--a-focus); outline-offset: 2px; }

.muted { color: var(--a-muted); }
.hint { margin: 0; color: var(--a-muted); font-size: 13px; }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.empty { color: var(--a-muted); text-align: center; padding: 18px; }
.mono { font-family: var(--a-mono); }

/* --- Kenar menusu ---------------------------------------------------------- */
.side {
  width: var(--a-navw);
  flex: none;
  display: flex;
  flex-direction: column;
  background: var(--a-side);
  border-right: 1px solid var(--a-line);
  position: sticky;
  top: 0;
  height: 100dvh;
  font-size: 13px;
}
.brand {
  height: 52px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-bottom: 1px solid var(--a-line);
  text-decoration: none;
  color: var(--a-fg);
  white-space: nowrap;
  overflow: hidden;
}
.brand img { width: 30px; height: 30px; object-fit: contain; flex: none; }
.brand span { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.word { font-family: var(--a-display); font-weight: 900; font-stretch: 78%; font-size: 19px; color: var(--a-navy); }
.tagline { font-family: var(--a-mono); font-size: 10px; letter-spacing: 0.1em; color: var(--a-muted); }
@media (prefers-color-scheme: dark) { .word { color: var(--a-fg); } }

.side nav { flex: 1; overflow-y: auto; padding: 8px 0 16px; display: flex; flex-direction: column; }
.side .gl { padding: 14px 16px 6px; font-family: var(--a-mono); font-size: 10px; letter-spacing: 0.12em; color: var(--a-muted); }
.side nav a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 32px;
  padding: 0 12px 0 16px;
  color: var(--a-fg);
  text-decoration: none;
}
.side nav a:hover { background: var(--a-hover); color: var(--a-fg); }
.side nav a.on { background: var(--a-accent); font-weight: 600; }
.side nav a.on::before { content: ""; position: absolute; left: 0; top: 4px; bottom: 4px; width: 3px; background: var(--a-glow); }
.badge { font-family: var(--a-mono); font-size: 10px; padding: 0 5px; line-height: 16px; background: var(--a-navy); color: #fff; }

.me { flex: none; border-top: 1px solid var(--a-line); padding: 10px 16px; display: flex; align-items: center; gap: 10px; }
.avatar { width: 28px; height: 28px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--a-inv); color: var(--a-inv-fg); font-family: var(--a-mono); font-size: 11px; }
.me span { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.me strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me small { font-family: var(--a-mono); font-size: 11px; color: var(--a-muted); }
.link { padding: 0; border: 0; background: none; color: var(--a-muted); font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; }
.link:hover { color: var(--a-glow); }

/* --- Ust cubuk ve govde ------------------------------------------------------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top {
  height: 52px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 clamp(16px, 2.4vw, 32px);
  border-bottom: 1px solid var(--a-line);
  background: var(--a-bg);
  position: sticky;
  top: 0;
  z-index: 5;
}
.crumb { font-family: var(--a-mono); font-size: 12px; color: var(--a-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .space { flex: 1; }
.top .status { font-family: var(--a-mono); font-size: 11px; color: var(--a-muted); display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; display: inline-block; background: var(--a-success); }
.dot.off { background: var(--a-warn); }
.body { padding: 28px clamp(16px, 2.4vw, 32px) 48px; max-width: 1400px; width: 100%; }

.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.eyebrow { margin: 0 0 6px; font-family: var(--a-mono); font-size: 10px; letter-spacing: 0.1em; color: var(--a-muted); text-transform: uppercase; }
.eyebrow a { color: inherit; }
.head .sub { margin: 6px 0 0; color: var(--a-muted); font-size: 13px; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 8px 0 0; color: var(--a-muted); font-size: 13px; }

/* --- Kartlar ---------------------------------------------------------------- */
.card { background: var(--a-card); border: 1px solid var(--a-line); padding: 16px; margin-bottom: 16px; min-width: 0; }
.card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card__head h2 { margin: 0; }
.card__head > a { font-family: var(--a-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--a-muted); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; align-items: start; }
.grid2 > .card { margin-bottom: 0; }
.grid2 + * { margin-top: 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 16px; }
.cards .card { margin: 0; }
.member.planned, .node--planned { border-style: dashed; background: transparent; }

/* --- Sayaclar --------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--a-line); margin-bottom: 16px; background: var(--a-card); }
.stat { padding: 14px 16px; text-decoration: none; color: var(--a-fg); display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--a-line); }
.stat:last-child { border-right: 0; }
a.stat:hover { background: var(--a-hover); color: var(--a-fg); }
.stat span { order: -1; font-family: var(--a-mono); font-size: 10px; letter-spacing: 0.1em; color: var(--a-muted); text-transform: uppercase; }
.stat b { font-family: var(--a-display); font-weight: 900; font-stretch: 78%; font-size: 34px; line-height: 1; color: var(--a-navy); }
@media (prefers-color-scheme: dark) { .stat b { color: var(--a-fg); } }
.stat.warn b { color: var(--a-danger); }

/* --- Ekip semasi ------------------------------------------------------------- */
.org { background: var(--a-card); border: 1px solid var(--a-line); padding: 20px 16px; margin-bottom: 16px; display: flex; flex-direction: column; align-items: center; }
.org__title { align-self: stretch; margin-bottom: 14px; }
.org__row { display: flex; justify-content: center; width: 100%; }
.org__team { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.org__line { width: 1px; height: 18px; background: var(--a-strong); }
.node { border: 1px solid var(--a-line); padding: 10px 12px; text-align: left; display: flex; flex-direction: column; gap: 3px; background: var(--a-card); min-width: 260px; }
.org__team .node { min-width: 0; }
.node strong { font-family: var(--a-display); font-weight: 800; font-stretch: 84%; font-size: 15px; line-height: 1.2; }
.node small { color: var(--a-muted); font-size: 12px; line-height: 1.35; }
.node em { font-style: normal; font-family: var(--a-mono); font-size: 10px; letter-spacing: 0.08em; color: var(--a-muted); text-transform: uppercase; }
.node--top { background: var(--a-inv); color: var(--a-inv-fg); border-color: var(--a-inv); }
.node--top small { color: inherit; opacity: 0.75; }
.node--gm { background: var(--a-navy); color: #fff; border-color: var(--a-navy); box-shadow: inset 3px 0 0 var(--a-glow); }
.node--gm small { color: #c9d6ee; }
.node.busy { border-color: var(--a-glow); box-shadow: inset 3px 0 0 var(--a-glow); }
.node.busy em { color: var(--a-glow); }

/* --- Tablo ---------------------------------------------------------------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-family: var(--a-mono); font-weight: 500; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--a-muted); padding: 8px 10px; border-bottom: 1px solid var(--a-strong); }
.table td { padding: 9px 10px; border-bottom: 1px solid var(--a-line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--a-hover); }
.table td a { font-weight: 600; text-decoration: none; }
.table td a:hover { text-decoration: underline; }
.card .table { margin: 0 -10px; width: calc(100% + 20px); }

/* --- Rozetler ----------------------------------------------------------------- */
.pill, .tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border: 1px solid var(--a-strong);
  color: var(--a-fg);
  font-family: var(--a-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-transform: uppercase;
  vertical-align: middle;
}
.s-queued, .s-pending, .s-awaiting_approval { border-color: var(--a-warn); color: var(--a-warn); }
.s-running { border-color: var(--a-glow); color: var(--a-info); }
.s-done, .s-approved, .s-applied { border-color: var(--a-success); color: var(--a-success); }
.s-failed, .s-rejected { border-color: var(--a-danger); color: var(--a-danger); }
.s-cancelled { border-color: var(--a-line); color: var(--a-muted); }
.tag { border-color: var(--a-navy); color: var(--a-navy); }
@media (prefers-color-scheme: dark) { .tag { border-color: var(--a-glow); color: var(--a-glow); } }

/* --- Sekmeler ----------------------------------------------------------------- */
.tabs { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 16px; border-bottom: 1px solid var(--a-line); }
.card__head .tabs { margin: 0; border: 0; }
.tabs a { position: relative; padding: 8px 12px; text-decoration: none; color: var(--a-muted); font-size: 13px; }
.tabs a:hover { color: var(--a-fg); }
.tabs a.on { color: var(--a-fg); font-weight: 600; }
.tabs a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--a-glow); }

/* --- Formlar -------------------------------------------------------------- */
.stack { display: flex; flex-direction: column; gap: 4px; }
label { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; font-size: 13px; font-weight: 600; color: var(--a-fg); }
input, select, textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--a-control);
  border-radius: 2px;
  padding: 0 10px;
  background: var(--a-field);
  color: var(--a-fg);
  font-family: var(--a-sans);
  font-size: 14px;
  font-weight: 400;
}
textarea { min-height: 88px; padding: 8px 10px; line-height: 1.55; resize: vertical; font-family: var(--a-mono); font-size: 13px; }
input::placeholder, textarea::placeholder { color: var(--a-muted); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--a-focus); outline-offset: -1px; border-color: var(--a-focus); }
.inline { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.inline input, .inline select { width: auto; flex: 1 1 180px; }

/* --- Butonlar ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--a-primary);
  border-radius: 2px;
  background: var(--a-primary);
  color: #fff;
  font-family: var(--a-sans);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--a-primary-hover); border-color: var(--a-primary-hover); color: #fff; }
.btn.ghost { border-color: var(--a-strong); background: var(--a-bg); color: var(--a-fg); }
.btn.ghost:hover { background: var(--a-hover); color: var(--a-fg); }
.btn.danger { border-color: var(--a-line); background: var(--a-bg); color: var(--a-danger); }
.btn.danger:hover { border-color: var(--a-danger); background: var(--a-hover); color: var(--a-danger); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0 0; }

/* --- Mesajlar ------------------------------------------------------------- */
.flash, .notice { margin: 0 0 16px; padding: 10px 12px; border: 1px solid var(--a-strong); font-size: 13px; background: var(--a-card); }
.flash.ok { color: var(--a-success); border-color: var(--a-success); }
.flash.error { color: var(--a-danger); border-color: var(--a-danger); }
.notice { border-left: 3px solid var(--a-glow); }
.notice input { margin: 8px 0; font-family: var(--a-mono); font-size: 12px; }

/* --- Metin ---------------------------------------------------------------- */
.prose { overflow-wrap: anywhere; font-size: 14px; }
.prose > :first-child { margin-top: 0; }
.prose h1, .prose h2, .prose h3 { font-size: 16px; margin: 14px 0 6px; }
.prose table { border-collapse: collapse; }
.prose td, .prose th { border: 1px solid var(--a-line); padding: 4px 8px; }
.clamp { max-height: 420px; overflow: auto; }
.list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.chips { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { border: 1px solid var(--a-line); padding: 1px 8px; font-size: 12px; }
.pager { display: flex; justify-content: space-between; margin-top: 12px; font-family: var(--a-mono); font-size: 12px; }

/* --- Giris ekrani ------------------------------------------------------- */
.center { width: 100%; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.center > .flash { width: 100%; max-width: 380px; }
.auth { width: 100%; max-width: 380px; background: var(--a-bg); border: 1px solid var(--a-strong); }
.auth__brand { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--a-line); }
.auth__brand img { height: 40px; width: auto; }
.auth__box { padding: 20px 24px 24px; }
.auth__box h1 { font-size: 26px; margin-bottom: 6px; }
.auth__box p { margin: 0 0 8px; color: var(--a-muted); font-size: 13px; }
.auth__box .btn { width: 100%; min-height: 40px; margin-top: 8px; }
.auth__foot { margin: 16px 0 0; font-family: var(--a-mono); font-size: 11px; color: var(--a-muted); text-align: center; }
@media (prefers-color-scheme: dark) { .auth__brand img.logo { filter: invert(1) hue-rotate(180deg) brightness(1.1); } }

/* --- Mobil ------------------------------------------------------------------- */
@media (max-width: 960px) {
  body { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; border-right: 0; border-bottom: 1px solid var(--a-line); }
  .side nav { flex-direction: row; flex-wrap: wrap; padding: 4px 8px; }
  .side .gl { display: none; }
  .side nav a.on::before { top: auto; bottom: 0; left: 8px; right: 8px; width: auto; height: 2px; }
  .top { position: static; }
  .grid2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n + 2) { border-bottom: 1px solid var(--a-line); }
  .table { display: block; overflow-x: auto; }
  .node { min-width: 0; width: 100%; }
}
