/* ————————————————————————————————————————————
   Güzellik Merkezi — tasarım sistemi
   Zemin: pudralı porselen · Menü: derin mürdüm
   Vurgu: gül kurusu · Detay: altın · Başarı: yeşil
———————————————————————————————————————————— */

:root {
  --bg: #f7f2ef;
  --surface: #ffffff;
  --surface-2: #fdfaf8;
  --ink: #2e2228;
  --muted: #8a7580;
  --line: #eadfe3;
  --line-strong: #d9c8cf;

  --plum-950: #2b1a24;
  --plum-900: #33202b;
  --plum-800: #402a37;
  --plum-100: #e9dde4;

  --rose: #a64d66;
  --rose-dark: #8e3e55;
  --rose-soft: #f6e8ec;

  --gold: #b08542;
  --gold-soft: #f5ead7;

  --green: #2f7d5d;
  --green-dark: #266749;
  --green-soft: #e2f2ea;

  --red: #b0433c;
  --red-soft: #f9e7e5;

  --yellow-soft: #fbf3d9;
  --yellow-ink: #8a6d1a;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(46, 34, 40, .05), 0 8px 24px rgba(46, 34, 40, .07);
  --shadow-lg: 0 4px 12px rgba(43, 26, 36, .18), 0 24px 60px rgba(43, 26, 36, .22);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}

h1, h2, h3 { margin: 0; }

/* ————— Giriş sayfası ————— */

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(1100px 500px at 85% -10%, rgba(166, 77, 102, .28), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(176, 133, 66, .18), transparent 55%),
    var(--plum-950);
}

.login-card {
  width: min(400px, calc(100vw - 40px));
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 44px 40px 36px;
  text-align: center;
}

.monogram {
  width: 58px; height: 58px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--plum-900);
  color: #e8cfa6;
  font-family: var(--font-display);
  font-size: 26px;
  font-style: italic;
}

.login-logo {
  display: block;
  width: 260px;
  max-width: 100%;
  margin: -8px auto 0;
}

.login-card h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 26px;
  letter-spacing: .2px;
}

.login-card .alt {
  color: var(--muted);
  font-size: 13px;
  margin: 6px 0 26px;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.login-card form { text-align: left; }

/* ————— Uygulama iskeleti ————— */

.app {
  display: grid;
  grid-template-columns: 264px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, var(--plum-900), var(--plum-950));
  color: #d9c5ce;
  padding: 22px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.18) transparent;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 10px 20px;
  border-bottom: 1px solid rgba(232, 207, 166, .22);
  margin-bottom: 16px;
}

.brand .monogram { margin: 0; width: 42px; height: 42px; font-size: 19px; background: rgba(232,207,166,.12); border: 1px solid rgba(232,207,166,.35); }

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(232, 207, 166, .35);
  background: #fff;
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  color: #f3e7ee;
  line-height: 1.2;
}
.brand-name small { display: block; font-family: var(--font-body); font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: #b493a3; margin-top: 3px; }

.nav-group { margin-bottom: 4px; }

.nav-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: none;
  border: 0;
  color: #d9c5ce;
  font: 600 14px var(--font-body);
  border-radius: 9px;
  cursor: pointer;
  text-align: left;
}
.nav-head:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-head .chev { margin-left: auto; transition: transform .18s ease; font-size: 11px; opacity: .6; }
.nav-group.open .chev { transform: rotate(90deg); }
.nav-head .ico { width: 20px; text-align: center; }

.nav-sub {
  display: none;
  padding: 2px 0 6px 30px;
}
.nav-group.open .nav-sub { display: block; }

.nav-sub a, a.nav-single {
  display: block;
  padding: 7px 12px;
  color: #b9a2ae;
  text-decoration: none;
  font-size: 13.5px;
  border-radius: 8px;
  border-left: 2px solid transparent;
}
.nav-sub a:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-sub a.active {
  color: #f8eef3;
  background: rgba(166, 77, 102, .35);
  border-left-color: #e8cfa6;
}

