/* ==========================================================================
   PERA FESTIVAL — COMPONENTS
   Button · Input · Badge · Card · Alert · Toast · Modal · Drawer · Tabs
   Stepper · Dropzone · Table · Skeleton · EmptyState · Pagination
   ========================================================================== */

/* ============================ BUTTON ============================ */
.btn {
  --btn-h: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: var(--btn-h); padding: 0 var(--btn-px, var(--space-4));
  border-radius: var(--radius-btn, var(--radius-sm)); border: 1px solid transparent;
  font-family: var(--font-ui-chrome, var(--font-ui)); font-size: var(--fs-btn, var(--fs-body-sm)); font-weight: 600; letter-spacing: -.005em;
  white-space: nowrap; position: relative; isolation: isolate;
  box-shadow: var(--shadow-btn, none);
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast), color var(--dur-fast), transform var(--dur-instant), box-shadow var(--dur-fast);
}
.btn::before { content:""; position:absolute; inset:-6px; z-index:-1; } /* dokunma hedefi */
.btn:active { transform: scale(.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn[aria-busy="true"] { pointer-events: none; }

.btn-sm { --btn-h: 32px; padding: 0 var(--space-3); font-size: var(--fs-caption); }
.btn-md { --btn-h: 40px; }
.btn-lg { --btn-h: 48px; padding: 0 var(--space-5); font-size: var(--fs-body); }
.btn-xl { --btn-h: 56px; padding: 0 var(--space-6); font-size: var(--fs-body-lg); border-radius: var(--radius-md); }
.btn-block { width: 100%; }

.btn-primary { background: var(--btn-bg, var(--festival-primary)); color: var(--btn-fg, var(--festival-on-primary)); }
.btn-primary:hover { background: var(--btn-bg-hover, var(--festival-primary-strong)); }

.btn-brass { background: var(--brass-500); color: var(--ink-950); }
.btn-brass:hover { background: var(--brass-400); }

.btn-secondary { background: var(--surface); color: var(--ink-900); border-color: var(--ink-200); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--ink-300); }

.btn-ghost { background: transparent; color: var(--ink-700); }
.btn-ghost:hover { background: var(--surface-3); }

.btn-danger { background: var(--danger-600); color: #fff; }
.btn-danger:hover { background: var(--danger-700); }

.btn-outline-light { border-color: rgba(255,255,255,.35); color: #fff; background: rgba(255,255,255,.04); backdrop-filter: blur(6px); }
.btn-outline-light:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.6); }

.btn-icon { width: var(--btn-h); padding: 0; }

.spinner {
  width: 1em; height: 1em; border-radius: 50%; flex: none;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================ BADGE ============================ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 var(--space-2); border-radius: var(--radius-full);
  font-size: var(--fs-micro); font-weight: 600; letter-spacing: .01em; white-space: nowrap;
  background: var(--surface-3); color: var(--ink-600);
}
.badge-dot::before { content:""; width:6px; height:6px; border-radius:50%; background: currentColor; }
.badge-success { background: var(--success-100); color: var(--success-700); }
.badge-warning { background: var(--warning-100); color: var(--warning-700); }
.badge-danger  { background: var(--danger-100);  color: var(--danger-700); }
.badge-info    { background: var(--info-100);    color: var(--info-700); }
.badge-live    { background: var(--badge-live-bg); color: var(--badge-live-fg); }
.badge-lock    { background: var(--chip-bg); color: #fff; }
.badge-brass   { background: var(--brass-100); color: var(--brass-800); }
.badge-outline { background: transparent; border: 1px solid var(--ink-200); color: var(--ink-600); }

/* ============================ CARD ============================ */
.card-x {
  background: var(--surface); border: var(--border-subtle); border-radius: var(--radius-md);
  overflow: hidden; transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), border-color var(--dur-base);
}
.card-x:hover { box-shadow: var(--shadow-md); border-color: var(--ink-200); }
.card-pad { padding: var(--space-card, var(--space-5)); }

/* ============================ INPUT ============================ */
.field { margin-bottom: var(--space-5); }
.field > label, .label {
  display: block; font-size: var(--fs-body-sm); font-weight: 600;
  color: var(--ink-900); margin-bottom: var(--space-2);
}
.label .req { color: var(--danger-600); margin-left: 2px; }
.help { display: block; font-size: var(--fs-caption); color: var(--text-secondary); margin-top: var(--space-2); }
.err { display: none; font-size: var(--fs-caption); color: var(--danger-700); margin-top: var(--space-2); align-items: flex-start; gap: 6px; }
.err::before { content: "⚠"; }
.field.has-error .err { display: flex; }
.field.has-error .help { display: none; }

.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: var(--space-2) var(--space-3);
  background: var(--surface); border: 1px solid var(--ink-200); border-radius: var(--radius-input, var(--radius-sm));
  font-size: 16px; color: var(--ink-900);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast), background var(--dur-fast);
}
@media (max-width: 575px) { .input, .select, .textarea { min-height: 52px; } }
.input::placeholder, .textarea::placeholder { color: var(--ink-400); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-300); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--festival-primary); box-shadow: 0 0 0 3px var(--festival-ring); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--surface-2); color: var(--ink-400); cursor: not-allowed; }
.textarea { min-height: 104px; resize: vertical; line-height: 1.55; }
.select { appearance: none; padding-right: var(--space-8);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23646B77' stroke-width='1.6' d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right var(--space-3) center; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--danger-600); }
.field.is-valid .input { border-color: var(--success-200); }

.input-group { display: flex; gap: var(--space-2); }
.input-group .select { flex: 0 0 118px; }
.duration-group { display: flex; align-items: center; gap: var(--space-2); }
.duration-group .input { width: 76px; text-align: center; font-variant-numeric: tabular-nums; }
.duration-group span { color: var(--text-secondary); font-size: var(--fs-caption); }

/* Checkbox / radio */
.check { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3);
  border: 1px solid var(--ink-150); border-radius: var(--radius-sm); cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast); }
