/* e-İDEAL — Ortak bileşen kütüphanesi */

/* ---------- İkon varsayılanı ---------- */
svg.ic { width: 18px; height: 18px; flex: none; }
.chev { width: 18px; height: 18px; flex: none; color: var(--text-3); }
.t-xs svg.ic, .t-xxs svg.ic { width: 14px; height: 14px; }
.badge svg.ic { width: 13px; height: 13px; }

/* ---------- Kart ---------- */
.card {
  background: var(--surface);
  border: 0;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
}
:root[data-theme="dark"] .card { box-shadow: var(--sh-sm), inset 0 0 0 1px var(--line); }
.card-p { padding: var(--s4); }
.card-hd {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s3); padding: var(--s5) var(--s5) var(--s4);
}
.card-hd h4, .card-hd h3 { letter-spacing: -.01em; }
.card-bd { padding: 0 var(--s5) var(--s5); }
/* Başlıksız kartta gövde tek başına: üst boşluk da olmalı */
.card > .card-bd:first-child { padding-top: var(--s5); }
.card-hd + .card-bd { padding-top: 0; }
.card-ft {
  padding: var(--s4) var(--s5); border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
}
.card-hover { transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease); }
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--sh-md); }

/* ---------- Buton ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  height: 40px; padding: 0 var(--s4);
  border-radius: var(--r-sm); border: 1px solid transparent;
  font-size: var(--fs-md); font-weight: 600; white-space: nowrap;
  transition: background var(--dur-1), color var(--dur-1), border-color var(--dur-1),
              transform var(--dur-1), box-shadow var(--dur-1);
  user-select: none;
}
.btn:active { transform: scale(.975); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn .ic { width: 18px; height: 18px; flex: none; }

.btn-primary { background: var(--brand); color: var(--text-on-brand); box-shadow: var(--sh-brand); }
.btn-primary:hover { background: var(--brand-strong); }
.btn-dark { background: var(--surface-inverse); color: var(--text-inverse); }
.btn-dark:hover { opacity: .88; }
.btn-ghost { background: var(--surface-3); color: var(--text); }
.btn-ghost:hover { background: var(--line); }
.btn-outline { background: var(--surface); color: var(--text); box-shadow: var(--sh-sm); }
.btn-outline:hover { background: var(--surface-2); box-shadow: var(--sh-md); }
:root[data-theme="dark"] .btn-outline { box-shadow: inset 0 0 0 1px var(--line-2); }
:root[data-theme="dark"] .btn-outline:hover { box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-soft:hover { background: var(--brand); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.92); }
/* Referanstaki "Reddet" düğmesi: beyaz zemin, kırmızı çerçeve ve metin */
.btn-outline-brand { background: var(--surface); color: var(--brand); border-color: var(--brand); box-shadow: none; }
.btn-outline-brand:hover { background: var(--brand-soft); }
.btn-quiet { background: transparent; color: var(--text-2); }
.btn-quiet:hover { background: var(--surface-3); color: var(--text); }

.btn-sm { height: 32px; padding: 0 var(--s3); font-size: var(--fs-sm); border-radius: var(--r-xs); }
.btn-sm .ic { width: 15px; height: 15px; }
.btn-lg { height: 50px; padding: 0 var(--s6); font-size: var(--fs-lg); border-radius: var(--r-md); }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.btn-icon.btn-lg { width: 50px; }

