/* Kart bileseni - mac-card, detay yerlesimi (doc-header/doc-grid/stat-strip), komponentler (timeline/info-box/quick-actions/sys-info/reason-list), panel-tinted */

/* ============================================================
   10. CARDS
   ============================================================ */
.mac-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.mac-card .card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border-soft);
  gap: 12px;
}
.mac-card .card-title {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--muted); margin: 0;
}
.mac-card .card-sub {
  font-size: 12px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.mac-card .card-link {
  font-size: 12px; color: var(--mac-blue); cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px; font-weight: 500;
}
.mac-card .card-link:hover { text-decoration: underline; }
.mac-card .card-body { padding: 18px 20px; }
.mac-card .card-body.tight { padding: 0; }

/* ============================================================
   13. DETAY LAYOUT (doc-header, doc-grid, stat-strip)
   ============================================================ */
.doc-header {
  display: grid; grid-template-columns: 1fr auto;
  gap: 32px; align-items: center;
  padding: 20px 0 24px;
  border-bottom: 1px solid var(--border-soft);
}
.doc-id-block { display: flex; align-items: center; gap: 16px; min-width: 0; }
.doc-icon-lg {
  width: 48px; height: 48px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.doc-icon-lg.orange { background: var(--orange-soft); color: var(--orange); }
.doc-icon-lg.blue   { background: rgba(0,122,255,0.1); color: var(--mac-blue); }
.doc-icon-lg.green  { background: var(--green-bg); color: var(--green-dark); }
.doc-icon-lg.purple { background: var(--purple-bg); color: var(--purple-dark); }
.doc-icon-lg.red    { background: var(--red-bg); color: var(--red-dark); }
.doc-icon-lg.yellow { background: var(--yellow-bg); color: var(--yellow-dark); }
.doc-id-text { min-width: 0; }
.doc-no-big {
  font-size: 22px; font-weight: 600; letter-spacing: -0.3px;
  color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.2;
}
.doc-chips {
  display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted);
}
.doc-chips .static-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 12px;
  background: rgba(0,0,0,0.05); color: var(--muted); font-weight: 500;
}
.doc-chips .ted-link-chip {
  display: inline-flex; align-items: center; gap: 4px;
  color: var(--mac-blue); font-weight: 500; cursor: pointer;
}
.doc-chips .ted-link-chip:hover { text-decoration: underline; }
.doc-chips .ted-link-chip i { font-size: 10px; }
.doc-chips .meta { color: var(--muted); }

.stat-strip {
  display: flex; align-items: stretch;
  background: var(--gray-surface); border-radius: 12px; padding: 12px 4px;
}
.stat {
  padding: 0 22px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 110px; position: relative;
}
.stat + .stat::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px;
  width: 1px; background: var(--border-soft);
}
.stat-k {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--muted); margin-bottom: 4px; white-space: nowrap;
}
.stat-v {
  font-size: 17px; font-weight: 600; color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }

.doc-grid {
  margin-top: 20px;
  display: grid; grid-template-columns: 1fr 380px;
  gap: 20px; align-items: start;
}
.doc-grid .left, .doc-grid .right {
  display: flex; flex-direction: column; gap: 16px;
}

/* ============================================================
   14. COMPONENTS (timeline, info-box, quick-actions, sys-info, reason-list)
   ============================================================ */

