/* Creatik Destek - temel stil (tasarim dili: ref/PANEL-GOREV.md #5) */
:root {
  --ink: #1D1D1B;
  --accent: #FE7E20;
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --line: #E6E6E3;
  --muted: #6B6B68;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(29, 29, 27, 0.04), 0 2px 8px rgba(29, 29, 27, 0.04);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.5; font-size: 16px; }
a { color: inherit; }
.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; min-height: 64px; }
.brand img { display: block; }
main.container { padding: 40px 20px 64px; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 20px 0; }
.site-footer a { color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; }
h1 { font-size: 28px; font-weight: 600; margin: 0 0 12px; letter-spacing: -0.01em; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 12px; color: var(--muted); margin: 0 0 8px; }
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 10px; padding: 12px 20px; font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-size: 15px; line-height: 1.2; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.support-code { font-size: 48px; font-weight: 700; letter-spacing: 0.08em; color: var(--accent); margin: 8px 0; }
pre.detail { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow: auto; font-size: 12px; }

/* ---------- Ortak form / bilesenler ---------- */
h2 { font-size: 18px; font-weight: 600; margin: 0 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.95em; }
.form .field { display: block; margin-bottom: 16px; }
.form .field > span { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--ink); }
.form .field > span em { color: var(--accent); font-style: normal; }
.form .field > span small { color: var(--muted); font-weight: 400; }
.form input[type=text], .form input[type=email], .form input[type=password], .form input[type=tel], .form input[type=search], .form input[type=date], .form textarea, .form select,
.filters input, .filters select {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.form input:focus, .form textarea:focus, .form select:focus, .filters input:focus, .filters select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(254, 126, 32, 0.15); }
.form input:disabled { background: var(--bg); color: var(--muted); }
.form textarea { resize: vertical; }
.form-inline { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.form-inline .field { margin-bottom: 0; }
.input-code { font-size: 28px; letter-spacing: 0.3em; text-align: center; font-weight: 600; }
.btn:hover { filter: brightness(0.97); }
.btn:disabled { opacity: 0.6; cursor: default; }
.btn-primary:hover { filter: brightness(0.95); }
.btn-ghost { background: transparent; color: var(--ink); border-color: transparent; }
.btn-ghost:hover { background: var(--bg); }
.btn-danger { background: var(--surface); color: #B42318; border-color: var(--line); }
.btn-danger:hover { border-color: #B42318; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; justify-content: center; }
.btn.is-done { color: var(--accent); border-color: var(--accent); }
.flash { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 16px; font-size: 14px; background: var(--surface); }
.flash-error { border-color: #F4C7C3; background: #FEF3F2; color: #B42318; }
.flash-success { border-color: #C7E8D0; background: #F2FBF5; color: #1B6B3A; }
.flash-warn { border-color: #FBD9B8; background: #FFF7F0; color: #8A4B10; }
.status { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); white-space: nowrap; }
.status-waiting { color: var(--muted); }
.status-ready { color: var(--accent); border-color: rgba(254,126,32,.4); background: #FFF7F0; }
.status-connected { color: #1B6B3A; border-color: #C7E8D0; background: #F2FBF5; }
.status-ended, .status-expired { color: var(--muted); background: var(--bg); }
.status-rejected { color: #B42318; border-color: #F4C7C3; background: #FEF3F2; }

/* ---------- Giris ekrani ---------- */
body.auth { background: var(--bg); }
.auth-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-logo { display: block; margin: 0 auto 20px; }
.auth-title { font-size: 22px; text-align: center; margin-bottom: 20px; }
.auth-foot { color: var(--muted); font-size: 13px; margin-top: 20px; }
.auth-alt { text-align: center; font-size: 13px; margin: 16px 0 0; }
.auth-alt a { color: var(--muted); }
.qr-box { display: flex; justify-content: center; margin: 16px 0; }
.qr-box svg { width: 200px; height: 200px; }
.secret-line { text-align: center; font-size: 13px; color: var(--muted); margin: 0 0 20px; word-break: break-all; }

/* ---------- Panel ---------- */
body.panel { background: var(--bg); }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.topbar-inner { max-width: 1120px; margin: 0 auto; padding: 0 20px; min-height: 60px; display: flex; align-items: center; gap: 24px; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.nav a:hover { background: var(--bg); color: var(--ink); }
.nav a.active { color: var(--ink); background: var(--bg); box-shadow: inset 0 -2px 0 var(--accent); }
.topbar-user { display: flex; align-items: center; gap: 8px; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; padding: 4px 8px 4px 4px; border-radius: 999px; }
.user-chip:hover { background: var(--bg); }
.user-name { font-size: 14px; font-weight: 500; }

/* Avatar: fotograf varsa yuvarlak resim, yoksa bas harfler */
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px; border-radius: 50%; overflow: hidden; background: #FFF7F0; color: var(--accent); border: 1px solid rgba(254,126,32,.3); font-size: 11px; font-weight: 600; letter-spacing: 0.02em; line-height: 1; vertical-align: middle; user-select: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-xs { width: 20px; height: 20px; font-size: 9px; }
.avatar-lg { width: 72px; height: 72px; font-size: 24px; }
.tech, .sess-tech { display: inline-flex; align-items: center; gap: 6px; }
.avatar-row { display: flex; gap: 20px; align-items: flex-start; }
.avatar-forms { flex: 1; min-width: 0; }
.avatar-upload .field { margin-bottom: 10px; }
.avatar-upload input[type=file] { padding: 8px 10px; font-size: 14px; }
.avatar-upload .actions { margin: 0 0 8px; }
.panel-main { max-width: 1120px; margin: 0 auto; padding: 28px 20px 64px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.page-head h1 { font-size: 24px; margin: 0; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; align-items: start; }
.grid-2-wide { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-head h2 { margin: 0; }
.live { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: #2E9E5B; }
.live.is-offline .dot { background: #B42318; }
.empty { margin: 8px 0; }

.code-card { margin-bottom: 20px; border-color: rgba(254,126,32,.45); }
.code-big { font-size: 56px; font-weight: 700; letter-spacing: 0.1em; color: var(--accent); line-height: 1.1; margin: 4px 0 8px; cursor: pointer; user-select: all; }
.code-big.code-small { font-size: 28px; letter-spacing: 0.04em; color: var(--ink); }
.code-link a { color: var(--muted); word-break: break-all; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }

.sess { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 12px; background: var(--surface); }
.sess-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.sess-note { margin-top: 6px; }
.sess-code { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.code-inline { font-size: 22px; font-weight: 700; letter-spacing: 0.12em; color: var(--accent); cursor: pointer; margin-right: 6px; }
.sess-device { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.rid-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 4px; }
.rid { font-size: 18px; font-weight: 600; letter-spacing: 0.04em; }
.sess-wait { margin: 4px 0; }
.sess-actions { display: flex; justify-content: flex-end; margin-top: 10px; }

.filters { display: grid; grid-template-columns: 2fr 1.2fr 1fr 1fr auto auto; gap: 10px; margin-bottom: 20px; align-items: center; }
.table-wrap { overflow-x: auto; margin: 0 -8px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 600; }
.table tr:last-child td { border-bottom: 0; }
.row-muted td { color: var(--muted); }
.actions-cell { display: flex; gap: 4px; }
.actions-cell form { display: inline; }
.pager { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.id-list { list-style: none; padding: 0; margin: 0 0 20px; }
.id-list li { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); gap: 12px; }

@media (max-width: 820px) {
  .grid-2, .grid-2-wide { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters input[type=search] { grid-column: 1 / -1; }
  .form-inline { grid-template-columns: 1fr; }
  .topbar-inner { flex-wrap: wrap; gap: 8px 16px; padding: 10px 16px; }
  .nav { order: 3; flex-basis: 100%; margin: 0 -4px; }
  .topbar-user { margin-left: auto; }
  .user-name { display: none; }
  .card { padding: 20px; }
  .code-big { font-size: 44px; }
  .panel-main { padding: 20px 16px 48px; }
  main.container { padding: 24px 16px 48px; }
}

/* ---------- Indirme sayfasi ---------- */
.hero { text-align: center; padding: 40px 32px; margin-bottom: 20px; }
.hero-logo { display: block; margin: 0 auto 20px; max-width: 100%; height: 64px; width: auto; }
.hero h1 { font-size: 32px; }
.lead { font-size: 17px; color: var(--muted); max-width: 560px; margin: 0 auto; }
.hero-code .support-code { cursor: pointer; }
.actions-center { justify-content: center; }
.download { margin-bottom: 20px; }
.dl-primary { text-align: center; padding: 8px 0 16px; }
.btn-lg { padding: 16px 32px; font-size: 17px; border-radius: 12px; }
#dl-meta { margin-top: 10px; }
.dl-others { list-style: none; padding: 16px 0 0; margin: 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: center; font-size: 14px; }
.dl-others li[hidden] { display: none; }
.dl-others a { color: var(--muted); }
.sha { margin-top: 16px; }
.sha summary { cursor: pointer; }
.sha code { word-break: break-all; }
.steps { margin-bottom: 20px; }
.step-list { margin: 0; padding-left: 20px; }
.step-list li { margin-bottom: 10px; }
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 16px; }
.perm h3 { font-size: 15px; margin: 12px 0 6px; }
.perm p { margin: 0; }
.perm-img.placeholder { aspect-ratio: 16 / 10; border: 1px dashed var(--line); border-radius: 10px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; background: var(--bg); }
.mac-perms.is-highlight { border-color: rgba(254,126,32,.45); }
.error-card { text-align: center; }
@media (max-width: 820px) {
  .hero { padding: 28px 20px; }
  .hero h1 { font-size: 26px; }
  .support-code { font-size: 40px; }
  .perm-grid { grid-template-columns: 1fr; }
}

/* ---------- Anahtar (switch) ve kopuk durumu ---------- */
.switch-field { display: flex; align-items: center; gap: 10px; margin: 4px 0 16px; cursor: pointer; user-select: none; }
.switch-inline { margin: 0; margin-right: auto; }
.switch-field .switch { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-ui { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--line); transition: background .15s; flex: none; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch:checked + .switch-ui { background: var(--accent); }
.switch:checked + .switch-ui::after { transform: translateX(16px); }
.switch:focus-visible + .switch-ui { box-shadow: 0 0 0 3px rgba(254,126,32,.25); }
.switch:disabled + .switch-ui { opacity: .5; }
.switch-label { font-size: 14px; }
.sess-countdown { margin: 4px 0 8px; }
.sess-countdown.is-disconnected { color: #8A4B10; font-weight: 500; }
.sess-disconnected { border-color: #FBD9B8; background: #FFFCF9; }
.status-disconnected { color: #8A4B10; border-color: #FBD9B8; background: #FFF7F0; }
.sess-rejected { margin: 8px 0; padding: 8px 10px; }
.sess-rejected code { font-weight: 600; }
.sess-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
