/* Alpa Player paneli — uygulamayla aynı tasarım dili. İki tema: gece (Siyah &
   Gümüş) ve gündüz (açık zemin). theme.js <html data-theme> değerini cihaz
   tercihine ya da kullanıcının seçimine göre ayarlar. Yerleşim mantıksal
   özelliklerle (inline-start / end) yazılı: Arapçada (dir=rtl) kendiliğinden
   sağdan sola döner. */

:root {
  --bg: #000000;
  --surface: #0e0e12;
  --surface-2: #16161c;
  --line: #24242c;
  --silver: #94a3b8;
  --text: #ffffff;
  --text-2: #a1a1aa;
  --muted: #71717a;
  --ok: #86efac;
  --bad: #fca5a5;
  --warn: #fcd34d;
  --brand: #e0512a;
  --header-bg: rgba(0, 0, 0, .86);
  --sidebar: #08080b;
  --nav-hover: #121217;
  --nav-on: #1c1c23;
  --nav-on-text: #ffffff;
  --icon: #a1a1aa;
  --icon-on: #e2e8f0;
  --primary-bg: #e2e8f0;
  --primary-fg: #000000;
  --primary-hover: #ffffff;
  --btn: #1a1a21;
  --btn-hover: #24242c;
  --field: #16161c;
  --field-focus: #1b1b22;
  --page-icon-bg: linear-gradient(145deg, #1f1f27, #121217);
  --shadow: none;
  --premium: #e8d7a8;
  --radius: 14px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f4f4f1;
  --surface: #ffffff;
  --surface-2: #f2f2ee;
  --line: #e6e6e1;
  --silver: #64748b;
  --text: #111114;
  --text-2: #52525b;
  --muted: #8a8a93;
  --ok: #15803d;
  --bad: #b91c1c;
  --warn: #a16207;
  --header-bg: rgba(255, 255, 255, .9);
  --sidebar: #ffffff;
  --nav-hover: #f4f4f1;
  --nav-on: #111114;
  --nav-on-text: #ffffff;
  --icon: #6b6b74;
  --icon-on: #ffffff;
  --primary-bg: #111114;
  --primary-fg: #ffffff;
  --primary-hover: #000000;
  --btn: #ececE7;
  --btn-hover: #e2e2dc;
  --field: #f4f4f1;
  --field-focus: #ffffff;
  --page-icon-bg: linear-gradient(145deg, #ffffff, #ececE7);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 20px rgba(0, 0, 0, .04);
  --premium: #8a6a16;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 300 15px/1.55 Inter, "Segoe UI", system-ui, -apple-system, "Noto Sans Arabic", "Segoe UI Arabic", sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background-color .25s, color .25s;
}
body.center { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--text-2); }
h1 { font-weight: 300; font-size: 26px; letter-spacing: .2px; margin: 0; }
h2 { font-weight: 500; font-size: 16px; margin: 0 0 14px; color: var(--text); }
h2.mt, .mt { margin-top: 22px; }
code { font: 13px ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--silver); }
code.big { font-size: 18px; color: var(--text); }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* --- Üst şerit ---------------------------------------------------------------- */
.top {
  position: sticky; top: 0; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 24px; background: var(--header-bg); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); letter-spacing: 4px; font-size: 14px; }
.brand b { font-weight: 600; color: var(--brand); }
.brand em { font-style: normal; letter-spacing: 1px; color: var(--muted); font-size: 12px; margin-inline-start: 4px; }
.brand.big { font-size: 18px; justify-content: center; margin-bottom: 6px; }
.logo { width: 28px; height: 28px; }
.brand.big .logo { width: 44px; height: 44px; }
.who { display: flex; align-items: center; gap: 12px; }
.who form { margin: 0; }

.lang { margin: 0; }
.lang-label { flex-direction: row; align-items: center; gap: 6px; color: var(--text-2); }
.lang-label .ico { width: 18px; height: 18px; fill: var(--icon); }
.lang select { width: auto; padding: 7px 10px; border-radius: 999px; font-size: 13px; background: var(--btn); }

