/* ==========================================================================
   Bilesenler
   ========================================================================== */

/* --- Sayfa dugme cubugu -------------------------------------------------- */
/* Sayfa basligi ve kirinti yolu artik ust barda; burada yalnizca sayfaya ait
   dugmeler durur. Dugmesi olmayan sayfada cubuk hic yer kaplamaz. */

.page-bar {
  display: flex; align-items: center; justify-content: flex-end;
  gap: var(--sp-2); flex-wrap: wrap;
  margin-bottom: var(--sp-2);
}
.page-bar:empty { display: none; }

/* --- Butonlar ------------------------------------------------------------ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 30px; padding: 0 var(--sp-3);
  border: 1px solid transparent; border-radius: var(--radius);
  background: var(--brand-500); color: #fff;
  font-size: var(--fs-base); font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition), box-shadow var(--transition);
}
.btn:hover { background: var(--brand-600); color: #fff; box-shadow: var(--shadow-brand); }
.btn:active { background: var(--brand-700); }
.btn:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }

.btn--ghost { background: var(--surface); border-color: var(--border-strong); color: var(--ink-700); }
.btn--ghost:hover { background: var(--brand-50); border-color: var(--brand-300); color: var(--brand-700); box-shadow: none; }

.btn--soft { background: var(--brand-50); border-color: var(--brand-200); color: var(--brand-700); }
.btn--soft:hover { background: var(--brand-100); color: var(--brand-800); box-shadow: none; }

.btn--danger { background: var(--err-500); }
.btn--danger:hover { background: #b91c1c; box-shadow: 0 6px 18px rgba(220, 38, 38, .25); }

.btn--success { background: var(--ok-500); }
.btn--success:hover { background: #15803d; box-shadow: 0 6px 18px rgba(22, 163, 74, .25); }

.btn--sm { height: 26px; padding: 0 var(--sp-2); font-size: var(--fs-sm); }
.btn--icon { width: 28px; height: 28px; padding: 0; }
.btn--block { width: 100%; }

/* --- Kartlar / paneller ------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card__head {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  border-bottom: 1px solid var(--border);
}
.card__title {
  font-size: var(--fs-sm); font-weight: 700; color: var(--ink-800);
  text-transform: uppercase; letter-spacing: .06em;
}
.card__actions { margin-left: auto; display: flex; gap: var(--sp-2); }
.card__body { padding: var(--sp-4); }
.card__body--flush { padding: 0; }
.card__foot {
  padding: var(--sp-3) var(--sp-5);
  border-top: 1px solid var(--border);
  background: var(--surface-muted);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  font-size: var(--fs-sm); color: var(--text-muted);
}

/* --- Izgara ------------------------------------------------------------- */

.grid { display: grid; gap: var(--sp-4); }
.grid--stats { grid-template-columns: repeat(auto-fit, minmax(238px, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stack { display: grid; gap: var(--sp-4); }

@media (max-width: 1180px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: minmax(0, 1fr); }
}

/* --- Sayac karti -------------------------------------------------------- */

.stat {
  position: relative;
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat::after {
  content: ""; position: absolute; inset: 0 auto 0 0;
  width: 4px; background: var(--brand-500);
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat__icon {
  width: 52px; height: 52px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--radius-lg);
  background: var(--brand-50);
  color: var(--brand-600);
  border: 1px solid var(--brand-100);
}
.stat__icon .ic { width: 26px; height: 26px; }

.stat__body { min-width: 0; margin-left: auto; text-align: right; }
.stat__label {
  font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .07em;
}
.stat__value {
  display: flex; align-items: center; justify-content: flex-end; gap: 6px;
  font-size: var(--fs-2xl); font-weight: 700; color: var(--ink-900);
  letter-spacing: -.6px; font-variant-numeric: tabular-nums;
}
.stat__trend { color: var(--ok-500); }
.stat__trend .ic { width: 18px; height: 18px; stroke-width: 2.4; }

/* --- Veri tablosu ------------------------------------------------------- */

.table-wrap { width: 100%; overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; font-size: var(--fs-base); }

.table thead th {
  padding: 6px var(--sp-3);
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border);
  color: var(--ink-700);
  font-size: var(--fs-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  text-align: left; white-space: nowrap;
}
.table tbody td {
  padding: 6px var(--sp-3);
  border-bottom: 1px solid var(--ink-100);
  color: var(--ink-700);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--brand-50); }

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

/* Ozet tablo — ana sayfadaki ADET / TUTAR listeleri */
.table--summary tbody td:first-child {
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-700);
  text-transform: uppercase; letter-spacing: .04em;
}
.table--summary tbody tr:nth-child(odd) td { background: var(--surface-muted); }
.table--summary tbody tr:hover td { background: var(--brand-50); }
.table--summary .cell-count { width: 110px; font-weight: 700; color: var(--ink-900); }
.table--summary .cell-amount { width: 170px; font-weight: 700; color: var(--ink-900); }
.table--summary .cell-plate { width: 260px; }
.table--summary .is-zero { color: var(--text-faint); font-weight: 500; }

.table--compact tbody td { padding: 4px var(--sp-2); }

.plate-list { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }

.plate {
  display: inline-flex; align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: var(--fs-xs); font-weight: 700;
  letter-spacing: .04em; color: var(--ink-800);
  white-space: nowrap;
}
.plate--warn { border-color: var(--warn-500); background: var(--warn-50); color: #92400e; }
.plate--ok { border-color: var(--ok-500); background: var(--ok-50); color: #15803d; }

/* --- Etiketler --------------------------------------------------------- */

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--ink-100); color: var(--ink-700);
  font-size: var(--fs-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  white-space: nowrap;
}
.badge--brand { background: var(--brand-100); color: var(--brand-800); }
.badge--ok    { background: var(--ok-50);   color: #15803d; }
.badge--warn  { background: var(--warn-50); color: #92400e; }
.badge--err   { background: var(--err-50);  color: #b91c1c; }
.badge--info  { background: var(--info-50); color: #0369a1; }
.badge--muted { background: var(--ink-100); color: var(--ink-500); }

.money { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

/* --- Formlar ----------------------------------------------------------- */

.form-grid { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.field.is-hidden { display: none; }
.field--wide { grid-column: 1 / -1; }
.field > label {
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-700);
  display: flex; align-items: center; gap: 6px;
}
.field .req { color: var(--err-500); }
.field .req.is-hidden { display: none; }
.field-label__add {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; padding: 0; margin-left: auto;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--ink-600); cursor: pointer;
}
.field-label__add:hover { background: var(--brand-50); border-color: var(--brand-200); color: var(--brand-600); }
.field__group-title { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-700); margin: var(--sp-3) 0 var(--sp-2); }

.field input[type="text"], .field input[type="number"], .field input[type="email"],
.field input[type="password"], .field input[type="date"], .field input[type="time"],
.field input[type="datetime-local"], .field input[type="url"], .field input[type="tel"],
.field select, .field textarea,
.input, .select, .textarea {
  width: 100%;
  min-height: 30px;
  padding: 4px var(--sp-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: inherit; font-size: var(--fs-base);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.field textarea, .textarea { min-height: 72px; resize: vertical; line-height: 1.5; }

.field input:focus, .field select:focus, .field textarea:focus,
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px var(--brand-100);
}

.field__hint { font-size: var(--fs-xs); color: var(--text-muted); }
.field__error { font-size: var(--fs-xs); color: var(--err-500); font-weight: 600; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--err-500); }

.check { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-base); }
.check input { width: 17px; height: 17px; accent-color: var(--brand-500); }

.form-actions {
  display: flex; gap: var(--sp-2); flex-wrap: wrap;
  padding-top: var(--sp-3); margin-top: var(--sp-3);
  border-top: 1px solid var(--border);
}

/* Filtre cubugu — liste sayfalarinin arama/filtre seridi.
   Etiketler alanin ustunde degil icinde durur; boylece bos gorunen genis bir
   kutu yerine tek satirlik derli toplu bir cubuk cikar. */
.filters {
  display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center;
  padding: var(--sp-2) var(--sp-3);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-muted) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: var(--sp-2);
  box-shadow: var(--shadow-sm);
}

.filters .field { flex: 0 1 170px; gap: 0; }
.filters .field:first-child { flex: 1 1 240px; }
.filters .field > label {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.filters .field input,
.filters .field select {
  height: 28px; min-height: 28px; border-radius: var(--radius-pill);
  border-color: var(--border-strong);
  background: var(--surface); font-size: var(--fs-sm);
}
.filters .field--search { position: relative; justify-content: center; }
.filters .field--search > .ic { position: absolute; left: 10px; color: var(--text-faint); pointer-events: none; }
.filters .field--search:focus-within > .ic { color: var(--brand-500); }
.filters .field--search input { padding-left: 29px; }
.filters .form-actions { padding: 0; margin: 0 0 0 auto; border: 0; }

/* --- Sekmeler ---------------------------------------------------------- */

.tabs {
  display: flex; gap: 3px; flex-wrap: wrap;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--sp-4);
  box-shadow: var(--shadow-sm);
}
.tab {
  padding: 5px var(--sp-3);
  border-radius: var(--radius);
  color: var(--ink-600);
  font-size: var(--fs-sm); font-weight: 600;
  white-space: nowrap;
}
.tab:hover { background: var(--brand-50); color: var(--brand-700); }
.tab.is-active { background: var(--surface); color: var(--brand-700); box-shadow: inset 0 0 0 1px var(--brand-500); }

/* Kart basligi olarak sekme cubugu */
.tabs--head {
  margin: 0; padding: 5px var(--sp-3) 0;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-muted) 100%);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  gap: var(--sp-1);
}
.tabs--head .tab {
  border-radius: var(--radius) var(--radius) 0 0;
  border: 1px solid transparent; border-bottom: 0;
  margin-bottom: -1px; padding: 6px var(--sp-3);
}
.tabs--head .tab.is-active {
  background: var(--surface); color: var(--brand-700);
  border-color: var(--border); box-shadow: none;
}
.tab-panel.is-hidden { display: none; }

/* --- Belge yukleme alani ----------------------------------------------- */

.dropzone {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--surface-muted); cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.dropzone:hover { border-color: var(--brand-400); background: var(--brand-50); }
.dropzone.is-over { border-color: var(--brand-500); background: var(--brand-50); }
.dropzone.has-file { border-style: solid; border-color: var(--ok-500); background: var(--ok-50); }
.dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }

