/* FNDX yönetim paneli. Renkler ve yazı tipi, uygulamanın kilitli stil dosyasından değer olarak alınmıştır; o dosya içe aktarılmaz. */
:root {
  --bg: #0C0F16;
  --bg-1: #0F121B;
  --topbar: #0B0E15;
  --surface: #151924;
  --surface-2: #1A1F2C;
  --surface-3: #212737;
  --line: rgba(255, 255, 255, .06);
  --line-2: rgba(255, 255, 255, .1);
  --line-3: rgba(255, 255, 255, .18);
  --text: #F2F4F8;
  --text-2: #A7ADBB;
  --text-3: #7B8293;
  --text-4: #596071;
  --blue: #003CF5;
  --blue-2: #0A2FFF;
  --blue-glow: #2D6BFF;
  --sky: #8DCAFE;
  --red: #FF4D5E;
  --amber: #FFB547;
  --green: #3FBF8A;
  --font-ui: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/20px var(--font-ui);
  min-height: 100vh;
}

h1, h2, h3, p, dl, dd { margin: 0; }
h1 { font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 16px; line-height: 22px; font-weight: 600; }
h3 { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--text-2); }
a { color: var(--sky); }
code, .mono { font-family: var(--font-mono); font-size: 12.5px; }

:focus-visible { outline: 2px solid var(--blue-glow); outline-offset: 2px; }

/* Üst çubuk */
.bar {
  background: var(--topbar);
  border-bottom: 1px solid var(--line-2);
  position: sticky;
  top: 0;
  z-index: 5;
}
.bar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 56px;
}
.brand { display: flex; align-items: baseline; gap: 8px; flex: none; }
.brand b { font-size: 16px; letter-spacing: .04em; font-weight: 700; }
.brand span { color: var(--text-3); font-size: 13px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; flex: 1; min-width: 0; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  color: var(--text-2);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  white-space: nowrap;
  font-weight: 500;
}
.tabs a:hover { background: var(--surface-2); color: var(--text); }
.tabs a[aria-current="page"] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 -2px 0 var(--blue-glow); }

/* Sayfa */
main { max-width: 1240px; margin: 0 auto; padding: 24px 16px 64px; }
.view { display: grid; gap: 16px; }
.view-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.view-head p { color: var(--text-3); }

.card {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  padding: 16px;
  display: grid;
  gap: 16px;
  min-width: 0;
}
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }

/* Formlar */
form { display: grid; gap: 16px; }
.fields { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
label, .label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.hint { font-size: 12.5px; line-height: 18px; color: var(--text-3); }
input, select {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  background: var(--bg-1);
  color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  font: inherit;
}
input::placeholder { color: var(--text-4); }
input:hover { border-color: var(--line-3); }
input:focus-visible { outline: none; border-color: var(--blue-glow); box-shadow: 0 0 0 3px rgba(45, 107, 255, .28); }
input[type="date"] { color-scheme: dark; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid var(--line-3);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--surface-3); }
.btn.primary { background: var(--blue); border-color: var(--blue); }
.btn.primary:hover { background: var(--blue-2); border-color: var(--blue-2); }
.btn.quiet { background: transparent; border-color: var(--line-2); color: var(--text-2); }
.btn.small { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* Bildirimler */
.notice {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  border-left-width: 3px;
  background: var(--surface-2);
  color: var(--text);
}
.notice.warn { border-color: rgba(255, 181, 71, .45); border-left-color: var(--amber); background: rgba(255, 181, 71, .07); }
.notice.err { border-color: rgba(255, 77, 94, .45); border-left-color: var(--red); background: rgba(255, 77, 94, .07); }
.notice.ok { border-color: rgba(63, 191, 138, .45); border-left-color: var(--green); background: rgba(63, 191, 138, .07); }
.notice ul { margin: 0; padding-left: 18px; }
.status { font-size: 13px; color: var(--text-2); min-height: 20px; }
.status.err { color: var(--red); }
.status.ok { color: var(--green); }

.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: var(--surface-3);
  color: var(--text-2);
}
.badge.ok { background: rgba(63, 191, 138, .14); color: var(--green); }
.badge.warn { background: rgba(255, 181, 71, .14); color: var(--amber); }

/* Tablolar */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { font-size: 12px; font-weight: 500; color: var(--text-3); background: var(--bg-1); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .sub { display: block; color: var(--text-3); font-family: var(--font-mono); font-size: 11.5px; }
td.wrap { overflow-wrap: anywhere; min-width: 160px; }
.empty { padding: 24px 12px; text-align: center; color: var(--text-3); }

/* Toplamlar */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1px; background: var(--line-2); border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; }
.stat { background: var(--surface); padding: 12px; display: grid; gap: 2px; }
.stat dt { font-size: 12px; color: var(--text-3); }
.stat dd { font-size: 18px; line-height: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Giriş sayfası */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 420px; }
.login-card .brand { margin-bottom: 4px; }
.secret {
  display: block;
  padding: 12px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 15px;
  letter-spacing: .06em;
  overflow-wrap: anywhere;
  user-select: all;
}
.codes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.codes li { padding: 8px 10px; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 8px; font-family: var(--font-mono); font-size: 13px; text-align: center; user-select: all; }
.steps { margin: 0; padding-left: 18px; color: var(--text-2); display: grid; gap: 4px; }

@media (max-width: 640px) {
  .bar-inner { flex-wrap: wrap; gap: 0 12px; padding-top: 8px; padding-bottom: 4px; }
  .brand { order: 1; flex: 1; }
  #logout { order: 2; }
  .tabs { order: 3; flex-basis: 100%; padding-bottom: 4px; }
  main { padding-top: 16px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .btn { min-height: 44px; }
  .btn.small { min-height: 36px; }
  input, select { min-height: 44px; font-size: 16px; }
}

@media (prefers-reduced-motion: no-preference) {
  .btn, input, .tabs a { transition: background-color .12s, border-color .12s, box-shadow .12s; }
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
