/* ============================================================
   BERBER RANDEVU — Görsel Kimlik
   Palet: koyu ahsap/deri (ink), sicak parsomen (cream),
   pirinç/altin (brass) vurgu, berber diregi kirmizisi (redline).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Work+Sans:wght@400;500;600;700&display=swap');

:root {
  --ink: #1b140f;
  --ink-2: #2a1f17;
  --ink-soft: #4a392c;
  --cream: #f3ead8;
  --cream-card: #fffaf1;
  --brass: #b8873f;
  --brass-light: #d9ab61;
  --brass-dark: #8f6a2e;
  --redline: #7f2430;
  --pine: #3c5d45;
  --ink-text: #2a1f17;
  --muted: #7a6a58;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(27, 20, 15, 0.12);
  font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

* { box-sizing: border-box; }

html { scroll-padding-top: env(safe-area-inset-top, 0px); }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink-text);
  min-height: 100vh;
  padding-bottom: 48px;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--brass-light); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--brass-dark);
  outline-offset: 2px;
}

/* ---------------- Header / Marka ---------------- */

header.top {
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  color: var(--cream);
  padding: 22px 16px 20px;
  text-align: center;
  border-bottom: 3px solid var(--brass);
  position: relative;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.brand-mark svg {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
}

header.top h1 {
  margin: 0;
  font-family: 'Bebas Neue', 'Work Sans', sans-serif;
  font-size: 2rem;
  letter-spacing: 0.06em;
  font-weight: 400;
  color: var(--cream);
  line-height: 1;
}

header.top p {
  margin: 8px 0 0;
  color: var(--brass-light);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}

/* ---------------- Layout ---------------- */

main {
  max-width: 520px;
  margin: 20px auto;
  padding: 0 16px;
}

.section-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.03em;
  color: var(--ink);
  margin: 4px 0 12px;
}

.section-sub {
  font-size: 0.85rem;
  color: var(--muted);
  margin: -8px 0 14px;
}

.card {
  background: var(--cream-card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(184, 135, 63, 0.18);
}

.card h2 {
  margin-top: 0;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
  font-weight: 400;
  color: var(--ink);
}

/* ---------------- Ekip / Berber Kartlari ---------------- */

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

.team-card {
  background: var(--cream-card);
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 12px 10px 14px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.team-card:hover { transform: translateY(-2px); }

.team-card.selected {
  border-color: var(--brass);
  background: #fffdf8;
}

.team-card.disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
.team-card.disabled:hover { transform: none; }

.team-photo-wrap {
  width: 84px;
  height: 84px;
  margin: 0 auto 10px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--brass);
  aspect-ratio: 1 / 1;
  background: var(--ink-soft);
}

.team-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 1 / 1;
}

.team-photo-wrap.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
}
.team-photo-wrap.placeholder svg { width: 34px; height: 34px; }

.team-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 4px;
}

/* ---------------- Sekmeler ---------------- */

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 2px solid rgba(184, 135, 63, 0.25);
}

.tabs button {
  flex: 1;
  padding: 11px 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.tabs button.active {
  color: var(--ink);
  border-bottom-color: var(--brass);
}

/* ---------------- Formlar ---------------- */

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 14px 0 5px;
}

input, select {
  width: 100%;
  padding: 11px 12px;
  border: 1.5px solid #ddd0ba;
  border-radius: 8px;
  font-size: 1rem;
  background: #fff;
  color: var(--ink-text);
  font-family: inherit;
}

input:focus, select:focus {
  border-color: var(--brass);
  outline: none;
}

/* ---------------- Saat Slotlari ---------------- */

.slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.slot-btn {
  padding: 11px 4px;
  border: 1.5px solid var(--brass);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
}

.slot-btn.selected {
  background: var(--brass);
  color: var(--cream);
  border-color: var(--brass-dark);
}

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

/* ---------------- Butonlar ---------------- */

button.primary {
  width: 100%;
  margin-top: 18px;
  padding: 14px;
  background: var(--ink);
  color: var(--cream);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.02em;
}

button.primary:disabled { opacity: 0.5; cursor: not-allowed; }
button.primary:not(:disabled):hover { background: var(--ink-2); }

button.secondary {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--brass);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
button.secondary:hover { background: rgba(184, 135, 63, 0.1); }

button.danger {
  background: var(--redline);
  color: #fdf3ee;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}

button.confirm {
  background: var(--pine);
  color: #f1f7f2;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  margin-right: 6px;
}

/* ---------------- Mesajlar / Rozetler ---------------- */

.msg {
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 8px;
  font-size: 0.9rem;
  border: 1px solid transparent;
}
.msg.error { background: #fbeaea; color: var(--redline); border-color: rgba(127,36,48,0.25); }
.msg.success { background: #eaf2ec; color: var(--pine); border-color: rgba(60,93,69,0.25); }
.msg.info { background: #f1ece1; color: var(--ink-soft); }

.appt-row {
  border: 1px solid #e7dcc7;
  border-radius: 10px;
  padding: 13px;
  margin-bottom: 10px;
  background: #fffdf8;
}

.appt-row .meta {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-bottom: 9px;
  line-height: 1.5;
}

.badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.badge.bekliyor { background: #f4e6c9; color: var(--brass-dark); }
.badge.onaylandi { background: #e2ede4; color: var(--pine); }
.badge.calisiyor { background: #e2ede4; color: var(--pine); }
.badge.tatilde { background: #f6e1e3; color: var(--redline); }

/* ---------------- Admin: Gunler / Grid ---------------- */

.day-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.day-toggle {
  padding: 11px 4px;
  border-radius: 8px;
  border: 1.5px solid var(--pine);
  background: #e2ede4;
  color: var(--pine);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  white-space: pre-line;
}

.day-toggle.closed {
  border-color: var(--redline);
  background: #f6e1e3;
  color: var(--redline);
}

.barber-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid #ece1cd;
  gap: 8px;
  flex-wrap: wrap;
}

a.nav-link {
  color: var(--brass-dark);
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 600;
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 22px 0;
  font-size: 0.9rem;
}

/* ---------------- Responsive: kucuk ekranlar ---------------- */

@media (max-width: 380px) {
  header.top h1 { font-size: 1.65rem; }
  .team-photo-wrap { width: 72px; height: 72px; }
}
