:root {
  --bg-deep: #ffffff;
  --bg-page: #f8f7f7;
  --bg-header: #ffffff;
  --bg-card: #ffffff;
  --bg-card-2: #f8f7f7;
  --border: #e8e8e8;
  --border-soft: #eeeeee;
  --accent: #a80000;
  --accent-bright: #8f0000;
  --accent-dim: #c65959;
  --text: #232323;
  --text-muted: #8a8a8a;
  --green: #2f8f5b;
  --amber: #c07a2a;
  --red: #c1392b;
}

* { box-sizing: border-box; }

html {
  height: 100%;
}

/* Varsayılan: sayfa normal şekilde kayar (giriş/kayıt/ayarlar/tanıtım/hukuki sayfalar).
   Sadece barkod okutma ekranı (body.kiosk-body) tek ekrana sabitlenip kaymaz — çünkü
   o sayfadaki ürün ızgarası kalan alana göre kendi kendine boyutlanacak şekilde tasarlandı. */
body {
  min-height: 100%;
  font-family: 'Inter', -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-page) 100%);
  color: var(--text);
  margin: 0;
  display: flex;
  flex-direction: column;
}

body.kiosk-body {
  height: 100%;
  overflow: hidden;
}

header {
  flex: 0 0 auto;
  background: var(--bg-header);
  padding: 10px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.05);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-name {
  font-family: 'Inter', -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 2px;
  color: var(--accent-bright);
}

.brand-sub {
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.stats {
  display: flex;
  gap: 26px;
  font-size: 13px;
  color: var(--text-muted);
}

.logout-btn {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card-2);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.logout-btn:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
}

.logout-btn.hidden { display: none; }

.stats span {
  color: var(--accent-bright);
  font-weight: 800;
  font-size: 16px;
  display: block;
  font-family: 'Inter', -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: -0.01em;
}

main {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0 auto;
  padding: 14px 28px 20px;
}

.display-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.display-toolbar-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.cargo-deadline {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card-2);
  color: var(--text);
  white-space: nowrap;
}
.cargo-deadline:empty { display: none; }
.cargo-deadline.deadline-warning { color: var(--amber); border-color: var(--amber); }
.cargo-deadline.deadline-urgent { color: var(--red); border-color: var(--red); }

.toggle-btn {
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card-2);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.toggle-btn:hover { border-color: var(--accent); }

.toggle-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

.scan-bar {
  flex: 0 0 auto;
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

#barcodeInput {
  flex: 1;
  font-size: 20px;
  padding: 12px 20px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  outline: none;
  font-family: 'Inter', sans-serif;
  letter-spacing: 1px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s, box-shadow 0.15s;
}

#barcodeInput::placeholder {
  color: rgba(47, 143, 91, 0.6);
  letter-spacing: 0.5px;
}

#barcodeInput:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(47, 143, 91, 0.16);
}

.camera-scan-btn {
  flex: 0 0 auto;
  width: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--accent);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.camera-scan-btn:hover { border-color: var(--accent); background: var(--bg-card-2); }
.camera-scan-btn svg { width: 24px; height: 24px; }

.camera-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 12, 0.94);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.camera-modal.hidden { display: none; }

.camera-modal-inner {
  position: relative;
  width: 100%;
  max-width: 480px;
}

#cameraVideo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 18px;
  background: #000;
  display: block;
}