.theme-btn {
  width: 38px; height: 38px; border-radius: 19px; border: 0; padding: 0; cursor: pointer; flex: none;
  display: inline-flex; align-items: center; justify-content: center; background: var(--btn); color: var(--text);
}
.theme-btn:hover { background: var(--btn-hover); transform: none; }
.theme-btn svg { width: 19px; height: 19px; fill: currentColor; }
.theme-btn .sun { display: none; }
:root[data-theme="light"] .theme-btn .sun { display: block; }
:root[data-theme="light"] .theme-btn .moon { display: none; }

/* --- Yerleşim ----------------------------------------------------------------- */
.shell { display: grid; grid-template-columns: 264px 1fr; gap: 28px; padding: 24px; max-width: 1440px; margin: 0 auto; }
aside { position: sticky; top: 76px; align-self: start; max-height: calc(100vh - 92px); overflow-y: auto; }
.nav { background: var(--sidebar); border-radius: 18px; padding: 8px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.nav-group { display: flex; flex-direction: column; gap: 2px; padding: 6px 0; }
.nav-group + .nav-group { border-top: 1px solid var(--line); }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px;
  color: var(--text-2); font-size: 14.5px; transition: color .2s, background .2s;
}
.nav a:hover { color: var(--text); background: var(--nav-hover); }
.nav a.on { color: var(--nav-on-text); background: var(--nav-on); font-weight: 500; }
.nav a span { flex: 1; }
.ico { width: 20px; height: 20px; fill: var(--icon); flex: none; }
.nav a.on .ico { fill: var(--icon-on); }
.badge {
  font-style: normal; font-size: 10px; font-weight: 600; letter-spacing: .8px; padding: 2px 8px;
  border-radius: 999px; background: var(--brand); color: #fff;
}
main { min-width: 0; }
.orgbar { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 13px; margin-bottom: 10px; }
.orgbar strong { color: var(--text); font-weight: 500; }
.code { padding: 2px 8px; border-radius: 6px; background: var(--surface-2); font-size: 12px; color: var(--silver); }

/* Sayfa başlığı: anlamlı simge + kısa açıklama */
.page-head { display: flex; align-items: center; gap: 16px; margin: 4px 0 22px; }
.page-icon {
  width: 56px; height: 56px; border-radius: 16px; flex: none; display: grid; place-items: center;
  background: var(--page-icon-bg); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.page-icon .ico { width: 28px; height: 28px; fill: var(--text); }
.page-head p { margin: 4px 0 0; font-size: 14px; }

/* --- Kartlar ------------------------------------------------------------------ */
.card {
  background: var(--surface); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; overflow-x: auto;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head p { margin: 0; max-width: 720px; }
.card.login { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 14px; text-align: start; }
.card.login > p.muted { text-align: center; margin: 0 0 6px; }
.login-wrap { width: 100%; max-width: 380px; }
.login-tools { display: flex; justify-content: flex-end; gap: 10px; margin-bottom: 12px; }
.card.help { background: var(--surface-2); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 18px; align-items: end; }
.grid h2, .grid .wide, .grid table, .grid fieldset { grid-column: 1 / -1; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; align-items: start; }
.split > .card { margin-bottom: 18px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile {
  background: var(--surface); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 4px;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.tile span { color: var(--text-2); font-size: 13px; }
.tile strong { font-weight: 300; font-size: 30px; }
.tile em { font-style: normal; color: var(--muted); font-size: 12px; }
.meter { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; margin: 4px 0 10px; }
.meter i { display: block; height: 100%; width: 0; background: var(--text); border-radius: 4px; transition: width .6s; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
.kv dt { color: var(--text-2); font-size: 13px; }
.kv dd { margin: 0; }
.steps { margin: 0; padding-inline-start: 20px; display: grid; gap: 8px; color: var(--text-2); }
.flow { display: flex; align-items: center; gap: 12px; margin: 14px 0; font-size: 18px; flex-wrap: wrap; }
.flow code { padding: 8px 12px; border-radius: 10px; background: var(--surface); }
[dir="rtl"] .flow span, [dir="rtl"] td.arrow { transform: scaleX(-1); display: inline-block; }
.examples { margin: 8px 0 0; padding-inline-start: 18px; display: grid; gap: 6px; }

/* İndirme kartları */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.card.dl { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; margin: 0; }
.card.dl h2 { margin: 6px 0 0; }
.card.dl p { margin: 0 0 6px; flex: 1; }
.dl-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); }
.dl-icon .ico { fill: var(--text); width: 24px; height: 24px; }

/* --- Form öğeleri ------------------------------------------------------------- */
label { display: flex; flex-direction: column; gap: 6px; color: var(--text-2); font-size: 13px; }
label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-size: 14px; }
label.inline { flex-direction: row; align-items: center; gap: 10px; }
label.inline select { width: auto; min-width: 200px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--field); color: var(--text); font: inherit; font-weight: 300;
  transition: border-color .2s, background .2s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--silver); background: var(--field-focus); }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--text); flex: none; }