.check:hover { border-color: var(--ink-300); background: var(--surface-2); }
.check input { margin: 2px 0 0; width: 18px; height: 18px; flex: none; accent-color: var(--festival-primary); }
.check-plain { border: 0; padding: 0; background: none; }
.check-plain:hover { background: none; }
.check-body strong { display: block; font-weight: 600; font-size: var(--fs-body-sm); }
.check-body span { font-size: var(--fs-caption); color: var(--text-secondary); }
.check.is-selected { border-color: var(--festival-primary); background: var(--festival-primary-soft); }

/* Segmented */
.segmented {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--surface-3); border-radius: var(--radius-full);
  /* Dar ekranda seçenekler sığmazsa SAYFAYI değil kendini kaydırır. */
  max-width: 100%; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.segmented::-webkit-scrollbar { display: none; }
.segmented button { flex: 0 0 auto; }
.segmented button {
  padding: 7px var(--space-4); border-radius: var(--radius-full);
  font-size: var(--fs-body-sm); font-weight: 600; color: var(--ink-600);
  transition: background var(--dur-fast), color var(--dur-fast);
}
.segmented button[aria-selected="true"] { background: var(--surface); color: var(--ink-900); box-shadow: var(--shadow-xs); }

/* Combobox */
.combo { position: relative; }
.combo-list {
  position: absolute; z-index: var(--z-dropdown); top: calc(100% + 4px); left: 0; right: 0;
  background: var(--surface); border: var(--border-default); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); max-height: 260px; overflow-y: auto; padding: var(--space-1);
}
.combo-list[hidden] { display: none; }
.combo-list li { list-style: none; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); cursor: pointer; font-size: var(--fs-body-sm); }
.combo-list li:hover, .combo-list li.is-active { background: var(--festival-primary-soft); }
.combo-list li.combo-new { color: var(--festival-primary); font-weight: 600; border-top: var(--border-subtle); margin-top: var(--space-1); }
/* FAZ 39 v2 / FAZ 40 — bilgilendirici, TIKLANAMAZ satır (örn. "Şehir
   bulunamadı." / "Eser bulunamadı.") — combo-new'dan FARKLI olarak
   tıklama davranışı yoktur, bu yüzden görsel olarak da pasif görünür. */