.dropzone__btn {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 34px; padding: 0 var(--sp-4); border-radius: var(--radius-sm);
  background: var(--brand-500); color: #fff;
  font-size: var(--fs-sm); font-weight: 600;
}
.dropzone__text { color: var(--text-muted); font-size: var(--fs-sm); word-break: break-all; }
.dropzone.has-file .dropzone__text { color: #15803d; font-weight: 600; }

/* Belge adi + uzanti rozeti */
.doc-name { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }
.doc-name a { color: var(--brand-700); font-weight: 600; }
.doc-name a:hover { text-decoration: underline; }

.doc-ext {
  flex: none; display: inline-grid; place-items: center;
  min-width: 40px; height: 22px; padding: 0 6px;
  border-radius: var(--radius-sm);
  background: var(--ink-100); color: var(--ink-600);
  font-size: 10.5px; font-weight: 700; letter-spacing: .4px;
}
.doc-ext--pdf { background: var(--err-50); color: #b91c1c; }
.doc-ext--jpg, .doc-ext--jpeg, .doc-ext--png { background: var(--info-50); color: #0369a1; }

/* Hazir dokuman kartlari — kompakt: tek satir baslik / onizleme, islemler
   tek satirda saga yasli. */
.template-grid {
  display: grid; gap: var(--sp-2);
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
}

.template-card {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.template-card:hover { border-color: var(--brand-300); box-shadow: var(--shadow); }

.template-card__icon {
  flex: none; width: 30px; height: 30px; border-radius: var(--radius-sm);
  display: grid; place-items: center;
  background: var(--brand-50); color: var(--brand-600);
  border: 1px solid var(--brand-200);
}
.template-card__icon .ic { width: 16px; height: 16px; }
.template-card__body { flex: 1 1 auto; min-width: 0; }
.template-card__title {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--fs-base); color: var(--ink-900); margin: 0 0 1px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.template-card__title .badge { flex: none; }
.template-card__desc {
  margin: 0; font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.template-card__actions { flex: none; display: flex; align-items: center; gap: 4px; }
.template-card__actions .btn--sm { height: 24px; padding: 0 7px; font-size: var(--fs-xs); gap: 4px; }

@media (max-width: 520px) {
  .template-card { flex-wrap: wrap; }
  .template-card__actions { width: 100%; }
  .template-card__actions .btn { flex: 1 1 0; justify-content: center; }
}


a.doc-count { text-decoration: none; }
a.doc-count:hover { background: var(--brand-100); border-color: var(--brand-300); color: var(--brand-800); }

/* --- Uye cari hesabi --------------------------------------------------- */

.ledger-head { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }

.ledger-balance {
  margin-left: auto; text-align: right;
  padding-left: var(--sp-5); border-left: 1px solid var(--border);
}
.ledger-balance__label {
  display: block; font-size: var(--fs-xs); color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .5px;
}
.ledger-balance__value {
  display: block; font-size: var(--fs-xl); font-weight: 700; color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}
.ledger-balance__value.is-negative { color: var(--err-500); }

.table--ledger tbody td { padding: 9px var(--sp-3); vertical-align: middle; }
.money.is-negative { color: var(--err-500); }

.ledger-totals {
  display: flex; justify-content: flex-end; flex-wrap: wrap;
  gap: var(--sp-2); padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--border); background: var(--surface-muted);
}
.ledger-total {
  min-width: 150px; padding: var(--sp-2) var(--sp-4);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); text-align: right;
}
.ledger-total__label {
  display: block; font-size: var(--fs-xs); color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .5px;
}
.ledger-total__value {
  display: block; font-weight: 700; color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}
.ledger-total--grand { background: var(--brand-50); border-color: var(--brand-300); }
.ledger-total--grand .ledger-total__value { color: var(--brand-800); }

@media (max-width: 720px) {
  .ledger-balance { margin-left: 0; padding-left: 0; border-left: 0; text-align: left; }
  .ledger-total { flex: 1 1 140px; min-width: 0; }
}

/* --- Not paneli -------------------------------------------------------- */

.note {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand-400);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.note__head {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  background: var(--brand-50);
  border-bottom: 1px solid var(--brand-100);
}
.note__title { font-size: var(--fs-sm); font-weight: 700; color: var(--brand-800); }
.note__meta { margin-left: auto; font-size: var(--fs-xs); color: var(--text-muted); }
.note__body {
  padding: var(--sp-4);
  max-height: 260px; overflow-y: auto;
  font-size: var(--fs-sm); line-height: 1.65;
  color: var(--ink-700);
  white-space: pre-wrap; word-break: break-word;
}

/* --- Bos durum --------------------------------------------------------- */

.empty { padding: var(--sp-10) var(--sp-5); text-align: center; }
.empty__icon {
  width: 56px; height: 56px; margin: 0 auto var(--sp-3);
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--brand-50); color: var(--brand-400);
  border: 1px solid var(--brand-100);
}
.empty__title { font-size: var(--fs-md); color: var(--ink-800); margin-bottom: 4px; }
.empty__text { font-size: var(--fs-sm); color: var(--text-muted); }

/* --- Uyarilar ---------------------------------------------------------- */

.alerts { display: grid; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.alert {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--border);
  border-left-width: 4px;
  border-radius: var(--radius);
  background: var(--surface);
  font-size: var(--fs-base);
  box-shadow: var(--shadow-sm);
}
.alert--success { border-left-color: var(--ok-500);   background: var(--ok-50); }
.alert--error   { border-left-color: var(--err-500);  background: var(--err-50); }
.alert--warning { border-left-color: var(--warn-500); background: var(--warn-50); }
.alert--info    { border-left-color: var(--info-500); background: var(--info-50); }
/* U-ETDS firma penceresindeki sunucu IP'si — kopyalanacak deger, one cikar. */
.ip-highlight { color: var(--err-500); font-weight: 700; font-family: var(--font-mono); user-select: all; }
.alert__close {
  margin-left: auto; border: 0; background: transparent;
  color: var(--text-muted); cursor: pointer; padding: 0 2px;
}

/* --- Sayfalama --------------------------------------------------------- */

/* Sayfalama — butun tablolarda ortak; kucuk, sikisik dugmeler. */
.pager {
  display: flex; align-items: center; gap: 4px;
  flex-wrap: wrap; justify-content: center;
  padding: var(--sp-2) var(--sp-4);
}
.pager__link {
  min-width: 24px; height: 24px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--ink-700);
  font-size: var(--fs-xs); font-weight: 600; line-height: 1;
}
.pager__link:hover { background: var(--brand-50); border-color: var(--brand-300); color: var(--brand-700); }
.pager__link.is-active {
  background: var(--brand-500); border-color: var(--brand-500); color: #fff;
}
.pager__info { font-size: var(--fs-xs); color: var(--text-muted); margin-right: auto; }

/* --- Tanim listesi ---------------------------------------------------- */

.dl { display: grid; grid-template-columns: 190px 1fr; gap: 1px; }
.dl > dt {
  padding: 9px var(--sp-4);
  background: var(--surface-muted);
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-600);
}
.dl > dd {
  margin: 0; padding: 9px var(--sp-4);
  font-size: var(--fs-base); color: var(--ink-800);
}
@media (max-width: 620px) { .dl { grid-template-columns: 1fr; } }