/* ---------- Chip / Badge ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 var(--s3);
  border-radius: var(--r-pill); background: var(--surface-3); color: var(--text-2);
  font-size: var(--fs-sm); font-weight: 600; white-space: nowrap;
  border: 1px solid transparent; transition: all var(--dur-1);
}
.chip:hover { background: var(--line); }
.chip[aria-pressed="true"], .chip.on {
  background: var(--surface-inverse); color: var(--text-inverse); box-shadow: var(--sh-sm);
}
.chip-brand[aria-pressed="true"], .chip-brand.on { background: var(--surface-inverse); color: var(--text-inverse); }
.chip .ic { width: 14px; height: 14px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: var(--r-pill);
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .01em; white-space: nowrap;
  background: var(--neutral-soft); color: var(--text-2);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge-ok      { background: var(--success-soft); color: var(--success); }
.badge-warn    { background: var(--warning-soft);  color: var(--warning); }
.badge-danger  { background: var(--danger-soft);   color: var(--danger); }
.badge-info    { background: var(--info-soft);     color: var(--info); }
.badge-brand   { background: var(--brand-soft);    color: var(--brand); }
.badge-solid   { background: var(--brand); color: #fff; }
.badge-lg { padding: 5px 12px; font-size: var(--fs-sm); }

.count-badge {
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 99px; background: var(--brand); color: #fff;
  font-size: var(--fs-xxs); font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .lbl {
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-2);
}
.field .req { color: var(--brand); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 12px var(--s4);
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font-size: var(--fs-md); transition: border-color var(--dur-1), box-shadow var(--dur-1);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-strong); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: var(--ring);
}
/* Dolu alan referansta kırmızı çerçeveyle vurgulanır */
.field.filled .input, .field.filled .select { border-color: var(--brand); }
.textarea { min-height: 96px; resize: vertical; line-height: var(--lh); }
.select {
  appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23767D87' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
.field.invalid .input, .field.invalid .select, .field.invalid .textarea {
  border-color: var(--danger); background: var(--danger-soft);
}
.err-msg { font-size: var(--fs-xs); color: var(--danger); font-weight: 600; display: none; }
.field.invalid .err-msg { display: block; }
.hint { font-size: var(--fs-xs); color: var(--text-3); }

.input-icon { position: relative; }
.input-icon .ic {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--text-3); pointer-events: none;
}
.input-icon .input { padding-left: 40px; }
.input-icon .trail {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: var(--r-xs); color: var(--text-3);
}
.input-icon .trail:hover { background: var(--surface-3); color: var(--text); }

/* Onay kutusu / radyo */
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: var(--fs-sm); }
.check input { position: absolute; opacity: 0; width: 0; height: 0; }
.check .box {
  width: 20px; height: 20px; flex: none; margin-top: 1px;
  border: 2px solid var(--line-strong); border-radius: 6px;
  display: grid; place-items: center; transition: all var(--dur-1); background: var(--surface);
}
.check .box svg { width: 13px; height: 13px; color: #fff; opacity: 0; transform: scale(.6); transition: all var(--dur-1); }
.check input:checked + .box { background: var(--brand); border-color: var(--brand); }
.check input:checked + .box svg { opacity: 1; transform: scale(1); }
.check input:focus-visible + .box { box-shadow: var(--ring); }
.check.radio .box { border-radius: 50%; }
.check.radio input:checked + .box { background: var(--surface); border-color: var(--brand); border-width: 6px; }
.check.radio input:checked + .box svg { display: none; }

/* Anahtar */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  width: 46px; height: 27px; border-radius: 99px; background: var(--line-2);
  padding: 3px; transition: background var(--dur-2) var(--ease); flex: none;
}
.switch .thumb {
  width: 21px; height: 21px; border-radius: 50%; background: #fff;
  box-shadow: var(--sh-sm); transition: transform var(--dur-2) var(--ease);
}
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track .thumb { transform: translateX(19px); }
.switch input:focus-visible + .track { box-shadow: var(--ring); }

/* Segment kontrol */
.segment {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--surface-3); border-radius: var(--r-sm);
}
.segment button {
  padding: 7px var(--s4); border-radius: 8px;
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-2);
  transition: all var(--dur-1);
}
.segment button:hover { color: var(--text); }
.segment button[aria-selected="true"] {
  background: var(--brand); color: #fff; box-shadow: var(--sh-xs);
}

