/* Panel, giriş ve hata sayfaları — kırık siyah ve nötr griler, IBM Plex Sans */
:root {
  --black: #1D1D1B;      /* kırık siyah: ana renk */
  --black-hover: #343432;
  --text-2: #4A4A47;
  --muted: #7A7A76;
  --line: #E3E3E0;
  --field: #CFCFCB;
  --paper: #F2F2F0;
  --tint: #F7F7F5;
  --surface: #FFFFFF;
  --danger: #A3261B;
  --ok: #2E6B45;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--black);
  font: 400 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--black); text-underline-offset: 2px; }
a:hover { color: var(--text-2); }
:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }
h1, h2 { font-weight: 600; letter-spacing: -.012em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- Marka ---- */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.005em;
  text-decoration: none;
}
.wordmark-mark {
  position: relative;
  width: 20px;
  height: 14px;
  border: 1.75px solid currentColor;
  border-radius: 2.5px;
}
.wordmark-mark::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 4px;
  width: 6px;
  height: 1.75px;
  background: currentColor;
}

/* ---- Üst bar ---- */
.topbar { background: var(--black); color: #FFFFFF; }
.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.topbar .wordmark:hover { color: #FFFFFF; }
.topnav { display: flex; gap: 2px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.topnav a {
  padding: 8px 12px;
  border-radius: 6px;
  color: rgba(255, 255, 255, .66);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
}
.topnav a:hover { color: #FFFFFF; }
.topnav a[aria-current="page"] { color: #FFFFFF; background: rgba(255, 255, 255, .1); }
.logout button {
  padding: 8px 4px;
  border: 0;
  background: none;
  color: rgba(255, 255, 255, .66);
  font: 500 14px/1 var(--font);
  cursor: pointer;
}
.logout button:hover { color: #FFFFFF; }
.topbar :focus-visible { outline-color: #FFFFFF; }

@media (max-width: 640px) {
  .topbar-inner { height: auto; flex-wrap: wrap; row-gap: 4px; padding: 12px 16px 8px; }
  .topnav { order: 3; flex-basis: 100%; margin: 0 -12px; }
  .logout { margin-left: auto; }
}

/* Yönetici bir kişinin panelindeyken üstte duran şerit */
.viewing-as { position: sticky; top: 0; z-index: 30; background: #FFF4D1; border-bottom: 1px solid #E8D594; color: #3D3210; }
.viewing-as-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}
.viewing-as p { margin: 0; font-size: 14px; }
.viewing-as .btn-ghost { border-color: #D9C27A; background: #FFFDF5; }
@media (max-width: 640px) { .viewing-as-inner { padding: 10px 16px; } }

/* ---- Panel alt bilgisi: solda sürüm, sağda Sektek / sekizpiksel ---- */
body.panel { min-height: 100vh; display: flex; flex-direction: column; }
body.panel > .wrap { flex: 1 0 auto; width: 100%; }
.panel-footer { border-top: 1px solid var(--line); background: var(--surface); }
.panel-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 20px 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
}
.panel-version { margin: 0; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.panel-brand { display: flex; flex-direction: column; align-items: flex-end; text-align: right; color: var(--black); }
.panel-brand .brand-mark { display: block; color: inherit; }
.panel-brand .brand-mark svg { display: block; height: 28px; width: auto; }
.panel-brand .brand-name { margin: 8px 0 0; font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.panel-brand .brand-parent { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; color: var(--muted); font-size: 12px; text-decoration: none; }
.panel-brand .brand-parent svg { display: block; height: 9px; width: auto; }
.panel-brand .brand-parent:hover { color: var(--black); }

/* ---- Sayfa ---- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 36px 20px 96px; }
@media (max-width: 640px) { .wrap { padding: 24px 16px 80px; } }

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 24px;
}
.page-head h1 { margin: 0; font-size: 28px; line-height: 1.15; }
.page-sub { margin: 6px 0 0; color: var(--muted); max-width: 70ch; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
}
.back-link i { font-size: 10px; }

.flash { margin-bottom: 18px; padding: 12px 16px; border: 1px solid; border-radius: 8px; font-size: 14.5px; }
.flash a { color: inherit; font-weight: 600; }
.flash-ok { background: #EEF5F0; border-color: #CFE2D5; color: #1F4A30; }
.flash-error { background: #FAEEEC; border-color: #EDCBC6; color: #6E1A12; }
.flash-info { background: var(--surface); border-color: var(--line); border-left: 3px solid var(--black); color: var(--black); }

/* ---- Butonlar ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: 500 14px/1 var(--font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary { background: var(--black); color: #FFFFFF; }
.btn-primary:hover { background: var(--black-hover); color: #FFFFFF; }
.btn-ghost { background: var(--surface); border-color: var(--field); color: var(--black); }
.btn-ghost:hover { border-color: var(--black); color: var(--black); }
.btn-quiet { background: none; color: var(--text-2); }
.btn-quiet:hover { color: var(--black); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 6px; }
.btn-block { width: 100%; height: 46px; font-size: 15px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 10px; }

/* ---- Form yüzeyi ---- */
.sheet { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.sheet--narrow { max-width: 640px; }
/* Tablo kutusu: açılır menüler kutunun dışına taşabilsin diye overflow kullanılmaz,
   köşe yuvarlaklığı başlık hücrelerine verilir. */
.sheet--flush .users th:first-child { border-top-left-radius: 11px; }
.sheet--flush .users th:last-child { border-top-right-radius: 11px; }

.form-section { padding: 26px 28px; border-bottom: 1px solid var(--line); }
.form-section h2 { margin: 0 0 18px; font-size: 17px; }
.section-sub { margin: -12px 0 18px; color: var(--muted); font-size: 14px; max-width: 64ch; }
@media (max-width: 640px) { .form-section { padding: 22px 18px; } }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }

.field { margin-bottom: 18px; }
.grid-2 > .field { margin-bottom: 0; }
.form-section > :last-child { margin-bottom: 0; }
.field label { display: block; margin-bottom: 6px; font-size: 13.5px; font-weight: 500; color: var(--black); }
.field label i { width: 16px; margin-right: 2px; color: var(--text-2); text-align: center; }
.field input, .field textarea {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--field);
  border-radius: 8px;
  background: var(--surface);
  color: var(--black);
  font: 400 15px/1.4 var(--font);
}
.field textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.field input:focus, .field textarea:focus, .input-prefix:focus-within {
  outline: none;
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(29, 29, 27, .1);
}
.field input::placeholder, .field textarea::placeholder { color: #A4A49F; }
.has-error input, .has-error textarea, .has-error .input-prefix { border-color: var(--danger); }
.hint { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.field-error { margin: 6px 0 0; font-size: 13px; font-weight: 500; color: var(--danger); }

.input-prefix { display: flex; border: 1px solid var(--field); border-radius: 8px; overflow: hidden; background: var(--surface); }
.input-prefix span {
  display: flex;
  align-items: center;
  padding: 0 2px 0 12px;
  color: var(--muted);
  font-size: 15px;
  white-space: nowrap;
}
.field .input-prefix input { border: 0; border-radius: 0; padding-left: 0; box-shadow: none; }
@media (max-width: 480px) { .input-prefix span { font-size: 13px; } }

.check { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--black); }

/* Kart türü seçimi */
.type-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.type-option { position: relative; cursor: pointer; }
.type-option input { position: absolute; opacity: 0; pointer-events: none; }
.type-box {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  height: 100%;
  padding: 16px;
  border: 1px solid var(--field);
  border-radius: 10px;
  background: var(--surface);
}
.type-box i { grid-row: span 2; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: var(--paper); font-size: 15px; }
.type-box strong { font-size: 15px; font-weight: 600; }
.type-box span { color: var(--muted); font-size: 13px; line-height: 1.4; }
.type-option input:checked + .type-box { border-color: var(--black); box-shadow: inset 0 0 0 1px var(--black); }
.type-option input:checked + .type-box i { background: var(--black); color: #FFFFFF; }
.type-option input:focus-visible + .type-box { outline: 2px solid var(--black); outline-offset: 2px; }
@media (max-width: 560px) { .type-options { grid-template-columns: 1fr; } }

/* Tema seçimi: her tema küçük bir telefon ekranı çizimiyle gösterilir */
.theme-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px; }
.theme-note { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: var(--paper); color: var(--text-2); }
.theme-option { position: relative; display: block; cursor: pointer; }
.theme-option[hidden] { display: none; }
.theme-option input { position: absolute; opacity: 0; pointer-events: none; }
.theme-thumb {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #FFFFFF;
}
.theme-option input:checked + .theme-thumb { border-color: var(--black); box-shadow: 0 0 0 2px var(--black); }
.theme-option input:focus-visible + .theme-thumb { outline: 2px solid var(--black); outline-offset: 4px; }
.theme-name { display: block; margin-top: 10px; font-size: 14px; font-weight: 600; }
.theme-desc { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
@media (max-width: 480px) { .theme-options { gap: 8px; } .theme-desc { display: none; } }

.theme-thumb i { position: absolute; display: none; }
.theme-thumb .t-l1, .theme-thumb .t-l2 { display: block; height: 4.5%; border-radius: 2px; background: #1D1D1B; }
.theme-thumb .t-l2 { height: 3.2%; background: #B9B9B4; }
.theme-thumb .t-btn { display: block; left: 10%; right: 10%; height: 8%; border-radius: 3px; background: #1D1D1B; }
.theme-thumb .t-r1, .theme-thumb .t-r2, .theme-thumb .t-r3 { display: block; left: 10%; right: 10%; height: 1px; background: #DDDDD8; }
.theme-thumb .t-av { display: block; width: 24%; aspect-ratio: 1; border-radius: 50%; background: #DADAD6; border: 2px solid #FFFFFF; }

/* Klasik */
.tt-klasik .t-cover { display: block; inset: 0 0 auto 0; height: 30%; background: #1D1D1B; }
.tt-klasik .t-av { top: 18%; left: 10%; }
.tt-klasik .t-l1 { top: 45%; left: 10%; width: 52%; }
.tt-klasik .t-l2 { top: 53%; left: 10%; width: 34%; }
.tt-klasik .t-btn { top: 62%; }
.tt-klasik .t-r1 { top: 78%; } .tt-klasik .t-r2 { top: 86%; } .tt-klasik .t-r3 { top: 94%; }

/* Antrasit */
.tt-antrasit { background: #1D1D1B; border-color: #1D1D1B; }
.tt-antrasit .t-cover { display: block; inset: 0 0 auto 0; height: 30%; background: #2C2C2A; }
.tt-antrasit .t-av { top: 18%; left: 38%; border-color: #1D1D1B; background: #55554F; }
.tt-antrasit .t-l1 { top: 45%; left: 26%; width: 48%; background: #F2F2EF; }
.tt-antrasit .t-l2 { top: 53%; left: 34%; width: 32%; background: #6E6E69; }
.tt-antrasit .t-btn { top: 62%; background: #F2F2EF; }
.tt-antrasit .t-r1, .tt-antrasit .t-r2, .tt-antrasit .t-r3 { background: #3A3A36; }
.tt-antrasit .t-r1 { top: 78%; } .tt-antrasit .t-r2 { top: 86%; } .tt-antrasit .t-r3 { top: 94%; }

/* Yalın */
.tt-yalin { background: #FAFAF8; }
.tt-yalin .t-cover { display: block; top: 9%; left: 10%; width: 38%; height: 3%; border-radius: 2px; background: #1D1D1B; }
.tt-yalin .t-r1 { top: 16%; height: 1.5px; background: #1D1D1B; }
.tt-yalin .t-av { top: 22%; right: 10%; width: 20%; border: 0; border-radius: 3px; }
.tt-yalin .t-l1 { top: 24%; left: 10%; width: 46%; height: 5.5%; }
.tt-yalin .t-l2 { top: 33%; left: 10%; width: 30%; }
.tt-yalin .t-btn { top: 48%; background: transparent; border: 1.5px solid #1D1D1B; }
.tt-yalin .t-r2 { top: 66%; background: repeating-linear-gradient(90deg, #C9C9C4 0 2px, transparent 2px 4px); }
.tt-yalin .t-r3 { top: 76%; background: repeating-linear-gradient(90deg, #C9C9C4 0 2px, transparent 2px 4px); }

/* Sade ve Gece: ortalı fotoğraf, alt alta bağlantılar */
.tt-sade .t-av, .tt-gece .t-av { top: 9%; left: 35%; width: 30%; }
.tt-sade .t-l1, .tt-gece .t-l1 { top: 36%; left: 28%; width: 44%; }
.tt-sade .t-l2, .tt-gece .t-l2 { display: none; }
.tt-sade .t-btn, .tt-gece .t-btn { top: 45%; }
.tt-sade .t-r1, .tt-sade .t-r2, .tt-sade .t-r3,
.tt-gece .t-r1, .tt-gece .t-r2, .tt-gece .t-r3 { height: 8.5%; border: 1px solid #DDDDD8; border-radius: 3px; background: transparent; }
.tt-sade .t-r1, .tt-gece .t-r1 { top: 57%; }
.tt-sade .t-r2, .tt-gece .t-r2 { top: 69%; }
.tt-sade .t-r3, .tt-gece .t-r3 { top: 81%; }
.tt-gece { background: #1D1D1B; border-color: #1D1D1B; }
.tt-gece .t-av { border-color: #1D1D1B; background: #55554F; }
.tt-gece .t-l1 { background: #F2F2EF; }
.tt-gece .t-btn { background: #F2F2EF; }
.tt-gece .t-r1, .tt-gece .t-r2, .tt-gece .t-r3 { border-color: #3A3A36; background: #262624; }

/* Kapak: tam boy fotoğraf, adı fotoğrafın üstünde */
.tt-kapak .t-cover { display: block; inset: 0 0 auto 0; height: 52%; background: linear-gradient(180deg, #B4B4AF 0%, #6A6A66 55%, #1D1D1B 100%); }
.tt-kapak .t-av { display: none; }
.tt-kapak .t-l1 { top: 42%; left: 8%; width: 50%; height: 5%; background: #FFFFFF; }
.tt-kapak .t-l2 { display: none; }
.tt-kapak .t-btn { top: 58%; }
.tt-kapak .t-r1, .tt-kapak .t-r2, .tt-kapak .t-r3 { height: 8.5%; border: 1px solid #DDDDD8; border-radius: 3px; background: transparent; }
.tt-kapak .t-r1 { top: 70%; } .tt-kapak .t-r2 { top: 81%; } .tt-kapak .t-r3 { top: 92%; }

/* WOW: beyaz logo şeridi, kırmızı çizgi, otel fotoğrafı, ortalı fotoğraf, kırmızı buton, koyu otel bölümü */
.tt-wow .t-l2 { top: 3.5%; left: 37%; width: 26%; height: 6%; background: #E30613; border-radius: 1px; }
.tt-wow .t-r1 { top: 12%; left: 0; right: 0; height: 2px; background: #E30613; }
.tt-wow .t-cover { display: block; top: 13%; left: 0; right: 0; height: 21%; background: linear-gradient(180deg, #8DA2B8 0%, #5D6B7A 60%, #3B3F44 100%); }
.tt-wow .t-av { top: 26%; left: 38%; }
.tt-wow .t-l1 { top: 52%; left: 27%; width: 46%; background: #222222; }
.tt-wow .t-r2 { top: 60%; left: 35%; right: 35%; height: 3%; border-radius: 2px; background: #E30613; }
.tt-wow .t-btn { top: 67%; background: #ED1C24; }
.tt-wow .t-r3 { top: 81%; height: 15%; border-radius: 3px; background: #222222; }

/* Ek telefon / e-posta satırları */
.extras { margin-top: 20px; }
.extras-list { display: grid; gap: 8px; margin: 6px 0 10px; }
.extras-list:not(:has(.extra-row)) { display: none; }
.extra-row { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.extra-row input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--field);
  border-radius: 8px;
  background: var(--surface);
  color: var(--black);
  font: 400 15px/1.4 var(--font);
}
.extra-row input:focus { outline: none; border-color: var(--black); box-shadow: 0 0 0 3px rgba(29, 29, 27, .1); }
.extra-row input::placeholder { color: #A4A49F; }
.extras.has-error .extra-row input:not([name*="label"]) { border-color: var(--danger); }
.extras .field-error { margin: 0 0 10px; }
.extras [data-add-extra][disabled] { opacity: .45; cursor: not-allowed; }
.extras + .hint { margin-top: 10px; }
@media (max-width: 480px) { .extra-row { grid-template-columns: minmax(0, 96px) minmax(0, 1fr) auto; } }

/* Görseller: her alan bir bırakma alanıdır */
.image-fields { display: grid; gap: 14px; }
.image-field {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 20px;
  align-items: start;
  padding: 16px;
  border: 1.5px dashed var(--field);
  border-radius: 12px;
  background: var(--tint);
  transition: border-color .15s, background-color .15s;
}
.image-field.is-over { border-color: var(--black); background: #ECECE9; }
.image-field.has-error { border-color: var(--danger); }
.image-preview {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--black);
  font-size: 28px;
  font-weight: 600;
}
.image-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-preview--avatar { width: 100px; height: 100px; border-radius: 50%; }
.image-preview--header { width: 180px; aspect-ratio: 12 / 5; border-radius: 8px; background: var(--black); border-color: var(--black); }
.image-label { display: block; margin-bottom: 4px; font-size: 13.5px; font-weight: 600; }
.drop-text { margin: 0; color: var(--text-2); font-size: 14px; }
.drop-text i { margin-right: 4px; color: var(--muted); }
.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--black);
  font: inherit;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.link-btn:hover { color: var(--text-2); }
.file-input { display: none; }
.file-chosen { margin: 6px 0 0; font-size: 13.5px; font-weight: 500; overflow-wrap: anywhere; }
.file-chosen i { margin-right: 4px; color: var(--ok); }
@media (max-width: 560px) { .image-field { grid-template-columns: 1fr; gap: 12px; } }

.save-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 16px 28px;
  border-radius: 0 0 12px 12px;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(6px);
}
.save-bar .hint { margin: 0; }
.save-bar .hint.is-dirty { color: #8A5A00; font-weight: 500; }
.save-bar .hint.is-dirty::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #D99A00; vertical-align: 1px; }
@media (max-width: 640px) { .save-bar { padding: 14px 18px; } }

/* Düzenleme + iPhone önizleme */
.edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
.preview { position: sticky; top: 20px; }
.viewing-as + .wrap .preview { top: 72px; }
.preview .hint { text-align: center; margin-top: 14px; }
@media (max-width: 1080px) {
  .edit-grid { grid-template-columns: 1fr; }
  .preview { display: none; }
}

/* iPhone 15 Pro oranları (71.6 × 146.6 mm gövde, 393 × 852 pt ekran). Ölçüler gövde genişliğine (cqw) göre. */
.iphone-wrap {
  container-type: inline-size;
  width: min(352px, calc((100vh - 230px) * .4884));
  margin: 0 auto;
}
.viewing-as + .wrap .iphone-wrap { width: min(352px, calc((100vh - 280px) * .4884)); }
.iphone {
  position: relative;
  aspect-ratio: 71.6 / 146.6;
  padding: 3.4cqw;
  border-radius: 16.5cqw;
  background: #0C0C0B;
  box-shadow:
    inset 0 0 0 .5cqw #262624,
    0 0 0 .55cqw #4A4A46,
    0 0 0 .9cqw #232321,
    0 40px 70px -36px rgba(29, 29, 27, .6);
}
.iphone-key {
  position: absolute;
  width: 1cqw;
  border-radius: .6cqw;
  background: linear-gradient(90deg, #2A2A28, #4A4A46 50%, #2A2A28);
}
.iphone-key--action   { left: -1.7cqw; top: 17.5%; height: 4.5%; }
.iphone-key--vol-up   { left: -1.7cqw; top: 25%;   height: 7.5%; }
.iphone-key--vol-down { left: -1.7cqw; top: 34%;   height: 7.5%; }
.iphone-key--power    { right: -1.7cqw; top: 28%;  height: 12%; }

.iphone-screen {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 13.2cqw;
  background: #FFFFFF;
  /* Safari köşe kırpmasını transform'lu iframe ile de uygulasın */
  isolation: isolate;
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}
.iphone-status {
  position: relative;
  flex: none;
  height: 13.2cqw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2cqw 7.4cqw 0 9.6cqw;
  background: #1D1D1B; /* Safari durum çubuğunu sayfanın theme-color rengine boyar */
  color: #FFFFFF;
  font: 600 4.3cqw/1 -apple-system, "SF Pro Text", system-ui, sans-serif;
  letter-spacing: -.01em;
}
.iphone-island {
  position: absolute;
  top: 2.9cqw;
  left: 50%;
  width: 31cqw;
  height: 9.2cqw;
  transform: translateX(-50%);
  border-radius: 5cqw;
  background: #000000;
}
.iphone-icons { display: flex; align-items: center; gap: 1.5cqw; }
.iphone-icons svg { display: block; fill: currentColor; }
.ic-signal { width: 4.7cqw; height: 3.2cqw; }
.ic-wifi { width: 4.3cqw; height: 3.2cqw; }
.ic-battery { width: 7cqw; height: 3.4cqw; }

.iphone-viewport { position: relative; flex: 1; overflow: hidden; background: #FFFFFF; }
.iphone-viewport iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  transform-origin: 0 0;
}

.iphone-safari {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.6cqw;
  padding: 2.4cqw 4cqw 2cqw;
  border-top: 1px solid #E6E6E3;
  background: rgba(248, 248, 246, .96);
}
.iphone-url {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.4cqw;
  width: 100%;
  height: 9.6cqw;
  border-radius: 3.2cqw;
  background: #FFFFFF;
  box-shadow: 0 .3cqw 1.6cqw rgba(0, 0, 0, .08);
  color: #1D1D1B;
  font: 500 3.9cqw/1 -apple-system, "SF Pro Text", system-ui, sans-serif;
}
.iphone-url svg { width: 2.4cqw; height: 3.1cqw; fill: #6B6B68; }
.iphone-screen.is-dark .iphone-safari { border-top-color: #2C2C2A; background: rgba(29, 29, 27, .97); }
.iphone-screen.is-dark .iphone-url { background: #2C2C2A; color: #F2F2EF; box-shadow: none; }
.iphone-screen.is-dark .iphone-home { background: #F2F2EF; }
.iphone-status.is-light { color: #1D1D1B; }
.iphone-home { width: 35cqw; height: 1.4cqw; border-radius: 1cqw; background: #1D1D1B; }

/* ---- Giriş bilgilerim ---- */
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; max-width: 1000px; }
.account-grid .section-sub strong { color: var(--black); font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 860px) { .account-grid { grid-template-columns: 1fr; } }

/* ---- Kartvizit listesi ---- */
.users { width: 100%; border-collapse: collapse; }
.users th {
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--tint);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
}
.users td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
.users tbody tr:last-child td { border-bottom: 0; }
.users .num { text-align: right; font-variant-numeric: tabular-nums; }
.users td[data-label="Adres"], .users td[data-label="Son giriş"], .users td[data-label="Durum"] { white-space: nowrap; }
.users tr.is-off .person, .users tr.is-off td[data-label] { opacity: .5; }
.person { display: flex; align-items: center; gap: 12px; }
.person strong { font-weight: 600; }
.person-avatar {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--paper);
  color: var(--black);
  font-size: 14px;
  font-weight: 600;
}
.person-avatar img { width: 100%; height: 100%; object-fit: cover; }
.person-meta { display: block; color: var(--muted); font-size: 13px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-on { color: var(--ok); }
.status-off { color: var(--muted); }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions > * { vertical-align: middle; }
.row-actions > form { display: inline-block; margin: 0; }
.row-actions > * + * { margin-left: 4px; }

.menu { position: relative; display: inline-block; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  min-width: 220px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 16px 40px -18px rgba(29, 29, 27, .35);
  text-align: left;
}
.menu-list button {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--black);
  font: 400 14px/1.3 var(--font);
  text-align: left;
  cursor: pointer;
}
.menu-list button small { display: block; margin-top: 2px; color: var(--muted); font-size: 12.5px; }
.menu-list button:hover { background: var(--paper); }
.menu-list button.danger { color: var(--danger); }

/* Tablo yaklaşık 1000 pikselin altında sığmaz; kişiler alt alta kart olarak dizilir. */
@media (max-width: 1020px) {
  .users thead { display: none; }
  .users, .users tbody, .users tr, .users td { display: block; width: 100%; }
  .users tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .users tbody tr:last-child { border-bottom: 0; }
  .users td { padding: 3px 16px; border: 0; text-align: left; }
  .users td.num { text-align: left; }
  .users td[data-label]::before { content: attr(data-label); display: inline-block; min-width: 108px; color: var(--muted); font-size: 13px; }
  .row-actions { padding-top: 10px !important; text-align: left; }
}

.empty { max-width: 640px; padding: 32px 28px; }
.empty h2 { margin: 0 0 6px; font-size: 19px; }
.empty p { margin: 0 0 18px; color: var(--text-2); }

.credentials {
  max-width: 640px;
  margin-bottom: 24px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--black);
  border-radius: 10px;
  background: var(--surface);
}
.credentials h2 { margin: 0 0 4px; font-size: 17px; }
.credentials p { margin: 0; color: var(--text-2); font-size: 14px; }
.credentials pre {
  margin: 14px 0 12px;
  padding: 14px 16px;
  border-radius: 8px;
  background: var(--paper);
  font: 400 13.5px/1.75 "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ---- QR sayfası: beyaz zemin, yukarı süzülen siyah pikseller ve QR köşe desenleri ---- */
body.page-qr { background: #FFFFFF; }
.page-qr .wrap { flex: 1 0 auto; display: flex; flex-direction: column; max-width: none; width: 100%; padding: 0; }
.page-qr .wrap > .flash { max-width: 1180px; width: calc(100% - 40px); margin: 20px auto 0; }

.qr-space {
  position: relative;
  isolation: isolate;
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 560px;
  padding: 72px 20px 64px;
  overflow: hidden;
  background: #FFFFFF;
}

.pixel-field {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 86%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 86%, transparent 100%);
}
.pixel-field span {
  position: absolute;
  left: var(--x);
  top: 100%;
  width: var(--s);
  height: var(--s);
  background: #1D1D1B;
  opacity: var(--o);
  animation: pixel-rise var(--d) linear var(--delay) infinite;
  will-change: transform;
}
/* QR köşe deseni: 7×7 modül — siyah çerçeve, beyaz halka, 3×3 siyah merkez */
.pixel-field .finder {
  box-shadow:
    inset 0 0 0 calc(var(--s) / 7) #1D1D1B,
    inset 0 0 0 calc(var(--s) * 2 / 7) #FFFFFF;
}
@keyframes pixel-rise { to { transform: translate3d(0, calc(-100vh - 120px), 0); } }

.qr-back {
  position: absolute;
  top: 24px;
  left: max(20px, calc((100% - 1180px) / 2 + 20px));
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
}
.qr-back:hover { color: var(--black); }
.qr-back i { font-size: 10px; }

.qr-stage { display: flex; flex-direction: column; align-items: center; width: 100%; }
.qr-card {
  width: min(340px, 100%);
  margin: 0;
  padding: 28px 28px 20px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #FFFFFF;
  color: var(--black);
  text-align: center;
  box-shadow: 0 28px 70px -34px rgba(29, 29, 27, .45);
}
.qr-render svg { display: block; width: 100%; height: auto; }
.qr-card figcaption { margin-top: 14px; }
.qr-card strong { display: block; font-size: 18px; font-weight: 600; }

/* Tıklanabilir bağlantı + kopyalama butonu */
.link-row { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.link-row a { color: var(--text-2); font-size: 13.5px; overflow-wrap: anywhere; text-underline-offset: 3px; }
.link-row a:hover { color: var(--black); }
.qr-card .link-row { margin-top: 4px; }
.copy-btn {
  flex: none;
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.copy-btn:hover { border-color: var(--line); background: var(--paper); color: var(--black); }
.copy-btn.is-copied { color: var(--ok); }
.copy-note { margin-left: 2px; color: var(--ok); font-size: 12.5px; font-weight: 500; }

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  margin-top: 26px;
  padding: 0 30px;
  border: 0;
  border-radius: 999px;
  background: #1D1D1B;
  color: #FFFFFF;
  font: 600 15.5px/1 var(--font);
  cursor: pointer;
  box-shadow: 0 14px 30px -14px rgba(29, 29, 27, .6);
}
.btn-download:hover { background: var(--black-hover); }

@media (prefers-reduced-motion: reduce) {
  .pixel-field span { animation: none; top: var(--y); }
}

/* ---- Giriş ---- */
body.auth { background: var(--surface); }
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth-intro {
  display: flex;
  flex-direction: column;
  padding: 44px clamp(28px, 6vw, 88px);
  background: var(--black);
  color: #FFFFFF;
}
.auth-intro .wordmark { color: #FFFFFF; }
.auth-intro h1 {
  max-width: 16ch;
  margin: auto 0 16px;
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.02em;
}
.auth-intro > p:not(.wordmark):not(.auth-url) { margin: 0; max-width: 46ch; color: rgba(255, 255, 255, .68); font-size: 16px; }
.auth-url {
  margin: 40px 0 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .5);
  font-size: 15px;
  overflow-wrap: anywhere;
}
.auth-url span { color: #FFFFFF; }
.auth-form { align-self: center; justify-self: center; width: 100%; max-width: 420px; padding: 48px 32px; }
.auth-form h2 { margin: 0 0 22px; font-size: 24px; }
.auth-form .btn-block { margin-top: 6px; }
.auth-form > .hint { margin-top: 18px; }
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-intro { padding: 26px 20px 28px; }
  .auth-intro h1 { margin-top: 40px; font-size: 30px; }
  .auth-url { margin-top: 24px; }
  .auth-form { padding: 32px 20px 48px; }
}

/* ---- Hata ---- */
body.error-page { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.error-box { max-width: 460px; }
.error-box h1 { margin: 28px 0 10px; font-size: 30px; line-height: 1.15; }
.error-box p { color: var(--text-2); }
.error-code { margin-bottom: 24px; color: var(--muted) !important; font-size: 13px; }

/* ---- Yazdırma: yalnızca QR ---- */
@media print {
  body, body.page-qr { background: #FFFFFF; }
  .topbar, .viewing-as, .page-head, .flash, .pixel-field, .qr-back, .btn-download, .copy-btn, .panel-footer { display: none !important; }
  .wrap { padding: 0; }
  .qr-space { background: none; padding: 0; min-height: 0; }
  .qr-card { max-width: 9cm; margin: 40px auto; box-shadow: none; }
}
