/* Ortak tasarım sistemi: koyu lacivert zemin, kobalt birincil, cam yüzeyli kartlar.
   Yazı tipleri (Plus Jakarta Sans, Inter) SIL OFL 1.1 ile lisanslıdır ve bu sunucudan verilir. */
@font-face {
  font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/assets/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(/assets/fonts/plus-jakarta-sans-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Inter; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(/assets/fonts/inter-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --ink: #0a0a12;
  --panel: #11121c;
  --panel-2: #181a27;
  --raise: #242635;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.15);
  --text: #e8ebf0;
  --text-hi: #ffffff;
  --muted: #8f98a5;
  --faint: #5f6876;
  --accent: #ff6b0a;
  --accent-hi: #ff8433;
  --accent-soft: #ffb27a;
  --accent-deep: #3a1c08;
  --on-accent: #1d0f04;
  --info: #9ab4fb;
  --green: #1fa96b;
  --green-hi: #3cc585;
  --amber: #f8ae34;
  --red: #e04848;
  --red-hi: #ee6f6f;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --font-display: "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--ink); color: var(--text);
  font: 400 15px/1.55 var(--font-body); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--text-hi); font-weight: 700; letter-spacing: -0.025em; line-height: 1.12; margin: 0; }
p { margin: 0; }
a { color: var(--accent-soft); text-underline-offset: 3px; }
a:hover { color: #ffd2b0; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(255, 107, 10, 0.5); color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* Atmosfer: tek bir mavi ışıma + seyrek yıldız tozu (hareket azaltma tercihine saygılı) */
.sky { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.sky::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60rem 38rem at 12% -12%, rgba(88, 66, 200, 0.2), transparent 62%),
    radial-gradient(42rem 30rem at 96% 108%, rgba(255, 107, 10, 0.09), transparent 65%);
}
.sky::after {
  content: ""; position: absolute; inset: -50% 0 0 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.55) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(255, 178, 122, 0.45) 0 1px, transparent 1.6px),
    radial-gradient(circle, rgba(255, 255, 255, 0.3) 0 0.8px, transparent 1.4px);
  background-size: 410px 380px, 530px 470px, 290px 330px;
  background-position: 30px 60px, 200px 140px, 90px 220px;
  opacity: 0.5; animation: drift 240s linear infinite;
}
@keyframes drift { to { transform: translateY(380px); } }
@media (prefers-reduced-motion: reduce) { .sky::after { animation: none; } * { scroll-behavior: auto !important; } }

/* ---------- Düğmeler ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border-radius: var(--r-sm); border: 1px solid transparent; font: 600 14px/1 var(--font-body); letter-spacing: -0.005em;
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform 0.12s var(--ease), filter 0.15s, background 0.15s, border-color 0.15s;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn:focus-visible, .input:focus-visible, .select:focus-visible, .textarea:focus-visible, .tab:focus-visible, .chk:focus-within {
  outline: none; box-shadow: 0 0 0 3px rgba(255, 107, 10, 0.5);
}
.btn-primary {
  background: var(--accent); color: var(--on-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 10px 28px -12px rgba(255, 107, 10, 0.75);
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.08); color: var(--on-accent); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.08); color: var(--text-hi); border-color: var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 10px 28px -14px rgba(0, 0, 0, 0.6);
}
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.13); color: #fff; }
.btn-quiet { background: transparent; color: var(--muted); }
.btn-quiet:hover:not(:disabled) { background: rgba(255, 255, 255, 0.06); color: var(--text-hi); }
.btn-danger { background: rgba(224, 72, 72, 0.12); color: var(--red-hi); border-color: rgba(224, 72, 72, 0.35); }
.btn-danger:hover:not(:disabled) { background: rgba(224, 72, 72, 0.2); color: #ffb0b0; }
.btn-sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn-icon { width: 36px; min-height: 36px; padding: 0; }
.btn-sm.btn-icon { width: 30px; min-height: 30px; }
.btn-block { width: 100%; }
.btn-lg { min-height: 48px; padding: 0 22px; font-size: 15px; }

/* ---------- Yüzeyler ---------- */
.card {
  position: relative; border-radius: var(--r-lg); border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.018)), var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 28px 70px -36px rgba(0, 0, 0, 0.9);
}
.card-pad { padding: 24px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font: 700 11px/1 var(--font-body); letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.eyebrow svg { width: 14px; height: 14px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 20px 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--font-mono); font-size: 0.92em; letter-spacing: 0; }
.nowrap { white-space: nowrap; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1 1 auto; min-width: 0; }
.right { margin-left: auto; }
.gap-lg { gap: 18px; }