/* ---------- Rol kartı ---------- */
.role-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s2); }
.role-card {
  display: flex; align-items: center; gap: 11px; padding: 13px var(--s4); border-radius: var(--r-md);
  border: 0; background: var(--surface); text-align: left; box-shadow: var(--sh-sm);
  transition: all var(--dur-2) var(--ease); font-size: var(--fs-sm); font-weight: 600;
}
.role-card:hover { box-shadow: var(--sh-md); transform: translateY(-1px); }
.role-card[aria-pressed="true"] { background: var(--brand); color: #fff; box-shadow: var(--sh-brand); }
.role-card[aria-pressed="true"] .ic-b { background: rgba(255,255,255,.22); color: #fff; }
.role-card .ic-b { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
                   background: var(--surface-3); color: var(--text-2); flex: none; }
.role-card[aria-pressed="true"] .ic-b { background: var(--brand); color: #fff; }
.role-card .ic-b svg { width: 15px; height: 15px; }

/* Seçilebilir etiket çipi — referans "Teknik ✓ / Acil ✓" */
.pick-chip {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 var(--s4);
  border-radius: var(--r-sm); border: 1.5px solid var(--line-2); background: var(--surface);
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); transition: all var(--dur-1);
}
.pick-chip:hover { border-color: var(--line-strong); }
.pick-chip .tick { width: 17px; height: 17px; border-radius: 50%; display: none; place-items: center;
                   background: var(--brand); color: #fff; }
.pick-chip .tick svg { width: 11px; height: 11px; stroke-width: 3.4; }
.pick-chip[aria-pressed="true"] { border-color: var(--brand); color: var(--brand); background: var(--brand-softer); }
.pick-chip[aria-pressed="true"] .tick { display: grid; }

/* ---------- Sekmeler ---------- */
.tabs { display: flex; gap: var(--s5); border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button {
  position: relative; padding: 12px 0 13px; font-size: var(--fs-md); font-weight: 600;
  color: var(--text-3); white-space: nowrap; transition: color var(--dur-1);
}
.tabs button:hover { color: var(--text-2); }
.tabs button[aria-selected="true"] { color: var(--brand); }
.tabs button[aria-selected="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--brand); border-radius: 2px 2px 0 0;
}

/* ---------- Akordiyon ---------- */
.acc { border: 0; border-radius: var(--r-md); overflow: hidden; background: var(--surface); box-shadow: var(--sh-sm); }
.acc + .acc { margin-top: var(--s2); }
.acc-hd {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: var(--s3); padding: var(--s4); text-align: left; font-weight: 600;
}
.acc-hd:hover { background: var(--surface-2); }
.acc-hd .chev { transition: transform var(--dur-2) var(--ease); color: var(--text-3); }
.acc[open] .acc-hd .chev, .acc.open .acc-hd .chev { transform: rotate(180deg); }
.acc-bd { padding: 0 var(--s4) var(--s4); color: var(--text-2); font-size: var(--fs-sm); }

/* ---------- Avatar ---------- */
.avatar {
  border-radius: 50%; display: grid; place-items: center; flex: none;
  font-weight: 700; color: #fff; letter-spacing: .01em; overflow: hidden;
  width: 40px; height: 40px; font-size: var(--fs-sm); user-select: none;
  position: relative; background: var(--surface-3);
}
/* Fotoğraflı avatar: görsel yüklenemezse baş harflere düşer */
.avatar.has-photo > i { display: none; }
.avatar > i { font-style: normal; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar:not(.has-photo) > i {
  display: grid; place-items: center; width: 100%; height: 100%;
  background: var(--surface-inverse); color: var(--text-inverse);
}
.avatar-xs { width: 24px; height: 24px; font-size: var(--fs-xxs); }
.avatar-sm { width: 32px; height: 32px; font-size: var(--fs-xs); }
.avatar-lg { width: 56px; height: 56px; font-size: var(--fs-lg); }
.avatar-xl { width: 76px; height: 76px; font-size: var(--fs-2xl); }
.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -8px; border: 2px solid var(--surface); }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* ---------- Durum noktası ---------- */
.pulse-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex: none; }
.pulse-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 2px solid var(--success); opacity: .5; animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse { 0%{transform:scale(.6);opacity:.7} 100%{transform:scale(1.5);opacity:0} }

/* ---------- İlerleme ---------- */
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress + .t-xs, .progress + p { margin-top: 8px; }
.progress > i { display: block; height: 100%; border-radius: 99px; background: var(--brand); transition: width var(--dur-3) var(--ease); }
.progress-sm { height: 5px; }
.progress-lg { height: 12px; }

/* ---------- Zaman çizelgesi ---------- */
.timeline { position: relative; padding-left: 30px; }
.timeline::before {
  content: ""; position: absolute; left: 11px; top: 10px; bottom: 10px;
  width: 2px; background: var(--line); border-radius: 2px;
}
.tl-item { position: relative; padding-bottom: var(--s5); }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -27px; top: 1px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); border: 2.5px solid var(--line-strong); z-index: 1;
}
.tl-item.done::before {
  background: var(--brand); border-color: var(--brand);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-size: 11px 11px; background-position: center; background-repeat: no-repeat;
}
.tl-item.active::before {
  background: var(--surface); border-color: var(--brand); border-width: 5px;
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.tl-item:not(.done):not(.active):not(.warn)::before { border-style: dashed; border-color: var(--line-2); }
.tl-item.warn::before { background: var(--warning); border-color: var(--warning); }
.tl-t { font-weight: 600; font-size: var(--fs-md); }
.tl-m { font-size: var(--fs-xs); color: var(--text-3); margin-top: 2px; }

/* ---------- Stepper ---------- */
.stepper { display: flex; align-items: center; gap: 0; overflow-x: auto; padding-bottom: 4px; }
.step { display: flex; align-items: center; gap: var(--s2); flex: none; }
.step .num {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 700;
  background: var(--surface-3); color: var(--text-3); border: 1.5px solid transparent;
}
.step.done .num { background: var(--success); color: #fff; }
.step.active .num { background: var(--brand); color: #fff; box-shadow: 0 0 0 4px var(--brand-soft); }
.step .lb { font-size: var(--fs-sm); font-weight: 600; color: var(--text-3); white-space: nowrap; }
.step.done .lb { color: var(--text-2); }
.step.active .lb { color: var(--text); }
.step-line { width: 28px; height: 2px; background: var(--line); margin: 0 var(--s2); flex: none; border-radius: 2px; }
.step-line.done { background: var(--success); }

/* ---------- Tablo ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); }
table.dt { font-size: var(--fs-sm); min-width: 100%; }
table.dt th {
  text-align: left; font-weight: 600; color: var(--text-3);
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .05em;
  padding: 12px var(--s3); border-bottom: 1px solid var(--line); white-space: nowrap;
  background: var(--surface); position: sticky; top: 0; z-index: 1;
}
table.dt th.sortable { cursor: pointer; user-select: none; }
table.dt th.sortable:hover { color: var(--text); }
table.dt th .sort-ic { display: inline-block; width: 12px; opacity: .45; margin-left: 3px; vertical-align: -1px; }
table.dt th[aria-sort] .sort-ic { opacity: 1; color: var(--brand); }
table.dt td { padding: 14px var(--s3); border-bottom: 1px solid var(--line); vertical-align: middle; }
table.dt tbody tr { transition: background var(--dur-1); }
table.dt tbody tr:hover { background: var(--surface-2); }
table.dt tbody tr.sel { background: var(--brand-softer); }
table.dt tbody tr.clickable { cursor: pointer; }
table.dt tbody tr:last-child td { border-bottom: 0; }
table.dt .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Sayfalama ---------- */
.pager { display: flex; align-items: center; gap: var(--s1); }
.pager button {
  min-width: 32px; height: 32px; padding: 0 8px; border-radius: var(--r-xs);
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.pager button:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.pager button[aria-current="page"] { background: var(--brand); color: #fff; }
.pager button:disabled { opacity: .35; cursor: default; }

/* ---------- Modal ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(12,14,18,.5);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  z-index: var(--z-modal); display: grid; place-items: center; padding: var(--s4);
  animation: fade var(--dur-2) var(--ease);
}
@keyframes fade { from { opacity: 0 } }
.modal {
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-xl);
  width: min(520px, 100%); max-height: min(86vh, 760px); display: flex; flex-direction: column;
  border: 0; animation: modalIn var(--dur-3) var(--ease);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.97) } }
.modal-lg { width: min(760px, 100%); }
.modal-hd {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3);
  padding: var(--s5) var(--s5) var(--s3);
}
.modal-bd { padding: 0 var(--s5) var(--s5); overflow-y: auto; flex: 1; }
.modal-ft {
  display: flex; align-items: center; justify-content: flex-end; gap: var(--s2);
  padding: var(--s4) var(--s5); border-top: 1px solid var(--line);
  background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.modal-ft.split { justify-content: space-between; }

/* Alt sayfa (mobil bottom sheet) */
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-modal);
  background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: var(--sh-xl); max-height: 88vh; display: flex; flex-direction: column;
  animation: sheetIn var(--dur-3) var(--ease); padding-bottom: env(safe-area-inset-bottom);
}
@keyframes sheetIn { from { transform: translateY(100%) } }
.sheet-grip { width: 38px; height: 4px; border-radius: 99px; background: var(--line-2); margin: 10px auto 4px; flex: none; }
.overlay.bottom { display: block; padding: 0; }

/* Drawer (sağdan) */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: var(--z-drawer);
  width: min(460px, 100%); background: var(--surface); box-shadow: var(--sh-xl);
  border-left: 0; display: flex; flex-direction: column;
  animation: drawerIn var(--dur-3) var(--ease);
}
@keyframes drawerIn { from { transform: translateX(100%) } }
.drawer-wide { width: min(620px, 100%); }
.drawer-hd {
  padding: var(--s5); border-bottom: 1px solid var(--line);
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3);
}
.drawer-bd { padding: var(--s5) var(--s6); overflow-y: auto; flex: 1; }
.drawer-ft { padding: var(--s4) var(--s5); border-top: 1px solid var(--line); display: flex; gap: var(--s2); background: var(--surface-2); }

/* ---------- Açılır menü ---------- */
.menu {
  position: absolute; z-index: var(--z-drawer); min-width: 190px;
  background: var(--surface); border: 0;
  border-radius: var(--r-md); box-shadow: var(--sh-lg); padding: var(--s2);
  animation: menuIn var(--dur-2) var(--ease);
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px) scale(.98) } }
.menu button, .menu a {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 9px var(--s3); border-radius: var(--r-xs);
  font-size: var(--fs-sm); font-weight: 500; color: var(--text); text-align: left;
}
.menu button:hover, .menu a:hover { background: var(--surface-3); }
.menu .ic { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.menu button:hover .ic { color: var(--text-2); }
.menu .sep { height: 1px; background: var(--line); margin: var(--s1) 0; }
.menu .danger { color: var(--danger); }
.menu .danger .ic { color: var(--danger); }
.menu-lb { padding: 8px var(--s3) 5px; font-size: var(--fs-xxs); font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .07em; }

/* ---------- Toast ---------- */
.toasts {
  position: fixed; z-index: var(--z-toast); bottom: var(--s5); left: 50%;
  transform: translateX(-50%); display: flex; flex-direction: column-reverse;
  gap: var(--s2); width: min(420px, calc(100vw - 32px)); pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: var(--s3);
  background: var(--surface-inverse); color: var(--text-inverse);
  border-radius: var(--r-md); padding: 13px var(--s4); box-shadow: var(--sh-lg);
  font-size: var(--fs-sm); font-weight: 500; pointer-events: auto;
  animation: toastIn var(--dur-3) var(--ease);
}
.toast.out { animation: toastOut var(--dur-2) var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.95) } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.97) } }
.toast .ic { width: 19px; height: 19px; flex: none; margin-top: 1px; }
.toast.ok .ic { color: #4ADE80; } .toast.err .ic { color: #FF8A8A; }
.toast.warn .ic { color: #FCD34D; } .toast.info .ic { color: #93B4FF; }
.toast .x { margin-left: auto; opacity: .6; flex: none; }
.toast .x:hover { opacity: 1; }

/* ---------- Boş / yükleniyor / hata ---------- */
.empty { text-align: center; padding: var(--s8) var(--s5); }
.empty .ill {
  width: 64px; height: 64px; margin: 0 auto var(--s4); border-radius: var(--r-lg);
  background: var(--surface-3); display: grid; place-items: center; color: var(--text-3);
}
.empty .ill svg { width: 30px; height: 30px; }
.empty h4 { margin-bottom: 6px; }
.empty p { color: var(--text-3); font-size: var(--fs-sm); max-width: 320px; margin: 0 auto; }

.skel {
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--line) 50%, var(--surface-3) 75%);
  background-size: 200% 100%; animation: shim 1.4s linear infinite; border-radius: var(--r-xs);
}
@keyframes shim { to { background-position: -200% 0 } }
.skel-line { height: 12px; margin-bottom: 8px; }
.skel-line.w60 { width: 60%; } .skel-line.w40 { width: 40%; } .skel-line.w80 { width: 80%; }

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