/* Timeline */
.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px;
  width: 1px; background: var(--border);
}
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -19px; top: 4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gray-surface); border: 2px solid var(--border);
}
.tl-dot.done    { background: var(--green); border-color: var(--green); box-shadow: 0 0 0 3px rgba(52,199,89,0.2); }
.tl-dot.active  { background: var(--yellow); border-color: var(--yellow); box-shadow: 0 0 0 3px rgba(255,189,46,0.25); }
.tl-dot.blue    { background: var(--mac-blue); border-color: var(--mac-blue); box-shadow: 0 0 0 3px rgba(0,122,255,0.2); }
.tl-dot.red     { background: var(--red); border-color: var(--red); box-shadow: 0 0 0 3px rgba(255,59,48,0.2); }
.tl-dot.purple  { background: var(--purple); border-color: var(--purple); box-shadow: 0 0 0 3px rgba(175,82,222,0.2); }
.tl-dot.pending { background: #fff; border-color: var(--border-soft); }
.tl-meta { font-size: 11px; color: var(--muted); }
.tl-title { font-size: 13px; font-weight: 500; color: var(--text); margin-top: 2px; }
.tl-body { font-size: 12px; color: var(--muted); margin-top: 2px; }
.tl-item.pending .tl-title { color: var(--muted); font-weight: 400; }

/* Info box */
.info-box {
  margin-top: 14px;
  background: rgba(0,122,255,0.06);
  border: 1px solid rgba(0,122,255,0.14);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12px; color: #003D80; line-height: 1.5;
}
.info-box i.bi-info-circle-fill { color: var(--mac-blue); font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.info-box.warn  { background: rgba(255,189,46,0.12); border-color: rgba(255,189,46,0.32); color: var(--yellow-dark); }
.info-box.warn  i { color: var(--yellow-dark); }
.info-box.danger { background: rgba(255,59,48,0.08); border-color: rgba(255,59,48,0.20); color: var(--red-dark); }
.info-box.danger i { color: var(--red); }

/* Reason / pill list */
.reason-list { display: flex; flex-direction: column; gap: 10px; }
.reason-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 10px;
  background: var(--gray-surface);
}
.reason-icon {
  width: 32px; height: 32px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.reason-icon.yellow { background: var(--yellow-bg); color: var(--yellow-dark); }
.reason-icon.red    { background: var(--red-bg); color: var(--red-dark); }
.reason-icon.green  { background: var(--green-bg); color: var(--green-dark); }
.reason-icon.blue   { background: rgba(0,122,255,0.12); color: var(--mac-blue); }
.reason-text { flex: 1; min-width: 0; }
.reason-text .rt-title { font-size: 13px; font-weight: 500; color: var(--text); }
.reason-text .rt-sub { font-size: 11px; color: var(--muted); margin-top: 2px; font-variant-numeric: tabular-nums; }

/* Quick actions */
.quick-actions { display: flex; flex-direction: column; gap: 6px; }
.qa-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 8px;
  background: transparent; border: 1px solid transparent;
  font-size: 13px; color: var(--text);
  font-family: var(--font); text-align: left; cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.qa-btn:hover { background: var(--gray-surface); border-color: var(--border-soft); }
.qa-btn i { font-size: 14px; color: var(--muted); width: 18px; text-align: center; flex-shrink: 0; }
.qa-btn.danger { color: var(--red-dark); }
.qa-btn.danger i { color: var(--red); }

/* System info */
.sys-info { display: flex; flex-direction: column; gap: 10px; font-size: 12px; }
.sys-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; padding: 4px 0;
}
.sys-row + .sys-row { border-top: 1px solid var(--border-soft); padding-top: 10px; }
.sys-key { color: var(--muted); }
.sys-val { color: var(--text); font-weight: 500; text-align: right; }
.sys-val.mono { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.sys-val .ava-mini { display: inline-flex; align-items: center; gap: 6px; }
.sys-val .ava-mini .ava-cir {
  width: 18px; height: 18px; border-radius: 50%;
  background: linear-gradient(135deg, #007AFF, #5856D6);
  color: #fff; font-size: 9px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ============================================================
   34. PANEL-TINTED — kategorize edilmiş alan ayrımı
   Sayfada birden çok mac-card varsa, her birine farklı kategori
   (renk) atayarak görsel ayrım yaratır. 11-12-BirimSuite test'inden
   DNA'ya alındı; her modülde uygulanabilir.

   Kullanım:
     <div class="mac-card panel-tinted blue">  ...arama / keşif...
     <div class="mac-card panel-tinted green"> ...seçim / sonuç...
     <div class="mac-card panel-tinted purple">...rapor / özet...
     <div class="mac-card panel-tinted orange">...uyarı / aksiyon...
     <div class="mac-card panel-tinted gray">  ...meta / log...
   ============================================================ */

.panel-tinted {
  border-width: 2px !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.panel-tinted.blue {
  border-color: rgba(0, 122, 255, 0.22) !important;
  background:
    linear-gradient(180deg, rgba(0, 122, 255, 0.05) 0%, rgba(0, 122, 255, 0) 90px),
    var(--surface);
}
.panel-tinted.green {
  border-color: rgba(52, 199, 89, 0.22) !important;
  background:
    linear-gradient(180deg, rgba(52, 199, 89, 0.05) 0%, rgba(52, 199, 89, 0) 90px),
    var(--surface);
}
.panel-tinted.purple {
  border-color: rgba(175, 82, 222, 0.22) !important;
  background:
    linear-gradient(180deg, rgba(175, 82, 222, 0.05) 0%, rgba(175, 82, 222, 0) 90px),
    var(--surface);
}
.panel-tinted.orange {
  border-color: rgba(255, 149, 0, 0.22) !important;
  background:
    linear-gradient(180deg, rgba(255, 149, 0, 0.05) 0%, rgba(255, 149, 0, 0) 90px),
    var(--surface);
}
.panel-tinted.red {
  border-color: rgba(255, 59, 48, 0.22) !important;
  background:
    linear-gradient(180deg, rgba(255, 59, 48, 0.05) 0%, rgba(255, 59, 48, 0) 90px),
    var(--surface);
}
.panel-tinted.gray {
  border-color: var(--border-strong) !important;
  background:
    linear-gradient(180deg, var(--hover-bg) 0%, transparent 90px),
    var(--surface);
}

/* Dark mode — renk opaklığı arttırılır (koyu zemin üzerinde belirgin kalsın) */
body[data-theme="dark"] .panel-tinted.blue {
  border-color: rgba(0, 122, 255, 0.42) !important;
  background:
    linear-gradient(180deg, rgba(0, 122, 255, 0.12) 0%, rgba(0, 122, 255, 0) 90px),
    var(--surface);
}
body[data-theme="dark"] .panel-tinted.green {
  border-color: rgba(52, 199, 89, 0.40) !important;
  background:
    linear-gradient(180deg, rgba(52, 199, 89, 0.12) 0%, rgba(52, 199, 89, 0) 90px),
    var(--surface);
}
body[data-theme="dark"] .panel-tinted.purple {
  border-color: rgba(175, 82, 222, 0.42) !important;
  background:
    linear-gradient(180deg, rgba(175, 82, 222, 0.12) 0%, rgba(175, 82, 222, 0) 90px),
    var(--surface);
}
body[data-theme="dark"] .panel-tinted.orange {
  border-color: rgba(255, 149, 0, 0.42) !important;
  background:
    linear-gradient(180deg, rgba(255, 149, 0, 0.12) 0%, rgba(255, 149, 0, 0) 90px),
    var(--surface);
}
body[data-theme="dark"] .panel-tinted.red {
  border-color: rgba(255, 59, 48, 0.42) !important;
  background:
    linear-gradient(180deg, rgba(255, 59, 48, 0.12) 0%, rgba(255, 59, 48, 0) 90px),
    var(--surface);
}
body[data-theme="dark"] .panel-tinted.gray {
  border-color: rgba(255, 255, 255, 0.16) !important;
}