.combo-list li.combo-empty { color: var(--ink-400); cursor: default; font-style: italic; }
.combo-list li.combo-empty:hover { background: transparent; }
.combo-list ul { margin: 0; padding: 0; }

/* ============================ ALERT ============================ */
.alert {
  display: flex; gap: var(--space-3); padding: var(--space-4);
  border-radius: var(--radius-sm); border-left: 4px solid var(--info-600);
  background: var(--info-100); color: var(--info-700); font-size: var(--fs-body-sm);
}
.alert strong { display: block; margin-bottom: 2px; }
.alert-success { background: var(--success-100); border-color: var(--success-600); color: var(--success-700); }
.alert-warning { background: var(--warning-100); border-color: var(--warning-600); color: var(--warning-700); }
.alert-danger  { background: var(--danger-100);  border-color: var(--danger-600);  color: var(--danger-700); }
.alert-neutral { background: var(--surface-2); border-color: var(--ink-300); color: var(--ink-700); }

/* ============================ TOAST ============================ */
.toast-host { position: fixed; z-index: var(--z-toast); right: var(--space-6); top: var(--space-6); display: flex; flex-direction: column; gap: var(--space-2); pointer-events: none; }
@media (max-width: 575px) { .toast-host { right: var(--space-3); left: var(--space-3); top: auto; bottom: calc(var(--space-3) + env(safe-area-inset-bottom)); } }
.toast {
  pointer-events: auto; display: flex; align-items: flex-start; gap: var(--space-3);
  min-width: 260px; max-width: 380px; padding: var(--space-3) var(--space-4);
  background: var(--chip-bg); color: #fff; border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  font-size: var(--fs-body-sm); animation: toast-in var(--dur-base) var(--ease-out);
  /* REV-19.1.2 — Bootstrap 5 ile çakışma: Bootstrap .toast { width: 350px; border: … }
     tanımlar; biz tanımlamadığımız için onun değerleri kalıyordu. */
  width: auto; border: 0;
}
/* REV-19.1.2 — Bootstrap 5: .toast:not(.show) { display: none }  (özgüllük 0,2,0)
   Bizim toast'larımızda .show sınıfı YOKTUR; bu kural canlıda HER toast'ı gizliyordu —
   hataların "sessiz" görünmesinin nedeni buydu. Aynı özgüllükte ve daha sonra
   geldiği için bu satır kazanır. Tasarım değeri değişmez (display: flex zaten). */
.toast-host .toast, .toast-host .toast:not(.show) { display: flex; }
.toast .ic { flex: none; }
.toast-success .ic { color: #6EE7A8; }
.toast-danger .ic { color: #FCA5A5; }
.toast button { margin-left: auto; color: rgba(255,255,255,.6); }
.toast.is-out { animation: toast-out var(--dur-base) var(--ease-in-out) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-6px); } }

