/* ============================================================
   HadyGel — İşletme Web Paneli · Tasarım Sistemi
   Marka: coral (#F0531C) vurgu · ink (#0F172A) koyu/birincil · slate nötrleri
   Tipografi: Geist + Geist Mono · Açık tema · dengeli yoğunluk · responsive
   ============================================================ */

:root {
  /* ── Coral (marka aksanı) ── */
  --coral-50:  #FEF1EC;
  --coral-100: #FDDFD2;
  --coral-200: #FAC0A8;
  --coral-300: #F69B76;
  --coral-400: #F37545;
  --coral-500: #F0531C;   /* PRIMARY ACCENT */
  --coral-600: #D8430F;
  --coral-700: #B23A12;
  --coral-800: #8F3214;

  /* ── Ink + Slate nötrleri ── */
  --ink:       #0F172A;   /* koyu yüzey, birincil buton, başlık */
  --slate-50:  #F8FAFC;   /* app zemini */
  --slate-100: #F1F5F9;
  --slate-200: #E7ECF2;
  --slate-300: #CBD5E1;
  --slate-400: #94A3B8;
  --slate-500: #64748B;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1E293B;
  --slate-900: #0F172A;

  /* ── Durum renkleri (işlevsel) ── */
  --pending: #6366F1;  --pending-bg: #EEF0FE;     /* onay bekliyor */
  --queue:   #2F6FED;  --queue-bg:   #E9F0FE;     /* sırada */
  --progress:#D97706;  --progress-bg:#FEF3DD;     /* süren / vakti geldi */
  --overdue: #E0602A;  --overdue-bg: #FCEDE3;     /* işlem bekliyor */
  --success: #1F9254;  --success-bg: #E4F5EC;     /* tamamlandı */
  --danger:  #DC2626;  --danger-bg:  #FCEBEB;     /* iptal / reddedildi */
  --neutral: #64748B;  --neutral-bg: #EFF2F6;     /* gelmedi / pasif */
  --warning: #B45309;  --warning-bg: #FEF3DD;
  --info:    #0E7490;  --info-bg:    #E2F4F7;

  /* kanal renkleri (raporlar) */
  --ch-service: var(--coral-500);
  --ch-product: #2563EB;
  --ch-package: #8B5CF6;

  --hairline: #E7ECF2;
  --hairline-strong: #D7DEE7;
  --ring: rgba(240,83,28,0.16);

  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --r-sm: 8px; --r-md: 11px; --r-lg: 14px; --r-xl: 18px;
  --sh-xs: 0 1px 2px rgba(15,23,42,0.05);
  --sh-sm: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
  --sh-md: 0 6px 18px -8px rgba(15,23,42,0.16);
  --sh-lg: 0 18px 44px -20px rgba(15,23,42,0.30);

  --side-w: 256px;
  --top-h: 64px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--slate-50);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}
