/* ==================================================================
   modules/review.css · Teslimat inceleme (rv-)
   Sakin, önizleme odaklı çalışma alanı: solda büyük sahne + alt araç
   çubuğu, sağda yorum / madde / AI QA paneli. Renkler token'lardan.
================================================================== */
.rv { flex: 1; min-height: 0; display: flex; flex-direction: column; height: 100%; background: var(--bg); }
.rv-queue { overflow: hidden; }
.rv-body { flex: 1; min-height: 0; display: flex; }
.rv-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.rv-side { width: 384px; flex: none; display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); background: var(--surface); }

/* Başlık parçaları (araç çubuğunda ve müşteri çubuğunda) */
.rv-tb { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rv-chain { margin: 0; flex-wrap: nowrap; }
.rv-chain .ver { cursor: pointer; }
.rv-chain .ver:hover:not([aria-pressed="true"]) { background: var(--hover); }
.rv-upbtn { margin-left: -2px; }
.rv-nover { font-size: 13px; }
.rv-h1 { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 15px !important; }
.rv-h1 svg.i { width: 14px; height: 14px; color: var(--text-3); flex: none; }
.rv-h1 b { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-crumb-job { color: var(--text-2); font-weight: 500; text-decoration: none; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 4px; }
a.rv-crumb-job:hover { color: var(--text); }
.toolbar .rv-back { margin-right: -4px; }
.btn[aria-disabled="true"], .segmented button[aria-disabled="true"] { opacity: .45; cursor: default; }
.btn[aria-disabled="true"]:active { transform: none; }
.btn.primary[aria-disabled="true"]:hover { background: var(--accent); }
.rv-n { min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--orange-soft); color: var(--orange); font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; margin-left: 2px; }

/* Müşteri görünümündeki kendi çubuğu */
.rv-bar { height: var(--toolbar-h); flex: none; display: flex; align-items: center; gap: 8px; padding: 0 16px 0 10px; border-bottom: 1px solid var(--line); background: var(--bg); min-width: 0; }
.rv-bar .rv-h1 { margin: 0 6px 0 2px; }

/* Sahne */
.rv-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; background: var(--column); outline: none; touch-action: none; user-select: none; -webkit-user-select: none; }
.rv-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); border-radius: 0; }
.rv-stage[data-tool="select"] { cursor: grab; }
.rv-stage[data-tool="select"].panning { cursor: grabbing; }
.rv-stage[data-tool="point"], .rv-stage[data-tool="area"] { cursor: crosshair; }
.rv-stage-empty { display: flex; touch-action: auto; }
.rv-canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.rv-frame { position: relative; background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 6px 28px rgba(0, 0, 0, .10); }
.rv-art { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.rv-filechip { position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 6px; background: var(--surface); color: var(--text-2); font-size: calc(12px / var(--z, 1)); box-shadow: 0 0 0 1px var(--line); transform-origin: 0 100%; }
.rv-anns { position: absolute; inset: 0; }

/* İşaretler: ekranda sabit boyutta kalır (ölçek tersine çevrilir) */
.rv-pin { position: absolute; width: 26px; height: 26px; margin: 0; padding: 0; border: 2px solid var(--surface); border-radius: 50% 50% 50% 4px; background: var(--accent); color: var(--on-accent); font: 700 12px/1 var(--font); display: grid; place-items: center; cursor: pointer; transform: translate(0, -100%) scale(calc(1 / var(--z, 1))); transform-origin: 0 100%; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: background-color 120ms ease, box-shadow 160ms ease; font-variant-numeric: tabular-nums; }
.rv-pin:hover { box-shadow: 0 0 0 3px var(--accent-soft), 0 2px 6px rgba(0, 0, 0, .25); }
.rv-pin:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rv-pin.int { background: var(--text); color: var(--bg); }
.rv-pin.done { background: var(--green); color: #fff; opacity: .75; }
.rv-pin.on { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 45%, transparent), 0 2px 8px rgba(0, 0, 0, .3); opacity: 1; }
.rv-pin.draft { background: var(--orange); color: #fff; pointer-events: none; animation: rv-pop 240ms var(--ease-out); }
@keyframes rv-pop { from { opacity: 0; transform: translate(0, -100%) scale(calc(.6 / var(--z, 1))); } }
.rv-box { position: absolute; border: calc(2px / var(--z, 1)) solid var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); border-radius: calc(4px / var(--z, 1)); }
.rv-box > .rv-pin { left: 0; top: 0; }
.rv-box.int { border-color: var(--text); border-style: dashed; background: color-mix(in srgb, var(--text) 6%, transparent); }
.rv-box.done { border-color: var(--green); background: transparent; opacity: .7; }
.rv-box.on { box-shadow: 0 0 0 calc(4px / var(--z, 1)) color-mix(in srgb, var(--accent) 30%, transparent); opacity: 1; }
.rv-box.draft { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 12%, transparent); border-style: dashed; }