a.nav-single { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-weight: 600; font-size: 14px; color: #d9c5ce; }
a.nav-single.active { color: #f8eef3; background: rgba(166, 77, 102, .35); }
a.nav-single .ico { width: 20px; text-align: center; }

.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding: 14px 30px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.topbar #btnMenu { margin-right: auto; font-size: 17px; line-height: 1; padding: 7px 12px; }
.app.menu-kapali { grid-template-columns: 1fr; }
.app.menu-kapali .sidebar { display: none; }

.topbar .user { font-size: 13.5px; color: var(--muted); }
.topbar .user b { color: var(--ink); font-weight: 600; }
.topbar .yetki-badge {
  font-size: 11px; letter-spacing: .8px; text-transform: uppercase;
  background: var(--gold-soft); color: var(--gold);
  padding: 3px 9px; border-radius: 99px; font-weight: 700;
}

.content { padding: 30px 34px 60px; max-width: 1180px; width: 100%; }

.page-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 30px;
  letter-spacing: .2px;
  margin-bottom: 4px;
}
.page-desc { color: var(--muted); margin: 0 0 26px; font-size: 14px; }

/* ————— Kartlar, formlar ————— */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 22px;
}
.card h3 {
  font-family: var(--font-display);
  font-weight: 550;
  font-size: 19px;
  margin-bottom: 16px;
}

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 20px; }
.form-grid .full { grid-column: 1 / -1; }

label.field { display: block; }
label.field span {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .3px;
  margin-bottom: 6px;
}

input[type="text"], input[type="password"], input[type="tel"], input[type="date"],
input[type="number"], input[type="email"], input[type="search"], select, textarea {
  width: 100%;
  font: 14.5px var(--font-body);
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 70px; }
input:focus, select:focus, textarea:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(166, 77, 102, .14);
}
input:disabled, select:disabled { opacity: .55; cursor: not-allowed; }

/* ————— Düğmeler ————— */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 600 14px var(--font-body);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, transform .05s;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary { background: var(--rose); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--rose-dark); }

