:root {
  --bg: #f5f3ee;
  --card: #ffffff;
  --text: #141414;
  --muted: #77726b;
  --line: #dedad3;
  --soft: #f0ede6;
  --accent: #111111;
  --success: #28683a;
  --danger: #a52e2e;
  --shadow: 0 18px 45px rgba(20,20,20,.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text);
  /* Sistem fontu: dış istek yok, anında render. */
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    'Noto Sans', sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.page-shell { max-width: 760px; margin: 0 auto; padding: 28px 18px 44px; min-height: 100vh; }
.site-header, .admin-header { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:24px; }
.brand { font-size: 26px; font-weight: 800; letter-spacing: .17em; }
.brand-sub { margin-top: 2px; font-size: 11px; letter-spacing: .25em; color: var(--muted); }
.phone-link { color: var(--text); text-decoration: none; font-size: 13px; }

.booking-card, .login-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 28px; }
.card-title { margin:0 0 22px; font-size:15px; font-weight:700; letter-spacing:.16em; text-transform:uppercase; color:var(--muted); }
.stepper { display:grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-bottom: 30px; }
.step { display:flex; flex-direction:column; align-items:center; gap:7px; color:#aaa; text-align:center; }
.step > span { width:32px; height:32px; border-radius:50%; border:1px solid var(--line); display:grid; place-items:center; font-weight:600; }
.step.active { color:var(--text); }
.step.active > span { color:#fff; background:#111; border-color:#111; }
.step small { font-size:11px; }

.step-panel { display:none; }
.step-panel.active { display:block; }
.eyebrow { text-transform:uppercase; font-size:11px; letter-spacing:.12em; color:var(--muted); font-weight:700; }
.section-title h1, .section-title h2 { margin:7px 0 6px; font-size:28px; line-height:1.1; }
.section-title p { margin:0 0 24px; color:var(--muted); font-size:14px; line-height:1.5; }

.option-list { display:grid; gap:10px; margin-bottom:22px; }
.option-card { display:flex; align-items:center; gap:14px; width:100%; text-align:left; background:#fff; border:1px solid #cfc9c0; border-radius:12px; padding:15px 16px; transition:.15s ease; }
.option-card:hover { border-color:#888; }
.option-card.selected { border-color:#111; box-shadow: inset 0 0 0 1px #111; }
.option-content { flex:1; }
.option-title { font-weight:600; font-size:16px; }
.option-meta { margin-top:4px; font-size:12px; color:var(--muted); }
.option-price { font-weight:700; font-size:14px; color:var(--text); }
.option-price-alt { margin-left:7px; font-size:12.5px; color:var(--muted); }
.radio { width:18px; height:18px; border:1px solid #aaa; border-radius:50%; flex:0 0 auto; }
.option-card.selected .radio { border:5px solid #111; }

.primary-btn, .secondary-btn, .primary-mini-btn, .ghost-btn { border:0; border-radius:10px; padding:13px 16px; font-weight:600; }
.primary-btn { width:100%; background:#111; color:#fff; }
.secondary-btn, .ghost-btn { background:#f6f4ef; color:#111; border:1px solid var(--line); }
.action-row { display:grid; grid-template-columns: 1fr 2fr; gap:10px; margin-top:24px; }
.primary-mini-btn { background:#111; color:#fff; }

.date-strip { display:flex; gap:8px; overflow-x:auto; padding-bottom:8px; margin-bottom:18px; }
.date-btn { min-width:104px; padding:12px 10px; background:#fff; border:1px solid var(--line); border-radius:10px; text-align:center; }
.date-btn.selected { background:#111; color:#fff; border-color:#111; }
.date-day { display:block; font-weight:700; font-size:12px; }
.date-number { display:block; margin-top:3px; font-size:14px; }
.availability-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:12px; }
.availability-head span { color:var(--muted); font-size:12px; }
.slot-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:9px; min-height:70px; }
.slot-btn { padding:13px 8px; background:#fff; border:1px solid #cfc9c0; border-radius:9px; }
.slot-btn.selected { background:#111; color:#fff; border-color:#111; }
.slot-empty { grid-column:1/-1; color:var(--muted); padding:20px 0; text-align:center; font-size:14px; }

.field-label { display:block; margin:14px 0 7px; font-size:13px; font-weight:600; }
.text-input { width:100%; min-height:46px; border:1px solid #cfc9c0; border-radius:9px; background:#fff; padding:11px 12px; outline:none; }
.text-input:focus { border-color:#111; box-shadow:0 0 0 3px rgba(0,0,0,.06); }
.summary-card { padding:14px; background:var(--soft); border-radius:10px; margin-bottom:18px; line-height:1.6; }
.summary-main { font-weight:700; }
.summary-sub { color:var(--muted); font-size:13px; }

.alert { border-radius:10px; padding:12px 14px; margin-bottom:18px; font-size:13px; }
.alert.error { color:var(--danger); background:#fff2f2; border:1px solid #efc9c9; }
.success-panel { padding:30px 10px; text-align:center; }
.success-icon { font-size:40px; margin-bottom:10px; }
.success-panel h2 { margin:0 0 8px; font-size:28px; }
.success-panel p { color:var(--muted); line-height:1.6; }
.success-details { background:var(--soft); border-radius:12px; padding:16px; text-align:left; margin:22px 0; }

.site-footer { display:flex; justify-content:space-between; gap:12px; color:var(--muted); font-size:12px; margin-top:18px; }

/* Admin */
.admin-shell { max-width:1300px; margin:0 auto; padding:24px; min-height:100vh; }
.admin-header { padding:4px 0 20px; border-bottom:1px solid var(--line); }
.admin-header-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.current-date { min-width:190px; text-align:center; font-weight:700; font-size:14px; }
.calendar-grid-wrap { margin-top:20px; border:1px solid var(--line); border-radius:14px; overflow:auto; background:#fff; box-shadow:var(--shadow); }
.calendar-grid { min-width:700px; display:grid; grid-template-columns:85px minmax(240px,1fr) minmax(240px,1fr); }
.cal-head, .cal-time, .cal-cell { border-right:1px solid var(--line); border-bottom:1px solid var(--line); min-height:56px; }
.cal-head { position:sticky; top:0; z-index:2; background:#faf9f6; padding:14px; font-size:13px; font-weight:700; }
.cal-time { background:#faf9f6; padding:15px 10px; font-size:12px; color:var(--muted); text-align:center; }
.cal-cell { position:relative; padding:6px; background:#fff; }
.cal-cell:last-child, .cal-head:last-child { border-right:0; }
.cal-cell:hover { background:#fcfbf8; }
.empty-action { width:100%; height:100%; min-height:44px; border:0; background:transparent; color:#bbb; font-size:20px; }
.booking-item { width:100%; min-height:44px; text-align:left; border:0; border-left:4px solid #111; background:#f3eee4; border-radius:7px; padding:8px 10px; }
.booking-item .booking-name { display:block; font-weight:700; font-size:13px; }
.booking-item .booking-service { display:block; margin-top:3px; font-size:11px; color:var(--muted); }
.blocked-item { border-left-color:#999; background:#ededed; }
.booking-status-completed { opacity:.65; }
.admin-help { display:flex; gap:20px; flex-wrap:wrap; margin:14px 2px; color:var(--muted); font-size:12px; }
.login-card { max-width:480px; margin:70px auto; }
/* Şifre alanı ile "Giriş Yap" arası nefes payı. */
#login-form .primary-btn { margin-top:24px; }

.modal-backdrop { position:fixed; inset:0; display:grid; place-items:center; background:rgba(0,0,0,.45); padding:18px; z-index:10; }
.modal-backdrop[hidden] { display:none; }
.modal { width:min(540px,100%); max-height:90vh; overflow:auto; background:#fff; border-radius:16px; padding:22px; box-shadow:0 30px 80px rgba(0,0,0,.25); }
.small-modal { width:min(460px,100%); }
.modal-header { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:18px; }
.modal-header h2 { margin:6px 0 0; font-size:22px; }
.icon-btn { width:34px; height:34px; border-radius:50%; border:1px solid var(--line); background:#fff; font-size:22px; line-height:1; }
.two-col { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.choice-row { display:flex; gap:8px; margin-bottom:4px; }
.choice-btn { flex:1; border:1px solid var(--line); background:#fff; border-radius:9px; padding:11px; }
.choice-btn.selected { background:#111; color:#fff; border-color:#111; }
.modal-actions { display:grid; gap:8px; margin-top:20px; }
.detail-line { padding:12px 0; border-bottom:1px solid #eee; }
.detail-line:last-child { border-bottom:0; }
.detail-label { display:block; font-size:11px; color:var(--muted); margin-bottom:3px; text-transform:uppercase; letter-spacing:.08em; }
.danger-btn { width:100%; border:1px solid #e0b9b9; background:#fff4f4; color:var(--danger); padding:12px; border-radius:9px; font-weight:600; }
.success-btn { width:100%; border:1px solid #b9d8c0; background:#f2faf4; color:var(--success); padding:12px; border-radius:9px; font-weight:600; }

/* Kapalı gün (ör. Pazar) — tarih şeridinde seçilemez. */
.date-btn { position:relative; }
.date-btn.closed { background:var(--soft); color:#b3aea6; border-style:dashed; cursor:not-allowed; }
.date-btn.closed .date-day, .date-btn.closed .date-number { opacity:.75; }
.date-closed { display:block; margin-top:3px; font-size:10px; letter-spacing:.06em; text-transform:uppercase; }

/* Randevu penceresindeki "Müsait Değil" ikincil eylemi. */
.block-slot-btn { width:100%; margin-top:8px; }

/* Kapalı gün hücresi (eski satır içi style yerine — sıkı CSP için). */
.cal-empty-day { grid-column:1/-1; padding:30px; text-align:center; color:var(--muted); }

/* Onay ekranı — dükkân bilgisi ve harita */
.shop-card { background:var(--soft); border-radius:12px; padding:16px; text-align:left; margin:0 0 22px; }
.shop-line { display:block; font-size:14px; line-height:1.7; color:var(--text); text-decoration:none; }
a.shop-line { color:var(--text); text-decoration:underline; }
.shop-map { display:block; width:100%; height:180px; margin-top:12px; border:1px solid var(--line); border-radius:9px; }
.shop-directions { display:block; margin-top:10px; font-size:13px; font-weight:600; color:var(--text); }

/* Admin takvimi — geçmiş saatler ve içinde bulunulan 30 dk */
.cal-past { opacity:.45; }
.cal-past .empty-action { color:#ddd; }
.cal-now { background:#fffdf5; }
.cal-time.cal-now { font-weight:700; color:var(--text); box-shadow:inset 3px 0 0 #111; }
.cal-cell.cal-now { background:#fffdf5; }

.label-hint { font-weight:400; color:var(--muted); }
.detail-muted { color:var(--muted); }

/* KVKK bilgilendirmesi ve aydınlatma metni sayfası */
.privacy-note { margin:8px 0 0; font-size:12px; line-height:1.6; color:var(--muted); }
.privacy-note a { color:var(--muted); }
.legal-page h2 { margin:26px 0 8px; font-size:16px; }
.legal-page p, .legal-page li { font-size:14px; line-height:1.7; color:var(--text); }
.legal-page ul { margin:8px 0; padding-left:20px; }
.legal-lead { color:var(--muted) !important; }
.legal-note { margin-top:24px; padding:14px; background:var(--soft); border-radius:10px; font-size:13px !important; }
.legal-back { display:inline-block; width:auto; margin-top:24px; text-decoration:none; }

/* İptal sayfası ve onay ekranındaki iptal bağlantısı */
.cancel-hint { margin:18px 0 0; font-size:13px; line-height:1.7; color:var(--muted); }
.cancel-note { margin:16px 0; font-size:14px; line-height:1.7; }
.cancel-newlink { display:block; width:100%; margin-top:10px; text-align:center; text-decoration:none; }


/* Üst soldaki geri oku */
.card-head { display:flex; align-items:center; gap:10px; margin-bottom:22px; }
.card-head .card-title { margin:0; }
.back-arrow { width:36px; height:36px; flex:0 0 auto; border:1px solid var(--line); border-radius:50%;
  background:#fff; color:var(--text); font-size:24px; line-height:1; display:grid; place-items:center; padding:0; }
.back-arrow:hover { border-color:#888; }
.back-arrow[hidden] { display:none; }
.action-row.single { grid-template-columns:1fr; }

/* Haftalık görünüm aç/kapa düğmesi */
#week-toggle.selected { background:#111; color:#fff; border-color:#111; }

/* Haftalık ızgara: Saat + 7 gün */
.calendar-grid.week-grid { min-width:940px; grid-template-columns:70px repeat(7, minmax(112px, 1fr)); }
.week-day { text-align:center; cursor:pointer; line-height:1.3; }
.week-day small { display:block; font-weight:400; font-size:11px; color:var(--muted); }
.week-day:hover { background:#f2efe8; }
.week-day.is-today { background:#111; color:#fff; }
.week-day.is-today small { color:#ddd; }
.week-day.is-closed { color:#b3aea6; }
.week-cell { display:flex; gap:4px; align-items:stretch; padding:5px; }
.week-cell.is-off { background:repeating-linear-gradient(45deg,#faf9f6,#faf9f6 6px,#f3f1ec 6px,#f3f1ec 12px); }
.chip { flex:1; min-height:34px; border-radius:6px; border:1px solid #cfc9c0; background:#fff;
  font-size:12px; font-weight:700; color:#bbb; padding:0; }
.chip-free:hover { border-color:#111; color:#111; }
.chip-booked { background:#111; border-color:#111; color:#fff; }
.chip-done { background:#d9d4c8; border-color:#cfc9c0; color:#6b665e; }
.chip-blocked { background:#e6e6e6; border-color:#d5d5d5; color:#8a8a8a; }

/* Hizmet kartlarındaki tek-çizgi illüstrasyonlar */
.option-card.has-art { gap:16px; padding:14px 16px; }
.option-art { width:64px; height:64px; flex:0 0 auto; color:var(--text); overflow:visible; }
.option-card.has-art .option-title { font-size:16px; }

/* Berber kartı — solda fotoğraf, sağda ad + unvan */
.option-card.barber-card { gap:16px; padding:12px 16px 12px 12px; align-items:center; }
.barber-photo { width:88px; height:104px; flex:0 0 auto; border-radius:10px;
  object-fit:cover; background:var(--soft); display:block; }
.barber-photo-fallback { display:grid; place-items:center; border:1px solid var(--line); color:#b9b3aa; }
.barber-photo-fallback .option-art { width:60px; height:60px; }
.barber-card .option-title { font-size:18px; }
.barber-card .option-meta { margin-top:5px; font-size:13px; }

@media (max-width:760px) {
  .page-shell { padding:18px 12px 30px; }
  .booking-card { padding:18px; }
  .option-art { width:52px; height:52px; }
  .barber-photo { width:70px; height:84px; }
  .barber-photo-fallback .option-art { width:48px; height:48px; }
  .option-card.has-art { gap:12px; }
  .brand { font-size:22px; }
  .phone-link { display:none; }
  .section-title h1, .section-title h2 { font-size:24px; }
  .slot-grid { grid-template-columns:repeat(2,1fr); }
  .shop-map { height:150px; }
  .site-footer { flex-direction:column; }
  .admin-shell { padding:14px; }
  .admin-header { align-items:flex-start; flex-direction:column; }
  .admin-header-actions { width:100%; }
  .current-date { min-width:140px; }
}