/* --- Giris ekrani ----------------------------------------------------- */

.auth {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: var(--sp-6);
  background:
    radial-gradient(1100px 520px at 12% -10%, var(--brand-100), transparent 62%),
    radial-gradient(900px 480px at 100% 105%, var(--brand-50), transparent 60%),
    var(--page-bg);
}
.auth__card {
  width: 100%; max-width: 420px;
  padding: var(--sp-8);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}
.auth__brand { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-6); }
.auth__brand .brand-mark { width: 46px; height: 46px; font-size: var(--fs-lg); }
.auth__title { font-size: var(--fs-lg); color: var(--ink-900); }
.auth__sub { font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: var(--sp-5); }
.auth__foot { margin-top: var(--sp-5); text-align: center; font-size: var(--fs-xs); color: var(--text-faint); }

/* --- Arac cubugu (kart ici arama + filtre seridi) --------------------- */

.toolbar {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  flex-wrap: wrap;
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-muted) 100%);
}

.toolbar__search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 280px;
  min-width: 220px;
}
.toolbar__search .ic { position: absolute; left: 9px; color: var(--text-faint); pointer-events: none; }
.toolbar__search input {
  width: 100%; height: 28px; padding: 0 var(--sp-3) 0 29px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.toolbar__search input:focus {
  outline: none; border-color: var(--brand-400);
  box-shadow: 0 0 0 3px var(--brand-100);
}
.toolbar__search:focus-within .ic { color: var(--brand-500); }

.toolbar__select {
  height: 28px; padding: 0 var(--sp-2);
  border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--ink-700); font: inherit; font-size: var(--fs-sm);
  cursor: pointer; transition: border-color var(--transition), color var(--transition);
}
.toolbar__select:hover { border-color: var(--brand-300); color: var(--brand-700); }
.toolbar__select:focus { outline: none; border-color: var(--brand-400); box-shadow: 0 0 0 3px var(--brand-100); }
.toolbar__select--tight { min-width: 84px; }

/* Rol kartlari arasindaki "+" — admin'in kendi rolunu eklemesi. */
.role-card--add {
  border-style: dashed; background: transparent; cursor: pointer;
  font: inherit; text-align: left;
}
.role-card--add .role-card__icon { background: var(--brand-50); color: var(--brand-600); }
.role-card--add:hover { border-color: var(--brand-400); background: var(--brand-50); }

.role-new {
  display: grid; gap: var(--sp-3);
  margin-top: var(--sp-3); padding: var(--sp-3);
  border: 1px dashed var(--brand-300); border-radius: var(--radius);
  background: var(--brand-50);
}
.role-new.is-hidden { display: none; }
.role-new__foot { display: flex; justify-content: flex-end; gap: var(--sp-2); }

/* Kart disinda tek basina duran arac cubugu (ornek: Dokumanlar). */
.toolbar--bar {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); margin-bottom: var(--sp-2);
}
/* Dar arama kutusu — genisleyip satiri doldurmaz. */
.toolbar__search--narrow { flex: 0 1 260px; min-width: 180px; }

/* Tablo alt seridi — durum suzgeci, satir sayisi ve toplam kayit. */
.list-foot {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border-top: 1px solid var(--border);
  background: var(--surface-muted);
}
.list-foot__info { margin-left: auto; font-size: var(--fs-xs); color: var(--text-muted); }

/* Sayfa dugmeleri arac cubugunun sagina yaslanir (Sutunlar · Disa Aktar · Yeni …). */
.toolbar__actions { margin-left: auto; display: flex; align-items: center; gap: var(--sp-2); }

@media (max-width: 720px) {
  .toolbar { padding: var(--sp-3); }
  .toolbar__select { flex: 1 1 auto; }
}

/* --- Grup sekmeleri (Personel · Partner · Rehber · Discekim) ----------- */
/* Arac cubugunun altindaki satirda, sola yasli, yan yana cerceveli kutular.
   Aktif sekme turuncu cerceve ve yaziyla one cikar. Her sekme bir
   baglantidir; sunucu tarafinda hazir bir suzgec calistirir. */

.toolbar--stacked { border-bottom: 0; padding-bottom: var(--sp-1); }

.tab-row {
  padding: var(--sp-1) var(--sp-3) var(--sp-2);
  border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
}

.seg-tabs { display: flex; flex-wrap: wrap; }
.seg-tab {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 140px; height: 30px; padding: 0 var(--sp-4);
  margin-left: -1px;
  border: 1px solid var(--border);
  background: var(--surface-muted);
  color: var(--ink-600); font-size: var(--fs-sm); font-weight: 500;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
}
.seg-tab:first-child { margin-left: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.seg-tab:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.seg-tab .ic { color: var(--ink-400); }
.seg-tab:hover { background: var(--surface); color: var(--brand-700); }
.seg-tab.is-active {
  position: relative; z-index: 1;
  background: var(--surface); color: var(--brand-600); font-weight: 700;
  border-color: var(--brand-500); border-radius: var(--radius-sm);
}
.seg-tab.is-active .ic { color: var(--brand-500); }

@media (max-width: 720px) {
  .seg-tab { min-width: 0; flex: 1 1 45%; }
}

/* --- Uye tablosu ------------------------------------------------------ */

.table--members tbody td { padding: 5px var(--sp-3); vertical-align: middle; }
.table--members tbody tr { transition: background var(--transition); }

.rowno {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 4px;
  border-radius: var(--radius-sm); background: var(--ink-100);
  font-size: var(--fs-xs); font-weight: 700; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.table--members tbody tr:hover .rowno { background: var(--brand-100); color: var(--brand-700); }

.member { display: flex; align-items: center; gap: var(--sp-2); min-width: 0; }

/* Fotograf yoksa yalnizca bas harfler yazar (AD, CM …): renkli daire yok,
   ince gri cerceve icinde koyu yazi. Fotograf varsa kutuyu doldurur. Kural
   bu sinifi kullanan her tabloda ve uye basliginda gecerlidir. */
.member__avatar {
  position: relative; flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--ink-700); font-size: var(--fs-sm); font-weight: 600; letter-spacing: .3px;
}
.member__avatar img { width: 100%; height: 100%; object-fit: cover; }
.member__avatar.is-online::after {
  content: ""; position: absolute; right: -1px; bottom: -1px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ok-500); border: 2px solid var(--surface);
}

.member__body { min-width: 0; display: grid; gap: 0; }
.member__name {
  display: flex; align-items: center; gap: 5px;
  font-size: var(--fs-base); font-weight: 600; color: var(--ink-900);
}
.member__meta { font-size: var(--fs-xs); color: var(--text-faint); font-family: var(--font-mono); }

.chips { display: flex; gap: 3px; }