.camera-scan-frame {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 78%;
  height: 30%;
  border: 3px solid var(--accent);
  border-radius: 14px;
  box-shadow: 0 0 0 2000px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.camera-status {
  text-align: center;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  margin: 16px 0 0;
}

.camera-close-btn {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.camera-close-btn:hover { background: var(--accent-bright); }

.message {
  flex: 0 0 auto;
  min-height: 0;
  font-size: 15px;
  padding: 0 2px 6px;
  color: var(--text-muted);
}
.message:empty { padding: 0; }

.message.error { color: var(--red); font-weight: 600; }
.message.ok { color: var(--green); font-weight: 600; }

.result {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: 20px;
  padding: 18px 26px;
  border: 1px solid var(--border);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.07);
}

.result.hidden { display: none; }

.result-header {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}

.result-header h2 {
  margin: 0;
  font-family: 'Inter', -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(15px, 4.2vw, 26px);
  color: var(--accent-bright);
  letter-spacing: 0.5px;
  word-break: break-word;
}

.badge {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.result-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cargo-courier-badge {
  color: var(--accent-bright);
  border-color: var(--accent-dim);
}
.cargo-courier-badge.hidden { display: none; }

.badge.prepared {
  background: rgba(47, 143, 91, 0.1);
  border-color: var(--green);
  color: #237349;
}

/* Barkod okutma ekranı (kiosk) için sıkıştırma: ürün görseli maksimum alan kaplasın diye
   başlık/rozet/tarama çubuğu/header küçültülüyor. Sadece .kiosk-body altında geçerli —
   settings/billing/admin gibi diğer sayfalar aynı temel sınıfları paylaştığı için
   buradaki kurallar onları etkilemesin diye hepsi .kiosk-body ile öneklendi. */
.kiosk-body header {
  padding: 5px 16px;
}
.kiosk-body .brand-logo {
  height: 22px;
}
.kiosk-body .brand-name {
  font-size: 11px;
  letter-spacing: 1px;
}
.kiosk-body .brand-sub {
  font-size: 8px;
}
.kiosk-body .header-right {
  gap: 10px;
}
.kiosk-body .logout-btn {
  font-size: 9px;
  padding: 4px 8px;
}

.kiosk-body main {
  padding: 6px 12px 10px;
}

.kiosk-body .display-toolbar {
  gap: 5px;
  margin-bottom: 5px;
}
.kiosk-body .display-toolbar-label {
  font-size: 9px;
}
.kiosk-body .toggle-btn {
  font-size: 9px;
  padding: 4px 8px;
}
.kiosk-body .cargo-deadline {
  font-size: 9px;
  padding: 4px 8px;
}

.kiosk-body .scan-bar {
  gap: 6px;
  margin-bottom: 6px;
}
.kiosk-body #barcodeInput {
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 8px;
}
.kiosk-body .camera-scan-btn {
  width: 26px;
  border-radius: 8px;
}
.kiosk-body .camera-scan-btn svg {
  width: 14px;
  height: 14px;
}

.kiosk-body .result {
  padding: 8px 12px;
  border-radius: 14px;
}
.kiosk-body .result-header {
  margin-bottom: 4px;
  padding-bottom: 4px;
  gap: 4px 8px;
}
.kiosk-body .result-header h2 {
  font-size: clamp(18px, 2.8vw, 22px);
  line-height: 1;
  margin: 0;
  letter-spacing: 0.2px;
}
.kiosk-body .badge {
  font-size: 7px;
  padding: 2px 8px;
  letter-spacing: 0.3px;
}

.item-list {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  /* Sütun/satır sayısı ve hücre boyutu, kart oranı sabit kalacak şekilde app.js tarafından px olarak hesaplanır */
}

.item {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  min-width: 0;
}

.item-image {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  background: var(--bg-card-2);
  border-radius: 14px;
  padding: 10px;
  border: 1px solid var(--border-soft);
  min-height: 0;
  min-width: 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  background: var(--bg-card);
}

.item .no-image {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  background: var(--bg-card-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.item-qty {
  position: absolute;
  bottom: 14px;
  right: 14px;
  min-width: 2.2em;
  padding: 0.25em 0.6em;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: clamp(18px, 15cqw, 42px);
  font-weight: 800;
  font-family: 'Inter', -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  text-align: center;
  line-height: 1.15;
  letter-spacing: -0.02em;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
  border: 2px solid rgba(255,255,255,0.85);
}

/* Adet başına, temanın altın/krem paletiyle uyumlu, tonu düşük (cırtlak olmayan) ayırt edici renkler */
.item-qty.qty-1 { background: #C9A35F; color: #3a2c0a; } /* altın */
.item-qty.qty-2 { background: #6B8CAE; color: #ffffff; } /* gri-mavi */
.item-qty.qty-3 { background: #B2564B; color: #ffffff; } /* kiremit */
.item-qty.qty-4 { background: #6E8B5E; color: #ffffff; } /* adaçayı yeşili */
.item-qty.qty-5 { background: #8E7196; color: #ffffff; } /* leylak */
.item-qty.qty-6 { background: #A9713F; color: #ffffff; } /* bakır */
.item-qty.qty-7 { background: #4F7C82; color: #ffffff; } /* petrol */
.item-qty.qty-8 { background: #4A433C; color: #ffffff; } /* espresso, 8+ adet */

.item-colors {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(6px, 4cqw, 14px);
  padding: clamp(4px, 3cqw, 8px) 4px;
}

.item-name {
  flex: 0 0 auto;
  text-align: center;
  font-size: clamp(11px, 5cqw, 15px);
  font-weight: 600;
  color: var(--text);
  padding: clamp(2px, 2cqw, 6px) 6px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.color-tag {
  display: inline-flex;
  align-items: center;
  gap: clamp(4px, 2.4cqw, 7px);
  background: var(--bg-card-2);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: clamp(3px, 2cqw, 6px) clamp(8px, 4cqw, 14px);
  font-size: clamp(11px, 5.5cqw, 16px);
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.swatch {
  width: clamp(9px, 4.5cqw, 15px);
  height: clamp(9px, 4.5cqw, 15px);
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.15);
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.4);
}

.item.unmatched .item-image {
  border-color: var(--amber);
}

.item.unmatched .item-qty { background: var(--amber); }

.empty-state {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--accent-dim);
  opacity: 0.85;
}

.empty-logo {
  width: auto;
  height: 100px;
  object-fit: contain;
  opacity: 0.6;
  margin-bottom: 16px;
}

.empty-state p {
  font-family: 'Inter', -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 20px;
  letter-spacing: 1px;
  margin: 0;
  color: var(--text-muted);
}

.empty-state.hidden { display: none; }

@media (max-width: 560px) {
  header { flex-direction: column; gap: 12px; align-items: center; }
  .header-right { flex-wrap: wrap; justify-content: center; }
  .stats { flex-wrap: wrap; gap: 14px; }
  .settings-actions { flex-direction: column; }
  .settings-actions button[type="submit"],
  .settings-remove-btn { width: 100%; }
  /* Mobilde header dar olduğu için logonun yanındaki marka yazısı gizlenir, sadece logo kalır */
  .brand-text { display: none; }
}

/* Giriş / Kayıt sayfaları */
.auth-main {
  flex: 1 1 auto;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 30px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.07);
  text-align: center;
}

.auth-logo {
  width: auto;
  height: 64px;
  object-fit: contain;
  margin-bottom: 12px;
}

.auth-card h1 {
  font-family: 'Inter', -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: var(--accent-bright);
  margin: 0 0 22px;
}

.auth-card form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
}

.auth-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.auth-card input {
  font-size: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--bg-card-2);
  color: var(--text);
  outline: none;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-card input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(168, 0, 0, 0.16);
}

.auth-card button {
  margin-top: 6px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 12px 18px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.auth-card button:hover { background: var(--accent-bright); }
.auth-card button:active { transform: scale(0.98); }
.auth-card button:disabled { opacity: 0.6; cursor: default; }

.auth-message {
  min-height: 0;
  font-size: 13px;
  color: var(--red);
  font-weight: 600;
}
.auth-message:empty { display: none; }
.auth-message.ok { color: var(--green); }

.auth-hint {
  margin: -8px 0 18px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: left;
}

.auth-switch {
  margin: 20px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-switch a {
  color: var(--accent-bright);
  font-weight: 700;
  text-decoration: none;
}
.auth-switch a:hover { text-decoration: underline; }

/* Ayarlar sayfası */
.settings-main {
  flex: 1 1 auto;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px 26px;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.07);
}

.settings-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.settings-card-header h2 {
  font-family: 'Inter', -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: 22px;
  color: var(--accent-bright);
  margin: 0;
}

.settings-guide {
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-muted);
  background: var(--bg-card-2);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 0 0 18px;
}

.settings-guide strong { color: var(--text); }

.settings-card form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.settings-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.settings-optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.settings-card input,
.settings-card select {
  font-size: 15px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--bg-card-2);
  color: var(--text);
  outline: none;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.settings-card input:focus,
.settings-card select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(168, 0, 0, 0.16);
}

.settings-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.settings-actions button[type="submit"] {
  flex: 1;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 16px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s;
}
.settings-actions button[type="submit"]:hover { background: var(--accent-bright); }
.settings-actions button[type="submit"]:disabled { opacity: 0.6; cursor: default; }

.settings-remove-btn {
  font-size: 13px;
  font-weight: 600;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.settings-remove-btn:hover { border-color: var(--red); color: var(--red); }

.users-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.users-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: var(--bg-card-2);
}

.users-email {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-cost-input {
  width: 130px;
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 13px;
}

.cost-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 0 0 auto;
}

.cost-field-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.users-row .settings-remove-btn {
  padding: 6px 12px;
  font-size: 12.5px;
}

/* Abonelik / Ödeme sayfası */
.billing-card { max-width: 440px; transition: max-width 0.2s; }

/* PayTR'nin ödeme iframe'i içeriği dar karta sığmayıp kırpılıyordu — ödeme başlayınca
   kart yaklaşık 3 katına genişliyor (440px -> 1320px), kompakt fiyat/istatistik görünümü
   ise değişmediği için önceki adımlarda dar kalmaya devam ediyor. */
.billing-card.paying { max-width: 1320px; }

.billing-status {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 18px;
}

.billing-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.billing-stats.hidden { display: none; }

.billing-stat {
  flex: 1;
  background: var(--bg-card-2);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
}

.billing-stat-value {
  display: block;
  font-family: 'Inter', -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: var(--accent-bright);
  line-height: 1.2;
}

.billing-stat-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

.billing-integrations {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.billing-integrations.hidden { display: none; }

.billing-integration-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card-2);
  color: var(--text-muted);
}

.billing-integration-tag.connected {
  background: rgba(47, 143, 91, 0.1);
  border-color: var(--green);
  color: #237349;
}

.billing-plans {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  text-align: left;
}

/* .auth-card button (üstteki genel form-buton stili) düz kırmızı dolgu + kenarlıksız
   veriyor ve normal specificity'de .billing-plan'in üzerine yazıyordu, metni okunmaz
   hale getiriyordu — .billing-plans içinde iç içe seçici kullanılarak bilerek daha
   yüksek specificity'ye çıkarıldı. */
.billing-plans .billing-plan {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-top: 0;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.billing-plans .billing-plan:hover { border-color: var(--accent-dim); background: var(--bg-card); }
.billing-plans .billing-plan.selected {
  border-color: var(--accent);
  background: rgba(168, 0, 0, 0.05);
  box-shadow: 0 0 0 1px var(--accent);
}

.billing-plan-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s;
}
.billing-plan.selected .billing-plan-radio { border-color: var(--accent); }

.billing-plan-radio-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.15s, transform 0.15s;
}
.billing-plan.selected .billing-plan-radio-dot { opacity: 1; transform: scale(1); }

.billing-plan-body {
  flex: 1 1 auto;
  min-width: 0;
}

.billing-plan-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.billing-plan-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-align: left;
}

.billing-plan-price {
  font-family: 'Inter', -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: 17px;
  color: var(--accent-bright);
  white-space: nowrap;
}

.billing-plan-period {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 12px;
  color: var(--text-muted);
  margin-left: 2px;
}

.billing-plans.hidden,
.billing-invoice-form.hidden,
.billing-iframe-wrap.hidden,
#payButton.hidden {
  display: none;
}

.billing-invoice-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
}

.billing-invoice-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.billing-invoice-type {
  display: flex;
  gap: 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.billing-invoice-type label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
}

.billing-invoice-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.billing-invoice-form label.hidden { display: none; }

.billing-invoice-form input,
.billing-invoice-form textarea {
  font-size: 14px;
  padding: 9px 12px;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: var(--bg-card-2);
  color: var(--text);
  outline: none;
  font-family: 'Inter', sans-serif;
  resize: vertical;
}

.billing-invoice-form input:focus,
.billing-invoice-form textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(168, 0, 0, 0.16);
}

