/* ==========================================================================
   Ortak bileşenler: kart, buton, rozet, avatar, dropdown, tablo, form,
   bildirim (toast), modal, sayfalama, boş durum, iskelet yükleyici.
   Yeni modüller bu bileşenleri tekrar kullanmalıdır.
   ========================================================================== */

/* ---------- Kart ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: var(--card-header-py) var(--card-padding);
  min-height: 3.75rem;
  border-bottom: 1px solid var(--border);
}

.card-title {
  position: relative;
  padding-left: 0.65rem;
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1.3;
}

.card-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.15rem;
  bottom: 0.15rem;
  width: 3px;
  border-radius: 0.5rem;
  background: var(--title-accent);
}

.card-body {
  flex: 1 1 auto;
  padding: var(--card-padding);
}

.card-footer {
  padding: 0.85rem var(--card-padding);
  border-top: 1px solid var(--border);
}

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 38px;
  padding: 0 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: var(--fs-base);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.btn > svg {
  width: 16px;
  height: 16px;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: #7549d6;
  box-shadow: 0 0.25rem 0.75rem rgba(var(--primary-rgb), 0.3);
}

.btn-outline-secondary {
  background: transparent;
  border-color: var(--secondary);
  color: var(--secondary);
}

.btn-outline-secondary:hover:not(:disabled) {
  background: var(--secondary);
  color: #fff;
}

.btn-light {
  background: var(--surface-muted);
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-light:hover:not(:disabled) {
  background: var(--surface-hover);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  height: 30px;
  padding: 0 0.7rem;
  font-size: var(--fs-xs);
}

.btn-icon {
  width: 30px;
  height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--surface-muted);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.btn-icon:hover,
.btn-icon[aria-expanded="true"] {
  color: var(--primary);
  background: rgba(var(--primary-rgb), 0.08);
}

.btn-icon > svg {
  width: 15px;
  height: 15px;
}

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-muted);
}

.link-more > svg {
  width: 13px;
  height: 13px;
}

.link-more:hover {
  color: var(--primary);
}

/* ---------- Rozetler ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.18rem 0.45rem;
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.badge > svg {
  width: 11px;
  height: 11px;
}

.badge-primary { background: rgba(var(--primary-rgb), 0.12); color: var(--primary); }
.badge-secondary { background: rgba(var(--secondary-rgb), 0.12); color: var(--secondary); }
.badge-success { background: rgba(var(--success-rgb), 0.12); color: var(--success); }
.badge-warning { background: rgba(var(--warning-rgb), 0.14); color: #d99a24; }
.badge-danger { background: rgba(var(--danger-rgb), 0.12); color: var(--danger); }
.badge-info { background: rgba(var(--info-rgb), 0.12); color: var(--info); }
.badge-muted { background: var(--surface-muted); color: var(--text-muted); }

.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 7px;
}

.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }

.bg-primary { background: var(--primary); }
.bg-secondary { background: var(--secondary); }
.bg-success { background: var(--success); }
.bg-warning { background: var(--warning); }
.bg-danger { background: var(--danger); }
.bg-info { background: var(--info); }

/* ---------- Avatar ---------- */
.avatar {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  overflow: hidden;
}

.avatar-md {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  font-size: 0.6875rem;
}

.avatar-lg {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  font-size: var(--fs-sm);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-c1 { background: rgba(var(--primary-rgb), 0.12); color: var(--primary); }
.avatar-c2 { background: rgba(var(--warning-rgb), 0.15); color: #d99a24; }
.avatar-c3 { background: rgba(var(--success-rgb), 0.12); color: var(--success); }
.avatar-c4 { background: rgba(var(--secondary-rgb), 0.12); color: var(--secondary); }
.avatar-c5 { background: rgba(var(--danger-rgb), 0.12); color: var(--danger); }
.avatar-c6 { background: rgba(var(--info-rgb), 0.12); color: var(--info); }

/* ---------- Dropdown ---------- */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 1050;
  min-width: 11rem;
  padding: 0.4rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-dropdown);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), visibility var(--t-fast);
}

.dropdown-menu.is-left {
  left: 0;
  right: auto;
}

.dropdown.is-open > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--text);
  text-align: left;
  white-space: nowrap;
}

.dropdown-item > svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.dropdown-item:hover,
.dropdown-item.is-active {
  background: var(--surface-hover);
  color: var(--primary);
}

.dropdown-item:hover > svg,
.dropdown-item.is-active > svg {
  color: var(--primary);
}

