/* ============================
   Otel Kort Rezervasyon — Modern Minimal
   ============================ */

:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --border: #e5eaf1;
  --border-strong: #cdd5e0;
  --text: #0f172a;
  --text-soft: #475569;
  --text-mute: #94a3b8;

  --primary: #0d6efd;
  --primary-hover: #0a58ca;
  --primary-soft: #e7f0ff;

  --accent: #10b981;
  --accent-hover: #059669;
  --accent-soft: #d1fae5;

  --danger: #ef4444;
  --danger-soft: #fee2e2;

  --warning: #f59e0b;
  --warning-soft: #fef3c7;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.14);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --transition: 160ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

/* Erişilebilirlik: klavye odağı */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Hareketi azalt tercihi */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0ms !important;
  }
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font-family: inherit;
}

/* ============ Layout ============ */

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

header.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(180%) blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  box-shadow: var(--shadow-sm);
}

.brand-text h1 {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

.brand-text p {
  font-size: 12px;
  color: var(--text-mute);
  margin: 0;
}

/* Dil seçici */
.lang-switcher {
  display: flex;
  gap: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
}

.lang-btn {
  border: none;
  background: transparent;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  border-radius: 8px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: var(--transition);
}

.lang-btn:hover {
  color: var(--text);
  background: var(--surface);
}

.lang-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* ============ Main content ============ */

main {
  padding: 32px 0 64px;
}

.hero {
  text-align: center;
  margin-bottom: 32px;
}

.hero h2 {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0;
  color: var(--text-soft);
  font-size: 15px;
}

/* Adımlar ve seçim alanları */

.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.section.is-locked {
  opacity: 0.5;
  pointer-events: none;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.section.completed .step-num {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.section-value {
  margin-left: auto;
  font-size: 14px;
  color: var(--accent-hover);
  font-weight: 600;
}

/* Bölüm/kort buton ızgaraları */

.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.option-btn {
  border: 1.5px solid var(--border);
  background: var(--surface);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.option-btn:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.option-btn.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: var(--shadow-sm);
}

.option-btn-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.option-btn-sub {
  font-size: 12px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.option-btn.selected .option-btn-sub {
  color: var(--primary);
}

/* Tarih seçici */

.date-input-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.date-input {
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  transition: var(--transition);
  font-family: inherit;
  width: 100%;
  max-width: 280px;
}

.date-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.date-quick-btns {
  display: flex;
  gap: 6px;
}

.chip-btn {
  font-size: 12px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  border-radius: 999px;
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.chip-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Saat slot ızgarası */

.slots-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-soft);
  margin-bottom: 16px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: var(--radius-md);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-dot.available {
  background: var(--accent);
}

.legend-dot.reserved {
  background: var(--danger);
}

.legend-dot.past {
  background: var(--text-mute);
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  animation: fadeIn 200ms ease-out;
}

.slot {
  position: relative;
  padding: 14px 10px;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  background: var(--accent-soft);
  color: var(--accent-hover);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
  font-family: inherit;
}

.slot:hover:not(:disabled) {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.slot:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: none;
}

.slot.reserved {
  background: var(--danger-soft);
  color: var(--danger);
  cursor: not-allowed;
}

.slot.past {
  background: #f1f5f9;
  color: var(--text-mute);
  cursor: not-allowed;
}

.slot:disabled {
  pointer-events: none;
}

/* Adım yardım metni (örn. "yeşil hücreye tıklayın") */
.section-help {
  margin: 0 0 12px 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.5;
}

/* ============ Müsaitlik matriksi (kort × saat) ============ */

.matrix-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  animation: fadeIn 200ms ease-out;
}

.matrix-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: 13px;
  font-family: inherit;
  table-layout: auto;
}

.matrix-table th,
.matrix-table td {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0;
  text-align: center;
  vertical-align: middle;
}

.matrix-table tr > *:last-child {
  border-right: 0;
}

.matrix-table tbody tr:last-child > * {
  border-bottom: 0;
}

/* Sol üst köşe ("Saat" başlığı) - hem üstte hem solda sticky */
.matrix-corner {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 4;
  background: var(--bg);
  color: var(--text-soft);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 12px;
  min-width: 72px;
  text-align: left;
}

/* Kort başlıkları (üst satır) - üstte sticky */
.matrix-court-th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--bg);
  text-align: center;
  padding: 10px 8px;
  min-width: 72px;
  vertical-align: middle;
}

.matrix-court-name {
  display: block;
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  line-height: 1.2;
}

