/* ==================================================================
   modules/settings.css · Ajans ayarları (önek st-)
   Renkler yalnız token'lardan; Açık, Yarı koyu ve Koyu temada aynı kurallar.
================================================================== */
.st-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.st-mono { font-family: var(--mono); font-size: 12px; }
.st-nowrap { white-space: nowrap; }
.st-mtab { display: none; }

/* Sayfa iskeleti: başlık altında tam ekran, uzun içerik içeride kayar */
.st-page { gap: 16px; }
.st-page > .table-wrap { padding: 0; margin: 0 -4px; }
.st-scroll { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 2px; margin: -2px; }
.st-static { display: flex; align-items: center; gap: 6px; min-height: var(--ctl-h); flex-wrap: wrap; }
.st-static.sub { min-height: 0; color: var(--text-2); font-size: 12.5px; }
.st-mail { color: var(--text-2); overflow-wrap: anywhere; }
.st-cell-name { display: grid; min-width: 0; }
.st-cell-name .t { white-space: nowrap; }
.st-you { height: 18px; font-size: 11px; margin-left: 4px; vertical-align: 1px; }
.st-col-role { width: 220px; }
.st-col-team { width: 190px; }
.st-col-scope { width: 240px; }
.st-col-act { width: 44px; text-align: right; }
.st-team td .field-btn, .st-staff td .field-btn { height: 30px; }
.st-ic { width: 32px; height: 32px; border-radius: 8px; background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; flex: none; }
.st-ic svg.i { width: 17px; height: 17px; }
.st-wide { width: 100%; justify-content: center; }
.st-btn-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.st-inline-note { display: flex; gap: 6px; align-items: center; }
.st-code { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); font: 12px/1.5 var(--mono); color: var(--text); overflow-x: auto; white-space: pre; }

