/* ADR checklist character — shared by CTU / liman / yangın / eğitim / ADR.
   Full-row yeşil / kırmızı / sarı. Kanıt: foto, belge, not.
   Gap raporu: document flow AFTER last item. Sticky bottom = metraj only (.save-bar).
   Do NOT paste these rules into JS. Consulting product — no official stamps. */

.cl-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #1e293b;
  margin-bottom: 6px;
  transition: border-color .15s, background .15s;
  flex-wrap: wrap;
  background: var(--pt-surface, #0f172a);
}
.cl-item:hover { border-color: #334155; }
.cl-item.checked { background: #0d2a1a; border-color: #166534; }
.cl-item.failed { background: #2a0d0d; border-color: #7f1d1d; }
.cl-item.pending { background: #2a210d; border-color: #92400e; }
.cl-item.na-state { background: rgba(100, 116, 139, .06); border-color: #334155; opacity: .55; }
.cl-item.dynamic { border-left: 3px solid #1d4ed8; }

.cl-state-btns { display: flex; gap: 3px; flex-shrink: 0; margin-top: 1px; }
.cl-state-btn {
  width: 28px; height: 28px; border-radius: 6px; border: 1px solid #334155;
  background: #0f172a; cursor: pointer; font-size: .72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0; color: #64748b;
}
.cl-state-btn:hover { border-color: #475569; background: #1e293b; }
.cl-state-btn.active-evet { background: #16a34a; border-color: #16a34a; color: #fff; }
.cl-state-btn.active-hayir { background: #dc2626; border-color: #dc2626; color: #fff; }
.cl-state-btn.active-na { background: #475569; border-color: #475569; color: #fff; }

.cl-check-area { display: flex; align-items: flex-start; gap: 10px; flex: 1; min-width: 0; }
.cl-text { font-size: .83rem; line-height: 1.5; flex: 1; color: var(--pt-text, #f1f5f9); white-space: normal; overflow-wrap: break-word; word-break: normal; }
.cl-foot { font-size: .76rem; color: #64748b; margin-top: 8px; }
.cl-item.checked .cl-text { color: #4ade80; }
.cl-item.failed .cl-text { color: #fca5a5; }
.cl-item.pending .cl-text { color: #fbbf24; }
.cl-item.na-state .cl-text { color: #64748b; text-decoration: line-through; }
.cl-ref-inline { font-size: .72rem; font-weight: 600; color: #60a5fa; margin-right: 6px; }
.cl-seed { display: block; font-size: .76rem; color: #94a3b8; margin-top: 4px; white-space: normal; overflow-wrap: break-word; word-break: normal; }
.cl-miss { display: block; font-size: .76rem; color: #fbbf24; margin-top: 4px; }

.cl-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 8px; flex-wrap: wrap; }
.cl-title { font-size: .9rem; font-weight: 600; }
.cl-progress { font-size: .75rem; color: #64748b; }
.progress-bar { height: 4px; background: #1e293b; border-radius: 2px; margin-bottom: 12px; overflow: hidden; }
.progress-fill { height: 100%; background: #3b82f6; border-radius: 2px; transition: width .3s; }

.attach-bar { display: flex; gap: 4px; margin-left: auto; flex-shrink: 0; }
.attach-btn {
  width: 28px; height: 28px; border-radius: 6px; border: 1px solid #1e293b;
  background: #0f172a; cursor: pointer; font-size: .85rem;
  display: flex; align-items: center; justify-content: center; padding: 0; color: inherit;
}
.attach-btn:hover { border-color: #3b82f6; background: #1e3a5f; }
.attach-btn.has-data { border-color: #f59e0b; background: rgba(245, 158, 11, .18); }
.attach-list { width: 100%; display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; padding-top: 6px; border-top: 1px dashed #1e293b; }
.attach-chip {
  font-size: .68rem; background: #1e293b; border: 1px solid #334155; border-radius: 5px;
  padding: 2px 8px; color: #94a3b8; display: inline-flex; align-items: center; gap: 3px;
}
.item-note-row { width: 100%; margin-top: 6px; padding-top: 6px; border-top: 1px dashed #1e293b; display: none; }
.item-note-row.visible { display: block; }
.item-note-input {
  width: 100%; background: #020617; border: 1px solid #1e293b; border-radius: 6px;
  color: var(--pt-text, #f1f5f9); padding: 6px 8px; font-size: .75rem;
  resize: vertical; min-height: 32px; outline: none; font-family: inherit;
}
.item-note-input:focus { border-color: #3b82f6; }

/* Gap report: document flow AFTER last item — never sticky/fixed. Hidden until list is finished. */
.incomplete-banner {
  background: #7f1d1d; border: 1px solid #991b1b; border-radius: 10px;
  padding: 14px 18px; margin-top: 16px; margin-bottom: 14px; display: none;
  position: static;
}

/* Bottom tally only — cloned from sevkiyat-hazirla .save-bar. Not the gap essay. */
.save-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--pt-surface, #0f172a);
  border-top: 1px solid var(--pt-border, #1e293b);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  z-index: 100;
}
.save-bar .status-msg { font-size: .78rem; color: var(--pt-muted-2, #94a3b8); }
.save-bar .status-msg.ok { color: var(--pt-success, #4ade80); }
.save-bar .status-msg.err { color: var(--pt-danger, #f87171); }
.save-bar .status-msg.warn { color: var(--pt-st-pending-fg, #fbbf24); }
.save-bar.cl-metraj {
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 8px 20px 10px;
}
.cl-metraj-track {
  height: 4px;
  background: var(--pt-border, #1e293b);
  border-radius: 2px;
  overflow: hidden;
}
.cl-metraj-fill {
  height: 100%;
  width: 0;
  background: #3b82f6;
  border-radius: 2px;
  transition: width .3s, background .3s;
}
.cl-metraj-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.cl-metraj-row [data-cl-metraj-main] { flex: 1 1 auto; min-width: 140px; }
.cl-metraj-acts {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}
.cl-metraj-btn {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--pt-border, #334155);
  background: var(--pt-surface-2, #1e293b);
  color: var(--pt-text, #f1f5f9);
  font-family: inherit;
}
.cl-metraj-btn:hover { border-color: var(--pt-primary, #3b82f6); background: var(--pt-primary-dim, rgba(59,130,246,.15)); }
.cl-metraj-btn.primary {
  background: var(--pt-primary, #1d4ed8);
  border-color: var(--pt-primary, #3b82f6);
  color: var(--pt-on-primary, #fff);
}
.cl-metraj-btn.primary:hover { filter: brightness(1.08); }
html[data-theme="light"] .cl-metraj-btn {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}
html[data-theme="light"] .cl-metraj-btn.primary {
  background: #1d4ed8;
  color: #fff;
  border-color: #1d4ed8;
}
body.ghm-has-sidebar .save-bar,
body.pt-app-chrome .save-bar { left: var(--ghm-sidebar-w, 236px); }
body.cl-has-metraj { padding-bottom: 72px; }
@media print {
  .save-bar { display: none !important; }
}
html[data-theme="light"] .save-bar {
  background: var(--pt-surface, #fff);
  border-top-color: var(--pt-border, #cbd5e1);
}
html[data-theme="light"] .cl-metraj-track { background: #e2e8f0; }
.incomplete-banner.visible { display: block; }
.incomplete-banner.gap-ok {
  background: #0d2a1a; border-color: #166534; display: block;
}
.incomplete-banner .ib-title { font-size: .88rem; font-weight: 700; color: #fca5a5; margin-bottom: 6px; }
.incomplete-banner.gap-ok .ib-title { color: #4ade80; }
.incomplete-banner .ib-text { font-size: .78rem; color: #fecaca; line-height: 1.5; }
.incomplete-banner.gap-ok .ib-text { color: #86efac; }
.incomplete-banner .ib-list { font-size: .74rem; color: #fca5a5; margin-top: 6px; max-height: 220px; overflow-y: auto; }
.incomplete-banner .ib-item { padding: 3px 0; border-bottom: 1px solid rgba(153, 27, 27, .4); }
.incomplete-banner .ib-item.warn { color: #fbbf24; border-bottom-color: rgba(146, 64, 14, .45); }

html[data-theme="light"] .cl-item { border-color: var(--pt-border, #cbd5e1); background: var(--pt-surface, #fff); }
html[data-theme="light"] .cl-item:hover { background: var(--pt-surface-2, #f8fafc); }
html[data-theme="light"] .cl-item.checked { background: #dcfce7; border-color: #22c55e; }
html[data-theme="light"] .cl-item.failed { background: #fee2e2; border-color: #ef4444; }
html[data-theme="light"] .cl-item.pending { background: #fef3c7; border-color: #f59e0b; }
html[data-theme="light"] .cl-item.na-state { background: #f1f5f9; border-color: #cbd5e1; }
html[data-theme="light"] .cl-item.checked .cl-text { color: #166534; }
html[data-theme="light"] .cl-item.failed .cl-text { color: #991b1b; }
html[data-theme="light"] .cl-item.pending .cl-text { color: #92400e; }
html[data-theme="light"] .cl-item.na-state .cl-text { color: #64748b; }
html[data-theme="light"] .cl-state-btn,
html[data-theme="light"] .attach-btn {
  background: var(--pt-surface, #fff); border-color: rgba(15, 23, 42, .28); color: #475569;
}
html[data-theme="light"] .item-note-input { background: #fff; color: #0f172a; border-color: #cbd5e1; }
html[data-theme="light"] .attach-chip { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }

/* Yangın / araç uygunluk .gap rows share the same full-row character */
html[data-theme] .gap.checked, html[data-theme] .gap.st-ok { background: #0d2a1a !important; border-color: #166534 !important; color: #4ade80 !important; }
html[data-theme] .gap.failed, html[data-theme] .gap.st-bad { background: #2a0d0d !important; border-color: #7f1d1d !important; color: #fca5a5 !important; }
html[data-theme] .gap.pending, html[data-theme] .gap.st-ask { background: #2a210d !important; border-color: #92400e !important; color: #fbbf24 !important; }
html[data-theme] .gap.na-state, html[data-theme] .gap.st-na { background: rgba(100, 116, 139, .06) !important; border-color: #334155 !important; color: #64748b !important; }
html[data-theme="light"] .gap.checked, html[data-theme="light"] .gap.st-ok { background: #dcfce7 !important; border-color: #22c55e !important; color: #166534 !important; }
html[data-theme="light"] .gap.failed, html[data-theme="light"] .gap.st-bad { background: #fee2e2 !important; border-color: #ef4444 !important; color: #991b1b !important; }
html[data-theme="light"] .gap.pending, html[data-theme="light"] .gap.st-ask { background: #fef3c7 !important; border-color: #f59e0b !important; color: #92400e !important; }
html[data-theme="light"] .gap.na-state, html[data-theme="light"] .gap.st-na { background: #f1f5f9 !important; border-color: #cbd5e1 !important; color: #64748b !important; }

/* Kayıt listesi — sevkiyatlar gibi. Not sticky gap. */
.cl-kayit-wrap { margin: 0 0 16px; }
.cl-kayit-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cl-kayit-h1 { font-size: 1.05rem; font-weight: 700; }
.cl-kayit-sub { font-size: .75rem; color: #64748b; margin-top: 3px; }
.cl-kayit-err { font-size: .8rem; color: #fca5a5; background: #2a0d0d; border: 1px solid #7f1d1d; border-radius: 8px; padding: 8px 12px; }
.cl-kayit-empty { text-align: center; padding: 36px 16px; color: #64748b; font-size: .85rem; background: var(--pt-surface, #0f172a); border: 1px solid #1e293b; border-radius: 12px; }
.cl-kayit-list { display: flex; flex-direction: column; gap: 8px; }
.cl-kayit-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--pt-surface, #0f172a); border: 1px solid #1e293b; border-radius: 12px;
  padding: 12px 14px;
}
.cl-kayit-row:hover { border-color: #334155; }
.cl-kayit-main { flex: 1; min-width: 160px; }
.cl-kayit-no { font-family: ui-monospace, monospace; font-weight: 700; color: #a78bfa; font-size: .82rem; }
.cl-kayit-title { font-size: .88rem; font-weight: 600; margin-top: 2px; }
.cl-kayit-meta { font-size: .72rem; color: #64748b; margin-top: 3px; }
.cl-kayit-badge {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 12px;
  font-size: .68rem; font-weight: 600; white-space: nowrap;
}
.cl-kayit-badge.draft { background: rgba(100,116,139,.15); border: 1px solid #334155; color: #94a3b8; }
.cl-kayit-badge.finished { background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.35); color: #4ade80; }
.cl-kayit-acts { display: flex; gap: 6px; }
.cl-kayit-btn {
  padding: 5px 12px; border-radius: 8px; font-size: .76rem; cursor: pointer;
  border: 1px solid #334155; background: #1e293b; color: #f1f5f9;
}
.cl-kayit-btn:hover { background: #334155; }
.cl-kayit-btn.primary { background: #1d4ed8; border-color: #3b82f6; color: #fff; }
.cl-kayit-btn.primary:hover { background: #1e40af; }
.cl-kayit-btn.danger { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.4); color: #f87171; }
.cl-kayit-btn.ghost { background: transparent; }
.cl-kayit-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
html[data-theme="light"] .cl-kayit-empty,
html[data-theme="light"] .cl-kayit-row { background: #fff; border-color: #cbd5e1; }
html[data-theme="light"] .cl-kayit-btn { background: #f1f5f9; color: #0f172a; border-color: #cbd5e1; }
html[data-theme="light"] .cl-kayit-btn.primary { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