/* ---------- Bilgi kutusu ---------- */
.note {
  display: flex; gap: var(--s3); padding: var(--s3) var(--s4);
  border-radius: var(--r-sm); font-size: var(--fs-sm); line-height: var(--lh);
  background: var(--info-soft); color: var(--text-2); border: 1px solid transparent;
}
.note .ic { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--info); }
.note-warn { background: var(--warning-soft); } .note-warn .ic { color: var(--warning); }
.note-ok   { background: var(--success-soft); } .note-ok .ic   { color: var(--success); }
.note-brand{ background: var(--brand-soft); }   .note-brand .ic{ color: var(--brand); }
.note-demo {
  background: var(--surface-3); border: 1px dashed var(--line-strong);
  color: var(--text-3); font-size: var(--fs-xs);
}
.note-demo .ic { color: var(--text-3); }

/* ---------- KPI ---------- */
.kpi { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s3); }
.kpi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s2); }
.kpi-ic {
  width: 38px; height: 38px; border-radius: var(--r-sm); flex: none;
  display: grid; place-items: center; background: var(--brand-soft); color: var(--brand);
}
.kpi-ic svg { width: 18px; height: 18px; }
.kpi-lb { font-size: var(--fs-sm); color: var(--text-2); font-weight: 500; }
.kpi-val { font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.kpi-ft { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: var(--fs-xs); font-weight: 700; }
.delta.up { color: var(--success); } .delta.down { color: var(--danger); }
.delta svg { width: 12px; height: 12px; }

/* ---------- Ayırıcı ---------- */
.hr { height: 1px; background: var(--line); border: 0; }
.hr-v { width: 1px; align-self: stretch; background: var(--line); }
.dot-sep { color: var(--text-3); }
.dot-sep::before { content: "·"; margin: 0 6px; }

/* ---------- Liste satırı ---------- */
.lrow {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s4); border-radius: var(--r-sm);
  transition: background var(--dur-1); width: 100%; text-align: left;
}
.lrow:hover { background: var(--surface-2); }
.lrow + .lrow { box-shadow: inset 0 1px 0 var(--line); border-radius: 0; }
.lrow .chev { color: var(--text-3); flex: none; }
.lrow .grow { min-width: 0; }