.dropdown-item.is-disabled {
  opacity: 0.55;
  cursor: default;
}

.dropdown-item.is-disabled:hover {
  background: transparent;
  color: var(--text);
}

.dropdown-divider {
  height: 1px;
  margin: 0.35rem 0;
  background: var(--border);
}

.dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0.7rem 0.5rem;
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--text-strong);
}

.dropdown-toggle-text {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius-sm);
}

.dropdown-toggle-text > svg {
  width: 14px;
  height: 14px;
}

.dropdown-toggle-text:hover,
.dropdown-toggle-text[aria-expanded="true"] {
  color: var(--primary);
}

/* ---------- Tablo ---------- */
.table-wrap {
  position: relative; /* mutlak konumlu iç öğeler (sr-only vb.) kaydırma alanından taşmasın */
  width: 100%;
  overflow-x: auto;
}

.table th,
.table td {
  padding: 0.75rem 1.25rem;
  font-size: var(--fs-sm);
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  vertical-align: middle;
}

.table thead th {
  font-weight: 600;
  color: var(--text-strong);
  background: transparent;
}

.table tbody tr:hover {
  background: var(--surface-hover);
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.cell-user {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.cell-user__name {
  font-weight: 600;
  color: var(--text-strong);
}

.cell-user__sub {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

/* ---------- Form ---------- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.form-label {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--text-strong);
}

.form-hint {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.form-control,
.form-select {
  width: 100%;
  height: 40px;
  padding: 0 0.85rem;
  background: var(--surface);
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--text);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.form-control-sm,
.form-select-sm {
  height: 32px;
  font-size: var(--fs-xs);
  padding: 0 0.6rem;
}

.form-control::placeholder {
  color: var(--text-soft);
}

.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: rgba(var(--primary-rgb), 0.6);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}

.input-icon {
  position: relative;
}

.input-icon > svg {
  position: absolute;
  left: 0.6rem;
  top: 50%;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  color: var(--text-soft);
  pointer-events: none;
}

.input-icon > .form-control {
  padding-left: 2rem;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: var(--fs-sm);
  line-height: 1.45;
}

.alert > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-top: 1px;
}

.alert-danger { background: rgba(var(--danger-rgb), 0.1); color: #b8402d; }
.alert-warning { background: rgba(var(--warning-rgb), 0.15); color: #946313; }
.alert-info { background: rgba(var(--info-rgb), 0.12); color: #1d7fb8; }
.alert-success { background: rgba(var(--success-rgb), 0.12); color: #1a8a6b; }

/* ---------- Demo veri bandı ---------- */
.demo-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  padding: 0.65rem 1rem;
  border: 1px dashed rgba(var(--warning-rgb), 0.7);
  border-radius: var(--radius);
  background: rgba(var(--warning-rgb), 0.1);
  color: #8a5d10;
  font-size: var(--fs-sm);
}

.demo-banner > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.demo-banner strong {
  font-weight: 600;
}

/* ---------- Sayfalama ---------- */
.pagination {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  color: var(--text);
  border: 1px solid var(--border-strong);
  background: var(--surface);
}

.page-btn > svg {
  width: 15px;
  height: 15px;
}

.page-btn:hover:not(:disabled) {
  color: var(--primary);
  border-color: rgba(var(--primary-rgb), 0.4);
}

.page-btn.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

/* ---------- Boş durum ---------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}

.empty-state > svg {
  width: 28px;
  height: 28px;
  color: var(--text-soft);
  stroke-width: 1.5;
}

/* ---------- İskelet yükleyici ---------- */
.skeleton {
  display: block;
  border-radius: var(--radius-sm);
  background: linear-gradient(90deg, var(--surface-muted) 25%, var(--surface-hover) 37%, var(--surface-muted) 63%);
  background-size: 400% 100%;
  animation: skeleton 1.3s ease infinite;
}

@keyframes skeleton {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

.is-loading .card-body > *:not(.skeleton-wrap) {
  visibility: hidden;
}

/* ---------- Toast bildirimleri ---------- */
.toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(360px, calc(100vw - 2rem));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--primary);
  box-shadow: var(--shadow-dropdown);
  font-size: var(--fs-sm);
  animation: toast-in var(--t) var(--ease);
}

.toast > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  margin-top: 1px;
}