.btn-green { background: var(--green); color: #fff; }
.btn-green:hover:not(:disabled) { background: var(--green-dark); }

.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #93362f; }

.btn-ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover:not(:disabled) { background: var(--rose-soft); border-color: var(--rose); color: var(--rose-dark); }

.btn-gold { background: var(--gold-soft); color: var(--gold); border-color: #e3cda4; }
.btn-gold:hover:not(:disabled) { background: #efdfc0; }

.btn-wa { background: #1faa53; color: #fff; }
.btn-wa:hover:not(:disabled) { background: #178a43; }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }

.icon-btn {
  background: none; border: 1px solid var(--line-strong);
  border-radius: 8px; cursor: pointer;
  padding: 5px 10px; font-size: 15px; color: var(--muted);
}
.icon-btn:hover { border-color: var(--rose); color: var(--rose-dark); background: var(--rose-soft); }

/* ————— Tablolar ————— */

.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.data th {
  text-align: left;
  font-size: 11.5px;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 10px 12px;
  border-bottom: 1.5px solid var(--line-strong);
  white-space: nowrap;
}
table.data td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.data tr:hover td { background: var(--surface-2); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Paket grup başlığı satırı */
table.data tr.grp-row td {
  background: #f6eff2;
  color: var(--rose);
  font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  padding-top: 9px; padding-bottom: 7px;
}
table.data tr.grp-row:hover td { background: #f6eff2; }

tr.row-hediye td { background: #fdf8ef; }
tr.row-hediye:hover td { background: #faf1de; }
tr.row-gecmis td { color: var(--red); }
tr.row-yeni-odeme td { background: var(--yellow-soft); color: var(--yellow-ink); font-weight: 600; }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 34px 10px;
  font-size: 14px;
}
.empty .big { font-size: 30px; display: block; margin-bottom: 8px; opacity: .5; }

/* ————— Rozetler ————— */

.badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .7px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 99px;
}
.badge-hediye { background: var(--gold-soft); color: var(--gold); border: 1px solid #e3cda4; }
.badge-onaylandi { background: var(--green-soft); color: var(--green-dark); }
.badge-beklemede { background: var(--yellow-soft); color: var(--yellow-ink); }
.badge-reddedildi { background: var(--red-soft); color: var(--red); }
.badge-plain { background: var(--plum-100); color: var(--plum-800); }

/* ————— Filtre satırı ————— */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 18px;
}
.filters label.field { flex: 1 1 140px; min-width: 130px; }
.filters .btn { flex: 0 0 auto; }

/* ————— Modal (yarı saydam sayfa) ————— */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43, 26, 36, .55);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 24px;
  animation: fadeIn .16s ease;
}
.modal {
  background: var(--surface);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  width: min(660px, 100%);
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  animation: popIn .18s ease;
}
.modal.wide { width: min(880px, 100%); }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 26px 0;
}
.modal-head h3 { font-family: var(--font-display); font-weight: 550; font-size: 21px; }
.modal-close {
  background: none; border: 0; font-size: 22px;
  color: var(--muted); cursor: pointer; line-height: 1;
  padding: 4px 8px; border-radius: 8px;
}
.modal-close:hover { background: var(--rose-soft); color: var(--rose-dark); }
.modal-body { padding: 18px 26px 26px; }

@keyframes fadeIn { from { opacity: 0; } }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* ————— Bildirimler (toast) ————— */

.toast-zone {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
}
.toast {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 14px 18px;
  font-size: 14px;
  border-left: 5px solid var(--green);
  animation: toastIn .25s cubic-bezier(.2, .9, .3, 1.2);
}
.toast .t-ico {
  width: 26px; height: 26px; flex: 0 0 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 14px; color: #fff;
  background: var(--green);
}
.toast.success { border-left-color: var(--green); background: linear-gradient(90deg, var(--green-soft), var(--surface) 55%); }
.toast.error { border-left-color: var(--red); background: linear-gradient(90deg, var(--red-soft), var(--surface) 55%); }
.toast.error .t-ico { background: var(--red); }
.toast.info { border-left-color: var(--rose); background: linear-gradient(90deg, var(--rose-soft), var(--surface) 55%); }
.toast.info .t-ico { background: var(--rose); }
.toast b { display: block; margin-bottom: 2px; }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } }

/* ————— Takvim ————— */

.cal-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 16px;
}
.cal-title { font-family: var(--font-display); font-size: 24px; font-weight: 550; min-width: 190px; text-align: center; }
.cal-head .spacer { flex: 1; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-dow {
  text-align: center; font-size: 11px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase; color: var(--muted);
  padding: 6px 0;
}
.cal-day {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 68px;
  padding: 8px 10px;
  cursor: pointer;
  position: relative;
  transition: border-color .12s, background .12s;
}
.cal-day:hover { border-color: var(--rose); }
.cal-day.other { opacity: .35; pointer-events: none; }
.cal-day.today { border-color: var(--gold); background: var(--gold-soft); }
.cal-day.selected { border-color: var(--rose); background: var(--rose-soft); box-shadow: 0 0 0 2px rgba(166,77,102,.25); }
.cal-day .dnum { font-weight: 700; font-size: 14px; }
.cal-day .dcount {
  position: absolute; right: 8px; bottom: 6px;
  font-size: 11px; font-weight: 700;
  background: var(--rose); color: #fff;
  border-radius: 99px; padding: 1px 8px;
}

.slot-list { margin-top: 20px; }
.slot {
  display: flex;
  gap: 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  font-size: 14px;
}
.slot:hover { background: var(--surface-2); }
.slot .stime { font-weight: 700; font-variant-numeric: tabular-nums; width: 52px; color: var(--muted); }
.slot .sbody { flex: 1; }
.slot.bos .sbody { color: var(--line-strong); }
.tel-link { color: inherit; text-decoration: none; white-space: nowrap; }
.tel-link:hover { color: var(--rose-dark); text-decoration: underline; }

.slot .slot-actions { display: flex; gap: 6px; }
.slot .slot-actions .btn { padding: 3px 10px; font-size: 12px; }
.slot .appt-chip {
  display: inline-block;
  background: var(--rose-soft);
  border: 1px solid rgba(166,77,102,.3);
  color: var(--rose-dark);
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.slot .appt-chip:hover { background: var(--rose-dark); color: #fff; }

/* Saat seçici ızgarası */
.time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}
.time-grid button {
  font: 600 13.5px var(--font-body);
  font-variant-numeric: tabular-nums;
  padding: 8px 4px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  cursor: pointer;
}
.time-grid button:hover:not(:disabled) { border-color: var(--rose); color: var(--rose-dark); }
.time-grid button.sel { background: var(--rose); border-color: var(--rose); color: #fff; }
.time-grid button:disabled { background: var(--line); color: var(--muted); cursor: not-allowed; text-decoration: line-through; }

/* ————— Randevu düzenleme: eski/yeni bölmesi ————— */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.split .pane { border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.split .pane.old { background: var(--surface-2); }
.split .pane h4 {
  margin: 0 0 10px;
  font-size: 12px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted);
}
.split .pane.new h4 { color: var(--green-dark); }

/* ————— Özet kutuları ————— */

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.stat .s-label { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.stat .s-value { font-family: var(--font-display); font-size: 26px; font-weight: 550; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat.green { border-color: #bfe0d0; background: linear-gradient(180deg, var(--green-soft), var(--surface)); }
.stat.green .s-value { color: var(--green-dark); }
.stat.gold { border-color: #e3cda4; background: linear-gradient(180deg, var(--gold-soft), var(--surface)); }
.stat.gold .s-value { color: var(--gold); }

/* ————— Detay listeleri ————— */

.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; }

.section-label {
  font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--rose-dark);
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
  margin: 22px 0 10px;
}
.section-label:first-child { margin-top: 0; }

/* Ödeme özeti şeridi */
.pay-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.pay-summary div {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; text-align: center;
}
.pay-summary .p-label { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.pay-summary .p-value { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.pay-summary .odenecek .p-value { color: var(--red); }
.pay-summary .odenen .p-value { color: var(--green-dark); }

/* Müşteri seçici */
.picker { position: relative; }
.picker-list {
  position: absolute;
  top: calc(100% + 4px); left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  max-height: 260px;
  overflow-y: auto;
  z-index: 50;
}
.picker-list button {
  display: block; width: 100%; text-align: left;
  padding: 10px 14px;
  background: none; border: 0; border-bottom: 1px solid var(--line);
  cursor: pointer; font: 14px var(--font-body);
}
.picker-list button:hover { background: var(--rose-soft); }
.picker-list .sub { color: var(--muted); font-size: 12.5px; }

.selected-customer {
  display: flex; align-items: center; gap: 12px;
  background: var(--green-soft);
  border: 1px solid #bfe0d0;
  border-radius: 10px;
  padding: 12px 16px;
}
.selected-customer .cname { font-weight: 700; }
.selected-customer .csub { color: var(--muted); font-size: 13px; }
.selected-customer .clear { margin-left: auto; }

/* Rapor sekmeleri */
.tabs { display: flex; gap: 6px; margin-bottom: 20px; border-bottom: 1.5px solid var(--line-strong); }
.tabs button {
  font: 600 14px var(--font-body);
  padding: 9px 20px;
  background: none; border: 0;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1.5px;
  color: var(--muted);
  cursor: pointer;
}
.tabs button.active { color: var(--rose-dark); border-bottom-color: var(--rose); }

/* Onay penceresi */
.confirm-text { font-size: 15px; margin: 4px 0 20px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* WhatsApp listesi */
.wa-row {
  display: flex; gap: 14px; align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
}
.wa-row .wa-info { flex: 1; }
.wa-row .wa-msg {
  margin-top: 6px;
  background: #e7f6e9;
  border-radius: 0 12px 12px 12px;
  padding: 8px 12px;
  font-size: 13px;
  color: #1d4a2a;
}
.wa-row.sent { opacity: .55; }

/* küçük yardımcılar */
.mt { margin-top: 16px; }
.mb0 { margin-bottom: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.flex { display: flex; gap: 10px; align-items: center; }
.flex .grow { flex: 1; }
.money { font-variant-numeric: tabular-nums; font-weight: 600; }
.strike { text-decoration: line-through; color: var(--muted); font-weight: 400; }

::selection { background: rgba(166, 77, 102, .25); }

@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .content { padding: 20px 16px 50px; }
}

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