/* Genel */
.st-strip { flex: none; }
.st-strip > button small { color: var(--text-2); }
.st-genel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: start; }
.st-genel .panel { overflow: visible; }
.st-genel .panel-body { overflow: visible; }
.st-pad { padding: 16px; display: grid; gap: 14px; }
.st-mark-row { display: flex; gap: 10px; align-items: center; }
.st-mark-prev { width: 36px; height: 36px; flex: none; font-size: 13px; }
.st-sample { min-height: var(--ctl-h); display: flex; align-items: center; padding: 0 10px; border-radius: 8px; background: var(--surface-2); color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.st-err-only { gap: 0; margin-top: -8px; }
.st-switch-row { justify-content: space-between; width: 100%; min-height: var(--ctl-h); font-weight: 600; font-size: 13px; }
.st-mfa-sum { display: flex; }
.st-foot { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.st-dirty { margin-right: auto; font-size: 12.5px; }

/* Roller */
.st-roles { flex: 1; min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; }
.st-rlist { display: grid; gap: 2px; padding: 6px; }
.st-ritem { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 9px; min-height: 38px; padding: 0 10px; border-radius: 8px; cursor: pointer; color: var(--text-2); font-size: 13.5px; transition: background-color 120ms ease, color 120ms ease; }
.st-ritem:hover { background: var(--hover); color: var(--text); }
.st-ritem:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.st-ritem[aria-current="true"] { background: var(--selected); color: var(--text); font-weight: 600; }
.st-ritem[aria-current="true"] svg.i { color: var(--accent); }
.st-rname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-rmeta { min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); font-size: 11.5px; font-weight: 600; display: inline-grid; place-items: center; }
.st-matrix .panel-head .badge { margin-left: 2px; }
.st-perm th.st-c, .st-perm td.st-c { text-align: center; width: 92px; }
.st-perm th.st-c { padding-left: 4px; padding-right: 4px; }
.st-perm td { padding-top: 6px; padding-bottom: 6px; height: 47px; }
.st-perm .check { justify-content: center; }
.st-perm .check input:disabled { cursor: default; opacity: .55; }
.st-perm .check input:disabled:checked { opacity: .5; }
.st-na { color: var(--text-3); }
.st-scope { width: 240px; }
.st-scope-h { white-space: nowrap; }
.st-scope-h .hint-i { vertical-align: middle; }
.st-perm-sum td { padding-top: 7px; padding-bottom: 7px; }
.st-perm-sum td:first-child { width: 150px; }
.st-perm-sum .tag { margin: 1px 0; }
.strip b.st-b-sm { font-size: 17px; line-height: 1.6; }

/* Müşteri personeli */
.st-client-line { flex: none; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.st-client-line strong { font-weight: 650; }
.st-client-line .muted { font-size: 13px; }

/* Modüller */
.st-mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.st-mod { display: flex; flex-direction: column; gap: 14px; border: 1px solid transparent; transition: border-color 140ms ease, background-color 140ms ease; }
.st-mod.off { background: transparent; border-color: var(--line); }
.st-mod.off .st-mod-ic { color: var(--text-3); }
.st-mod-top { display: flex; align-items: center; gap: 10px; }
.st-mod-top h4 { margin: 0; font-size: 14.5px; }
.st-mod-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.st-mod-ic svg.i { width: 19px; height: 19px; }
.st-mod-sw { margin-left: auto; }
.st-mod-sw input:disabled { cursor: default; opacity: .6; }
.st-mod-foot { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.st-mod-foot .muted { margin-left: auto; font-variant-numeric: tabular-nums; }

/* Entegrasyonlar */
.st-int { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.st-irow { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px 12px 16px; }
.st-irow + .st-irow { border-top: 1px solid var(--line); }
.st-irow.off .st-imain strong { color: var(--text-2); }
.st-irow > .st-ic { margin-top: -2px; }
.st-imain { flex: 1; min-width: 0; display: grid; gap: 6px; }
.st-imain strong { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-imain strong.st-url { font-size: 12.5px; }
.st-itags { display: flex; flex-wrap: wrap; gap: 4px; }
.st-imeta { color: var(--text-2); font-size: 12px; line-height: 1.5; }
.st-imeta .st-mono { white-space: nowrap; font-size: 11.5px; }
.st-iside { display: flex; align-items: center; gap: 6px; flex: none; }
.st-int .panel-body .st-irow:has(> .st-ic) { align-items: center; }

/* Denetim kaydı */
.st-col-at { width: 130px; }
.st-act-txt { min-width: 240px; }
.st-audit td { padding-top: 9px; padding-bottom: 9px; }
.st-audit td:nth-child(2) .cell-inline { white-space: nowrap; }
.st-more-note { font-size: 12.5px; padding: 10px; margin: 0; }

@media (max-width: 1500px) {
  .st-genel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1280px) {
  .st-int { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-auto-rows: minmax(0, 1fr); }
  .st-int > :first-child { grid-row: span 2; }
}
@media (max-width: 760px) {
  .st-mtab { display: flex; width: auto; min-width: 150px; flex: none; }
  /* Telefonda bölüm seçici araç çubuğunu doldurur; üye durumu süzgeci sığmıyor (satırlarda durum rozeti var) */
  .toolbar .st-mtab ~ .status-switch { display: none; }
  .st-page { gap: 12px; }
  .st-scroll { overflow: visible; flex: none; }
  .st-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-genel { grid-template-columns: 1fr; }
  .st-foot { position: sticky; bottom: calc(-96px - env(safe-area-inset-bottom)); background: var(--bg); padding-bottom: 8px; }
  .st-roles, .st-int { grid-template-columns: 1fr; flex: none; grid-auto-rows: auto; }
  .st-int > :first-child { grid-row: auto; }
  .st-role-list .panel-body { max-height: none; }
  .st-matrix .panel-body { max-height: none; overflow-x: auto; }
  .st-perm th.st-c, .st-perm td.st-c { width: 56px; font-size: 11px; }
  .st-scope { width: 160px; }
  .st-col-role { width: 140px; }
  .st-col-scope { width: 140px; }
  .st-team td .field-btn, .st-staff td .field-btn { min-width: 0; }
  .st-page > .table-wrap { margin: 0; }
  .st-act-txt { min-width: 0; }
  .st-col-at { width: auto; }
  .st-irow { flex-wrap: wrap; }
  .st-matrix .panel-head { flex-wrap: wrap; }
  /* Ekip ve personel tabloları telefonda kart satırı olur */
  .st-team thead, .st-staff thead { display: none; }
  .st-team tbody tr, .st-staff tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px 8px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
  .st-team td, .st-staff td { display: block; padding: 0; border: 0; min-width: 0; }
  .st-team td.hide-sm, .st-staff td.hide-sm { display: none; }
  .st-team td:nth-child(1), .st-staff td:nth-child(1) { grid-column: 1; grid-row: 1; }
  .st-team td:nth-child(5), .st-staff td:nth-child(5) { grid-column: 2; grid-row: 1; }
  .st-team td.st-col-act, .st-staff td.st-col-act { grid-column: 3; grid-row: 1; width: auto; }
  .st-team td:nth-child(3), .st-staff td:nth-child(3), .st-staff td:nth-child(4) { grid-column: 1 / -1; }
  .st-team td[colspan], .st-staff td[colspan] { grid-column: 1 / -1; }
  .st-cell-name .t, .st-cell-name .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .st-iside { width: 100%; justify-content: flex-start; }
  .st-int .panel-body .st-irow:has(> .st-ic) .st-iside { width: auto; }
}