#root { height: 100vh; }
.app *::-webkit-scrollbar { width: 10px; height: 10px; }
.app *::-webkit-scrollbar-thumb { background: var(--slate-300); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
.app *::-webkit-scrollbar-thumb:hover { background: var(--slate-400); background-clip: padding-box; }
.app ::selection { background: var(--coral-100); color: var(--coral-800); }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ── Tipografi yardımcıları ── */
.t-display { font-size: 30px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
.t-h1   { font-size: 22px; font-weight: 600; letter-spacing: -0.022em; line-height: 1.18; }
.t-h2   { font-size: 17px; font-weight: 600; letter-spacing: -0.016em; line-height: 1.3; }
.t-h3   { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.35; }
.t-body { font-size: 14px; font-weight: 400; line-height: 1.55; color: var(--slate-700); }
.t-sec  { font-size: 13px; font-weight: 600; letter-spacing: -0.006em; color: var(--slate-600); }
.t-cap  { font-size: 12.5px; font-weight: 400; color: var(--slate-500); line-height: 1.45; }
.t-micro{ font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate-400); font-weight: 500; }
.mono   { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.tnum   { font-variant-numeric: tabular-nums; }
.grow   { flex: 1; min-width: 0; }
.row    { display: flex; align-items: center; }
.col    { display: flex; flex-direction: column; }
.ellip  { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── Layout kabuğu ── */
.app { height: 100%; display: flex; background: var(--slate-50); }

.side {
  width: var(--side-w); flex: none; height: 100%;
  background: #fff; border-right: 1px solid var(--hairline);
  display: flex; flex-direction: column; z-index: 40;
}
.side-brand { height: var(--top-h); display: flex; align-items: center; padding: 0 18px; gap: 11px; border-bottom: 1px solid var(--hairline); flex: none; }
.salon-switch {
  margin: 13px 13px 4px; padding: 9px 11px; border-radius: var(--r-md);
  border: 1px solid var(--hairline); background: var(--slate-50);
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  transition: border-color .15s, background .15s; flex: none;
}
.salon-switch:hover { border-color: var(--slate-300); background: #fff; }
.side-nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; display: flex; flex-direction: column; gap: 1px; }
.side-group-label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--slate-400); font-weight: 500; padding: 15px 10px 7px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; height: 39px; padding: 0 11px;
  border-radius: var(--r-md); cursor: pointer; color: var(--slate-600);
  font-size: 13.5px; font-weight: 500; letter-spacing: -0.01em;
  transition: background .13s, color .13s; position: relative; user-select: none;
}
.nav-item:hover { background: var(--slate-50); color: var(--ink); }
.nav-item.active { background: var(--coral-50); color: var(--coral-700); font-weight: 600; }
.nav-item.active::before { content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--coral-500); }
.nav-item.active .nav-ico { color: var(--coral-600); }
.nav-ico { color: var(--slate-400); display: flex; flex: none; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--slate-100); color: var(--slate-600); font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); }
.nav-item.active .nav-badge { background: var(--coral-100); color: var(--coral-700); }
.nav-badge.alert { background: var(--danger-bg); color: var(--danger); }

.side-foot { padding: 11px 13px; border-top: 1px solid var(--hairline); display: flex; align-items: center; gap: 10px; flex: none; }