/* Telefon hucresi — numara ustte, iletisim kisayollari hemen altinda. */
.cell-contact { display: grid; gap: 2px; justify-items: start; }
.cell-contact__no {
  font-size: var(--fs-sm); font-variant-numeric: tabular-nums;
  white-space: nowrap; color: var(--ink-700);
}
.chip {
  display: inline-grid; place-items: center;
  width: 19px; height: 17px; border-radius: var(--radius-sm);
  color: #fff; transition: transform var(--transition), filter var(--transition);
}
.chip:hover { transform: translateY(-1px); filter: brightness(1.06); }
.chip--wa   { background: #22c55e; }
.chip--tel  { background: var(--info-500); }
.chip--mail { background: var(--brand-500); }

.doc-count {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: var(--radius-pill); background: var(--brand-50);
  border: 1px solid var(--brand-200); color: var(--brand-700);
  font-size: var(--fs-xs); font-weight: 700;
}
.doc-count.is-zero { background: var(--ink-100); border-color: var(--border); color: var(--text-faint); }

/* Satir islem dugmeleri */
.row-actions { display: inline-flex; gap: 2px; }
.row-action {
  display: inline-grid; place-items: center;
  width: 23px; height: 23px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: transparent;
  color: var(--ink-400); cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.row-action:hover { background: var(--brand-50); border-color: var(--brand-200); color: var(--brand-600); }
.row-action--lock:hover   { background: var(--warn-50); border-color: #fcd34d; color: #b45309; }
.row-action--key:hover    { background: var(--brand-50); border-color: var(--brand-300); color: var(--brand-700); }
.row-action--doc:hover    { background: var(--info-50); border-color: #7dd3fc; color: #0369a1; }
.row-action--edit:hover   { background: var(--ok-50);   border-color: #86efac; color: #15803d; }
.row-action--danger:hover { background: var(--err-50);  border-color: #fca5a5; color: #b91c1c; }
.row-action:disabled, .row-action.is-locked { opacity: .35; cursor: not-allowed; }
.row-action.is-locked:hover { background: transparent; border-color: transparent; color: var(--ink-400); }

/* Sutun secim menusu */
.col-menu { position: relative; }
.col-menu .dropdown { min-width: 200px; }
.col-menu__item {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: 3px var(--sp-2); border-radius: var(--radius-sm);
  font-size: var(--fs-sm); color: var(--ink-700); cursor: pointer;
}
.col-menu__item:hover { background: var(--brand-50); color: var(--brand-700); }
.col-menu__item input { width: 14px; height: 14px; accent-color: var(--brand-500); }

/* Gizlenen kolon — tarayicinin varsayilani yeterli ama tablo hucrelerinde
   display degeri ezilebildigi icin acikca belirtiyoruz. */
th[hidden], td[hidden] { display: none !important; }
.row-action:disabled:hover { background: transparent; border-color: transparent; color: var(--ink-400); }

/* --- Acik / kapali anahtar -------------------------------------------- */

.switch {
  position: relative; display: inline-block;
  width: 34px; height: 19px; padding: 0;
  border: 0; border-radius: var(--radius-pill);
  background: var(--ink-300); cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
}
.switch:hover { box-shadow: 0 0 0 3px var(--ink-100); }
.switch.is-on { background: var(--ok-500); }
.switch.is-on:hover { box-shadow: 0 0 0 3px var(--ok-50); }
.switch:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

/* Degistirilemeyen anahtar — olu gorunmesin diye tarali ve kilit imlecli. */
.switch--locked {
  cursor: not-allowed; opacity: .55;
  background-image: repeating-linear-gradient(
    45deg, rgba(255,255,255,.45) 0 3px, transparent 3px 6px);
}
.switch--locked:hover { box-shadow: 0 0 0 3px var(--ink-100); }

.switch__knob {
  position: absolute; top: 3px; left: 3px;
  width: 13px; height: 13px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-sm);
  transition: transform var(--transition);
}
.switch.is-on .switch__knob { transform: translateX(15px); }

/* --- Modal ------------------------------------------------------------ */

.modal {
  position: fixed; inset: 0; z-index: 80;
  display: none; align-items: flex-start; justify-content: center;
  padding: var(--sp-8) var(--sp-4);
  overflow-y: auto;
}
.modal.is-open { display: flex; }
body.is-modal-open { overflow: hidden; }

.modal__scrim {
  position: fixed; inset: 0;
  background: rgba(28, 25, 23, .48);
  backdrop-filter: blur(2px);
  animation: modal-fade 160ms ease-out;
}

.modal__box {
  position: relative; z-index: 1;
  width: min(880px, 100%);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modal-rise 180ms cubic-bezier(.2, .8, .3, 1);
}

@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-rise {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

.modal__head {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  padding: var(--sp-5);
  background: linear-gradient(135deg, var(--brand-50), var(--sidebar-tint));
  border-bottom: 1px solid var(--border);
}
.modal__icon {
  flex: none; width: 40px; height: 40px; border-radius: var(--radius);
  display: grid; place-items: center;
  background: var(--brand-500); color: #fff; box-shadow: var(--shadow-brand);
}
.modal__title { font-size: var(--fs-lg); color: var(--ink-900); letter-spacing: -.2px; }
.modal__sub { font-size: var(--fs-sm); color: var(--text-muted); margin-top: 2px; }
.modal__close {
  margin-left: auto; flex: none;
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  display: grid; place-items: center;
  border: 1px solid transparent; background: transparent;
  color: var(--text-muted); cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.modal__close:hover { background: var(--surface); color: var(--err-500); border-color: var(--border); }

.modal__body { padding: var(--sp-4); display: grid; gap: var(--sp-4); }

.modal__foot {
  display: flex; justify-content: flex-end; gap: var(--sp-2);
  padding: var(--sp-4) var(--sp-5);
  background: var(--surface-muted);
  border-top: 1px solid var(--border);
}

.modal__box--wide { width: min(1000px, 100%); }
.modal__body--flush { padding: 0; display: block; max-height: 62vh; overflow-y: auto; }

/* --- Yetkiler > Ana Ekran Tasarimi (tek satir, kompakt tek secim) ----- */

.home-layout {
  margin: 0; padding: var(--sp-2) var(--sp-5);
  border: 0; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
}
.home-layout__title {
  float: left; /* legend'i fieldset akisina sokar (flex ogesi olsun) */
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  padding: 0; cursor: help;
  font-size: var(--fs-xs); font-weight: 700; color: var(--ink-800);
  text-transform: uppercase; letter-spacing: .4px;
}
.home-layout__title .ic { color: var(--brand-500); }
.home-layout__grid { display: flex; flex-wrap: wrap; gap: var(--sp-2); flex: 1 1 auto; }
.home-layout__card {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px 0 4px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
  background: var(--surface); cursor: pointer;
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-700); white-space: nowrap;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}
.home-layout__card:hover { border-color: var(--brand-300); color: var(--brand-700); }
.home-layout__card input { position: absolute; opacity: 0; pointer-events: none; }
.home-layout__icon {
  width: 20px; height: 20px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--ink-100); color: var(--ink-600);
  transition: background var(--transition), color var(--transition);
}
.home-layout__icon .ic { width: 12px; height: 12px; }
.home-layout__check { display: none; }
.home-layout__check .ic { width: 11px; height: 11px; stroke-width: 2.6; }
.home-layout__card:has(input:checked) {
  border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-700);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-500) 12%, transparent);
}
.home-layout__card:has(input:checked) .home-layout__icon { background: var(--brand-500); color: #fff; }
.home-layout__card:has(input:checked) .home-layout__check { display: inline-grid; color: var(--brand-600); }
.home-layout__card:has(input:focus-visible) { outline: 2px solid var(--brand-400); outline-offset: 2px; }

/* --- Ekran yetkileri matrisi ------------------------------------------ */

.perm-toolbar {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  border-bottom: 1px solid var(--border);
  background: var(--surface-muted);
}

.perm-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }

.perm-table thead th {
  position: sticky; top: 0; z-index: 2;
  padding: var(--sp-2) var(--sp-3);
  background: var(--surface); border-bottom: 1px solid var(--border-strong);
  font-size: var(--fs-xs); font-weight: 700; color: var(--ink-800);
  text-transform: uppercase; letter-spacing: .4px; text-align: left;
}
.perm-table thead th.t-center { text-align: center; width: 130px; }
.perm-table thead th span { display: block; }

.perm-all {
  margin-top: 2px; padding: 1px 8px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--text-muted);
  font: inherit; font-size: 10px; text-transform: none; letter-spacing: 0;
  cursor: pointer; transition: all var(--transition);
}
.perm-all:hover { border-color: var(--brand-400); color: var(--brand-700); background: var(--brand-50); }

.perm-table tbody td, .perm-table tbody th { padding: 5px var(--sp-3); border-bottom: 1px solid var(--ink-100); }
.perm-table tbody tr:hover td { background: var(--brand-50); }
.perm-table tbody tr.is-hidden { display: none; }

.perm-group th {
  padding-top: var(--sp-3); text-align: left;
  font-weight: 700; color: var(--ink-900); background: var(--surface-muted);
}
.perm-group:hover th { background: var(--surface-muted); }

/* Ortalama kurali `.table` icin tanimli; yetki tablosu ayri bir sinif oldugu
   icin burada tekrar verilir. Hem satirlardaki hem bolum basligindaki tikler
   ayni hizaya bu sayede gelir. */
.perm-table tbody td.t-center,
.perm-table tbody th.t-center { text-align: center; }

.perm-name { color: var(--ink-700); }
.perm-name--1 { padding-left: var(--sp-5) !important; }
.perm-name--2 { padding-left: var(--sp-10) !important; color: var(--text-muted); }

/* --- Tik kutusu -------------------------------------------------------- */
/* Yetki matrisi gibi yuzlerce secimin yan yana durdugu yerlerde anahtar cok
   yer kaplar; tik kutusu hem daha derli toplu hem tek bakista okunur.
   Gorunum tamamen CSS: gercek onay kutusu gizli ama tiklama, klavye ve form
   gonderimi yerlisi gibi calisir. */

.tick {
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; line-height: 0;
}
.tick input[type="checkbox"] {
  position: absolute; opacity: 0; width: 0; height: 0; margin: 0;
}

.tick__box {
  position: relative;
  width: 20px; height: 20px;
  border: 1.5px solid var(--border-strong); border-radius: 5px;
  background: var(--surface);
  transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.tick__box::after {
  content: "";
  position: absolute; left: 6px; top: 2px;
  width: 5px; height: 9px;
  border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(.5);
  opacity: 0;
  transition: opacity var(--transition), transform var(--transition);
}

.tick:hover .tick__box { border-color: var(--brand-400); }

.tick input:checked + .tick__box { background: var(--ok-500); border-color: var(--ok-500); }
.tick input:checked + .tick__box::after { opacity: 1; transform: rotate(45deg) scale(1); }
.tick input:focus-visible + .tick__box { box-shadow: 0 0 0 3px var(--brand-100); }

/* Bolum basligindaki ozet kutusu: alt satirlarin YALNIZCA bir kismi acikken
   tik degil cizgi gosterir — "kismen acik" durumu boylece tek bakista okunur. */
.tick input:indeterminate + .tick__box { background: var(--ink-400); border-color: var(--ink-400); }
.tick input:indeterminate + .tick__box::before {
  content: "";
  position: absolute; left: 4px; top: 8px;
  width: 10px; height: 2px; border-radius: 1px; background: #fff;
}

/* Sutuna gore renk: silme yetkisi kirmizi, dikkat cekmeli. */
.tick--duzenle input:checked + .tick__box { background: var(--info-500); border-color: var(--info-500); }
.tick--sil input:checked + .tick__box { background: var(--err-500); border-color: var(--err-500); }

/* Modal ici alan gruplari */
.fieldset { display: grid; gap: var(--sp-3); }
.fieldset.is-hidden { display: none; }
.license-note.is-hidden { display: none; }
.fieldset__title {
  display: flex; align-items: center; gap: 7px;
  font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .8px;
  color: var(--brand-700);
  padding-bottom: 7px; border-bottom: 1px dashed var(--brand-200);
}
.fieldset__title .ic { color: var(--brand-500); }
.fieldset__note {
  text-transform: none; letter-spacing: 0;
  font-size: var(--fs-sm); font-weight: 500; color: var(--text-muted);
}

/* Acilir / kapanir blok */
.fieldset--collapse { gap: 0; }
.fieldset__toggle {
  width: 100%; margin: 0; padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--brand-200); border-radius: var(--radius);
  background: linear-gradient(135deg, var(--brand-50), var(--sidebar-tint));
  cursor: pointer; text-align: left; font-family: inherit;
  transition: border-color var(--transition), background var(--transition);
}
.fieldset__toggle:hover { border-color: var(--brand-400); }
.fieldset__toggle:focus-visible { outline: 2px solid var(--brand-400); outline-offset: 2px; }

.fieldset__badge {
  margin-left: auto; padding: 3px 10px;
  border-radius: var(--radius-pill); background: var(--brand-500); color: #fff;
  font-size: var(--fs-xs); font-weight: 700; text-transform: none; letter-spacing: 0;
  white-space: nowrap;
}
.fieldset__badge:empty { display: none; }

.fieldset__chevron { color: var(--brand-600); transition: transform var(--transition); }

.fieldset__panel {
  display: grid; gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--brand-200); border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--surface);
}