/* ============================ MODAL / DRAWER ============================ */
.overlay { position: fixed; inset: 0; background: rgba(10,11,13,.45); z-index: var(--z-modal); display: grid; place-items: center; padding: var(--space-4); animation: fade var(--dur-base) var(--ease-out); }
.overlay[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
/* REV-19.1.2 — KÖK NEDEN: BOOTSTRAP 5 ".modal" ÇAKIŞMASI
   Sayfalar bizim CSS'ten önce Bootstrap 5.3.3'ü yüklüyor. Bootstrap'in .modal kuralı:
     position:fixed; top:0; left:0; z-index:1055; display:none; width:100%; height:100%
   Bu blok display / position / top / left / height tanımlamadığı için o özellikler
   Bootstrap'ten geliyordu: modal DOM'a ekleniyor ama display:none kalıyordu (canlı tanı:
   display none · z-index 1055 · 0×0). Overlay ise Bootstrap'te olmadığı için görünüyordu —
   "koyu ekran var, modal yok". Aşağıdaki satır Bootstrap'in dokunduğu her özelliği
   AÇIKÇA bizim tasarımımıza sabitler; seçici ve özgüllük aynı, yalnızca eksik olan
   özellikler yazıldı. Tasarım değerleri değişmedi. */
.modal {
  display: block; position: relative; top: auto; left: auto; height: auto; z-index: auto; outline: 0;
  width: min(560px, 100%); max-height: 88vh; overflow: auto; background: var(--surface);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); animation: modal-in var(--dur-medium) var(--ease-out);
}
.modal-lg { width: min(880px, 100%); }
@keyframes modal-in { from { opacity: 0; transform: scale(.96); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-5); border-bottom: var(--border-subtle); }
.modal-body { padding: var(--space-5); }
.modal-foot { display: flex; justify-content: flex-end; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-top: var(--border-subtle); background: var(--surface-2); }
@media (max-width: 575px) { .overlay { padding: 0; align-items: flex-end; } .modal { max-height: 92vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; animation: sheet-in var(--dur-medium) var(--ease-out); } }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } }

.drawer-host { position: fixed; inset: 0; z-index: var(--z-drawer); pointer-events: none; }
.drawer-host[hidden] { display: none; }
.drawer {
  pointer-events: auto; position: absolute; right: 0; top: 0; bottom: 0;
  width: clamp(480px, 42%, 720px); background: var(--surface); box-shadow: var(--shadow-xl);
  display: flex; flex-direction: column; animation: drawer-in var(--dur-medium) var(--ease-out);
}
@keyframes drawer-in { from { transform: translateX(100%); } }
@media (max-width: 767px) { .drawer { width: 100%; animation: sheet-in var(--dur-medium) var(--ease-out); } }

/* ============================ TABS ============================ */
.tabs { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--ink-150); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  position: relative; padding: var(--space-3) var(--space-4); white-space: nowrap;
  font-size: var(--fs-body-sm); font-weight: 600; color: var(--ink-500);
  transition: color var(--dur-fast);
}
.tabs button::after { content: ""; position: absolute; left: var(--space-3); right: var(--space-3); bottom: -1px; height: 2px; background: var(--festival-primary); border-radius: 2px; opacity: 0; transition: opacity var(--dur-base) var(--ease-out); }
.tabs button[aria-selected="true"] { color: var(--ink-900); }
.tabs button[aria-selected="true"]::after { opacity: 1; }

/* ============================ ACCORDION ============================ */
.acc { border-top: var(--border-subtle); }
.acc-item { border-bottom: var(--border-subtle); }
.acc-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) 0; text-align: left; font-weight: 600; font-size: var(--fs-body); }
.acc-btn .chev { transition: transform var(--dur-base) var(--ease-out); color: var(--ink-400); }
.acc-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-medium) var(--ease-out); }
.acc-panel > div { overflow: hidden; }
.acc-item.is-open .acc-panel { grid-template-rows: 1fr; }
.acc-panel p { color: var(--text-secondary); padding-bottom: var(--space-4); margin: 0; }

