/* ============ Admin paneli ============ */
.admin-body { background: #f6f0eb; }

/* ---------- Giriş ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card {
  width: 100%; max-width: 380px; background: var(--cream);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 36px;
  box-shadow: 0 30px 60px -40px rgba(120, 60, 60, .35);
}
.login-card .logo { display: block; margin-bottom: 24px; }
.login-card h1 { font: 400 28px var(--serif); }
.login-card .hint { margin: 6px 0 22px; }
.login-card label { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 14px; }
.login-card input {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; font: 15px var(--sans); background: #fff;
}
.login-card input:focus { outline: none; border-color: var(--rose); }
.back-link { display: block; text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }
.back-link:hover { color: var(--ink); }

/* ---------- Yerleşim ---------- */
.admin { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column;
  background: var(--cream); border-right: 1px solid var(--line); padding: 26px 18px;
}
.sidebar .logo { padding: 0 10px; margin-bottom: 18px; }
.sidebar-label {
  font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--rose); font-weight: 600; padding: 0 10px; margin: 18px 0 6px;
}
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav button {
  text-align: left; border: none; background: none; cursor: pointer;
  padding: 9px 12px; border-radius: 10px; font: 500 15px var(--sans); color: var(--muted);
}
.side-nav button:hover { background: var(--blush); color: var(--ink); }
.side-nav button.active { background: var(--ink); color: var(--cream); }
.sidebar-foot { margin-top: auto; padding-top: 24px; display: flex; flex-direction: column; gap: 8px; }
.sidebar-foot .btn { padding: 10px; font-size: 14px; }

.content { padding: 40px 4vw 120px; max-width: 1150px; width: 100%; }
.view-title { font: 400 36px var(--serif); letter-spacing: -.5px; }
.view-desc { color: var(--muted); margin: 4px 0 28px; }
.group-title { font: 500 19px var(--serif); margin: 30px 0 12px; }
.group-title em { color: var(--rose); }