/* PayTR'nin ödeme formu (uyarı bandı, dil seçici, kart formu, taksit tablosu dahil)
   520px'e sığmıyordu — dar kutunun içinde kendi iç kaydırma çubuğunu açıp "kayıyor/kararsız"
   bir his veriyordu. Sabit, yeterince yüksek bir alan vererek tüm formun tek seferde,
   iç kaydırma olmadan görünmesini sağlıyoruz; sayfa normal şekilde tek parça kayar. */
.billing-iframe-wrap {
  width: 100%;
  height: 950px;
  margin-bottom: 16px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.billing-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

#payButton {
  width: 100%;
  font-size: 15px;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 10px;
  border: none;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s;
}
#payButton:hover { background: var(--accent-bright); }
#payButton:disabled { opacity: 0.6; cursor: default; }

/* Destek footer'ı (kiosk, entegrasyon, üyelik sayfaları) */
.support-footer {
  flex: 0 0 auto;
  margin-top: auto;
  padding: 14px 24px 20px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-muted);
}

.support-footer a {
  color: var(--accent-bright);
  font-weight: 700;
  text-decoration: none;
}
.support-footer a:hover { text-decoration: underline; }

/* Üyelik göstergesi (kiosk header) */
.membership-badge {
  font-weight: 700;
}
.membership-badge.membership-low { color: var(--red) !important; }

