/* Tek stil dosyası (profil + yönetim). CDN yok, derleme adımı yok. Marka rengi sayfadaki nonce'lu <style> ile --brand olarak gelir. */
:root {
  --bg: #eaf0f7; --surface: #fff; --surface-2: #f3f7fb; --fg: #0d2238; --muted: #566a80; --line: #d3dee9;
  --brand: #0a4e9b; --on-brand: #fff; --accent: #00b9f2; --danger: #b3261e; --ok: #1b7a3c; --warn: #8a5a00;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #08121e; --surface: #101e2f; --surface-2: #0c1827; --fg: #e7eef7; --muted: #92a5ba; --line: #213348; --danger: #ff8a80; --ok: #6fd08c; --warn: #f0c266; color-scheme: dark; }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 400 16px/1.5 var(--font); -webkit-text-size-adjust: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
code, .sel { font-family: var(--mono); font-size: .92em; }
.sel { user-select: all; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* ---- Nötr sayfa ---- */
.neutral { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.neutral-box { max-width: 420px; text-align: center; }
.neutral-box h1 { font-size: 20px; margin: 0 0 8px; }
.neutral-box p { margin: 0; color: var(--muted); }

/* ---- Profil ---- */
.profile { padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.phone { width: 100%; max-width: 420px; margin: 0 auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: 28px; overflow: hidden; box-shadow: 0 24px 50px -28px rgba(6, 30, 60, .5); }
.hero { background: var(--brand); background: linear-gradient(160deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 62%, #000) 100%);
  color: var(--on-brand); padding: 22px 22px 30px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; border-radius: 0 0 28px 28px; }
.logo-pill { align-self: flex-start; background: #fff; border-radius: 10px; padding: 6px 10px; display: inline-flex; }
.logo-pill img { height: 26px; width: auto; max-width: 160px; display: block; }
.avatar { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .16); border: 3px solid var(--accent); font: 800 32px/1 var(--font); margin-top: 6px; }
.avatar-img { object-fit: cover; background: #fff; }
.hero h1 { margin: 0; font-size: 28px; line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; overflow-wrap: anywhere; }
.role { margin: 0; opacity: .88; font-size: 15px; }
.chip { display: inline-block; font: 500 12px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28); padding: 7px 10px; border-radius: 999px; }
.body { padding: 20px 18px 26px; display: flex; flex-direction: column; gap: 14px; }
.primary { min-height: 54px; border-radius: 14px; background: var(--brand); color: var(--on-brand); font-weight: 700; font-size: 17px; text-decoration: none; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .6); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pair a, .linkbtn { min-height: 48px; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--line); background: var(--surface); border-radius: 12px; font-weight: 600; text-decoration: none; padding: 0 14px; text-align: center; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.row { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; }
.row + .row { border-top: 1px solid var(--line); }
.row .lab { font: 500 11px/1 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.row .val { font-weight: 500; overflow-wrap: anywhere; user-select: all; }
.links { display: flex; flex-direction: column; gap: 10px; }
.linkbtn { justify-content: flex-start; gap: 12px; text-align: left; }
.linkbtn span { flex: 1; text-align: center; padding-right: 34px; }
.linkbtn .ic { width: 24px; height: 24px; flex: none; }
.ic.ig { color: #e1306c; } .ic.wa { color: #1faa59; } .ic.ty { color: #f27a1a; } .ic.map { color: #ea4335; } .ic.web { color: var(--muted); }
.sched-box { background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; }
.sched-box summary { padding: 13px 16px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: space-between; list-style: none; }
.sched-box summary::-webkit-details-marker { display: none; }
.sched-box summary::after { content: "▾"; color: var(--muted); font-size: 14px; }
.sched-box[open] summary { border-bottom: 1px solid var(--line); }
.sched-box[open] summary::after { content: "▴"; }
.sched-list { padding: 10px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.sched-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.sched-item b { display: block; font-size: 14px; }
.sched-item span { font-size: 12px; color: var(--muted); }
.sched-time { font: 600 12px var(--mono); padding: 4px 8px; border-radius: 7px; background: var(--surface); border: 1px solid var(--line); white-space: nowrap; }
.bio-box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 13px 16px; font-size: 14px; color: var(--muted); line-height: 1.45; }
.bio-box b { color: var(--fg); display: block; margin-bottom: 4px; font-size: 12px; font-family: var(--mono); text-transform: uppercase; letter-spacing: .06em; }
body.dark-card { --bg: #070709; --surface: #141419; --surface-2: #0d0d11; --fg: #f4f4f5; --muted: #a1a1aa; --line: #27272f; --accent: #ff1e27; color-scheme: dark; }
body.dark-card .phone { box-shadow: 0 24px 60px -20px rgba(255, 30, 39, .28), 0 20px 50px -25px rgba(0, 0, 0, .9); border-color: #272730; }
body.dark-card .hero { background: radial-gradient(circle at 85% 15%, rgba(255, 30, 39, .5) 0%, rgba(255, 30, 39, .15) 42%, transparent 70%), linear-gradient(150deg, #16070a 0%, #0d0d12 58%, #1f080c 100%); border-bottom: 1px solid rgba(255, 30, 39, .35); }
body.dark-card .primary { background: linear-gradient(90deg, #ff1e27 0%, #e10613 100%); color: #fff; box-shadow: 0 10px 24px -8px rgba(255, 30, 39, .55); }
body.dark-card .chip { background: rgba(255, 30, 39, .16); border-color: rgba(255, 59, 71, .5); color: #ff4d57; font-weight: 700; }
body.dark-card .sched-time { color: #ff4d57; border-color: rgba(255, 59, 71, .38); background: rgba(255, 30, 39, .1); }

/* ---- Yönetim ---- */
.admin-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.admin-top nav { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-top nav a { padding: 8px 12px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.admin-top nav a:hover { background: var(--surface-2); }
.admin-wrap.narrow { max-width: 640px; }
.codelink { display: inline-block; padding: 6px 2px; white-space: nowrap; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.admin-top form { display: flex; align-items: center; gap: 10px; }
.act { display: flex; gap: 8px; flex-wrap: wrap; }
.admin .panel .row { padding: 8px 0; }
.admin .panel .row + .row { border-top: 1px solid var(--line); }
.admin-wrap { max-width: 1100px; margin: 0 auto; padding: 20px 16px 48px; display: flex; flex-direction: column; gap: 16px; }
.admin h1 { margin: 0; font-size: 26px; letter-spacing: -.01em; }
.admin h1 small { color: var(--muted); font-weight: 500; font-size: 16px; }
.admin h2 { margin: 0 0 8px; font-size: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; align-items: start; }
.grid .full { grid-column: 1 / -1; }
.grid .end { display: flex; align-items: end; }
.filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; align-items: end; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; color: var(--muted); }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 500; margin-top: 8px; color: var(--fg); }
input, select, textarea { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--fg); font: inherit; }
input[type=color] { padding: 3px; }
input[type=checkbox] { width: auto; min-height: 0; }
textarea { resize: vertical; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--brand); color: var(--on-brand); font: 600 15px var(--font); text-decoration: none; cursor: pointer; }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.alert { margin: 0; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.alert.ok { border-color: var(--ok); } .alert.err { border-color: var(--danger); color: var(--danger); } .alert.warn { border-color: var(--warn); }
.tablewrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td.act { white-space: nowrap; display: flex; gap: 6px; }
td.empty { text-align: center; color: var(--muted); padding: 24px; }
form.inline { display: inline; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid currentColor; }
.pill.ok { color: var(--ok); } .pill.off { color: var(--muted); } .pill.warn { color: var(--warn); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.stat b { font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 13px; }
.thumb img { max-width: 160px; max-height: 120px; border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; background: #fff; }
.thumb.round img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }
.pager { display: flex; gap: 6px; flex-wrap: wrap; }
.pager a { padding: 6px 11px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.pager a.cur { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.login { max-width: 380px; margin: 12vh auto 0; padding: 0 16px; display: flex; flex-direction: column; gap: 12px; }
.login form { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.qrgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.qrcell { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; overflow-wrap: anywhere; }
.qr { width: 100%; max-width: 170px; aspect-ratio: 1; background: #fff; }
.qr svg { display: block; width: 100%; height: 100%; }

/* ---- Dijital kart profili: lüks görünüm (ana sayfayla aynı dil). Vurgu rengi şirketin marka renginden gelir. ---- */
body.profile, body.profile.dark-card {
  --bg: #0b0b0d; --surface: #17171b; --surface-2: #111114; --fg: #f3efe7; --muted: #9d978b; --line: #2a2a30;
  --accent: var(--brand); --tint: color-mix(in srgb, var(--brand) 72%, #fff);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  color-scheme: dark; background: var(--bg); color: var(--fg);
}
body.profile .phone, body.profile.dark-card .phone { max-width: 430px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 30px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .02); }
body.profile .hero, body.profile.dark-card .hero {
  background: radial-gradient(120% 85% at 50% -10%, color-mix(in srgb, var(--brand) 42%, transparent) 0%, transparent 68%), #121215;
  color: var(--fg); padding: 34px 24px 30px; gap: 10px; border-radius: 0; border-bottom: 1px solid var(--line);
}
body.profile .logo-pill { align-self: center; background: #f3efe7; border-radius: 12px; padding: 7px 12px; }
body.profile .avatar { width: 104px; height: 104px; margin-top: 4px; background: #0b0b0d; border: 1.5px solid var(--tint); box-shadow: 0 0 0 6px rgba(255, 255, 255, .03); color: var(--fg); font: 400 34px/1 var(--serif); letter-spacing: .04em; }
body.profile .avatar-img { background: #0b0b0d; }
body.profile .hero h1 { font: 400 31px/1.12 var(--serif); letter-spacing: .01em; margin-top: 8px; }
body.profile .role { opacity: 1; color: var(--muted); font-size: 14.5px; line-height: 1.4; max-width: 32ch; }
body.profile .chip, body.profile.dark-card .chip { margin-top: 6px; background: transparent; border: 1px solid var(--line); color: var(--tint); font: 500 11px/1 var(--font); letter-spacing: .24em; padding: 9px 14px; }
body.profile .body { padding: 22px 18px 28px; gap: 12px; }
body.profile .primary, body.profile.dark-card .primary { min-height: 56px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font: 600 16px/1 var(--font); letter-spacing: .02em; box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--brand) 80%, #000); }
body.profile .pair a, body.profile .linkbtn { min-height: 52px; background: transparent; border: 1px solid var(--line); border-radius: 16px; color: var(--fg); font-weight: 500; transition: border-color .2s, background .2s; }
body.profile .pair a:hover, body.profile .linkbtn:hover { border-color: var(--tint); background: rgba(255, 255, 255, .03); }
body.profile .list, body.profile .bio-box, body.profile .sched-box { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
body.profile .row { padding: 15px 18px; }
body.profile .row .lab, body.profile .bio-box b { font: 500 10.5px/1 var(--font); letter-spacing: .22em; color: var(--muted); }
body.profile .row .val { font: 400 17px/1.3 var(--serif); }
body.profile .bio-box { color: var(--muted); padding: 16px 18px; }
body.profile .sched-item { background: var(--surface-2); }
body.profile .sched-time, body.profile.dark-card .sched-time { color: var(--tint); border-color: var(--line); background: transparent; }
body.profile .ic.ig, body.profile .ic.wa, body.profile .ic.ty, body.profile .ic.map, body.profile .ic.web { color: var(--tint); }
body.profile :focus-visible { outline-color: var(--tint); }

/* Fatura bilgileri (php/fatura.php): katlanır bölüm, her satırda Kopyala */
.inv-box { background: var(--surface); border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; }
.inv-box summary { padding: 13px 16px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: space-between; list-style: none; }
.inv-box summary::-webkit-details-marker { display: none; }
.inv-box summary::after { content: "▾"; color: var(--muted); font-size: 14px; }
.inv-box[open] summary { border-bottom: 1px solid var(--line); }
.inv-box[open] summary::after { content: "▴"; }
.inv-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--line); }
.inv-row:last-child { border-bottom: 0; }
.inv-row .lab { display: block; font: 500 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.inv-row .val { display: block; font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.inv-box .copy { flex: none; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--fg); border-radius: 10px; padding: 8px 12px; font: 600 13px/1 var(--font); cursor: pointer; }
.inv-box .copy:active { transform: scale(.97); }
.inv-box .copy[hidden] { display: none; }
.inv-note { margin: -4px 4px 0; font-size: 12px; color: var(--muted); }

/* Fotoğraf galerisi (php/medya.php galeri_html): 3 sütunlu küçük resim ızgarası; dokununca büyür (galeri.js, <dialog>) */
.gal { display: grid; gap: 10px; }
.gal-baslik { margin: 6px 4px 0; font: 500 10.5px/1 var(--font); letter-spacing: .22em; color: var(--muted); }
.gal-izgara { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gal-izgara li { margin: 0; min-width: 0; }
.gal-oge { display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.gal-oge img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gal-oge:hover { border-color: var(--tint); }
body.lb-acik { overflow: hidden; }
dialog.lb { padding: 0; margin: 0; border: 0; max-width: none; max-height: none; width: 100%; height: 100%; color: #f3efe7; background: transparent; }
dialog.lb[open] { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(8, 8, 10, .985); }
dialog.lb::backdrop { background: rgba(0, 0, 0, .9); }
.lb-sahne { box-sizing: border-box; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; margin: 0; padding: 64px 12px 56px; }
.lb-img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 6px; }
.lb-img.lb-yukleniyor { opacity: .35; }
.lb-dugme { position: absolute; z-index: 2; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid rgba(255, 255, 255, .28); border-radius: 50%; background: rgba(20, 20, 24, .72); color: #fff; font: 400 28px/1 var(--font); cursor: pointer; }
.lb-dugme[hidden] { display: none; }
.lb-dugme:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.lb-kapat { top: max(12px, env(safe-area-inset-top)); right: max(12px, env(safe-area-inset-right)); font-size: 20px; }
.lb-onceki { top: 50%; left: max(8px, env(safe-area-inset-left)); margin-top: -24px; }
.lb-sonraki { top: 50%; right: max(8px, env(safe-area-inset-right)); margin-top: -24px; }
.lb-sayac { position: absolute; left: 0; right: 0; bottom: max(16px, env(safe-area-inset-bottom)); margin: 0; text-align: center; font: 500 13px/1 var(--font); letter-spacing: .08em; color: rgba(243, 239, 231, .8); }
.lb-durum { position: absolute; left: 0; right: 0; top: 50%; margin: 0; text-align: center; font: 500 14px/1.4 var(--font); color: rgba(243, 239, 231, .85); pointer-events: none; }
.lb-durum:empty { display: none; }
@media (prefers-reduced-motion: no-preference) { .lb-img { transition: opacity .2s; } }

/* Arka plan tanıtım videosu (php/medya.php video_arkaplan_html, video.js): hero'nun arkasında, koyu örtülü; kendiliğinden başlamaz */
body.profile .hero-videolu { position: relative; overflow: hidden; isolation: isolate; min-height: 300px; justify-content: center; }
.hero-video { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; background: transparent; }
.hero-video-kapaksiz:not(.hero-video-oynuyor) { opacity: 0; }
.hero-ortu { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(8, 8, 10, .55) 0%, rgba(8, 8, 10, .8) 100%); }
.hero-vdugme { position: absolute; z-index: 2; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; background: rgba(0, 0, 0, .5); color: #fff; font: 600 12.5px/1 var(--font); cursor: pointer; }
.hero-vdugme[hidden] { display: none; }
.hero-vdugme:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