/* Sahne üstü bilgi */
.rv-notice { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border-radius: 999px; background: var(--surface); color: var(--text); font-size: 13px; box-shadow: var(--shadow-pop); white-space: nowrap; max-width: calc(100% - 24px); cursor: default; z-index: 2; }
.rv-notice > span { overflow: hidden; text-overflow: ellipsis; }
.rv-notice svg.i { width: 16px; height: 16px; color: var(--accent); flex: none; }
.rv-notice .btn { border-radius: 999px; }
.rv-notice:not(:has(.btn)) { padding-right: 14px; }

/* Alt araç çubuğu */
.rv-dock { flex: none; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; border-top: 1px solid var(--line); background: var(--bg); flex-wrap: wrap; }
.rv-tools button { min-width: 0; }
.rv-meta { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; }
.rv-meta b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.rv-meta .badge { height: 20px; font-size: 11.5px; }
.rv-fname { overflow: hidden; text-overflow: ellipsis; color: var(--text-3); }
.rv-zoom { display: flex; align-items: center; gap: 2px; }
.rv-zv { min-width: 46px; text-align: center; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-2); }

/* Karşılaştırma */
.rv-cmp { display: flex; align-items: center; justify-content: center; touch-action: auto; cursor: default; }
.rv-cside { display: flex; gap: 20px; align-items: center; justify-content: center; width: 100%; height: 100%; padding: 32px; }
.rv-cfig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.rv-cfig figcaption { height: 24px; display: flex; align-items: center; }
.rv-cbox { position: relative; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 6px 28px rgba(0, 0, 0, .10); }
.rv-ctag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.rv-ctag b { font-variant-numeric: tabular-nums; }
.rv-cstack { position: relative; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 6px 28px rgba(0, 0, 0, .10); touch-action: none; user-select: none; -webkit-user-select: none; }
.rv-cmp[data-cmp="slider"] .rv-cstack { cursor: ew-resize; }
.rv-clayer { position: absolute; inset: 0; overflow: hidden; }
.rv-clayer.top { will-change: clip-path, opacity; }
.rv-cstack .rv-ctag { position: absolute; top: 10px; padding: 3px 4px 3px 9px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-pop); z-index: 2; pointer-events: none; }
.rv-cstack .rv-ctag.l { left: 10px; }
.rv-cstack .rv-ctag.r { right: 10px; }
.rv-handle { position: absolute; top: 0; bottom: 0; width: 32px; margin-left: -16px; display: grid; place-items: center; z-index: 3; cursor: ew-resize; outline: none; }
.rv-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: var(--surface); box-shadow: 0 0 0 1px rgba(0, 0, 0, .18); }
.rv-handle span { position: relative; width: 28px; height: 28px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-pop); }
.rv-handle span::before, .rv-handle span::after { content: ""; position: absolute; top: 9px; border: 5px solid transparent; }
.rv-handle span::before { left: 3px; border-right-color: var(--text-2); }
.rv-handle span::after { right: 3px; border-left-color: var(--text-2); }
.rv-handle:focus-visible span { box-shadow: 0 0 0 3px var(--accent), var(--shadow-pop); }
.rv-cpick { display: flex; align-items: center; gap: 6px; }
.rv-vsel { width: auto !important; min-width: 84px; }
.rv-op { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.rv-op input { width: 140px; accent-color: var(--accent); }
.rv-op output { min-width: 38px; font-variant-numeric: tabular-nums; color: var(--text); font-size: 12.5px; }
.rv-align { font-size: 13px; color: var(--text-2); }

/* Sağ panel */
.rv-tabs { padding: 12px 18px 0; gap: 20px; }
.rv-tabs button { position: relative; }
.rv-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); display: inline-block; }
.rv-dot.green { background: var(--green); } .rv-dot.orange { background: var(--orange); } .rv-dot.red { background: var(--red); } .rv-dot.accent { background: var(--accent); }
.rv-dot.muted { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-3); }
.rv-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.rv-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.rv-pane-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 14px 10px 18px; border-bottom: 1px solid var(--line); min-height: 48px; }
.rv-pane-head .segmented button { height: 24px; font-size: 12px; padding: 0 10px; }
.rv-pane-head .seg-n { font-size: 11px; color: var(--text-3); margin-left: 2px; font-variant-numeric: tabular-nums; }
.rv-small { font-size: 12.5px; }
.rv-small b { font-variant-numeric: tabular-nums; }
.rv-list { flex: 1; min-height: 0; overflow-y: auto; }
.rv-pane.flow .rv-list { padding: 14px 16px 10px 18px; display: flex; flex-direction: column; }
.rv-scroll { padding: 12px 16px 16px 18px; }
.rv-es { padding: 24px 12px; }
.rv-es h2 { font-size: 15px; display: inline-flex; align-items: center; gap: 4px; }