/* Yönetim paneli */
.admin-main {
  flex: 1 1 auto;
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 24px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.admin-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 16px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.admin-stat-value {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-bright);
  line-height: 1.2;
}

.admin-stat-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
}

.admin-table-wrap {
  overflow-x: auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  white-space: nowrap;
}

.admin-table th {
  text-align: left;
  padding: 10px 14px;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
}

.admin-table tr:last-child td { border-bottom: none; }

.admin-status {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.admin-status.trial { background: rgba(192, 122, 42, 0.12); color: var(--amber); }
.admin-status.paid { background: rgba(47, 143, 91, 0.12); color: var(--green); }
.admin-status.gift { background: rgba(168, 0, 0, 0.1); color: var(--accent-bright); }
.admin-status.unlimited { background: rgba(168, 0, 0, 0.1); color: var(--accent-bright); }
.admin-status.expired { background: rgba(193, 57, 43, 0.12); color: var(--red); }

.admin-badge-yes { color: var(--green); font-weight: 700; }
.admin-badge-no { color: var(--text-muted); }

.profit-positive { color: var(--green); font-weight: 700; }
.profit-negative { color: var(--red); font-weight: 700; }

.admin-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-actions .toggle-btn {
  padding: 6px 10px;
  font-size: 11.5px;
}

.admin-grant-select {
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card-2);
  color: var(--text);
}

.admin-revoke-btn {
  color: var(--red) !important;
  border-color: var(--red) !important;
}