input[type=color] { padding: 4px; height: 42px; }
input[type=file] { padding: 8px; }
textarea { font: 13px ui-monospace, Consolas, monospace; resize: vertical; margin: 10px 0; }
progress { width: 100%; height: 6px; accent-color: var(--text); }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0; display: grid; gap: 8px; }
legend { color: var(--text-2); font-size: 13px; padding: 0 6px; }
.pick { display: grid; gap: 6px; max-height: 260px; overflow-y: auto; padding: 8px; border-radius: 10px; background: var(--surface-2); margin-inline-start: 28px; }

button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--btn); color: var(--text); font: inherit; font-weight: 400;
  transition: background .2s, transform .2s;
}
button:hover, .button:hover { background: var(--btn-hover); color: var(--text); transform: scale(1.02); }
button.primary, .button.primary { background: var(--primary-bg); color: var(--primary-fg); font-weight: 500; }
button.primary:hover, .button.primary:hover { background: var(--primary-hover); color: var(--primary-fg); }
.button .ico, button .ico { width: 18px; height: 18px; fill: currentColor; }
button.small, .button.small { padding: 6px 12px; font-size: 13px; }
button.danger { color: var(--bad); }
button.link { background: none; padding: 0; color: var(--text-2); }
button.link:hover { color: var(--text); transform: none; }