.fieldset--collapse.is-collapsed .fieldset__panel { display: none; }
.fieldset--collapse.is-collapsed .fieldset__toggle { border-radius: var(--radius); }
.fieldset--collapse.is-collapsed .fieldset__chevron { transform: rotate(-90deg); }

/* --- Rol secici kartlari ---------------------------------------------- */

.role-picker {
  display: grid; gap: var(--sp-2);
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

/* --- Detayli filtre paneli -------------------------------------------- */

.filter-panel { margin-bottom: var(--sp-4); }

/* Arama cubugundaki "Detayli Filtre" dugmesi — panelin asil girisi.
   Panel acikken vurgulanir, aktif filtre sayisi rozette durur. */
.btn[data-collapse-toggle] .fieldset__chevron { transform: rotate(-90deg); }
.btn[data-collapse-toggle].is-open .fieldset__chevron { transform: none; }
.btn[data-collapse-toggle].is-on,
.btn[data-collapse-toggle].is-open {
  background: var(--brand-50); border-color: var(--brand-400); color: var(--brand-700);
}

.btn__count {
  display: inline-grid; place-items: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--brand-500); color: #fff;
  font-size: 10.5px; font-weight: 700; line-height: 1;
}

.filter-grid {
  display: grid; gap: var(--sp-3);
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  align-items: end;
}
.filter-grid .field > label {
  font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted);
  text-transform: none; letter-spacing: 0;
}
.filter-grid input, .filter-grid select { height: 36px; font-size: var(--fs-sm); }

.filter-grid__actions {
  grid-column: 1 / -1;
  display: flex; justify-content: flex-end; gap: var(--sp-2);
  padding-top: var(--sp-2); border-top: 1px dashed var(--border);
}

.date-range { display: flex; align-items: center; gap: 6px; }
.date-range input { flex: 1 1 0; min-width: 0; }
.date-range > span { color: var(--text-faint); font-size: var(--fs-sm); }

.role-hint {
  display: flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-4);
  border: 1px dashed var(--brand-200); border-radius: var(--radius);
  background: var(--brand-50); color: var(--brand-700);
  font-size: var(--fs-sm); font-weight: 600;
}
.role-hint.is-hidden { display: none; }

.role-card {
  position: relative; display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3);
  border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--surface); cursor: pointer;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}
.role-card:hover { border-color: var(--brand-300); background: var(--brand-50); }
.role-card input { position: absolute; opacity: 0; pointer-events: none; }

.role-card__icon {
  flex: none; width: 34px; height: 34px; border-radius: var(--radius-sm);
  display: grid; place-items: center;
  background: var(--ink-100); color: var(--ink-500);
  transition: background var(--transition), color var(--transition);
}
.role-card__body { display: grid; gap: 2px; min-width: 0; }
.role-card__name { font-size: var(--fs-sm); font-weight: 700; color: var(--ink-900); }
.role-card__desc { font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.35; }
.role-card__check { margin-left: auto; flex: none; color: var(--brand-500); opacity: 0; transition: opacity var(--transition); }

.role-card.is-active {
  border-color: var(--brand-500); background: var(--brand-50);
  box-shadow: 0 0 0 3px var(--brand-100);
}
.role-card.is-active .role-card__icon { background: var(--brand-500); color: #fff; }
.role-card.is-active .role-card__check { opacity: 1; }
.role-card:focus-within { border-color: var(--brand-400); }

/* --- Tekrarlanabilir satir tablosu (maas vb.) ------------------------- */

.repeater { width: 100%; border-collapse: collapse; }
.repeater thead th {
  padding: 8px var(--sp-3);
  font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-muted); text-align: left;
  border-bottom: 1px solid var(--border);
}
.repeater thead th.t-center { text-align: center; }
.repeater tbody td { padding: 6px var(--sp-2); border-bottom: 1px solid var(--border); vertical-align: middle; }
.repeater tbody td.t-center { text-align: center; }
.repeater tbody tr:last-child td { border-bottom: 0; }
.repeater input {
  width: 100%; height: 36px; padding: 0 var(--sp-3);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-sm);
}
.repeater input:focus { outline: none; border-color: var(--brand-400); box-shadow: 0 0 0 3px var(--brand-100); }
.repeater__foot { display: flex; justify-content: flex-end; }

/* --- Basit liste (Partner Turleri modali) ------------------------------ */

.simple-list { display: flex; flex-direction: column; gap: 2px; margin: 0 0 var(--sp-3); padding: 0; list-style: none; }
.simple-list__row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
  padding: 8px var(--sp-2); border-bottom: 1px solid var(--border);
}
.simple-list__row:last-child { border-bottom: 0; }

.input-suffix { display: flex; align-items: stretch; }
.input-suffix input { border-top-right-radius: 0; border-bottom-right-radius: 0; text-align: right; }
.input-suffix > span {
  display: grid; place-items: center; padding: 0 var(--sp-3);
  border: 1px solid var(--border-strong); border-left: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--surface-muted); color: var(--text-muted);
  font-size: var(--fs-sm); font-weight: 600;
}

@media (max-width: 640px) {
  .modal { padding: 0; }
  .modal__box { width: 100%; min-height: 100%; border-radius: 0; }
}

/* --- Yardimci siniflar ----------------------------------------------- */

.text-faint { color: var(--text-faint); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--sp-4); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.fw-700 { font-weight: 700; }
.nowrap { white-space: nowrap; }
.flex { display: flex; align-items: center; gap: var(--sp-2); }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.ml-auto { margin-left: auto; }

/* --- Zengin metin editoru ---------------------------------------------- */

.editor {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.editor:focus-within { border-color: var(--brand-400); box-shadow: 0 0 0 3px var(--brand-100); }

.editor__bar {
  display: flex; align-items: center; gap: 3px; flex-wrap: wrap;
  padding: 6px var(--sp-2);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-muted) 100%);
}

