/*
  admin.html'e özgü kurallar. Renk, yazı ve ölçüler velesso.css değişkenlerinden gelir.
  Varsayımlar:
  - İç araç, masaüstü öncelikli; 375px'te tablo kendi çerçevesinde yatay kayar.
  - 375px görsel testi bu görevde tarayıcıda yapılmadı (doğrulanmadı).
  - Gölge, büyük harfli etiket ve renkli durum rozetleri kullanılmaz (görev kuralı).
*/

[hidden] {
  display: none !important;
}

.vl-admin {
  padding: 0 24px 48px;
}

/* ---- Giriş kapısı ---- */

.adm-gate {
  max-width: 420px;
  margin: 64px auto;
}

.adm-gate__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.adm-gate__title {
  margin: 16px 0 0;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: var(--fs-xl);
  line-height: 1.2;
}

.adm-gate__intro {
  margin: 0 0 4px;
}

.adm-label {
  display: block;
  color: var(--text-2);
  font-size: var(--fs-s);
}

.adm-input {
  min-height: 48px;
  height: 48px;
  padding: 0 14px;
}

select.adm-input {
  padding: 0 12px;
}

.adm-error {
  padding: 10px 12px;
  border: 1px solid var(--danger);
  border-radius: var(--radius-btn);
  color: var(--danger-text);
  font-size: var(--fs-s);
  line-height: 1.4;
}

.adm-link {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 44px;
  color: var(--text-2);
  font-size: var(--fs-s);
}

.adm-link:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ---- Ana panel ---- */

.adm-main {
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-width: 1200px;
  margin: 0 auto;
}

.adm-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.adm-top__brand {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
}

.adm-top__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.adm-btn {
  width: auto;
  height: 48px;
  padding: 0 16px;
  font-size: var(--fs-s);
}

/* ---- Özet ---- */

.adm-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  border-top: 1px solid var(--line);
}

.adm-kpi__item {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.adm-kpi__label {
  color: var(--text-2);
  font-size: var(--fs-s);
}

.adm-kpi__val {
  margin-top: 4px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: var(--fs-l);
  line-height: 1.2;
}

/* ---- Arama ve işlemler ---- */

.adm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.adm-search {
  flex: 1 1 280px;
  min-width: 0;
}

.adm-select {
  flex: 0 0 auto;
  width: auto;
  min-width: 180px;
}

/* ---- Tablo ---- */

.adm-table-wrap {
  width: 100%;
  overflow-x: auto;
  border-top: 1px solid var(--text-2);
  border-bottom: 1px solid var(--line);
}

.adm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-s);
  text-align: left;
}

.adm-table th {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
  font-weight: 500;
  white-space: nowrap;
}

.adm-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
}

.adm-table tbody tr:last-child td {
  border-bottom: 0;
}

.adm-table tbody tr:hover td {
  background: var(--surface);
}

.adm-mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.adm-cell__sub {
  margin-top: 2px;
  color: var(--text-2);
  font-size: var(--fs-xs);
}

.adm-pin {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
}

.adm-empty {
  padding: 30px 14px;
  color: var(--text-2);
  text-align: center;
}

.adm-actions {
  display: flex;
  gap: 8px;
}

.adm-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  background: transparent;
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--fs-s);
  text-decoration: none;
  cursor: pointer;
}

.adm-action:hover {
  background: var(--surface);
}

.adm-action:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ---- Talep ve uyarı listeleri ---- */

.adm-list {
  border-top: 1px solid var(--line);
}

.adm-list__item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.adm-list__item:last-child {
  border-bottom: 0;
}

.adm-list__title {
  color: var(--text);
  font-size: var(--fs-m);
  font-weight: 500;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.adm-list__meta {
  margin-top: 2px;
  color: var(--text-2);
  font-size: var(--fs-s);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.adm-list .vl-btn {
  width: auto;
  height: 44px;
  min-height: 44px;
  margin-top: 10px;
  padding: 0 16px;
  font-size: var(--fs-s);
}

/* ---- Alt bilgi ---- */

.adm-foot {
  padding: 8px 0 0;
  color: var(--text-2);
  font-size: var(--fs-s);
}

@media (max-width: 600px) {
  .vl-admin {
    padding: 0 16px 40px;
  }

  .adm-gate {
    margin: 32px auto;
  }

  .adm-top__actions {
    width: 100%;
  }

  .adm-top__actions .adm-btn {
    flex: 1 1 auto;
  }
}