/* ============================ STEPPER ============================ */
.stepper { display: flex; flex-direction: column; gap: 2px; }
.stepper button {
  display: flex; align-items: center; gap: var(--space-3); width: 100%; text-align: left;
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm);
  font-size: var(--fs-body-sm); color: var(--ink-500); transition: background var(--dur-fast), color var(--dur-fast);
}
.stepper button:hover:not(:disabled) { background: var(--surface-2); }
.stepper button:disabled { opacity: .55; cursor: default; }
.stepper .num {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: var(--fs-micro); font-weight: 700; border: 1px solid var(--ink-200); color: var(--ink-500); background: var(--surface);
}
.stepper .is-done .num { background: var(--success-600); border-color: var(--success-600); color: #fff; }
.stepper .is-current { color: var(--ink-900); font-weight: 600; background: var(--festival-primary-soft); }
.stepper .is-current .num { background: var(--festival-primary); border-color: var(--festival-primary); color: var(--festival-on-primary); }

.progress-dots { display: flex; align-items: center; gap: 6px; }
.progress-dots i { flex: 1; height: 4px; border-radius: 2px; background: var(--surface-3); transition: background var(--dur-base); }
.progress-dots i.is-done { background: var(--success-600); }
.progress-dots i.is-current { background: var(--festival-primary); }

.progress-bar { height: 8px; border-radius: var(--radius-full); background: var(--surface-3); overflow: hidden; }
.progress-bar > span { display: block; height: 100%; background: var(--festival-primary); border-radius: inherit; transition: width var(--dur-medium) var(--ease-out), background var(--dur-base); }
.progress-bar.is-over > span { background: var(--danger-600); }

/* ============================ DROPZONE ============================ */
.dropzone {
  display: grid; place-items: center; text-align: center; gap: var(--space-2);
  min-height: 168px; padding: var(--space-6); cursor: pointer;
  border: 2px dashed var(--ink-200); border-radius: var(--radius-md); background: var(--surface-2);
  transition: border-color var(--dur-base), background var(--dur-base), transform var(--dur-base) var(--ease-out);
}
.dropzone:hover { border-color: var(--ink-300); }
.dropzone.is-over { border-color: var(--festival-primary); background: var(--festival-primary-soft); transform: scale(1.01); }
.dropzone.is-invalid { border-color: var(--danger-600); background: var(--danger-100); }
.dropzone .dz-ic { font-size: 28px; }
.dropzone .dz-main { font-weight: 600; }
.dropzone .dz-sub { font-size: var(--fs-caption); color: var(--text-secondary); }

.file-row { display: flex; gap: var(--space-3); align-items: center; padding: var(--space-3); border: var(--border-subtle); border-radius: var(--radius-sm); background: var(--surface); }
.file-thumb { width: 56px; height: 56px; flex: none; border-radius: var(--radius-xs); background: var(--surface-3); display: grid; place-items: center; overflow: hidden; font-size: 20px; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-meta { min-width: 0; flex: 1; }
.file-meta strong { display: block; font-size: var(--fs-body-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta span { font-size: var(--fs-caption); color: var(--text-secondary); }
.file-row.is-error { border-color: var(--danger-200); background: var(--danger-100); }
.file-row.is-done .file-state { color: var(--success-600); }

/* ============================ TABLE ============================ */
.table-x { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-body-sm); }
.table-x th {
  position: sticky; top: 0; z-index: var(--z-sticky); background: var(--surface-2);
  font-size: var(--fs-micro); font-weight: 600; letter-spacing: .04em; color: var(--ink-500);
  text-align: left; padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--ink-150); white-space: nowrap;
}
.table-x td { padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--ink-150); vertical-align: middle; }
.table-x tbody tr:hover { background: var(--surface-2); }
.table-x tbody tr.is-selected { background: var(--festival-primary-soft); }
.table-x .num { font-variant-numeric: tabular-nums; }

/* ============================ SKELETON / EMPTY ============================ */
.skel { position: relative; overflow: hidden; background: var(--surface-3); border-radius: var(--radius-xs); height: 12px; }
.skel::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

.empty { text-align: center; padding: var(--space-16) var(--space-6); color: var(--text-secondary); }
.empty .ic { font-size: 32px; margin-bottom: var(--space-3); opacity: .7; }
.empty h3 { color: var(--ink-900); }

/* ============================ PAGINATION ============================ */
.pager { display: flex; align-items: center; gap: var(--space-1); }
.pager button {
  min-width: 32px; height: 32px; padding: 0 var(--space-2); border-radius: var(--radius-sm);
  font-size: var(--fs-body-sm); color: var(--ink-600); border: 1px solid transparent;
  font-variant-numeric: tabular-nums;
}
.pager button:hover { background: var(--surface-3); }
.pager button[aria-current="page"] { background: var(--festival-primary); color: var(--festival-on-primary); }
.pager button:disabled { opacity: .4; pointer-events: none; }

/* ============================ TOOLTIP ============================ */
[data-tip] { position: relative; }
[data-tip]:hover::after, [data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
  background: var(--chip-bg); color: #fff; font-size: var(--fs-micro); font-weight: 500;
  padding: 4px 8px; border-radius: var(--radius-xs); white-space: nowrap; z-index: var(--z-dropdown);
  animation: fade var(--dur-base) var(--ease-out);
}

/* ============================ CHIP ============================ */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 var(--space-3);
  border-radius: var(--radius-full); background: var(--surface-3); font-size: var(--fs-caption); font-weight: 500; }