.editor__btn {
  display: inline-grid; place-items: center;
  min-width: 30px; height: 28px; padding: 0 7px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  background: transparent; color: var(--ink-700);
  font: inherit; font-size: var(--fs-sm); line-height: 1; cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.editor__btn:hover { background: var(--brand-50); border-color: var(--brand-200); color: var(--brand-700); }
.editor__btn:active { background: var(--brand-100); }

.editor__sep { width: 1px; height: 18px; margin: 0 4px; background: var(--border); }

.editor__area {
  min-height: 320px; max-height: 60vh; overflow-y: auto;
  padding: var(--sp-4) var(--sp-5);
  font-size: var(--fs-base); line-height: 1.65; color: var(--text);
  outline: none;
}
.editor__area:empty::before {
  content: "Dokuman icerigini buraya yazin…";
  color: var(--text-faint);
}

/* Editor icindeki icerigin gorunumu — cikti belgesine yakin dursun. */
.editor__area h1, .editor__area h2 {
  font-size: var(--fs-lg); color: var(--ink-900); margin: var(--sp-4) 0 var(--sp-2);
}
.editor__area h3 { font-size: var(--fs-md); color: var(--ink-900); margin: var(--sp-3) 0 var(--sp-2); }
.editor__area p { margin: 0 0 var(--sp-3); }
.editor__area ul, .editor__area ol { margin: 0 0 var(--sp-3); padding-left: var(--sp-6); }
.editor__area li { margin-bottom: 4px; }
.editor__area a { color: var(--brand-700); text-decoration: underline; }
.editor__area blockquote {
  margin: 0 0 var(--sp-3); padding: var(--sp-2) var(--sp-4);
  border-left: 3px solid var(--brand-300); background: var(--brand-50); color: var(--ink-700);
}

/* --- Uygulamalar ------------------------------------------------------- */
/* Kucuk kare kutular: gorsel ustte, baslik altinda. Aciklama tek satir,
   tamami fare ile uzerine gelince (title) gorunur. */

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: var(--sp-3);
}
.app-tile-wrap { position: relative; }
/* Yoneticide kartlar surukle-birak ile siralanir. */
[data-app-sort] .app-tile-wrap { cursor: grab; }
[data-app-sort] .app-tile-wrap:active { cursor: grabbing; }
.app-tile-wrap.is-dragging { opacity: .35; }
.app-tile-wrap.is-dragging .app-tile { border-style: dashed; border-color: var(--brand-400); }
.app-tile-wrap.is-passive { opacity: .45; }

.app-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
  aspect-ratio: 1 / 1;
  padding: var(--sp-3) var(--sp-2);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-sm);
  color: var(--ink-800); text-align: center;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.app-tile:hover {
  border-color: var(--brand-300); box-shadow: var(--shadow-md);
  transform: translateY(-2px); color: var(--brand-700);
}

.app-tile__logo {
  width: 44px; height: 44px; flex: none;
  display: grid; place-items: center; overflow: hidden;
  border-radius: var(--radius);
  background: var(--brand-50);
}
.app-tile__logo img { width: 100%; height: 100%; object-fit: contain; }
.app-tile__initials { font-weight: 700; font-size: var(--fs-md); color: var(--brand-600); }