/* ---------- Gruplanmış liste (referans: tek kart + ince ayırıcılar) ---------- */
.item-group {
  background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-sm); overflow: hidden;
}
:root[data-theme="dark"] .item-group { box-shadow: var(--sh-sm), inset 0 0 0 1px var(--line); }
.item-group > .item {
  box-shadow: none !important; border-radius: 0; margin-top: 0; background: transparent;
}
.item-group > .item + .item { box-shadow: inset 0 1px 0 var(--line) !important; }
.item-group > .item:hover { background: var(--surface-2); transform: none; }

/* ---------- Kanban ---------- */
.kanban { display: flex; gap: var(--s3); overflow-x: auto; padding-bottom: var(--s3); align-items: flex-start; }
.kcol {
  width: 272px; flex: none; background: var(--surface-3);
  border: 0; border-radius: var(--r-md); padding: var(--s3);
  display: flex; flex-direction: column; gap: var(--s2); max-height: 100%;
}
.kcol-hd { display: flex; align-items: center; gap: var(--s2); padding: 2px var(--s1) var(--s2); }
.kcol-hd .t { font-size: var(--fs-sm); font-weight: 700; }
.kcol-hd .n {
  font-size: var(--fs-xs); font-weight: 700; color: var(--text-3);
  background: var(--surface-3); padding: 1px 7px; border-radius: 99px;
}
.kcard {
  background: var(--surface); border: 0; border-radius: var(--r-sm);
  padding: var(--s4); box-shadow: var(--sh-sm); cursor: grab; width: 100%; text-align: left;
  transition: box-shadow var(--dur-1), transform var(--dur-1);
  display: flex; flex-direction: column; gap: 9px;
}
.kcard:hover { box-shadow: var(--sh-md); transform: translateY(-2px); }
.kcard.dragging { opacity: .4; }
.kcol.over { background: var(--brand-softer); border-color: var(--brand); border-style: dashed; }
.kcard .t { font-size: var(--fs-sm); font-weight: 600; line-height: 1.35; }
.kcard .m { font-size: var(--fs-xs); color: var(--text-3); }