.chip button { color: var(--ink-500); line-height: 1; }
.chip button:hover { color: var(--danger-600); }
.chip-active { background: var(--festival-primary-soft); color: var(--festival-primary); }

/* İki sütunlu alan satırı (form + admin ortak) */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 575px) { .field-row { grid-template-columns: 1fr; } }

/* ==========================================================================
   REPEATER (Tekrarlanan Grup) — hem sihirbaz hem Form Builder önizlemesi
   ========================================================================== */
/* Repeater — kamu tarafı bileşeni */
.rep .rep-rows { display: grid; gap: var(--space-2); margin-bottom: var(--space-2); }
.rep-row {
  display: flex; align-items: flex-start; gap: var(--space-2);
  background: var(--surface-2); border: var(--border-subtle);
  border-radius: var(--radius-sm); padding: var(--space-2) var(--space-3);
}
.rep-n {
  width: 22px; height: 22px; flex: none; margin-top: 18px;
  border-radius: 50%; background: var(--chip-bg); color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
}
.rep-cells { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.rep-cell { flex: 1 1 160px; min-width: 0; display: grid; gap: 3px; }
.rep-cell > span { font-size: var(--fs-micro); color: var(--ink-600); font-weight: 600; letter-spacing: .02em; }
.rep-x {
  flex: none; margin-top: 18px; width: 26px; height: 26px; border: 0; background: transparent;
  color: var(--ink-500); cursor: pointer; border-radius: var(--radius-sm); line-height: 1;
}
.rep-x:hover { background: var(--danger-50, #fdeceb); color: var(--danger-600); }
.rep-count { margin-left: var(--space-2); }
.rep.has-error .rep-row { border-color: var(--danger-600); }
@media (max-width: 560px) {
  .rep-cell { flex: 1 1 100%; }
  .rep-n, .rep-x { margin-top: 0; }
  .rep-row { flex-wrap: wrap; }
}

/* ==========================================================================
   TEMA DEĞİŞTİRİCİ (Rev.6)
   ========================================================================== */
.theme-toggle {
  display: inline-grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: transparent; cursor: pointer;
  color: var(--text-2); font-size: 15px; line-height: 1;
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.theme-toggle:hover { background: var(--surface-3); color: var(--text); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.site-header .theme-toggle { color: var(--ink-500); }
.site-header .theme-toggle:hover { color: var(--ink-900); }

/* Merkezi marka görseli — logoHTML() ile üretilen <img> (Rev.6) */
.brand-mark-img {
  width: 34px; height: 34px; flex: none; border-radius: 6px;
  object-fit: contain; display: block; background: transparent;
}
.site-header .brand-mark-img { width: 38px; height: 38px; }
.a-brand .brand-mark-img { width: 34px; height: 34px; }
.site-footer .brand-mark-img { width: 34px; height: 34px; }