.app-tile__title {
  max-width: 100%;
  font-size: var(--fs-sm); font-weight: 600; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.app-tile__desc {
  max-width: 100%;
  font-size: var(--fs-xs); color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Yonetici araclari kutunun sag ustunde, uzerine gelince belirir. */
.app-tile__tools {
  position: absolute; top: 4px; right: 4px;
  display: flex; gap: 2px;
  padding: 2px; border-radius: var(--radius-sm);
  background: var(--surface); box-shadow: var(--shadow-sm);
  opacity: 0; transition: opacity var(--transition);
}
.app-tile-wrap:hover .app-tile__tools,
.app-tile__tools:focus-within { opacity: 1; }
.app-tile__tools form { display: inline; }

/* --- Genel Ayarlar > Duyurular ------------------------------------------ */

.role-picker__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 4px;
  font-size: var(--fs-sm); font-weight: 600; color: var(--ink-700);
}
.role-picker__all {
  display: inline-flex; align-items: center; gap: 5px;
  font-weight: 500; color: var(--brand-600); cursor: pointer;
}
.role-picker__all input { accent-color: var(--brand-500); }
.role-picker {
  display: grid; gap: 4px;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
}
.role-pick {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 9px;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: var(--fs-sm); cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.role-pick:hover { border-color: var(--brand-300); }
.role-pick input { accent-color: var(--brand-500); flex: none; }
.role-pick:has(input:checked) { border-color: var(--brand-400); background: var(--brand-50); color: var(--brand-800); }

.tag-list { display: flex; flex-wrap: wrap; gap: 3px; }
.announce-body {
  color: var(--text-muted); font-size: var(--fs-sm);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* Ana sayfadaki duyuru kartlari */
.announcements { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.announcement {
  display: flex; gap: var(--sp-3);
  padding: var(--sp-4);
  background: var(--surface);
  border: 1px solid var(--border); border-left: 4px solid var(--brand-500);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.announcement__icon {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--brand-50); color: var(--brand-600);
}
.announcement__title { font-size: var(--fs-md); font-weight: 700; color: var(--ink-900); }
.announcement__meta { font-size: var(--fs-xs); color: var(--text-faint); margin: 2px 0 6px; }
.announcement__body { font-size: var(--fs-base); color: var(--ink-700); line-height: 1.55; }

/* --- Genel Ayarlar > Tema Ayarlari -------------------------------------- */

.theme-layout { max-width: 920px; }
.theme-presets { display: grid; gap: var(--sp-2); grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.theme-preset {
  display: flex; flex-direction: column; gap: 6px; align-items: stretch;
  padding: 8px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  font: inherit; font-size: var(--fs-sm); font-weight: 600; text-align: left;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.theme-preset:hover { border-color: var(--brand-300); }
.theme-preset.is-active { border-color: var(--brand-500); box-shadow: 0 0 0 2px var(--brand-100); }
.theme-preset__swatch { display: flex; height: 26px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.theme-preset__swatch i { flex: 1; }

.color-input { display: flex; align-items: center; gap: var(--sp-2); }
.color-input input[type="color"] {
  width: 42px; height: 32px; flex: none;
  padding: 2px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); cursor: pointer;
}
.color-input__hex { flex: 1; min-width: 0; font-family: var(--font-mono); text-transform: lowercase; }

.theme-actions { display: flex; align-items: center; gap: var(--sp-3); }
.theme-actions .btn:last-child { margin-left: auto; }

/* --- Genel Ayarlar > Doviz Ayarlari ------------------------------------- */

/* Genel Ayarlar > Mail Ayarlari */
.mail-settings { max-width: 980px; }
.mail-settings .card__body { display: grid; gap: var(--sp-3); }
.mail-settings__active, .mail-settings__clear { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; cursor: pointer; }
.mail-settings__clear { margin-top: 4px; font-weight: 500; color: var(--ink-700); }
.mail-settings__actions { display: flex !important; align-items: flex-end; gap: var(--sp-3); flex-wrap: wrap; }
.mail-settings__actions .field { flex: 1 1 260px; margin: 0; }
.currency-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(440px, 1fr)); }
@media (max-width: 560px) { .currency-grid { grid-template-columns: 1fr; } }
.currency-auto {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-sm); font-weight: 600; color: var(--brand-700); cursor: pointer;
}
.currency-auto input { width: 16px; height: 16px; accent-color: var(--brand-500); }
.currency-table td { vertical-align: middle; }
.currency-input {
  width: 100%; height: 30px; padding: 0 8px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  font: inherit; font-variant-numeric: tabular-nums; text-align: right;
}
.currency-input:focus { outline: none; border-color: var(--brand-400); box-shadow: 0 0 0 3px var(--brand-100); }
.currency-input[readonly] { background: var(--surface-muted); color: var(--text-muted); cursor: not-allowed; }
.currency-input.has-error { border-color: var(--err-500); }
.currency-margin { display: flex; gap: 4px; }
.currency-margin select { flex: none; width: 96px; height: 30px; }
.currency-margin .currency-input { flex: 1; min-width: 0; }
.currency-final { font-weight: 700; color: var(--ink-900); }

/* --- Telefon ulke kodu secici (partials/phone_input.html) --------------- */

.phone-input { position: relative; display: flex; }
.phone-input__cc {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  padding: 0 8px;
  border: 1px solid var(--border-strong); border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--surface-muted); color: var(--text);
  font: inherit; font-size: var(--fs-base); font-variant-numeric: tabular-nums;
  cursor: pointer;
}
.phone-input__cc:hover { background: var(--brand-50); }
.phone-input__cc .ic { color: var(--text-faint); }
.phone-input__flag, .phone-input__menu img {
  width: 20px; height: 15px; flex: none; object-fit: cover;
  border-radius: 2px; box-shadow: 0 0 0 1px var(--border);
}
.phone-input > input:not([type="hidden"]) {
  flex: 1; min-width: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.phone-input__menu {
  position: absolute; left: 0; top: calc(100% + 4px); z-index: 30;
  width: 280px; max-width: 90vw;
  padding: 6px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-md);
}
.phone-input__search { width: 100%; margin-bottom: 4px; }
.phone-input__menu ul { max-height: 240px; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.phone-input__menu li {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 7px; border-radius: var(--radius-sm);
  font-size: var(--fs-sm); cursor: pointer;
}
.phone-input__menu li[hidden] { display: none; }
.phone-input__menu li:hover { background: var(--brand-50); }
.phone-input__menu li[aria-selected="true"] { background: var(--brand-100); font-weight: 600; }
.phone-input__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-input__dial { color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* --- Yan yana iki girdi (Partner > Fiyat +/-: Islem · Oran) ------------- */

.inline-pair { display: flex; gap: 6px; }
.inline-pair > select { flex: 0 0 110px; }
.inline-pair > .input-suffix { flex: 1; min-width: 0; }

/* --- Sifre goster / gizle ----------------------------------------------- */

.password-field { position: relative; display: block; }
.password-field > input { width: 100%; padding-right: 36px; }
.password-field__toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-faint); cursor: pointer;
}
.password-field__toggle:hover, .password-field__toggle.is-on { color: var(--brand-600); background: var(--brand-50); }
.role-picker--compact { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.chip--tg { background: #229ed9; }
.cell-country { display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: var(--fs-sm); }
.cell-country img { width: 20px; height: 15px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px var(--border); }

/* --- Discekim Araclar > Tarih Araligi ve GENEL TOPLAM ------------------- */

.date-range {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 28px; padding: 0 10px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--text);
  font-size: var(--fs-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.date-range:hover { border-color: var(--brand-300); }
.date-range:focus-within { border-color: var(--brand-400); box-shadow: 0 0 0 3px var(--brand-100); }
.date-range > .ic { color: var(--text-faint); flex: none; }
.date-range select,
.date-range input[type="date"] {
  height: 26px; padding: 0; border: 0; outline: none;
  background: transparent; color: inherit;
  font: inherit; font-variant-numeric: tabular-nums; cursor: pointer;
}
.date-range select { padding-right: 2px; }
.date-range input[type="date"] { width: 104px; }
.date-range input[type="date"]::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; margin-left: 2px; }
.date-range__sep { width: 1px; height: 16px; background: var(--border); }
.date-range__to { color: var(--text-faint); }
.table tfoot .table-total td {
  border-top: 2px solid var(--border-strong);
  background: var(--surface-muted);
  font-weight: 600;
}
.col-menu__empty { padding: 8px 10px; font-size: var(--fs-sm); color: var(--text-muted); }

/* --- U-ETDS Panel Kullanicilari modali ---------------------------------- */

.split-panels { display: grid; gap: var(--sp-5); grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: start; }
@media (max-width: 860px) { .split-panels { grid-template-columns: 1fr; } }
.form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .form-grid--2 { grid-template-columns: 1fr; } }
.plate-input { text-transform: uppercase; }

/* --- Aranabilir secim (data-searchable-select) -------------------------- */

.ss { position: relative; }
.ss > select { display: none; }
.ss__button {
  width: 100%; height: 34px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  font: inherit; font-size: var(--fs-base); text-align: left; cursor: pointer;
}
.ss.is-disabled .ss__button { background: var(--surface-muted); color: var(--ink-700); cursor: not-allowed; }
.ss__button:focus { outline: none; border-color: var(--brand-400); box-shadow: 0 0 0 3px var(--brand-100); }
.ss__button .ic { color: var(--text-faint); flex: none; transition: transform var(--transition); }
.ss.is-open .ss__button .ic { transform: rotate(180deg); }
.ss__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss__menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 2px); z-index: 30;
  padding: 6px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-md);
}
.ss__search { width: 100%; margin-bottom: 4px; }
.ss__menu ul { max-height: 220px; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.ss__menu li { padding: 6px 8px; border-radius: var(--radius-sm); font-size: var(--fs-sm); cursor: pointer; }
.ss__menu li[hidden] { display: none; }
/* Arac uyari isareti (core/partials/vehicle_alert.html) — secim listesindeki "!" ile ayni */
.v-alert {
  display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 4px; vertical-align: middle;
  border-radius: 50%; background: var(--err-500); color: #fff; font-size: 11px; font-weight: 800; line-height: 1;
  cursor: help; flex: none;
}
.v-alert-km, .v-alert-km span { color: var(--err-500) !important; font-weight: 600; }
.ss__warn {
  display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 6px; vertical-align: -2px;
  border-radius: 50%; background: var(--err-500); color: #fff; font-size: 11px; font-weight: 800; line-height: 1;
}
.ss__menu li:hover { background: var(--brand-50); }
.ss__menu li[aria-selected="true"] { background: var(--brand-500); color: #fff; }
.ss__empty { padding: 6px 8px; font-size: var(--fs-sm); color: var(--text-faint); }

/* --- Coklu secim (select[multiple][data-multi-select]) ------------------ */

.ms { position: relative; }
.ms > select { display: none; }
.ms__control {
  min-height: 34px; width: 100%;
  display: flex; align-items: center; gap: 8px;
  padding: 3px 10px 3px 4px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); cursor: pointer;
}
.ms__control:focus, .ms.is-open .ms__control { outline: none; border-color: var(--brand-400); box-shadow: 0 0 0 3px var(--brand-100); }
.ms__chips { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.ms__placeholder { padding: 0 6px; font-size: var(--fs-base); color: var(--text-faint); line-height: 26px; }
.ms__chip {
  display: inline-flex; align-items: center; gap: 2px;
  height: 24px; padding: 0 2px 0 9px;
  border: 1px solid var(--brand-100); border-radius: 999px;
  background: var(--brand-50); color: var(--brand-700);
  font-size: var(--fs-sm); font-weight: 500; white-space: nowrap;
}
.ms__chip-x {
  width: 18px; height: 18px; padding: 0; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer;
}
.ms__chip-x .ic { width: 12px; height: 12px; }
.ms__chip-x:hover { background: var(--brand-100); }
.ms__caret { color: var(--text-faint); flex: none; transition: transform var(--transition); }
.ms.is-open .ms__caret { transform: rotate(180deg); }
.ms__menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 30;
  padding: 6px;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow-md);
}
.ms__search { width: 100%; margin-bottom: 4px; }
.ms__menu ul { max-height: 240px; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.ms__menu li {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: var(--radius-sm); font-size: var(--fs-sm); cursor: pointer;
}
.ms__menu li[hidden] { display: none; }
.ms__menu li:hover { background: var(--brand-50); }
.ms__tick {
  width: 16px; height: 16px; flex: none; display: grid; place-items: center;
  border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface); color: transparent;
}
.ms__tick .ic { width: 12px; height: 12px; }
.ms__menu li[aria-selected="true"] { font-weight: 500; }
.ms__menu li[aria-selected="true"] .ms__tick { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
.ms__empty { padding: 6px 8px; font-size: var(--fs-sm); color: var(--text-faint); }
.ms__foot { display: flex; justify-content: space-between; margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--border); }
.ms__foot button {
  padding: 2px 6px; border: 0; border-radius: var(--radius-sm); background: transparent;
  color: var(--brand-500); font: inherit; font-size: var(--fs-sm); cursor: pointer;
}
.ms__foot button:hover { background: var(--brand-50); }

/* --- Mobil duzeltmeleri ------------------------------------------------
   Dar ekranda arac cubugu dugmeleri ve tarih araligi alt satira gecer.
   Gecmezse sayfa ekrandan genisler; o zaman acilan modallar ve menuler de
   ekranin disinda kalir (mobilde "gorunmuyor" sikayetinin kaynagi). */
@media (max-width: 720px) {
  .toolbar__actions { flex-wrap: wrap; margin-left: 0; width: 100%; }
  .toolbar__actions > .btn:last-child { margin-left: auto; }
  /* "10 satir" secimi Sutunlar'in yaninda dar kalsin, satiri doldurmasin */
  .toolbar__actions > .toolbar__select { flex: none; width: auto; }
  .date-range { flex: 1 1 100%; flex-wrap: wrap; height: auto; min-height: 28px; padding: 3px 10px; }
  .date-range input[type="date"] { flex: 1 1 96px; width: auto; }
  .modal__head { padding: var(--sp-4); }
  .modal__foot { flex-wrap: wrap; padding: var(--sp-3) var(--sp-4); }
  .modal__foot > span[style*="margin-right:auto"] { flex: 1 1 100%; }
  .modal__body--flush { max-height: none; }
}