/* ── Main + Topbar ── */
.main { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; }
.topbar {
  height: var(--top-h); flex: none; background: rgba(255,255,255,0.86); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline); display: flex; align-items: center;
  gap: 14px; padding: 0 22px; position: sticky; top: 0; z-index: 30;
}
.searchbox {
  display: flex; align-items: center; gap: 9px; height: 38px; padding: 0 13px;
  background: var(--slate-50); border: 1px solid var(--hairline); border-radius: var(--r-md);
  color: var(--slate-400); width: 320px; max-width: 38vw; transition: border-color .15s, box-shadow .15s;
}
.searchbox:focus-within { border-color: var(--coral-300); box-shadow: 0 0 0 3px var(--ring); background: #fff; }
.searchbox input { border: none; outline: none; background: none; flex: 1; font-size: 13.5px; color: var(--ink); min-width: 0; }
.searchbox input::placeholder { color: var(--slate-400); }
.iconbtn { width: 38px; height: 38px; border-radius: var(--r-md); border: 1px solid var(--hairline); background: #fff; display: flex; align-items: center; justify-content: center; color: var(--slate-500); cursor: pointer; position: relative; transition: background .13s, border-color .13s, color .13s; }
.iconbtn:hover { background: var(--slate-50); color: var(--ink); border-color: var(--slate-300); }
.dot-badge { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--coral-500); border: 1.5px solid #fff; }

.content { flex: 1; overflow-y: auto; }
.page { max-width: 1280px; margin: 0 auto; padding: 26px 26px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }

/* ── Buton ── */
.b { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r-md); font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; border: 1px solid transparent; cursor: pointer; transition: background .14s, border-color .14s, color .14s, box-shadow .14s; white-space: nowrap; }
.b:disabled { opacity: 0.5; cursor: not-allowed; }
.b-ink     { background: var(--ink); color: #fff; }
.b-ink:hover{ background: #1E293B; }
.b-accent  { background: var(--coral-500); color: #fff; box-shadow: 0 1px 2px rgba(240,83,28,0.25); }
.b-accent:hover { background: var(--coral-600); }
.b-ghost   { background: #fff; color: var(--ink); border-color: var(--hairline-strong); }
.b-ghost:hover { background: var(--slate-50); border-color: var(--slate-300); }
.b-soft    { background: var(--coral-50); color: var(--coral-700); }
.b-soft:hover { background: var(--coral-100); }
.b-success { background: var(--success); color: #fff; }
.b-danger-o{ background: #fff; color: var(--danger); border-color: #F3C9C9; }
.b-danger-o:hover { background: var(--danger-bg); }
.b-sm { height: 32px; padding: 0 11px; font-size: 12.5px; gap: 6px; border-radius: var(--r-sm); }
.b-lg { height: 46px; padding: 0 20px; font-size: 14.5px; }
.b-icon { width: 40px; padding: 0; }

/* ── Kart ── */
.card { background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-lg); }
.card-pad { padding: 18px; }
.card-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--hairline); }
.tile { display: flex; align-items: center; justify-content: center; border-radius: var(--r-md); flex: none; }

/* ── Status pill ── */
.spill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; line-height: 1; white-space: nowrap; }
.spill .d { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.spill.lg { padding: 6px 12px 6px 10px; font-size: 12.5px; }

/* ── Segment chip şeridi ── */
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 13px; border-radius: 99px; font-size: 12.5px; font-weight: 500; border: 1px solid var(--hairline-strong); background: #fff; color: var(--slate-700); cursor: pointer; white-space: nowrap; transition: background .12s, color .12s, border-color .12s; }
.chip:hover { border-color: var(--slate-400); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .cdot { width: 6px; height: 6px; border-radius: 50%; }
.chip .cnt { font-family: var(--font-mono); font-size: 11px; opacity: 0.75; }
.chip.active .cnt { opacity: 0.85; }

/* tab (segment, alt-sayfa) */
.tabs { display: flex; gap: 4px; background: var(--slate-100); padding: 3px; border-radius: var(--r-md); }
.tab { height: 34px; padding: 0 14px; border-radius: var(--r-sm); border: none; background: none; font-size: 13px; font-weight: 500; color: var(--slate-500); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: background .13s, color .13s; }
.tab:hover { color: var(--ink); }
.tab.active { background: #fff; color: var(--ink); font-weight: 600; box-shadow: var(--sh-xs); }

/* ── KPI tile ── */
.kpi { background: #fff; border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: 16px 17px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; }
.kpi .kpi-accent { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; }
.kpi-val { font-size: 25px; font-weight: 600; letter-spacing: -0.025em; line-height: 1; }
.kpi-delta { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; }

/* ── Hero kart (koyu, finansal özet) ── */
.hero { position: relative; overflow: hidden; border-radius: var(--r-xl); background: var(--ink); color: #fff; padding: 22px 24px; }
.hero::after { content: ''; position: absolute; width: 360px; height: 360px; right: -120px; top: -160px; border-radius: 50%; background: radial-gradient(circle, rgba(240,83,28,0.45), transparent 68%); pointer-events: none; }
.hero-eyebrow { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--coral-300); }
.hero-val { font-size: 38px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; margin-top: 7px; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: rgba(255,255,255,0.72); }

/* ── Avatar ── */
.avatar { display: flex; align-items: center; justify-content: center; border-radius: 50%; flex: none; font-weight: 600; color: #fff; letter-spacing: -0.01em; overflow: hidden; }

/* ── Empty state ── */
.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 7px; padding: 52px 20px; }
.empty-ico { width: 66px; height: 66px; border-radius: var(--r-lg); background: var(--slate-50); border: 1px solid var(--hairline); display: flex; align-items: center; justify-content: center; color: var(--slate-300); margin-bottom: 6px; }

/* ── Liste satırı / hairline ── */
.hairline { height: 1px; background: var(--hairline); width: 100%; }
.divider-v { width: 1px; background: var(--hairline); align-self: stretch; }

/* ── Progress bar ── */
.pbar { height: 6px; border-radius: 99px; background: var(--slate-100); overflow: hidden; }
.pbar > i { display: block; height: 100%; border-radius: 99px; background: var(--coral-500); }

/* ── Toggle switch ── */
.tgl { width: 40px; height: 23px; border-radius: 99px; background: var(--slate-300); position: relative; cursor: pointer; transition: background .16s; flex: none; }
.tgl.on { background: var(--coral-500); }
.tgl::after { content: ''; position: absolute; top: 2.5px; left: 2.5px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.25); transition: transform .16s; }
.tgl.on::after { transform: translateX(17px); }

/* ── Banner ── */
.banner { display: flex; gap: 11px; padding: 12px 14px; border-radius: var(--r-md); font-size: 13px; line-height: 1.45; align-items: flex-start; }
.banner.info { background: var(--info-bg); color: var(--info); }
.banner.warn { background: var(--warning-bg); color: var(--warning); }
.banner.err  { background: var(--danger-bg); color: var(--danger); }

/* ── Input ── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12px; font-weight: 600; color: var(--slate-600); }
.inp { height: 40px; padding: 0 13px; border: 1px solid var(--hairline-strong); border-radius: var(--r-md); background: #fff; font-size: 13.5px; color: var(--ink); outline: none; transition: border-color .14s, box-shadow .14s; width: 100%; }
.inp:focus { border-color: var(--coral-400); box-shadow: 0 0 0 3px var(--ring); }
textarea.inp { height: auto; padding: 10px 13px; resize: vertical; line-height: 1.5; }

/* ── Mobil drawer ── */
.scrim { position: fixed; inset: 0; background: rgba(15,23,42,0.45); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 39; }
.scrim.show { opacity: 1; pointer-events: auto; }
.menu-btn { display: none; }

@media (max-width: 1024px) {
  .side { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--sh-lg); }
  .side.open { transform: translateX(0); }
  .menu-btn { display: flex; }
  .searchbox { width: auto; flex: 1; }
}
@media (max-width: 640px) {
  .page { padding: 18px 15px 56px; }
  .topbar { padding: 0 14px; gap: 10px; }
  .hero-val { font-size: 30px; }
}

/* yatay kaydırmalı şerit (carousel) */
.hscroll { display: flex; gap: 14px; overflow-x: auto; padding: 2px 1px 12px; scroll-snap-type: x proximity; scroll-padding-left: 1px; }
.hscroll > * { scroll-snap-align: start; }
.appt-card { flex: 0 0 322px; width: 322px; }
@media (max-width: 640px) { .appt-card { flex: 0 0 85vw; width: 85vw; } }
.now-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 780px) { .now-grid { grid-template-columns: 1fr; gap: 16px; } }
.carousel-nav { display: flex; gap: 6px; }
@media (max-width: 640px) { .carousel-nav { display: none; } }

/* ── Auth (giriş/kayıt) ── */
.auth { height: 100%; display: flex; background: var(--slate-50); }
.auth-brand { width: 44%; max-width: 560px; flex: none; background: var(--ink); color: #fff; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 40px 44px; }
.auth-brand::after { content: ''; position: absolute; width: 520px; height: 520px; right: -180px; bottom: -220px; border-radius: 50%; background: radial-gradient(circle, rgba(240,83,28,0.5), transparent 66%); }
.auth-main { flex: 1; min-width: 0; overflow-y: auto; display: flex; align-items: center; justify-content: center; padding: 32px 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-mobilebrand { display: none; }
@media (max-width: 880px) {
  .auth-brand { display: none; }
  .auth-mobilebrand { display: flex; }
}

/* grid yardımcıları */
.g { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .g-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px)  { .g-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px)  { .g-2, .g-3, .g-4 { grid-template-columns: 1fr; } }