.card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.card.list { padding: 0 20px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.hint { color: var(--muted); font-size: 14px; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.danger { color: #b23a3a !important; }
.btn.danger:hover { border-color: #b23a3a; }

/* ---------- Form alanları ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.form-grid.one { grid-template-columns: 1fr; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--muted); }
.field small { font-weight: 400; font-size: 12px; }
.field input, .field textarea, .field select, .inline-add input, .search, .time-range input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px;
  font: 15px var(--sans); color: var(--ink); background: var(--cream);
  transition: border-color .2s;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus, .inline-add input:focus, .search:focus, .time-range input:focus {
  outline: none; border-color: var(--rose); background: #fff;
}

.icon-btn {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  font-size: 14px; color: var(--ink); display: grid; place-items: center;
}
.icon-btn:hover:not(:disabled) { border-color: var(--ink); }
.icon-btn:disabled { opacity: .3; cursor: default; }

/* ---------- Kaydet çubuğu ---------- */
.save-bar {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 80;
  display: flex; align-items: center; gap: 24px;
  background: var(--ink); color: var(--cream);
  padding: 10px 10px 10px 24px; border-radius: 999px;
  box-shadow: 0 20px 40px -15px rgba(0,0,0,.4);
  animation: pop .3s ease;
}
.save-bar div { display: flex; gap: 6px; }
.save-bar .btn-ghost { color: var(--cream); border-color: rgba(255,255,255,.25); }
.save-bar .btn-primary { background: var(--rose); }
.save-bar .btn-primary:hover { background: var(--rose-dark); }

/* ---------- Randevular ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 26px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.stat span { font-size: 13px; color: var(--muted); }
.stat strong { display: block; font: 400 30px var(--serif); margin-top: 2px; }

.toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.segmented { display: flex; gap: 4px; background: var(--blush); padding: 4px; border-radius: 999px; }
.segmented button {
  border: none; background: none; padding: 8px 16px; border-radius: 999px;
  font: 500 14px var(--sans); color: var(--muted); cursor: pointer;
}
.segmented button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.search { max-width: 280px; background: #fff; }

.appt-row {
  display: grid; grid-template-columns: 70px 1fr 140px auto; gap: 16px; align-items: center;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.appt-row:last-child { border-bottom: none; }
.appt-time { font: 500 20px var(--serif); display: flex; flex-direction: column; line-height: 1.2; }
.appt-time small { font: 13px var(--sans); color: var(--muted); }
.appt-main { display: flex; flex-direction: column; }
.appt-main span { font-size: 14px; color: var(--muted); }
.appt-note { font-size: 14px; font-style: italic; color: var(--rose-dark); margin-top: 4px; }
.appt-phone { font-size: 14px; color: var(--muted); }
.appt-actions { display: flex; gap: 6px; justify-content: flex-end; }
.appt-row.is-cancelled { opacity: .55; }
.appt-row.is-cancelled strong { text-decoration: line-through; }

/* ---------- Tablo ---------- */
.table-wrap { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 600; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.table td { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: none; }
.table a { color: var(--rose-dark); }

/* ---------- Hizmetler ---------- */
.svc-row {
  display: grid; grid-template-columns: auto 2fr 1fr 1fr auto; gap: 14px; align-items: end;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.svc-row:last-child { border-bottom: none; }
.svc-row .order { display: flex; flex-direction: column; gap: 4px; }
.svc-row > .icon-btn { margin-bottom: 6px; }
.add-btn { margin-top: 14px; }

/* ---------- Saatler ---------- */
.hours-row {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 0; border-bottom: 1px solid var(--line); min-height: 70px;
}
.hours-row:last-child { border-bottom: none; }
.hours-row .switch strong { color: var(--ink); font-weight: 500; font-size: 15px; min-width: 90px; }
.hours-row.is-closed .switch strong { color: var(--muted); }
.time-range { display: flex; align-items: center; gap: 10px; }
.time-range input { width: 120px; }
.closed-label { color: var(--muted); font-size: 14px; }
.inline-add { display: flex; gap: 10px; max-width: 360px; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--blush); padding: 6px 8px 6px 14px; border-radius: 999px; font-size: 14px;
}
.chip button { border: none; background: rgba(255,255,255,.7); width: 22px; height: 22px; border-radius: 50%; cursor: pointer; }

/* ---------- Fotoğraflar ---------- */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.media-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.media-preview {
  position: relative; aspect-ratio: 4 / 5; border-radius: 12px;
  background-size: cover !important; background-position: center !important;
  display: grid; place-items: center;
}
.square .media-preview { aspect-ratio: 1; }
.media-preview > span { color: rgba(255,255,255,.9); font: italic 16px var(--serif); }
.media-tools {
  position: absolute; top: 8px; right: 8px; display: flex; gap: 4px;
  opacity: 0; transition: opacity .2s;
}
.media-card:hover .media-tools { opacity: 1; }
.media-add {
  border: 2px dashed var(--line); border-radius: 16px; background: transparent; cursor: pointer;
  min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font: 500 15px var(--sans); color: var(--muted); transition: border-color .2s, color .2s;
}
.media-add span { font-size: 34px; font-weight: 300; line-height: 1; }
.media-add small { font-size: 12px; font-weight: 400; }
.media-add:hover { border-color: var(--rose); color: var(--rose-dark); }

/* ---------- İletişim ---------- */
.contact-admin { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: stretch; }
.map-preview { padding: 0; overflow: hidden; min-height: 360px; }
.map-preview iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }

/* ---------- Mobil ---------- */
@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky; top: 0; height: auto; z-index: 40;
    flex-direction: row; align-items: center; gap: 10px;
    padding: 12px 4vw; border-right: none; border-bottom: 1px solid var(--line);
    overflow-x: auto;
  }
  .sidebar .logo { margin: 0; font-size: 20px; flex-shrink: 0; }
  .sidebar-label { display: none; }
  .side-nav { flex-direction: row; }
  .side-nav button { white-space: nowrap; font-size: 14px; }
  .sidebar-foot { flex-direction: row; margin: 0; padding: 0; }
  .sidebar-foot .btn { white-space: nowrap; width: auto; padding: 8px 14px; }
  .content { padding: 28px 4vw 120px; }
  .appt-row { grid-template-columns: 60px 1fr; }
  .appt-phone { grid-column: 2; }
  .appt-actions { grid-column: 2; justify-content: flex-start; }
  .svc-row { grid-template-columns: 1fr 1fr; }
  .svc-row .order { flex-direction: row; }
  .svc-row > .icon-btn { grid-row: 1; grid-column: 2; justify-self: end; margin: 0; }
  .svc-row > .field:first-of-type { grid-column: 1 / -1; }
  .contact-admin { grid-template-columns: 1fr; }
  .media-tools { opacity: 1; }
  .save-bar { left: 4vw; right: 4vw; transform: none; justify-content: space-between; gap: 12px; padding-left: 18px; font-size: 14px; }
}

.admin-body .toast { bottom: 96px; }

/* ---------- Onay akışı ---------- */
.nav-badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  margin-left: 8px; border-radius: 999px; background: var(--rose); color: #fff;
  font-size: 12px; font-weight: 600; vertical-align: 1px;
}
.stat-alert { border-color: var(--rose); background: #fdf3f1; }
.stat-alert strong { color: var(--rose-dark); }
.appt-phone a { color: var(--muted); }
.appt-phone a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- WhatsApp mesajları ---------- */
.chip-btn { border: none; cursor: pointer; font: 500 14px var(--sans); padding: 6px 14px; }
.chip-btn:hover { background: var(--rose); color: #fff; }
.group-title small { font: 400 14px var(--sans); }
.msg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.wa-preview {
  background: #efe7dd; border-radius: 14px; padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
}
.wa-preview span { font-size: 12px; color: var(--muted); font-weight: 500; }
.wa-preview p {
  align-self: flex-end; max-width: 90%;
  background: #d9fdd3; padding: 10px 12px; border-radius: 10px 10px 2px 10px;
  font-size: 14px; line-height: 1.45; white-space: pre-wrap;
  box-shadow: 0 1px 1px rgba(0,0,0,.08);
}
@media (max-width: 900px) { .msg-grid { grid-template-columns: 1fr; } }

/* ---------- Müşteri iptal bildirimi ---------- */
.notice {
  display: flex; align-items: center; gap: 14px;
  background: #fdf3f1; border: 1px solid #efc9c3; border-radius: 14px;
  padding: 12px 14px 12px 16px; margin: 0 0 10px;
}
.notice:first-of-type { margin-top: 18px; }
.notice p { flex: 1; font-size: 15px; }
.notice em { color: var(--muted); font-size: 14px; }
.notice-icon {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--rose); color: #fff; font-weight: 700; font-size: 14px;
}

/* ---------- Ses düğmesi ---------- */
.sound-toggle.is-off { border-style: dashed; color: var(--muted); }

.row-label { font-weight: 500; font-size: 15px; }
.inline-select {
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px;
  font: 14px var(--sans); background: var(--cream); color: var(--ink);
}

/* ---------- Kasa ---------- */
.kasa-range { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.kasa-range input { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: 14px var(--sans); background: #fff; }
.kasa-period-label { margin: 4px 0 14px; }
.stat-total { background: var(--ink); border-color: var(--ink); color: #fff; }
.stat-total span { color: rgba(255,255,255,.7); }

.kasa-row {
  display: grid; grid-template-columns: 110px 1fr 130px auto; gap: 16px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.kasa-row:last-child { border-bottom: none; }
.kasa-row .appt-time small { white-space: nowrap; }
.kasa-amount { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; background: var(--cream); }
.kasa-amount:focus-within { border-color: var(--rose); }
.kasa-amount input { width: 100%; border: none; background: none; padding: 9px 0; font: 500 16px var(--sans); text-align: right; outline: none; }
.kasa-amount span { color: var(--muted); }

.kasa-manual { display: grid; grid-template-columns: 150px 1fr 1.3fr 120px auto; gap: 12px; align-items: end; }

.kasa-day { margin-bottom: 16px; }
.kasa-day-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 0 4px 8px; font-size: 14px; }
.kasa-day-head span { color: var(--muted); }
.kasa-day-head b { color: var(--ink); }
.kasa-entry {
  display: grid; grid-template-columns: 54px 1fr auto 100px auto; gap: 14px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.kasa-entry:last-child { border-bottom: none; }
.kasa-time { color: var(--muted); font-size: 14px; }
.kasa-sum { text-align: right; font-weight: 600; }
.pay-cash { background: #e3f4e6; color: #2e7a3e; }
.pay-card { background: #e4ecf8; color: #2f5590; }

@media (max-width: 900px) {
  .kasa-row { grid-template-columns: 90px 1fr; }
  .kasa-row .kasa-amount, .kasa-row .appt-actions { grid-column: 2; justify-content: flex-start; }
  .kasa-manual { grid-template-columns: 1fr 1fr; }
  .kasa-entry { grid-template-columns: 44px 1fr auto; }
  .kasa-entry .badge { grid-column: 2; justify-self: start; }
}

/* ---------- Kasa raporu (yazdır / PDF) ---------- */
#printArea { display: none; }
@media print {
  @page { size: A4; margin: 14mm; }
  body.admin-body { background: #fff; }
  .admin-body > *:not(#printArea) { display: none !important; }
  #printArea { display: block; }
  .report { font: 11pt var(--sans); color: #000; }
  .report header { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #000; padding-bottom: 10px; margin-bottom: 16px; }
  .report h1 { font: 500 22pt var(--serif); margin: 0; }
  .report header p { margin: 2px 0 0; }
  .report-date { font-size: 9pt; color: #555; }
  .report-totals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
  .report-totals div { border: 1px solid #bbb; border-radius: 6px; padding: 8px 10px; }
  .report-totals span { display: block; font-size: 9pt; color: #555; }
  .report-totals strong { font-size: 15pt; }
  .report h2 { font: 600 12pt var(--sans); margin: 18px 0 6px; }
  .report table { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
  .report th, .report td { border-bottom: 1px solid #ddd; padding: 5px 6px; text-align: left; }
  .report th { background: #f2f2f2; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .report tfoot td { font-weight: 700; border-top: 2px solid #000; }
  .report .num { text-align: right; white-space: nowrap; }
  .report tr { break-inside: avoid; }
  .report-note { margin-top: 14px; font-size: 9pt; color: #555; }
}

/* ---------- Kasa: gider ---------- */
.stat small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat-total small { color: rgba(255,255,255,.6); }
.stat .neg { color: #a33a3a; }
.kasa-manual-wrap { display: flex; flex-direction: column; gap: 10px; }
.kasa-type { align-self: flex-start; }
.kasa-entry.is-expense .kasa-sum { color: #a33a3a; }
.btn.danger.btn-ghost { color: #a33a3a; }

/* ---------- Randevu ekle / taşı ---------- */
.toolbar-right { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.appt-modal .modal-card { max-width: 580px; }
.am-current { margin: -8px 0 16px; }
.am-form { display: flex; flex-direction: column; gap: 14px; }
.am-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.am-services { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.am-svc { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; color: var(--ink); font-weight: 500; }
.am-svc:has(input:checked) { border-color: var(--rose); background: #fdf3f1; }
.am-svc input { margin-top: 3px; accent-color: var(--rose); }
.am-svc small { display: block; font-weight: 400; color: var(--muted); }
.am-slots { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: -4px; }
.am-slots .chip.is-on { background: var(--rose); color: #fff; }
.am-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.am-check input { margin-top: 3px; accent-color: var(--rose); }
.am-check small { color: var(--muted); }
.am-actions { justify-content: flex-end; }
@media (max-width: 600px) { .am-two, .am-services { grid-template-columns: 1fr; } }

@media print {
  .report-totals small { display: block; font-size: 8pt; color: #555; margin-top: 2px; }
  .report-totals .hl { border: 2px solid #000; }
  .report-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
}
.am-svc input, .am-check input { width: auto; flex: none; padding: 0; margin: 3px 0 0; border: none; box-shadow: none; }
.am-svc { justify-content: flex-start; text-align: left; }
.toolbar { align-items: center; }
.toolbar-right { flex-wrap: nowrap; }
.toolbar-right .search { width: 240px; }
@media (max-width: 900px) { .toolbar-right { flex-wrap: wrap; } .toolbar-right .search { width: 100%; max-width: none; } }

/* ---------- Kasa: filtre kutuları + fatura ---------- */
.stat-btn { text-align: left; font: inherit; color: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.stat-btn:hover { border-color: var(--rose); transform: translateY(-1px); }
.stat-btn.is-on { border-color: var(--rose); box-shadow: 0 0 0 2px var(--rose); }
.stat-total.is-on { box-shadow: 0 0 0 2px var(--rose); }
.group-title small a { color: var(--rose-dark); text-decoration: underline; }

.kasa-manual { grid-template-columns: 150px 1fr 1.2fr 110px auto auto; }
.invoice-pick { display: flex; align-items: center; gap: 6px; min-height: 42px; }
.invoice-pick img { width: 42px; height: 42px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; }
.invoice-pick .icon-btn { width: 26px; height: 26px; }

.kasa-entry { grid-template-columns: 54px 1fr auto auto 100px auto; }
.kasa-inv img { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); cursor: zoom-in; display: block; }
.kasa-inv .btn { white-space: nowrap; }

.img-viewer {
  position: fixed; inset: 0; z-index: 200; background: rgba(20, 14, 16, .85);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px;
}
.img-viewer img { max-width: 100%; max-height: calc(100vh - 110px); border-radius: 10px; background: #fff; }
.img-viewer-bar { display: flex; align-items: center; gap: 8px; color: #fff; }
.img-viewer-bar span { margin-right: 8px; }
.img-viewer-bar .btn { background: #fff; }

@media (max-width: 900px) {
  .kasa-manual { grid-template-columns: 1fr 1fr; }
  .kasa-entry { grid-template-columns: 44px 1fr auto; }
  .kasa-entry .kasa-inv:empty { display: none; }
}

@media print {
  .report-break { break-before: page; }
  .report-invoices { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .report-invoices figure { margin: 0; break-inside: avoid; border: 1px solid #ccc; border-radius: 6px; padding: 8px; }
  .report-invoices img { width: 100%; max-height: 110mm; object-fit: contain; display: block; }
  .report-invoices figcaption { font-size: 9pt; margin-top: 6px; color: #333; }
}
.stat-btn.stat-total { color: #fff; }

/* ---------- Mobil düzeltmeler ---------- */
@media (max-width: 900px) {
  .admin { grid-template-columns: minmax(0, 1fr); }
  .content { min-width: 0; }
  .segmented { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .segmented::-webkit-scrollbar { display: none; }
  .segmented button { white-space: nowrap; flex-shrink: 0; }
  .toolbar-right { width: 100%; }
  .toolbar-right .search { flex: 1; width: auto; min-width: 0; }
}
@media (max-width: 900px) {
  /* özet kutuları: 2 sütun, kompakt */
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
  .stat { padding: 12px 14px; }
  .stat strong { font-size: 24px; }
  .stat small { font-size: 11px; }
  .stats .stat-total { grid-column: 1 / -1; }
  .view-title { font-size: 30px; }
  .view-desc { margin-bottom: 20px; }

  /* ödeme bekleyen satırı */
  .kasa-row { grid-template-columns: 76px minmax(0, 1fr); gap: 10px 12px; }
  .kasa-row .kasa-amount { min-width: 0; width: 100%; }
  .kasa-row .appt-actions { flex-wrap: wrap; }

  /* elle ekleme formu */
  .kasa-manual { grid-template-columns: 1fr 1fr; }
  .kasa-manual > .field:has(.invoice-pick) { grid-column: 1 / -1; }
  .kasa-manual > .btn-row { grid-column: 1 / -1; }
  .kasa-manual > .btn-row .btn { flex: 1; padding: 11px; }

  /* kasa geçmişi satırı: üstte isim + tutar, altta ödeme türü, fatura, işlem */
  .kasa-entry { grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 6px 10px; }
  .kasa-entry .kasa-time { grid-row: 1; grid-column: 1; }
  .kasa-entry .appt-main { grid-row: 1; grid-column: 2 / 4; }
  .kasa-entry .kasa-sum { grid-row: 1; grid-column: 4; }
  .kasa-entry .badge { grid-row: 2; grid-column: 2; justify-self: start; }
  .kasa-entry .kasa-inv { grid-row: 2; grid-column: 3; }
  .kasa-entry > .btn { grid-row: 2; grid-column: 4; white-space: nowrap; }
  .kasa-entry .kasa-inv:empty { display: block; }
  .kasa-day-head { font-size: 13px; }

  /* randevu penceresi telefonda tam ekrana yakın */
  .appt-modal { padding: 10px; }
  .appt-modal .modal-card { padding: 24px 18px; max-height: calc(100vh - 20px); }
}
@media (max-width: 900px) { .kasa-row .appt-time small { white-space: normal; } }

/* ---------- Müşteri önerisi ---------- */
.am-suggest-wrap { position: relative; }
.am-suggest {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 20;
  width: max(100%, 300px); max-height: 300px; overflow-y: auto;
  list-style: none; margin: 0; padding: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 18px 40px -18px rgba(90, 50, 50, .35);
}
.am-suggest li {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 10px; cursor: pointer; color: var(--ink);
}
.am-suggest li.is-active { background: var(--blush); }
.am-avatar {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; background: #fdf3f1; color: var(--rose-dark);
  font: 600 12px var(--sans); border: 1px solid #efc9c3;
}
.am-suggest li.is-active .am-avatar { background: #fff; }
.am-sug-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.am-sug-main strong { font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.am-sug-main small { font-size: 12px; color: var(--muted); font-weight: 400; }
.am-sug-main mark { background: none; color: var(--rose-dark); font-weight: 700; }
.am-sug-tags { display: flex; gap: 4px; flex: none; }
.am-sug-tags .badge { font-size: 11px; }

/* ---------- Mobil: hamburger menü ---------- */
.mobile-bar, .drawer-backdrop { display: none; }
@media (max-width: 900px) {
  .mobile-bar {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 50;
    padding: 12px 4vw; background: var(--cream); border-bottom: 1px solid var(--line);
  }
  .mobile-bar .logo { font-size: 22px; }
  .menu-btn {
    position: relative; width: 44px; height: 44px; border-radius: 12px;
    border: 1px solid var(--line); background: #fff; cursor: pointer;
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  }
  .menu-btn span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .25s, opacity .2s; }
  .menu-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-open .menu-btn span:nth-child(2) { opacity: 0; }
  .menu-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .menu-badge {
    position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px;
    border-radius: 999px; background: var(--rose); color: #fff; border: 2px solid var(--cream);
    font: 600 11px/16px var(--sans); font-style: normal; text-align: center;
  }

  /* Kenar çubuğu soldan açılan çekmece olur */
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 70;
    width: min(300px, 84vw); height: 100vh; height: 100dvh;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 24px 18px calc(20px + env(safe-area-inset-bottom));
    border-right: 1px solid var(--line); border-bottom: none;
    overflow-y: auto; overflow-x: hidden;
    transform: translateX(-102%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
    box-shadow: 20px 0 50px -30px rgba(60, 30, 30, .45);
  }
  .menu-open .sidebar { transform: none; }
  .sidebar .logo { margin: 0 0 18px; font-size: 24px; }
  .sidebar-label { display: block; }
  .side-nav { flex-direction: column; }
  .side-nav button { white-space: normal; font-size: 16px; padding: 12px 12px; }
  .sidebar-foot { flex-direction: column; margin-top: auto; padding-top: 24px; }
  .sidebar-foot .btn { width: 100%; padding: 11px; }

  .drawer-backdrop {
    display: block; position: fixed; inset: 0; z-index: 65;
    background: rgba(43, 32, 36, .4); backdrop-filter: blur(2px);
    opacity: 0; pointer-events: none; transition: opacity .25s;
  }
  .menu-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
  body.no-scroll { overflow: hidden; }
  .content { padding-top: 24px; }
}
@media (max-width: 900px) {
  /* kapalı çekmece: gölge sızmasın, klavyeyle odaklanılmasın */
  .sidebar { box-shadow: none; visibility: hidden; transition: transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s .28s; }
  .menu-open .sidebar { box-shadow: 20px 0 50px -30px rgba(60, 30, 30, .45); visibility: visible; transition: transform .28s cubic-bezier(.2,.8,.2,1); }
}

/* ---------- Mağaza ayarları ---------- */
.shop-source { display: flex; flex-direction: column; gap: 12px; }
.shop-source .segmented { align-self: flex-start; }
.shop-source .segmented button:disabled { cursor: not-allowed; opacity: .6; }
.shop-source .segmented em { font-style: normal; font-size: 11px; background: #fff; border-radius: 999px; padding: 2px 7px; margin-left: 4px; }
.shop-admin-grid .media-preview { aspect-ratio: 4 / 5; }
.shop-prices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.switch-sm { font-size: 14px; color: var(--ink); }

/* ---------- Randevudaki örnek tasarım fotoğrafları ---------- */
.appt-photos { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.appt-photos img { width: 48px; height: 48px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); cursor: zoom-in; }
.appt-photos small { font-size: 12px; color: var(--muted); }
.legal-input { font-size: 14px; line-height: 1.55; }

/* ---------- Hatırlatma ---------- */
.notice-remind { background: #fff8e6; border-color: #f0d79a; }
.notice-remind .notice-icon { background: #f4c45a; font-size: 13px; }
.notice-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.alarm-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 20px; background: #f4c45a; color: #3a2a06; font-size: 15px; text-align: center;
  box-shadow: 0 10px 30px -10px rgba(120, 80, 0, .45); cursor: pointer;
  animation: alarmPulse 1.1s ease-in-out infinite;
}
.alarm-bar em { font-style: normal; font-size: 13px; opacity: .75; }
.alarm-bell { display: inline-block; font-size: 20px; animation: bellShake .55s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes alarmPulse { 50% { background: #ffd978; } }
@keyframes bellShake { 25% { transform: rotate(14deg); } 75% { transform: rotate(-14deg); } }
@media (max-width: 900px) { .notice { flex-wrap: wrap; } .notice-actions { width: 100%; padding-left: 40px; } }

/* ---------- Hakkımda ayarları ---------- */
.about-admin { display: grid; grid-template-columns: 260px 1fr; gap: 16px; margin-top: 16px; align-items: start; }
.about-admin-photo { display: flex; flex-direction: column; gap: 12px; }
.about-admin-preview {
  aspect-ratio: 4 / 5; border-radius: 14px 90px 14px 14px; background-size: cover; background-position: center;
  display: grid; place-items: center;
}
.about-admin-preview span { font: italic 18px var(--serif); color: rgba(255,255,255,.9); }
.stat-edit-row { display: grid; grid-template-columns: 140px 1fr auto; gap: 12px; align-items: end; padding: 14px 0; border-bottom: 1px solid var(--line); }
.stat-edit-row:last-child { border-bottom: none; }
.stat-edit-row .icon-btn { margin-bottom: 6px; }
@media (max-width: 900px) {
  .about-admin { grid-template-columns: 1fr; }
  .about-admin-photo { max-width: 280px; }
}

/* ---------- Logo yükleme ---------- */
.brand-uploads { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.brand-up { display: flex; gap: 16px; align-items: center; }
.brand-up strong { display: block; margin-bottom: 4px; }
.brand-up .hint { margin-bottom: 10px; }
.brand-prev { flex-shrink: 0; background: #000 center / cover no-repeat; display: grid; place-items: center; border-radius: 14px; }
.brand-prev span { font-size: 12px; color: rgba(255,255,255,.6); }
.brand-prev-mark { width: 96px; height: 96px; border-radius: 22px; }
.brand-prev-logo { width: 150px; height: 100px; }
.sidebar .logo-mark { width: 40px; height: 40px; }
.login-card .logo { margin-bottom: 24px; }
@media (max-width: 900px) { .brand-uploads { grid-template-columns: 1fr; } .mobile-bar .logo-mark { width: 36px; height: 36px; } }

.sidebar .logo-img { height: 76px; }
.login-card .logo-img { height: 110px; margin: 0 auto; }
.login-card .logo { display: flex; justify-content: center; }
.mobile-bar .logo-img { height: 44px; }
.sidebar .logo-img, .login-card .logo-img, .mobile-bar .logo-img { border-radius: 0; filter: drop-shadow(0 0 .6px rgba(90, 45, 40, .9)) drop-shadow(0 1px 2px rgba(90, 45, 40, .25)); }
.sidebar .logo-img { height: 84px; }

.sidebar .logo-img, .login-card .logo-img, .mobile-bar .logo-img { filter: drop-shadow(0 1px 1.5px rgba(90, 45, 40, .28)); }
.brand-uploads { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.brand-prev-logoDark { width: 150px; height: 100px; background-size: contain; }
.brand-prev-logo { background-color: var(--cream); background-size: contain; border: 1px solid var(--line); }
.brand-uploads { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); } @media (max-width: 900px) { .brand-uploads { grid-template-columns: 1fr; } }

/* ---------- Yorumlar ---------- */
.rev-stars-admin { color: #d4a24c; letter-spacing: 1px; }
.rev-stars-admin span { color: var(--line); }
.badge-review { background: #fff3d6; color: #8a6414; }
.rev-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.rev-row:last-child { border-bottom: none; }
.rev-row-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rev-row-main p { margin: 6px 0 4px; font-style: italic; }
.rev-row-main small { color: var(--muted); font-size: 13px; }
.rev-add { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.rev-add-grid { display: grid; grid-template-columns: 1fr 180px 1fr; gap: 12px; }
@media (max-width: 900px) { .rev-row { grid-template-columns: 1fr; } .rev-add-grid { grid-template-columns: 1fr; } }

.notice-info { background: #f2f0fb; border-color: #d9d3f0; margin-bottom: 16px; }
.notice-info .notice-icon { background: #7a6bb8; font-style: italic; font-family: Georgia, serif; }
.media-warn { display: block; color: #a33a3a; font-size: 12px; margin-top: 6px; }

/* Oje darbesi ayarı */
.stroke-card { display: flex; align-items: center; gap: 28px; margin-top: 16px; flex-wrap: wrap; }
.stroke-preview { width: 240px; height: 110px; display: grid; place-items: center; background: var(--cream); border-radius: 14px; border: 1px solid var(--line); }
.stroke-preview .logo-img { height: 62px; }
.stroke-controls { display: flex; flex-direction: column; gap: 12px; flex: 1; min-width: 240px; }
.stroke-colors { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stroke-swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.stroke-swatch.is-on { box-shadow: 0 0 0 2px var(--rose); }
.stroke-custom { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.stroke-custom input { width: 34px; height: 34px; border: none; padding: 0; background: none; cursor: pointer; }

.stroke-preview { position: relative; overflow: hidden; width: 320px; display: flex; align-items: center; justify-content: flex-start; gap: 40px; padding: 0 18px; }
.stroke-preview .logo-img { position: relative; z-index: 1; height: 58px; filter: drop-shadow(0 1px 1.5px rgba(90, 45, 40, .28)); }
.preview-swoosh { position: absolute; left: 0; top: 0; height: 100%; width: 78%; }
.preview-nav { position: relative; z-index: 1; font-size: 13px; color: var(--muted); margin-left: auto; }

.btn-polish-row { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px dashed var(--line); }
.btn-polish-demo { margin-left: 8px; cursor: default; }
.btn-polish-demo:hover { background: var(--ink) !important; }

.fx-card { display: flex; flex-direction: column; gap: 14px; }
.fx-row { display: flex; flex-direction: column; gap: 2px; }
.fx-row .hint { padding-left: 50px; }

/* Müşteriler: düzenle / sil */
.cust-actions { white-space: nowrap; text-align: right; }
.cust-actions .btn + .btn { margin-left: 6px; }
@media (max-width: 900px) { .admin { align-content: start; } } /* içerik azken üst çubuk uzamasın */
/* Telefonda müşteri listesi kart görünümünde: düğmeler ekranda kalsın */
@media (max-width: 700px) {
  .cust-table thead { display: none; }
  .cust-table, .cust-table tbody { display: block; }
  .cust-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  .cust-table tr:last-child { border-bottom: none; }
  .cust-table td { padding: 0; border: none; grid-column: 1; overflow-wrap: anywhere; font-size: 14px; }
  .cust-table td[data-label] { display: inline; font-size: 12.5px; color: var(--muted); }
  .cust-table td[data-label]::before { content: attr(data-label) ": "; }
  .cust-table td.cust-actions { grid-column: 2; grid-row: 1 / span 5; align-self: center; display: flex; flex-direction: column; gap: 6px; }
  .cust-actions .btn + .btn { margin-left: 0; }
  .cust-table td.empty { grid-column: 1 / -1; text-align: center; }
}

/* Anlık bildirim */
.push-toggle { border-color: var(--rose, #c9787a); color: var(--rose-dark, #a85a5c); }
.push-row > div:first-child { display: flex; flex-direction: column; gap: 4px; max-width: 560px; }
.push-row .hint { line-height: 1.5; }