.matrix-court-type {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Saat satır başlığı (sol sütun) - solda sticky */
.matrix-hour-th {
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  color: var(--text);
  font-weight: 600;
  font-size: 12px;
  text-align: center;
  padding: 10px 8px;
  min-width: 72px;
  white-space: nowrap;
  border-right: 1px solid var(--border);
  box-shadow: 1px 0 0 var(--border);
}

.matrix-hour-th.is-past {
  color: var(--text-mute);
  opacity: 0.7;
}

/* Hücreler */
.matrix-cell {
  height: 40px;
  min-width: 48px;
  font-size: 14px;
  font-weight: 600;
  user-select: none;
  transition: background-color 120ms ease, transform 120ms ease;
}

.matrix-cell.cell-free {
  background: var(--accent-soft);
  color: var(--accent-hover);
  cursor: pointer;
}

.matrix-cell.cell-free:hover {
  background: var(--accent);
  color: #fff;
  transform: scale(1.02);
}

.matrix-cell.cell-free:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.matrix-cell.cell-reserved {
  background: var(--danger-soft);
  color: var(--danger);
  cursor: not-allowed;
}

.matrix-cell.cell-past {
  background: #f1f5f9;
  color: var(--text-mute);
  cursor: not-allowed;
}

.matrix-cell.cell-na {
  background: repeating-linear-gradient(
    45deg,
    #fafafa,
    #fafafa 4px,
    #f0f0f0 4px,
    #f0f0f0 8px
  );
  color: #cbd5e1;
  cursor: not-allowed;
  font-size: 12px;
}

/* Mobil iyileştirme — daha sıkı hücreler, küçük yazı */
@media (max-width: 640px) {
  .matrix-table {
    font-size: 12px;
  }
  .matrix-corner,
  .matrix-hour-th {
    min-width: 60px;
    padding: 8px 6px;
    font-size: 11px;
  }
  .matrix-court-th {
    min-width: 64px;
    padding: 8px 4px;
  }
  .matrix-court-name {
    font-size: 12px;
  }
  .matrix-court-type {
    font-size: 9px;
  }
  .matrix-cell {
    height: 40px;
    min-width: 64px;
    font-size: 14px;
  }
}

/* Boş durum */

.empty-state {
  text-align: center;
  padding: 28px 16px;
  color: var(--text-mute);
  font-size: 14px;
}

/* Yükleme spinner */

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  color: var(--text-soft);
  font-size: 14px;
}

/* ============ Modal ============ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
  animation: fadeIn 160ms ease;
}

.modal-overlay.is-open {
  display: flex;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: slideUp 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  padding: 20px 24px 8px;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
}

.modal-subtitle {
  font-size: 13px;
  color: var(--text-soft);
  margin: 0;
}

.modal-body {
  padding: 16px 24px;
}

.summary-box {
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.summary-row .key {
  color: var(--text-mute);
}

.summary-row .val {
  color: var(--text);
  font-weight: 600;
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.field-help {
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 6px;
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 14px;
  padding: 10px 12px;
  background: var(--primary-soft);
  color: var(--primary-hover);
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 500;
}

.privacy-note::before {
  content: '🔒';
  flex-shrink: 0;
}

.text-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  transition: var(--transition);
  font-family: inherit;
}

.text-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.text-input.error {
  border-color: var(--danger);
}

.error-text {
  color: var(--danger);
  font-size: 12px;
  margin-top: 6px;
  min-height: 16px;
}

.modal-footer {
  padding: 12px 24px 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Butonlar */

.btn {
  border: 1px solid transparent;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-soft);
  border-color: var(--border);
}

.btn-ghost:hover:not(:disabled) {
  background: var(--bg);
  color: var(--text);
}

.btn-success {
  background: var(--accent);
  color: white;
}

.btn-success:hover:not(:disabled) {
  background: var(--accent-hover);
}

/* Başarı modalı */

.success-icon {
  width: 64px;
  height: 64px;
  margin: 8px auto 16px;
  background: var(--accent-soft);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-hover);
  font-size: 28px;
  font-weight: 700;
}

.modal-body--center {
  text-align: center;
}

.success-id-row {
  display: inline-block;
  padding: 6px 14px;
  background: var(--bg);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-top: 12px;
  letter-spacing: 0.02em;
}

/* Toast (üst sağ) */