.toast.is-success { border-left-color: var(--success); }
.toast.is-success > svg { color: var(--success); }
.toast.is-error { border-left-color: var(--danger); }
.toast.is-error > svg { color: var(--danger); }
.toast.is-warning { border-left-color: var(--warning); }
.toast.is-warning > svg { color: var(--warning); }
.toast.is-info > svg { color: var(--primary); }

.toast.is-leaving {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--t) var(--ease), transform var(--t) var(--ease);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4rem 1rem 1rem;
  background: rgba(15, 23, 42, 0.45);
  overflow-y: auto;
}

.modal {
  width: 100%;
  max-width: 540px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-dropdown);
  animation: toast-in var(--t) var(--ease);
}

.modal .card-header {
  border-bottom: 1px solid var(--border);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.85rem var(--card-padding);
  border-top: 1px solid var(--border);
}

/* ---------- Bildirim listesi (header) ---------- */
.notif-menu {
  width: 340px;
  max-width: calc(100vw - 1.5rem);
  padding: 0;
}

.notif-menu .dropdown-header {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}

.notif-list {
  max-height: 320px;
  overflow-y: auto;
}

.notif-item {
  display: flex;
  gap: 0.7rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: var(--fs-sm);
}

.notif-item:last-child {
  border-bottom: 0;
}

.notif-item__icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.notif-item__icon > svg {
  width: 16px;
  height: 16px;
}

.notif-item__time {
  margin-top: 0.15rem;
  font-size: var(--fs-xxs);
  color: var(--text-muted);
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
  padding: 0.4rem;
  width: 280px;
}

.apps-grid__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.8rem 0.4rem;
  border-radius: var(--radius);
  font-size: var(--fs-xs);
  color: var(--text);
  text-align: center;
}

.apps-grid__item > svg {
  width: 22px;
  height: 22px;
  color: var(--primary);
  stroke-width: 1.6;
}

.apps-grid__item:hover {
  background: var(--surface-hover);
}

.apps-grid__item.is-disabled {
  opacity: 0.5;
  cursor: default;
}

/* ---------- Anahtar (switch) ---------- */
.switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
  flex: 0 0 34px;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
  transition: background var(--t-fast) var(--ease);
}

.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: transform var(--t-fast) var(--ease);
}

.switch input:checked + span {
  background: var(--primary);
}

.switch input:checked + span::after {
  transform: translateX(14px);
}

.switch input:focus-visible + span {
  outline: 2px solid rgba(var(--primary-rgb), 0.55);
  outline-offset: 2px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.7rem;
  font-size: var(--fs-sm);
}

/* Menü düzenleyici (ui/nav-editor.js) */
.ne-list { display: flex; flex-direction: column; gap: .35rem; max-height: 58vh; overflow-y: auto; padding-right: .25rem; }
.ne-group { border: 1px solid var(--border); border-radius: var(--radius); padding: .35rem .5rem; background: var(--surface); }
.ne-row { display: grid; grid-template-columns: 26px 22px minmax(0, 1fr) auto; align-items: center; gap: .5rem; padding: .2rem 0; }
.ne-row--child { margin-left: 1.6rem; }
.ne-row--cat .form-control { font-weight: 600; text-transform: none; }
.ne-row.is-off .form-control, .ne-row.is-off .ne-ico { opacity: .45; }
.ne-row.is-off .form-control { text-decoration: line-through; }
.ne-eye input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
.ne-ico { width: 18px; height: 18px; color: var(--text-muted); text-align: center; font-size: .8rem; }
.ne-move { display: inline-flex; gap: .15rem; }
.ne-children { border-top: 1px dashed var(--border); margin-top: .25rem; padding-top: .25rem; }

/* Liste üzerine gelince ayrıntı kartı (ui/hovercard.js) */
.hovercard { position: fixed; z-index: 2000; width: 300px; max-width: calc(100vw - 16px); background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg, 10px); box-shadow: 0 18px 40px -12px rgba(15, 23, 42, .35); overflow: hidden; pointer-events: none; }
.hovercard[hidden] { display: none; }
.hovercard__img { background: var(--surface-muted); display: flex; align-items: center; justify-content: center; height: 150px; padding: .5rem; }
.hovercard__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.hovercard__body { padding: .75rem .9rem .7rem; }
.hovercard__title { font-weight: 650; color: var(--text-strong); line-height: 1.3; }
.hovercard__sub { font-size: var(--fs-xs); color: var(--text-muted); margin-top: .1rem; }
.hovercard__list { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .2rem .7rem; margin: .5rem 0 0; font-size: var(--fs-sm); }
.hovercard__list dt { color: var(--text-muted); white-space: nowrap; }
.hovercard__list dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-strong); }
.hovercard__hint { margin-top: .55rem; font-size: var(--fs-xxs, .7rem); color: var(--text-muted); }