/* Giris ekranindaki reCAPTCHA kutusu (Google'in sabit 304x78 iframe'i).
   Cok dar ekranda kucultulur ki kartin disina tasmasin. */
.auth__captcha { display: flex; justify-content: center; min-height: 78px; }
@media (max-width: 360px) {
  .auth__captcha .g-recaptcha { transform: scale(.88); transform-origin: center top; }
}

/* Konum alanlari — Google Maps adres onerisi (static/js/places.js) */
.pl-box {
  position: absolute; z-index: 1000; max-height: 320px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .14); padding: 4px 0;
}
.pl-box[hidden] { display: none; }
.pl-item { display: flex; align-items: flex-start; gap: 8px; padding: 7px 10px; cursor: pointer; font-size: var(--fs-sm); }
.pl-item:hover, .pl-item.is-on { background: var(--brand-50); }
.pl-ic { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: #ea4335; }
.pl-ic--saved { background: var(--brand-600); }
.pl-txt { flex: 1 1 auto; min-width: 0; line-height: 1.3; }
.pl-txt b { display: block; font-weight: 600; color: var(--ink-800); }
.pl-txt small { display: block; color: var(--text-muted); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-tag { flex: none; font-style: normal; font-size: 10px; font-weight: 700; color: var(--brand-700); background: var(--brand-50); padding: 1px 6px; border-radius: 999px; }
.pl-by { padding: 4px 10px 2px; text-align: right; font-size: 10px; color: var(--text-faint); }

/* Oneri listeli kutular — kutunun hemen altinda acilan liste (static/js/app.js) */
.sg-box {
  position: absolute; z-index: 60; max-height: 260px; overflow-y: auto; padding: 4px 0;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  box-shadow: 0 10px 28px rgba(15, 23, 42, .14);
}
.sg-item { padding: 7px 10px; font-size: var(--fs-sm); color: var(--ink-800); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-item:hover, .sg-item.is-on { background: var(--brand-50); color: var(--brand-700); }

/* Surukle-birak siralama — tablo sutunlari ve sol menu (static/js/app.js) */
th.is-draggable { cursor: grab; }
th.is-draggable:active { cursor: grabbing; }
th.is-dragging { opacity: .45; }
th.is-drop-before { box-shadow: inset 3px 0 0 var(--brand-600); }
th.is-drop-after { box-shadow: inset -3px 0 0 var(--brand-600); }
.col-menu__reset {
  display: block; width: 100%; margin-top: 6px; padding: 7px 10px; border: 0; border-top: 1px solid var(--border);
  background: none; color: var(--brand-700); font: inherit; font-size: var(--fs-sm); text-align: left; cursor: pointer;
}
.col-menu__reset:hover { background: var(--brand-50); }
.col-menu__reset[hidden] { display: none; }
.sidebar__nav [data-nav-item].is-dragging { opacity: .45; }
.sidebar__nav [data-nav-item].is-drop-before { box-shadow: 0 -2px 0 var(--brand-300, #fdba74); }
.sidebar__nav [data-nav-item].is-drop-after { box-shadow: 0 2px 0 var(--brand-300, #fdba74); }
.nav-reset {
  display: block; width: calc(100% - 24px); margin: 4px 12px 0; padding: 5px 8px; border: 1px dashed currentColor;
  border-radius: var(--radius-sm); background: none; color: inherit; opacity: .7; font: inherit; font-size: var(--fs-xs); cursor: pointer;
}
.nav-reset:hover { opacity: 1; }
.nav-reset[hidden] { display: none; }

/* Ust cubukta filtreler (core/partials/inline_filters.html) */
.toolbar--filters .toolbar__search { flex: 1 1 220px; }
.toolbar__filters { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.toolbar__dates { display: inline-flex; align-items: center; gap: 4px; color: var(--text-muted); font-size: var(--fs-sm); }
.toolbar__dates input {
  height: 28px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: var(--radius-pill);
  background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-sm);
}
.toolbar__dates input:focus { outline: none; border-color: var(--brand-400); box-shadow: 0 0 0 3px var(--brand-100); }

/* Yetkisi olmayan toplu islem dugmesi (ornegin "Secimi Sil"): gorunur ama soluk */
.btn.is-locked, .btn.is-locked:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; filter: grayscale(.4); }


/* Aranabilir secim: uyarili secenek secildiginde (data-warn) */
.ss.has-warn .ss__button { border-color: var(--err-500); box-shadow: 0 0 0 1px var(--err-500); }
.ss__alert {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 6px; padding: 8px 10px;
  border: 1px solid #fecaca; border-radius: var(--radius-sm); background: #fef2f2;
  color: #991b1b; font-size: var(--fs-sm); line-height: 1.4;
}
.ss__alert[hidden] { display: none; }
.ss__alert .ss__warn { margin: 1px 0 0; flex: none; }

/* --- Tum tablolar: yalnizca baslik satiri kalin ------------------------- */
/* Hucre ici yazilar (isim, tarih, tutar, plaka, rozet, dugme…) normal kalinlikta
   ve hucrenin puntosunda; vurgu icin kalin / buyuk yazi kullanilmaz. Sayfaya ozel
   CSS'ler sonradan yuklendigi icin !important. Baslik (thead th) etkilenmez. */
table tbody td, table tbody td * { font-weight: 400 !important; }
table tbody td :is(b, strong), .rc-days-left { font-size: inherit !important; }

/* Onay / bilgi penceresi (app.js crmConfirm / crmAlert) */
.cfm { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(15, 23, 42, .45); }
.cfm[hidden] { display: none; }
.cfm__box {
  width: min(420px, 100%); padding: 20px; border-radius: var(--radius-lg); background: var(--surface);
  box-shadow: 0 20px 50px rgba(15, 23, 42, .25);
}
.cfm__msg { margin: 0 0 16px; font-size: var(--fs-md); line-height: 1.5; color: var(--ink-900); white-space: pre-line; }
.cfm__foot { display: flex; justify-content: flex-end; gap: 8px; }
.cfm__input {
  width: 100%; margin: -6px 0 16px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  font: inherit; font-size: var(--fs-base); resize: vertical; background: var(--surface);
}
.cfm__input:focus { outline: none; border-color: var(--brand-400); box-shadow: 0 0 0 3px var(--brand-100); }
.cfm__input[hidden] { display: none; }
.cfm__foot .btn:disabled { opacity: .5; cursor: not-allowed; }

/* --- Tum tablolar: satir satir beyaz / gri + her hucrede ince gri cizgi ---- */
/* Zebra dusuk oncelikli (:where): satir uzerine gelme, secili satir, uyari renkleri
   gibi sinifli arka planlar her zaman ustte kalir. Rezervasyon Takvimi (renkli
   durum hucreleri) haric. */
:root { --grid-line: #c3cad3; --zebra: #f2f4f7; }  /* acik gri, ince cizgi */
:where(table:not(.rcal-table)) > tbody > tr:nth-child(even) > td { background-color: var(--zebra); }
table:not(.rcal-table) { border-collapse: collapse; }
table:not(.rcal-table) > thead > tr > th,
table:not(.rcal-table) > tbody > tr > td,
table:not(.rcal-table) > tfoot > tr > td,
table:not(.rcal-table) > tbody > tr > th { border: .5px solid var(--grid-line) !important; }

/* Uye Yonetimi > Tedarikci (accounts/suppliers.py): hesap ozeti ve onay satiri */
.sup-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-2); margin-bottom: var(--sp-3); }
.sup-total { display: grid; gap: 2px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.sup-total span { font-size: var(--fs-xs); color: var(--text-muted); }
.sup-total b { font-size: var(--fs-lg); color: var(--ink-900); }
.sup-total--main { border-color: var(--brand-300); background: var(--brand-50); }
.sup-total--wait b { color: #b45309; }
.sup-decide { display: grid; gap: 4px; min-width: 460px; }
.sup-decide__row { display: flex; gap: 4px; align-items: center; }
.sup-decide__row select, .sup-decide__row input { flex: 1 1 0; min-width: 0; height: 30px; padding: 0 6px; font-size: var(--fs-xs); }
.sup-decide__row .btn { flex: none; width: 92px; justify-content: center; }
.form-grid[hidden] { display: none; }
@media (max-width: 720px) { .sup-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Kalin yazi yalnizca navbar'da (sol menu + ust cubuk); panelin geri kalaninda her sey normal
   kalinlikta: baslik, tablo basligi, dugme, tutar, <b> / <strong> dahil. Sayfaya ozel kurallardan
   sonra da gecerli olsun diye !important. */
body :not(.sidebar, .sidebar *, .topbar, .topbar *) { font-weight: 400 !important; }
