:root {
  --bg: #121212; --bg2: #1a1a1a; --bg3: #232323; --line: #2e2e2e; --line2: #3a3a3a;
  --tx: #ececec; --tx2: #a6a6a6; --tx3: #6f6f6f;
  --acc: #e8a33d; --acc-tx: #141414;
  --ok: #4caf7a; --warn: #e0b341; --bad: #e05d4f; --info: #5b9bd5; --wip: #a07ce0;
  --r: 8px; --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--tx); font: 14px/1.45 var(--font); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { padding: 40px; color: var(--tx2); }

/* Ust cubuk */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 0 18px; height: 52px;
  background: #0d0d0d; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.brand i { width: 22px; height: 22px; border-radius: 6px; background: var(--acc); display: inline-block; }
.nav { display: flex; gap: 2px; overflow-x: auto; flex: 1; }
.nav a { padding: 7px 12px; border-radius: 6px; color: var(--tx2); white-space: nowrap; }
.nav a:hover { color: var(--tx); background: var(--bg3); }
.nav a.on { color: var(--tx); background: var(--bg3); box-shadow: inset 0 -2px 0 var(--acc); }
.who { display: flex; align-items: center; gap: 10px; color: var(--tx2); white-space: nowrap; font-size: 13px; }
.who b { color: var(--tx); font-weight: 600; }