/* Modül tablosunda envantere bağlı hücre */
.inv-link { display: inline-flex; align-items: center; gap: .35rem; border: 0; background: none; padding: .1rem .2rem; margin: -.1rem -.2rem; border-radius: 6px; cursor: pointer; color: inherit; font: inherit; }
.inv-link:hover, .inv-link:focus-visible { background: rgba(var(--primary-rgb), .08); }
.inv-link > svg { width: 13px; height: 13px; color: var(--text-muted); }

/* Cihaz penceresindeki model görseli */
.item-image { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.item-image img { width: 120px; height: 90px; object-fit: contain; background: var(--surface-muted); border-radius: var(--radius); padding: .25rem; }
.item-image__empty { width: 120px; height: 90px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem;
  background: var(--surface-muted); border-radius: var(--radius); color: var(--text-muted); font-size: var(--fs-xs); }
.item-image__empty svg { width: 22px; height: 22px; }

/* ---- 1.3.0: Sistem durumu, sürümler, iki aşamalı doğrulama ---- */
.btn-link { border: 0; background: none; padding: 0; color: var(--primary); font: inherit; cursor: pointer; text-decoration: underline; }
.sys-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin-bottom: var(--gap); }
.sys-card { display: flex; gap: .85rem; align-items: flex-start; padding: 1rem 1.1rem; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-card); border-left: 4px solid var(--border); }
.sys-card__icon { width: 38px; height: 38px; flex: 0 0 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface-muted); }
.sys-card__icon svg { width: 18px; height: 18px; }
.sys-card__title { font-size: var(--fs-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }
.sys-card__value { font-size: 1.35rem; font-weight: 650; color: var(--text-strong); line-height: 1.25; }
.sys-card__sub { font-size: var(--fs-xs); color: var(--text-muted); margin-top: .15rem; }
.sys-card--success { border-left-color: var(--success); } .sys-card--success .sys-card__icon { color: var(--success); background: rgba(var(--success-rgb), .12); }
.sys-card--warning { border-left-color: var(--warning); } .sys-card--warning .sys-card__icon { color: var(--warning); background: rgba(var(--warning-rgb), .14); }
.sys-card--danger { border-left-color: var(--danger); } .sys-card--danger .sys-card__icon { color: var(--danger); background: rgba(var(--danger-rgb), .12); }
.sys-card--info { border-left-color: var(--info); } .sys-card--info .sys-card__icon { color: var(--info); background: rgba(var(--info-rgb), .12); }
.sys-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.sys-grid > .card:first-child { grid-column: 1 / -1; }
.sys-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.sys-list li { display: flex; gap: .55rem; align-items: flex-start; font-size: var(--fs-sm); }
.sys-list li svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: .15rem; }
.sys-list li > div { display: flex; flex-direction: column; min-width: 0; word-break: break-word; }
.sys-list--log { max-height: 420px; overflow: auto; }
.sys-list--log li { border-bottom: 1px dashed var(--border); padding-bottom: .45rem; }
.sys-dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .45rem 1rem; margin: 0; font-size: var(--fs-sm); }
.sys-dl dt { color: var(--text-muted); } .sys-dl dd { margin: 0; color: var(--text-strong); word-break: break-word; }
.sys-cron { margin-top: 1rem; font-size: var(--fs-sm); } .sys-cron summary { cursor: pointer; font-weight: 600; color: var(--primary); }
.sys-cron p { margin: .5rem 0; }
.sys-code { display: block; padding: .55rem .7rem; margin: .4rem 0; background: var(--surface-muted); border-radius: 6px; font-family: ui-monospace, Consolas, monospace; font-size: .8rem; word-break: break-all; user-select: all; }
.sys-actions { display: inline-flex; gap: .3rem; align-items: center; justify-content: flex-end; flex-wrap: wrap; white-space: nowrap; }
td.sys-actions { display: table-cell; text-align: right; }
.dot-online { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--success); margin-right: .3rem; vertical-align: 1px; box-shadow: 0 0 0 2px rgba(var(--success-rgb), .25); }
/* Sistem › Güvenlik ve Profilim › Açık oturumlar */
.sec-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.sec-item { display: flex; gap: .7rem; align-items: flex-start; padding: .65rem .8rem; border-radius: 8px; background: var(--surface-muted); border-left: 3px solid var(--border); font-size: var(--fs-sm); }
.sec-item > svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: .1rem; color: var(--text-muted); }
.sec-item > div { display: flex; flex-direction: column; gap: .15rem; min-width: 0; word-break: break-word; }
.sec-item strong { color: var(--text-strong); }
.sec-item--ok { border-left-color: var(--success); } .sec-item--ok > svg { color: var(--success); }
.sec-item--warn { border-left-color: var(--warning); } .sec-item--warn > svg { color: var(--warning); }
.sec-steps { margin: 0; padding-left: 1.2rem; display: grid; gap: .6rem; font-size: var(--fs-sm); }
.sess-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.sess-list li { display: flex; gap: .65rem; align-items: center; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: 8px; font-size: var(--fs-sm); }
.sess-list li > svg { width: 18px; height: 18px; flex: 0 0 18px; color: var(--text-muted); }
.sess-list li > div { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.sess-list li.is-current { border-color: rgba(var(--success-rgb), .5); background: rgba(var(--success-rgb), .06); }
.audit-changes { list-style: none; margin: .25rem 0 0; padding: 0; font-size: var(--fs-xs); color: var(--text-muted); }
.audit-changes del { color: var(--danger); text-decoration: line-through; } .audit-changes ins { color: var(--success); text-decoration: none; }
.version-list { display: grid; gap: .5rem; max-height: 60vh; overflow: auto; }
.version-item { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.version-item summary { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: .6rem .8rem; cursor: pointer; font-size: var(--fs-sm); }
.version-item summary svg { width: 15px; height: 15px; color: var(--text-muted); }
.version-item summary .cell-sub { flex-basis: 100%; }
.version-body { padding: 0 .8rem .8rem; }
.version-body .table { margin-bottom: .6rem; }
.twofa-steps { margin: 0; padding-left: 1.2rem; display: grid; gap: 1rem; }
.twofa-qr { margin: .6rem 0; display: inline-block; padding: .5rem; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
.twofa-qr svg { display: block; }
.twofa-input { font-size: 1.35rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; margin-top: .75rem; }
.recovery-codes code { display: block; text-align: center; padding: .45rem; background: var(--surface-muted); border-radius: 6px; font-family: ui-monospace, Consolas, monospace; font-size: 1rem; letter-spacing: .06em; }
.user-logins { list-style: none; margin: .25rem 0 0; padding: 0; display: grid; gap: .3rem; font-size: var(--fs-sm); }
.user-logins li { display: flex; gap: .45rem; align-items: center; }
.user-logins svg { width: 15px; height: 15px; }
@media (max-width: 1100px) { .sys-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sys-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .sys-cards { grid-template-columns: 1fr; } }
.sys-file { display: block; white-space: normal; max-width: 230px; word-break: break-all; font-size: var(--fs-sm); line-height: 1.35; }
.sys-actions .btn-sm { padding-left: .5rem; padding-right: .5rem; }
.ne-scope { display: flex; gap: .4rem; margin-bottom: .9rem; padding: .25rem; background: var(--surface-muted); border-radius: var(--radius); }
.ne-scope__btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .5rem .6rem; border: 0; border-radius: calc(var(--radius) - 2px);
  background: transparent; color: var(--text-muted); font: inherit; font-size: var(--fs-sm); font-weight: 500; cursor: pointer; }
.ne-scope__btn svg { width: 15px; height: 15px; }
.ne-scope__btn.is-active { background: var(--surface); color: var(--primary); font-weight: 600; box-shadow: var(--shadow-card); }

/* ---- 1.3.3: Profil fotoğrafı ---- */
.avatar-xl { width: 72px; height: 72px; flex-basis: 72px; font-size: 1.4rem; }
.avatar-edit { position: relative; flex: 0 0 auto; }
.avatar-edit .avatar { width: 72px; height: 72px; flex-basis: 72px; font-size: 1.4rem; }
.avatar-edit__btn { position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff; border: 2px solid var(--surface); cursor: pointer; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.avatar-edit__btn svg { width: 14px; height: 14px; }
.avatar-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.user-cell { display: inline-flex; align-items: center; gap: .6rem; min-width: 0; }
.user-cell > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.user-photo { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.user-photo > div { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }

/* ---- 1.3.6: Cihaz değişimi, personel kartı işlem bildirimi ---- */
.ex-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 1.25rem; align-items: start; }
.ex-old { display: flex; gap: .6rem; align-items: flex-start; padding: .55rem .6rem; border-radius: var(--radius); cursor: pointer; }
.ex-old:hover { background: var(--surface-muted); }
.ex-old input { margin-top: .2rem; accent-color: var(--primary); }
.ex-old > span { display: flex; flex-direction: column; }
.done-banner { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; margin-bottom: 1rem; padding: .75rem .9rem; border-radius: var(--radius);
  background: rgba(var(--success-rgb), .1); border: 1px solid rgba(var(--success-rgb), .25); color: var(--text); }
.done-banner > svg { width: 18px; height: 18px; color: var(--success); flex: 0 0 auto; }
.done-banner__text { flex: 1 1 260px; }
.done-banner__btns { display: flex; flex-wrap: wrap; gap: .4rem; }
@media (max-width: 900px) { .ex-grid { grid-template-columns: minmax(0, 1fr); } }

/* Ayrıntı penceresinde ‹ Önceki / Sonraki › kayıt gezinmesi */
.mnav { display: inline-flex; align-items: center; gap: .15rem; margin-left: auto; margin-right: .35rem; padding: .1rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); flex: 0 0 auto; }
.mnav .btn-icon { width: 30px; height: 30px; }
.mnav .btn-icon[disabled] { opacity: .3; pointer-events: none; }
.mnav__pos { font-size: var(--fs-xs); color: var(--text-muted); min-width: 4.2rem; text-align: center; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lv-table tr.is-current td { background: rgba(var(--primary-rgb), .06); }
@media (max-width: 560px) { .mnav__pos { min-width: 0; } .mnav { margin-right: .15rem; } }

/* Yedek tercihleri */
.bk-targets { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: .9rem; }
.bk-target { border: 1px solid var(--border); border-radius: 10px; padding: .85rem .95rem; display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.bk-target-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .2rem; }
.bk-target-head svg { width: 18px; height: 18px; color: var(--primary); flex: none; }
.bk-target-head .badge { margin-left: auto; }
.bk-target .cell-sub { display: block; overflow-wrap: anywhere; }
.bk-setup .sys-code { overflow-x: auto; max-width: 100%; }
.bk-setup .sec-steps { max-width: 60rem; }

/* Drive'dan geri yükleme ilerlemesi */
.rs-steps li.rs-wait { color: var(--text-muted); }
.rs-steps li.rs-done svg { color: var(--success); }
.rs-steps li.rs-now svg { color: var(--primary); animation: rs-spin 1.2s linear infinite; }
.rs-steps li > div { flex: 1; }
.rs-bar { height: 8px; background: var(--border); border-radius: 99px; overflow: hidden; margin: .35rem 0 .15rem; }
.rs-bar > span { display: block; height: 100%; background: var(--primary); transition: width .3s ease; }
@keyframes rs-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .rs-steps li.rs-now svg { animation: none; } }
.table .dr-sm-show { display: none; }
@media (max-width: 600px) { .table .dr-sm-hide { display: none; } .table .dr-sm-show { display: block; } .table .sys-actions.dr-sm-show { display: flex; } }

/* Bildirim zili (1.10.2): tıklanabilir satırlar, yeni olanlar, alt bağlantı */
a.notif-item {
  color: inherit;
  text-decoration: none;
}
a.notif-item:hover,
a.notif-item:focus-visible {
  background: var(--hover-bg, rgba(127, 127, 127, 0.08));
}
.notif-item.is-new {
  background: rgba(132, 90, 223, 0.08);
  background: color-mix(in srgb, var(--primary) 8%, transparent);
  box-shadow: inset 3px 0 0 var(--primary);
}
.notif-item__body {
  min-width: 0;
}
.notif-item__sub {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notif-item__no {
  font-variant-numeric: tabular-nums;
}
.notif-list {
  max-height: min(420px, 60vh);
}
.notif-foot {
  display: block;
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--border);
  font-size: var(--fs-sm);
  text-align: center;
  color: var(--primary);
  text-decoration: none;
}
.notif-foot:hover {
  text-decoration: underline;
}
@media (max-width: 575.98px) {
  .notif-menu,
  .notif-menu.is-left {
    position: fixed;
    top: 3.75rem;
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
    max-width: none;
  }
}

/* 1.13.0 — Sistem › Güvenlik › Yurt dışı erişim engeli */
.geo-list { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; font-size: var(--fs-sm); }