/* ---------- QR ---------- */
.qr-box {
  background: #fff; padding: 16px; border-radius: var(--r-lg);
  display: inline-block; box-shadow: var(--sh-md); border: 0;
}
.qr-box canvas, .qr-box svg { display: block; image-rendering: pixelated; }

/* ---------- Taşma koruması ---------- */
.scroll-x::-webkit-scrollbar { height: 6px; }

/* ---------- Yazdırma ---------- */
@media print { .no-print { display: none !important; } }

/* ---------- Grafikler ---------- */
.chart { width: 100%; height: auto; overflow: visible; }
.chart.fixed { width: auto; max-width: 100%; }
.spark { width: 90px; height: 30px; }
.legend { display: flex; flex-direction: column; gap: 9px; font-size: var(--fs-sm); }
.legend li { display: flex; align-items: center; gap: 9px; }
.legend i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.legend b { font-variant-numeric: tabular-nums; color: var(--text-2); }
.prow { display: grid; grid-template-columns: 84px 1fr 46px; align-items: center; gap: var(--s3); font-size: var(--fs-sm); }
.prow + .prow { margin-top: 11px; }
.prow-l { color: var(--text-2); font-weight: 600; }
.prow-b { height: 7px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.prow-b > i { display: block; height: 100%; border-radius: 99px; transition: width var(--dur-3) var(--ease); }
.prow-v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