/* Yorumlar */
.rv-list .comments { gap: 4px; margin: 0; }
.rv-c { padding: 10px 8px; margin: 0 -8px; border-radius: var(--r-m); cursor: pointer; transition: background-color 120ms ease; }
.rv-c:hover { background: var(--hover); }
.rv-c.on { background: var(--selected); }
.rv-c.done .comment-body { color: var(--text-2); }
.rv-c .comment-tools { flex-wrap: wrap; }
.rv-num { min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px 11px 11px 3px; border: 0; background: var(--accent); color: var(--on-accent); font: 700 11.5px/1 var(--font); display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
button.rv-num { cursor: pointer; }
.rv-num.int { background: var(--text); color: var(--bg); }
.rv-num.done { background: var(--green); color: #fff; }
.rv-num.draft { background: var(--orange); color: #fff; }
.rv-num.note { background: var(--surface-2); color: var(--text-2); border-radius: 50%; }
.rv-num.note svg.i { width: 12px; height: 12px; }
.rv-kind { font-size: 11.5px; color: var(--text-3); }
.rv-linked { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-3); padding: 0 6px; }
.rv-compose { padding: 12px 16px 16px 18px !important; }
.rv-compose .textarea { min-height: 58px; }
.rv-draftbar { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 10px; border-bottom: 1px solid var(--line); background: var(--orange-soft); font-size: 12.5px; }
.rv-draftbar .btn { margin-left: auto; height: 24px; }
.rv-compose .field-btn.bare { height: 28px; min-height: 28px; font-size: 12.5px; }

/* Revizyon maddeleri */
.rv-group + .rv-group { margin-top: 18px; }
.rv-group-h { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; color: var(--text-2); text-transform: none; margin-bottom: 6px; }
.rv-group-h .n { color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }
.rv-none { font-size: 12.5px; color: var(--text-3); padding: 6px 0; }
.rv-item { padding: 10px 12px; border-radius: var(--r-m); background: var(--surface-2); margin-bottom: 6px; display: grid; gap: 6px; }
.rv-item-top { display: flex; align-items: flex-start; gap: 8px; }
.rv-item-txt { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.45; padding-top: 3px; }
.rv-item.resolved .rv-item-txt, .rv-item.rejected .rv-item-txt { color: var(--text-2); }
.rv-item.rejected .rv-item-txt { text-decoration: line-through; text-decoration-color: var(--text-3); }
.rv-item-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--text-3); }
.rv-item-meta .rv-idel { margin-left: auto; width: 24px; height: 24px; opacity: .7; }
.rv-item-meta .rv-idel:hover { opacity: 1; }
.rv-pinlink { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--text-2); font-size: 11.5px; font-weight: 550; font-variant-numeric: tabular-nums; }
.rv-pinlink:hover { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.rv-reason { font-size: 12.5px; color: var(--text-2); border-left: 2px solid var(--red); padding-left: 8px; quotes: "“" "”"; }
.rv-ist.field-btn.bare { height: 26px; min-height: 26px; padding: 0 6px 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; flex: none; background: var(--surface); border-color: var(--line); }
.rv-ist.st-pending { color: var(--text-2); }
.rv-ist.st-in_progress { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.rv-ist.st-resolved { color: var(--green); background: var(--green-soft); border-color: transparent; }
.rv-ist.st-rejected { color: var(--red); background: var(--red-soft); border-color: transparent; }
.rv-ist.field-btn > svg.i:last-child { width: 12px; height: 12px; color: currentColor; }

/* AI QA */
.rv-qa-head .badge { flex: none; }
.rv-qa-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.rv-qa-row:last-of-type { border-bottom: 0; }
.rv-qa-top { display: flex; align-items: center; gap: 8px; }
.rv-qa-top strong { font-size: 13.5px; flex: 1; }
.rv-qa-row.pending { opacity: .7; }
.rv-conf { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; min-width: 72px; justify-content: flex-end; }
.rv-conf i { width: 30px; height: 4px; border-radius: 2px; background: var(--line-strong); position: relative; overflow: hidden; }
.rv-conf i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--text-2); border-radius: 2px; }
.rv-qa-kv { display: grid; grid-template-columns: 74px 1fr; gap: 3px 10px; margin: 8px 0 0; font-size: 12.5px; }
.rv-qa-kv dt { color: var(--text-3); }
.rv-qa-kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.rv-qa-row.r-fail .rv-qa-kv dd:last-of-type { color: var(--red); font-weight: 600; }
.rv-qa-row.r-unsure .rv-qa-kv dd:last-of-type { color: var(--orange); }
.rv-human { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12.5px; color: var(--text-2); flex-wrap: wrap; }
.rv-human.ask { padding: 8px 8px 8px 10px; border-radius: 8px; background: var(--orange-soft); color: var(--text); }
.rv-human.ask > span { flex: 1; font-weight: 600; font-size: 12.5px; }
.rv-human .btn.small { height: 26px; }
.rv-qa-wait, .rv-qa-need { margin-bottom: 8px; }
.rv-qa-wait svg.i, .rv-qa-need svg.i { color: var(--text-2); flex: none; }
.rv-qa-foot { display: flex; align-items: center; gap: 6px; margin: 14px 0 0; font-size: 12px; color: var(--text-3); }
.rv-resolve { display: grid; gap: 10px; }
.rv-resolve .check { align-items: flex-start; }
.rv-resolve .check input { margin-top: 1px; }
.rv-code { letter-spacing: .4em; font-variant-numeric: tabular-nums; text-align: center; font-size: 18px !important; }