main { padding: 22px 22px 80px; max-width: 1500px; margin: 0 auto; }
h1 { font-size: 22px; margin: 0 0 4px; font-weight: 650; }
h2 { font-size: 15px; margin: 0 0 12px; font-weight: 650; color: var(--tx); }
h3 { font-size: 13px; margin: 0 0 8px; font-weight: 600; color: var(--tx2); text-transform: uppercase; letter-spacing: .06em; }
.sub { color: var(--tx2); margin-bottom: 18px; }
.crumbs { color: var(--tx3); font-size: 13px; margin-bottom: 6px; }
.crumbs a:hover { color: var(--acc); }
.muted { color: var(--tx2); } .dim { color: var(--tx3); } .small { font-size: 12px; } .mono { font-family: var(--mono); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sp { flex: 1; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.card.pad0 { padding: 0; overflow: hidden; }
.card + .card { margin-top: 16px; }
.grid > .card + .card, .kpi > .card + .card { margin-top: 0; }

/* Form */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 6px; border: 1px solid var(--line2);
  background: var(--bg3); cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #555; }
.btn.pri { background: var(--acc); color: var(--acc-tx); border-color: var(--acc); font-weight: 600; }
.btn.pri:hover { filter: brightness(1.08); }
.btn.ok { background: #1f3a2a; border-color: #2f6b47; color: #9ee0b8; }
.btn.bad { background: #3d1f1c; border-color: #7a3730; color: #f2a69c; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--tx2); }
.btn.ghost:hover { color: var(--tx); background: var(--bg3); }
.btn.sm { padding: 4px 9px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
input, select, textarea { width: 100%; background: #0f0f0f; border: 1px solid var(--line2); border-radius: 6px; padding: 8px 10px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--acc); }
textarea { resize: vertical; min-height: 80px; }
label.f { display: block; margin-bottom: 10px; }
label.f > span { display: block; font-size: 12px; color: var(--tx2); margin-bottom: 4px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.check { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; color: var(--tx2); }
.check input { width: auto; }

/* Durum rozetleri */
.st { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.st.yapilacak { background: #262626; color: #a6a6a6; border-color: #333; }
.st.uretimde, .st.uretiliyor, .st.gonderiliyor { background: #2a2140; color: #c6b0f2; }
.st.onay_bekliyor, .st.bekliyor { background: #3a3014; color: #f0cf72; }
.st.revizyon, .st.hata { background: #3d1f1c; color: #f2a69c; }
.st.onaylandi, .st.tamam { background: #1c3527; color: #8fdcb0; }
.pill { display: inline-block; padding: 1px 7px; border-radius: 4px; background: var(--bg3); color: var(--tx2); font-size: 11.5px; }

/* Ilerleme */
.bar { height: 6px; background: #2a2a2a; border-radius: 3px; overflow: hidden; display: flex; }
.bar > i { display: block; height: 100%; }
.bar .b-ok { background: var(--ok); } .bar .b-rev { background: var(--warn); } .bar .b-wip { background: var(--wip); }

/* Proje kartlari */
.proj { display: block; padding: 18px; }
.proj:hover { border-color: #4a4a4a; }
.proj .big { font-size: 28px; font-weight: 700; }
.stats { display: flex; gap: 22px; margin: 12px 0; }
.stats div span { display: block; font-size: 11px; color: var(--tx3); text-transform: uppercase; letter-spacing: .05em; }
.stats div b { font-size: 18px; }

/* Tablolar */
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--tx3); text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
td { padding: 9px 10px; border-bottom: 1px solid #222; vertical-align: middle; }
tr.link { cursor: pointer; } tr.link:hover td { background: #1f1f1f; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Plan kartlari (storyboard) */
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.shot { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.shot:hover { border-color: #4a4a4a; }
.thumb { aspect-ratio: 16/9; background: #0b0b0b center/cover no-repeat; position: relative; display: flex; align-items: center; justify-content: center; color: var(--tx3); font-size: 12px; }
.thumb .v { position: absolute; top: 6px; left: 6px; background: rgba(0,0,0,.7); padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 600; color: #fff; }
.thumb .run { position: absolute; top: 6px; right: 6px; background: var(--wip); color: #111; padding: 1px 6px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.shot .meta { padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; }
.shot .code { font-family: var(--mono); font-size: 12px; color: var(--acc); }

/* Plan sayfasi */
.shotpage { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .shotpage { grid-template-columns: 1fr; } }
.viewer { background: #000; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.viewer video, .viewer img { display: block; width: 100%; max-height: 70vh; object-fit: contain; background: #000; }
.viewer .empty { aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; color: var(--tx3); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: #000; }
.compare > div { position: relative; }
.compare .lab { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.75); padding: 2px 8px; border-radius: 4px; font-size: 12px; z-index: 2; }
.vstrip { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 4px; }
.vchip { flex: 0 0 132px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; cursor: pointer; background: var(--bg2); }
.vchip.on { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc); }
.vchip .thumb { aspect-ratio: 16/9; }
.vchip .l { padding: 4px 7px; font-size: 11.5px; display: flex; justify-content: space-between; align-items: center; gap: 4px; }
.vinfo { padding: 12px 14px; border-top: 1px solid var(--line); background: var(--bg2); }
.prompt { font-family: var(--mono); font-size: 12px; white-space: pre-wrap; color: var(--tx2); background: #0f0f0f; padding: 8px 10px; border-radius: 6px; max-height: 140px; overflow: auto; }

.side .card { padding: 14px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.tabs button { background: none; border: none; padding: 8px 12px; color: var(--tx2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.on { color: var(--tx); border-bottom-color: var(--acc); }
.mediapick { display: flex; gap: 8px; flex-wrap: wrap; }
.mp { width: 92px; border: 1px solid var(--line2); border-radius: 6px; overflow: hidden; position: relative; font-size: 10.5px; }
.mp .thumb { aspect-ratio: 16/10; }
.mp .x { position: absolute; top: 2px; right: 2px; background: rgba(0,0,0,.8); border: none; color: #fff; width: 18px; height: 18px; border-radius: 9px; cursor: pointer; line-height: 1; }
.mp .t { padding: 2px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--tx2); }
.mp.add { display: flex; align-items: center; justify-content: center; min-height: 72px; cursor: pointer; color: var(--tx3); border-style: dashed; }
.mp.add:hover { color: var(--acc); border-color: var(--acc); }
.warn { background: #3a3014; color: #f0cf72; padding: 7px 10px; border-radius: 6px; font-size: 12.5px; margin: 6px 0; }
.errbox { background: #3d1f1c; color: #f2a69c; padding: 7px 10px; border-radius: 6px; font-size: 12.5px; margin: 6px 0; word-break: break-word; }
.est { font-size: 12.5px; color: var(--tx2); }
.est b { color: var(--acc); }

.cmt { padding: 9px 0; border-bottom: 1px solid #262626; }
.cmt:last-child { border-bottom: none; }
.cmt .h { font-size: 12px; color: var(--tx3); display: flex; gap: 6px; align-items: center; margin-bottom: 3px; }
.cmt .h b { color: var(--tx); font-weight: 600; }
.cmt.revizyon { border-left: 3px solid var(--bad); padding-left: 9px; }
.cmt.onaylandi { border-left: 3px solid var(--ok); padding-left: 9px; }

.feed div { padding: 6px 0; border-bottom: 1px solid #222; font-size: 13px; }
.feed div:last-child { border: none; }

/* Butce */
.kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi .card span { display: block; font-size: 11.5px; color: var(--tx3); text-transform: uppercase; letter-spacing: .05em; }
.kpi .card b { font-size: 22px; font-variant-numeric: tabular-nums; }
.kpi .card small { display: block; color: var(--tx2); }
.chart { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding-top: 10px; }
.chart .col { flex: 1; display: flex; flex-direction: column-reverse; min-width: 4px; position: relative; }
.chart .col i { display: block; width: 100%; }
.chart .col:hover::after { content: attr(data-t); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); background: #000; padding: 3px 7px; border-radius: 4px; font-size: 11px; white-space: pre; z-index: 5; border: 1px solid var(--line2); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--tx2); flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.c-byteplus { background: #e8a33d; } .c-kling { background: #5b9bd5; } .c-google { background: #4caf7a; } .c-higgsfield { background: #c56bd6; } .c-diger { background: #888; }
.good { color: var(--ok); } .badc { color: var(--bad); } .warnc { color: var(--warn); }

/* Giris */
.login { max-width: 360px; margin: 12vh auto; }
.login .brand { font-size: 18px; margin-bottom: 18px; }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px; overflow: auto; }
.modal { background: var(--bg2); border: 1px solid var(--line2); border-radius: 10px; padding: 20px; width: 100%; max-width: 520px; }
.modal h2 { margin-bottom: 14px; }

#toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 99; display: flex; flex-direction: column; gap: 6px; align-items: center; }
#toast div { background: #000; border: 1px solid var(--line2); padding: 9px 16px; border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.5); }
#toast div.e { border-color: var(--bad); color: #f2a69c; }

.script { min-height: 60vh; font-family: var(--mono); font-size: 13.5px; line-height: 1.6; }
.empty-state { padding: 30px; text-align: center; color: var(--tx3); }

@media (max-width: 700px) {
  main { padding: 16px 16px 60px; }
  .top { gap: 10px; padding: 0 12px; }
  .brand span { display: none; }
  .who span { display: none; }
}