/* --- Tablolar ----------------------------------------------------------------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: start; font-weight: 500; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; padding: 8px 10px; }
[dir="rtl"] th { letter-spacing: 0; }
td { padding: 10px; border-top: 1px solid var(--line); vertical-align: middle; }
tr.warn td { background: color-mix(in srgb, var(--warn) 9%, transparent); }
td.actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
td.actions form { margin: 0; }
td.arrow { color: var(--muted); text-align: center; }
th.cb, td.cb { width: 36px; }
.search { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.search input { max-width: 320px; }
.search select { width: auto; }

.bulkbar {
  position: sticky; top: 66px; z-index: 2; display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 10px 12px; margin-bottom: 10px; border-radius: 12px; background: var(--surface-2);
}
.bulkbar select { width: auto; min-width: 180px; }
form[data-bulk]:not(.has-selection) .bulkbar button.primary { opacity: .45; pointer-events: none; }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; background: var(--surface-2); }
.pill.ok { color: var(--ok); }
.pill.bad { color: var(--bad); }
.pill.warn { color: var(--warn); }
.pill.premium { color: var(--premium); background: color-mix(in srgb, var(--premium) 14%, transparent); font-weight: 500; }

.flash { padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; background: var(--surface-2); border: 1px solid var(--line); }
.flash.ok { color: var(--ok); }
.flash.error { color: var(--bad); }

.secret {
  font: 18px ui-monospace, Consolas, monospace; letter-spacing: 1px; padding: 14px 16px; direction: ltr;
  border-radius: 12px; background: var(--surface-2); color: var(--text); cursor: copy; word-break: break-all;
}
.secret.copied { color: var(--ok); }

/* --- Marka -------------------------------------------------------------------- */
.logo-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.org-logo { width: 96px; height: 96px; border-radius: 18px; object-fit: contain; background: var(--surface-2); }
.org-logo.empty { display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.preview { background: #000; border-radius: 16px; padding: 18px; color: #fff; }
.preview-top { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.preview-top img { width: 32px; height: 32px; border-radius: 8px; object-fit: contain; }
.preview-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pc { border: 1px solid #24242c; border-radius: 12px; padding: 22px 16px; background: #0e0e12; }

.sig { text-align: center; color: var(--muted); font-size: 12px; padding: 24px 16px 32px; }
.sig b { color: var(--text-2); font-weight: 500; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  aside { position: static; max-height: none; }
  .nav { display: flex; flex-wrap: wrap; }
  .nav-group { flex-direction: row; flex-wrap: wrap; padding: 4px; }
  .nav-group + .nav-group { border-top: 0; }
  .nav a { padding: 8px 10px; }
  .top { padding: 10px 16px; }
  .who .email, .brand em { display: none; }
  .bulkbar { top: 60px; }
}
@media (max-width: 520px) {
  .lang-label .ico { display: none; }
  .page-icon { width: 46px; height: 46px; }
  .split { grid-template-columns: 1fr; }
}

/* Gündüz temasında logonun açık kareleri zeminden ayrışsın. */
:root[data-theme="light"] .logo rect { stroke: #d6d6d0; stroke-width: 1.5; }
.kv + .row { margin-top: 16px; }
[dir="rtl"] .tile strong { text-align: right; }

/* APK kartı */
.apk-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.apk-head h2 { margin: 0; }
.apk-head p { margin: 4px 0 0; }
.grow { flex: 1; min-width: 200px; }
code.hash { word-break: break-all; font-size: 12px; }

/* Liste kasası */
.vault-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-2); font-size: 13px; margin: 0; }
.vault-chip .ico { width: 16px; height: 16px; }
.vault-chip.open { color: var(--ok); }
.vault-chip.open .ico { fill: var(--ok); }
.vault-chip.warn { color: var(--warn); padding-inline-end: 12px; }
.vault-chip.warn .ico { fill: var(--warn); }
a.vault-chip:not(.warn) { padding-inline-end: 12px; }
.orgbar .grow { flex: 1; }
.center-link { text-align: center; color: var(--text-2); }
.stack { display: flex; flex-direction: column; gap: 14px; margin: 0; }

/* Güvenlik kayıtları */
.tile.bad strong { color: var(--bad); }
.tile.warn strong { color: var(--warn); }
.trace { display: grid; gap: 12px; margin-top: 14px; }
.trace-hit { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.trace-hit svg { width: 22px; height: 22px; flex: none; fill: currentColor; opacity: .7; }
.trace-hit ul { margin: 6px 0 0; padding-inline-start: 18px; }
.pill.small { font-size: 11px; }
.alert-card { display: flex; gap: 14px; align-items: center; border-color: var(--bad); color: inherit; text-decoration: none; margin-bottom: 16px; }
.alert-card svg { width: 28px; height: 28px; fill: var(--bad); flex: none; }
.alert-card strong { color: var(--bad); }

/* Adli rapor ve taahhüt */
.terms ol { display: grid; gap: 10px; padding-inline-start: 22px; line-height: 1.55; }
.notice { border: 1px solid var(--warn); border-radius: 12px; padding: 12px 14px; }
.notice p { margin: 0 0 6px; }
code.wrap { word-break: break-all; }
.report-meta h2 { margin-top: 0; }
@media print {
  header.top, aside, .orgbar, .no-print, footer.sig, .flash { display: none !important; }
  .shell, main { display: block !important; padding: 0 !important; margin: 0 !important; }
  .card { break-inside: avoid; box-shadow: none !important; border: 1px solid #999 !important; }
  body { background: #fff !important; color: #000 !important; }
  a { color: #000 !important; text-decoration: none !important; }
  details > summary { display: none; }
  details:not([open]) code { display: none; }
}

/* Görünüm ve logo: nasıl çalışır */
.how ol { display: grid; gap: 8px; padding-inline-start: 22px; line-height: 1.55; }
.how code { word-break: break-all; }
form.inline { display: inline-block; margin-inline-start: 8px; }