/* Mobil: sahne üstte, panel altta; sayfa yatay kaymaz */
.rv-qa-head .rv-small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }

@media (max-width: 760px) {
  .rv { overflow-y: auto; overflow-x: hidden; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  .rv-body { flex-direction: column; flex: none; }
  .rv-main { flex: none; }
  .rv-stage { flex: none; height: 54vh; }
  .rv-side { width: 100%; border-left: 0; border-top: 1px solid var(--line); min-height: 60vh; }
  .rv-meta { display: none; }
  .rv-tl { display: none; }
  .rv-dock { gap: 8px; padding: 8px 12px; justify-content: space-between; }
  .rv-zoom .btn { padding: 0 6px; }
  .rv-cside { flex-direction: column; padding: 12px; gap: 10px; }
  .rv-op input { width: 90px; }
  .rv-notice { font-size: 12px; top: 8px; }
  .rv-pane.flow .rv-list { max-height: 50vh; }
  .rv-list { overflow: visible; }
  .rv-pane.flow .rv-list { overflow-y: auto; }
  .rv-crumb-job, .rv-h1 > svg.i { display: none; }
  .toolbar:has(.rv-tb) .mobile-search, .toolbar:has(.rv-tb) .notif-btn { display: none; }
  .toolbar .rv-chain { overflow-x: auto; scrollbar-width: none; max-width: 120px; }
  .toolbar .rv-h1 { max-width: 92px; }
  .rv-bar { padding: 0 10px; gap: 6px; }
  .rv-bar .label { display: none; }
  .rv-bar .rv-chain { overflow-x: auto; scrollbar-width: none; max-width: 110px; }
  .rv-bar .rv-h1 { max-width: 90px; }
  .rv-bar .rv-modes { display: none; }
  .rv-bar .btn.primary { width: var(--ctl-h); padding: 0; border-radius: 50%; }
  .rv-bar .btn:not(.primary) { width: var(--ctl-h); padding: 0; }
  .toolbar .rv-tb .btn:not(.primary) { width: var(--ctl-h); padding: 0; }
}