.toast {
  position: fixed;
  top: 16px;
  right: 16px;
  background: var(--text);
  color: white;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: 14px;
  z-index: 200;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: none;
  max-width: 360px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.error {
  background: var(--danger);
}

/* Footer */

footer.app-footer {
  text-align: center;
  padding: 24px 0;
  font-size: 12px;
  color: var(--text-mute);
}

/* ============ Admin Panel ============ */

.admin-shell {
  display: none;
}

.admin-shell.is-active {
  display: block;
}

.login-shell {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-shell.is-hidden {
  display: none;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-md);
}

.login-card h2 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.login-card p {
  margin: 0 0 20px;
  color: var(--text-soft);
  font-size: 13px;
}

.form-group {
  margin-bottom: 14px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.admin-greeting {
  font-size: 14px;
  color: var(--text-soft);
}

.admin-greeting strong {
  color: var(--text);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.stat-card .label {
  font-size: 12px;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 6px;
}

.stat-card .value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.stat-card.accent .value {
  color: var(--accent-hover);
}

.stat-card.danger .value {
  color: var(--danger);
}

.filter-bar {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
}

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.data-table thead {
  background: var(--bg);
}

table.data-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 12px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}

table.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}

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

table.data-table tr.cancelled td {
  color: var(--text-mute);
  text-decoration: line-through;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge.active {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.badge.cancelled {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn-icon {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--danger);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-size: 16px;
}

.btn-icon:hover:not(:disabled) {
  background: var(--danger-soft);
  border-color: var(--danger);
}

.btn-icon:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.empty-row td {
  text-align: center;
  color: var(--text-mute);
  padding: 32px 16px !important;
  font-size: 14px;
}

@media (max-width: 720px) {
  table.data-table th:nth-child(4),
  table.data-table td:nth-child(4) {
    display: none; /* Bölüm + kort'u küçük ekranda gizle */
  }
}

/* ============ Responsive ============ */

@media (max-width: 600px) {
  .hero h2 {
    font-size: 22px;
  }

  .hero {
    margin-bottom: 20px;
  }

  .section {
    padding: 18px;
  }

  .header-inner {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .brand-text h1 {
    font-size: 15px;
  }

  .brand-text p {
    display: none; /* küçük ekranda alt metni gizle */
  }

  .lang-switcher {
    margin-left: auto;
  }

  .lang-btn {
    padding: 5px 8px;
    font-size: 11px;
  }

  .option-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .slot-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .modal {
    max-width: 100%;
  }

  /* Rezervasyon onay modalı: mobilde ortada kompakt kart; uzun içerik gövdede kayar */
  #confirm-modal.modal-overlay {
    padding: max(10px, env(safe-area-inset-top, 10px)) 10px max(10px, env(safe-area-inset-bottom, 10px)) 10px;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  #confirm-modal .modal {
    width: 100%;
    max-width: min(100%, 400px);
    max-height: calc(100vh - 20px);
    max-height: min(88dvh, calc(100dvh - 20px));
    margin: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #confirm-modal .modal-header {
    flex-shrink: 0;
    padding: 14px 16px 6px;
  }

  #confirm-modal .modal-title {
    font-size: 16px;
    margin-bottom: 2px;
  }

  #confirm-modal .modal-subtitle {
    font-size: 12px;
    line-height: 1.35;
  }

  #confirm-modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 10px 16px 12px;
  }

  #confirm-modal .summary-box {
    padding: 10px 12px;
    margin-bottom: 12px;
    gap: 4px;
  }

  #confirm-modal .summary-row {
    font-size: 12px;
    gap: 10px;
  }

  #confirm-modal .summary-row .val {
    font-weight: 600;
    text-align: right;
    word-break: break-word;
  }

  #confirm-modal .form-group {
    margin-bottom: 10px;
  }

  #confirm-modal .field-label {
    font-size: 12px;
    margin-bottom: 4px;
  }

  #confirm-modal .text-input {
    padding: 10px 12px;
    font-size: 16px; /* iOS’ta odakta otomatik yakınlaştırmayı engeller */
  }

  #confirm-modal .privacy-note {
    margin-top: 8px;
    padding: 8px 10px;
    font-size: 11px;
  }

  #confirm-modal .error-text {
    margin-top: 4px;
  }

  #confirm-modal .modal-footer {
    flex-shrink: 0;
    flex-direction: column-reverse;
    gap: 8px;
    padding: 10px 16px max(12px, env(safe-area-inset-bottom, 12px));
  }

  #confirm-modal .modal-footer .btn {
    width: 100%;
    justify-content: center;
  }

  .modal-footer {
    flex-direction: column-reverse;
    gap: 8px;
  }

  .modal-footer .btn {
    width: 100%;
    justify-content: center;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar .filter-field {
    width: 100%;
  }

  .filter-bar > .filter-field:last-child {
    margin-left: 0 !important;
  }
}

@media (max-width: 380px) {
  .lang-btn {
    padding: 4px 6px;
    letter-spacing: 0;
  }

  .step-num {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .section-title {
    font-size: 14px;
  }
}