/* ---------- Çipler (durum noktalı) ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 9px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); color: var(--muted);
  font: 700 10.5px/16px var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.chip.plain::before { display: none; }
.chip.ok { color: var(--green-hi); border-color: rgba(60, 197, 133, 0.28); background: rgba(31, 169, 107, 0.1); }
.chip.warn { color: var(--amber); border-color: rgba(248, 174, 52, 0.3); background: rgba(248, 174, 52, 0.09); }
.chip.bad { color: var(--red-hi); border-color: rgba(238, 111, 111, 0.32); background: rgba(224, 72, 72, 0.1); }
.chip.info { color: var(--info); border-color: rgba(154, 180, 251, 0.3); background: rgba(69, 101, 230, 0.12); }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font: 600 13px/1.3 var(--font-body); color: var(--text); }
.hint { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2);
  background: rgba(5, 7, 10, 0.55); color: var(--text-hi); transition: border-color 0.15s, box-shadow 0.15s;
}
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.input:hover, .select:hover, .textarea:hover { border-color: rgba(255, 255, 255, 0.26); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent-hi); }
.textarea { padding: 12px 14px; min-height: 96px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238f98a5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
.select option { background: var(--panel-2); color: var(--text); }
.input-sm, .select-sm { min-height: 34px; font-size: 13px; padding-left: 10px; }
.chk { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r-sm); background: rgba(5, 7, 10, 0.4); }
.chk input { appearance: none; flex: none; width: 20px; height: 20px; margin: 1px 0 0; border-radius: 6px; border: 1.5px solid var(--faint); background: transparent; display: grid; place-items: center; cursor: pointer; transition: all 0.15s; }
.chk input:checked { background: var(--accent); border-color: var(--accent-hi); box-shadow: 0 0 14px -2px rgba(255, 107, 10, 0.8); }
.chk input:checked::after { content: ""; width: 10px; height: 6px; border-left: 2px solid var(--on-accent); border-bottom: 2px solid var(--on-accent); transform: translateY(-1px) rotate(-45deg); }
.chk span { font-size: 13.5px; line-height: 1.5; color: var(--text); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 999px; background: var(--raise); border: 1px solid var(--line-2); position: relative; cursor: pointer; transition: background 0.15s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #cfd5df; transition: transform 0.15s var(--ease), background 0.15s; }
.switch input:checked { background: var(--accent); border-color: var(--accent-hi); }
.switch input:checked::after { transform: translateX(16px); background: #fff; }

/* ---------- Tablo ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-md); border: 1px solid var(--line); background: rgba(5, 7, 10, 0.35); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; font: 700 10.5px/1 var(--font-body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
  padding: 12px 14px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.025); white-space: nowrap;
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background 0.12s; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.03); }
.table tr.clickable { cursor: pointer; }
.table .num { font-variant-numeric: tabular-nums; }
.table.compact th, .table.compact td { padding-left: 10px; padding-right: 10px; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions .btn + .btn { margin-left: 6px; }

/* ---------- Sekmeler ---------- */
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 10px; background: rgba(5, 7, 10, 0.55); border: 1px solid var(--line); flex-wrap: wrap; }
.tab { border: 0; background: transparent; color: var(--muted); padding: 7px 14px; border-radius: 7px; font: 600 13px/1 var(--font-body); cursor: pointer; display: inline-flex; gap: 8px; align-items: center; transition: all 0.15s; }
.tab:hover { color: var(--text-hi); }
.tab[aria-selected="true"] { background: var(--raise); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1); }
.tab .count { font-size: 11px; padding: 1px 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.1); }
.tab .count.hot { background: var(--red); color: #fff; }

/* ---------- Kaplama (modal / çekmece) ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(3, 5, 8, 0.72); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: fade 0.16s ease-out; }
.overlay.side { place-items: stretch; justify-content: end; padding: 0; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; animation: rise 0.22s var(--ease); }
.modal.wide { width: min(860px, 100%); }
.drawer { width: min(520px, 100%); height: 100%; overflow: auto; border-radius: var(--r-lg) 0 0 var(--r-lg); animation: slide 0.24s var(--ease); }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 20px 24px 0; }
.modal-head h3 { font-size: 20px; }
.modal-body { padding: 18px 24px 8px; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 18px; flex-wrap: wrap; position: sticky; bottom: 0; background: var(--panel-2); border-top: 1px solid var(--line); border-radius: 0 0 var(--r-lg) var(--r-lg); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(0.985); } }
@keyframes slide { from { transform: translateX(28px); opacity: 0; } }

/* ---------- Bildirim, yükleniyor, boş durum ---------- */
.toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(92vw, 460px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.9); font-size: 14px; animation: rise 0.2s var(--ease); }
.toast svg { width: 18px; height: 18px; flex: none; }
.toast.ok svg { color: var(--green-hi); }
.toast.bad { border-color: rgba(238, 111, 111, 0.4); }
.toast.bad svg { color: var(--red-hi); }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.18); border-top-color: var(--accent-soft); animation: turn 0.7s linear infinite; flex: none; }
@keyframes turn { to { transform: rotate(360deg); } }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.empty svg { width: 30px; height: 30px; color: var(--faint); }
.empty strong { color: var(--text); font-weight: 600; }
.skel { border-radius: 8px; background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04)); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.notice { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.04); font-size: 13.5px; line-height: 1.5; }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.notice.warn { border-color: rgba(248, 174, 52, 0.35); background: rgba(248, 174, 52, 0.08); }
.notice.warn svg { color: var(--amber); }
.notice.bad { border-color: rgba(238, 111, 111, 0.38); background: rgba(224, 72, 72, 0.09); }
.notice.bad svg { color: var(--red-hi); }
.notice.info { border-color: rgba(154, 180, 251, 0.3); background: rgba(69, 101, 230, 0.1); }
.notice.info svg { color: var(--info); }
.notice.ok { border-color: rgba(60, 197, 133, 0.3); background: rgba(31, 169, 107, 0.09); }
.notice.ok svg { color: var(--green-hi); }

@media (max-width: 640px) {
  .modal-head, .modal-body, .modal-foot { padding-left: 18px; padding-right: 18px; }
  .drawer { border-radius: 0; }
  .card-pad { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { .overlay, .modal, .drawer, .toast, .skel, .spin { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; } }

/* Marka işareti */
.brand { display: inline-flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; font: 800 21px/1 var(--font-display); letter-spacing: -0.025em; }
.brand:hover { color: #fff; }
/* logo.png kare ve kenarsızdır; köşeleri burada yuvarlanır. İnce çizgi, koyu zeminde kenarı belirginleştirir */
.logo { width: 56px; height: 56px; display: block; flex: none; border-radius: 22%; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 10px 26px -10px rgba(255, 107, 10, 0.5); }
.brand .sub { display: block; font: 600 10.5px/1 var(--font-body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
@media (max-width: 640px) { .brand { font-size: 18px; gap: 11px; } .logo { width: 46px; height: 46px; } }
.spectrum { height: 3px; border-radius: 99px; background: linear-gradient(90deg, #35c8a3, #2ebd5e, #e3b61d, #f27f2d, #e36b82); }
