/* ===== MDC Erkek Kuaförü — İşletme Paneli ===== */
:root {
  --sat: env(safe-area-inset-top, 0px);
  --font: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --bg: #f3f5f9;
  --surface: #fff;
  --surface-2: #f8f9fc;
  --line: #e6e9f1;
  --line-2: #d9dde8;
  --ink: #141a2e;
  --ink-2: #3b4560;
  --muted: #6c768d;
  --faint: #9aa3b6;
  --brand: #3f4ff0;
  --brand-600: #3340d4;
  --brand-50: #eef0ff;
  --brand-100: #dfe3ff;
  --ok: #0f9d6b;
  --ok-50: #e6f7f0;
  --warn: #b7791f;
  --warn-50: #fff4de;
  --bad: #d6455d;
  --bad-50: #fdeaee;
  --info: #2b7bd8;
  --info-50: #e8f2fd;
  --btn: var(--brand);
  --btn-600: var(--brand-600);
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --sh-1: 0 1px 2px rgba(20, 26, 46, .04), 0 1px 1px rgba(20, 26, 46, .03);
  --sh-2: 0 8px 24px -8px rgba(20, 26, 46, .12), 0 2px 6px rgba(20, 26, 46, .04);
}

* {
  box-sizing: border-box
}

[hidden] {
  display: none !important
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100%;
  overscroll-behavior-y: none
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100%;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent
}

a {
  color: var(--brand);
  text-decoration: none
}

img {
  max-width: 100%
}

h1,
h2,
h3 {
  font-family: inherit;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.02em;
  margin: 0
}

h1 {
  font-size: 26px;
  line-height: 1.2
}

h2 {
  font-size: 17px;
  line-height: 1.3;
  margin: 2px 0 6px
}

h3 {
  font-size: 15px
}

.hint {
  color: var(--muted);
  font-size: 13px;
  margin: 4px 0 0;
  max-width: 78ch
}

.hint strong {
  color: var(--ink-2);
  font-weight: 600
}

.eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--brand)
}

.gold-text {
  color: var(--brand)
}

.msg-error {
  color: var(--bad);
  font-size: 13px;
  margin: 6px 0 0
}

.msg-gold {
  color: var(--ok);
  font-size: 13px;
  font-weight: 500;
  margin: 10px 0 0;
  min-height: 0
}

.msg-gold:empty,
.msg-error:empty {
  margin: 0
}

.muted-s {
  color: var(--muted);
  font-weight: 400
}

.neg {
  color: var(--bad)
}

.pos {
  color: var(--brand);
  font-weight: 700
}

/* ---------- Form elemanları ---------- */
input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
  color-scheme: light
}

input::placeholder,
textarea::placeholder {
  color: var(--faint)
}

input:hover,
select:hover,
textarea:hover {
  border-color: #c4cadb
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-100)
}

input[type=file] {
  padding: 8px;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface-2)
}

input[type=file]::file-selector-button {
  margin-right: 10px;
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: #fff;
  color: var(--ink-2);
  font: 600 12px var(--font);
  cursor: pointer
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236c768d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px
}

label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2)
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid var(--btn);
  border-radius: var(--r-sm);
  background: var(--btn);
  color: #fff;
  font: 600 13px var(--font);
  cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
  box-shadow: var(--sh-1)
}

button:hover {
  background: var(--btn-600);
  border-color: var(--btn-600)
}

button:active {
  transform: translateY(1px)
}

button:disabled {
  opacity: .5;
  cursor: not-allowed
}

button:focus-visible,
a:focus-visible,
.tab-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px
}

.secondary {
  background: #fff;
  color: var(--ink-2);
  border-color: var(--line-2)
}

.secondary:hover {
  background: var(--surface-2);
  border-color: #c4cadb
}

.danger-btn {
  background: #fff;
  color: var(--bad);
  border-color: #f2c3cc;
  min-height: 34px;
  padding: 6px 12px;
  font-size: 12px;
  box-shadow: none
}

.danger-btn:hover {
  background: var(--bad-50);
  border-color: var(--bad)
}

.expense-btn {
  background: var(--bad) !important;
  border-color: var(--bad) !important;
  color: #fff !important
}

.expense-btn:hover {
  background: #bf364d !important
}

/* ---------- Üst çubuk ---------- */
.app-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: calc(64px + var(--sat));
  padding: var(--sat) max(24px, calc((100vw - 1360px)/2 + 24px)) 0;
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line)
}

.ab-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink)
}

.ls-mark {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, #4a5bff, #2d38c8);
  color: #fff;
  font: 700 14px var(--font);
  letter-spacing: .02em;
  box-shadow: 0 4px 12px -2px rgba(63, 79, 240, .45)
}

.ab-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
  line-height: 1.2
}

.ab-name small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0
}

.ab-right {
  display: flex;
  align-items: center;
  gap: 18px
}

.ab-site {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted)
}

.ab-site:hover {
  color: var(--brand)
}

.ab-user {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-left: 18px;
  border-left: 1px solid var(--line)
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px
}

.uc-av {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand);
  font: 700 12px var(--font);
  box-shadow: inset 0 0 0 1px var(--brand-100)
}

.uc-txt {
  display: block;
  line-height: 1.25
}

.uc-txt b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink)
}

.uc-txt small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0
}

.ab-logout {
  white-space: nowrap;
  min-height: 36px;
  padding: 7px 14px;
  font-size: 13px
}

/* ---------- Yerleşim ---------- */
main {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px 72px
}

.shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 32px;
  padding-top: 28px;
  align-items: start
}

.content {
  min-width: 0
}

.side {
  position: sticky;
  top: calc(92px + var(--sat))
}

.tabs {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 0;
  padding: 0;
  margin: 0
}

.side-label {
  display: block;
  padding: 18px 12px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--faint)
}

.side-label:first-child {
  padding-top: 0
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-2);
  font: 500 14px var(--font);
  text-align: left;
  justify-content: flex-start;
  box-shadow: none;
  position: relative
}

.tab-btn:hover {
  background: #e9ecf5;
  color: var(--ink);
  border-color: transparent
}

.tab-btn.active {
  background: var(--brand-50);
  color: var(--brand);
  font-weight: 600
}

.tab-btn.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--brand)
}

.tab-btn .ico {
  width: 18px;
  height: 18px;
  flex: none;
  opacity: .85
}

.welcome {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-bottom: 22px
}

.welcome .eyebrow {
  color: var(--muted);
  text-transform: none;
  letter-spacing: .02em;
  font-weight: 500;
  font-size: 12px
}

.welcome h1 {
  font-size: 28px;
  margin-top: 2px
}

.w-date {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-transform: capitalize;
  padding-bottom: 4px
}

/* ---------- Kartlar / paneller ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  padding: 24px 26px;
  margin: 0 0 18px
}

.panel .panel {
  box-shadow: none;
  background: var(--surface-2);
  margin: 20px 0 0
}

.title-row,
.list-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px
}

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px
}

.kpi {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
  padding: 18px 20px 18px 20px;
  overflow: hidden
}

.kpi::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  width: 28px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--brand)
}

.kpi.exp::before {
  background: var(--bad)
}

.kpi.net::before {
  background: var(--ok)
}

.kpi.cnt::before {
  background: var(--info)
}

.kpi span {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .02em
}

.kpi b {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -.03em
}

.kpi b.net-neg {
  color: var(--bad)
}

.kpi small {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--faint)
}

/* ---------- Formlar ---------- */
.crm-grid-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px
}

.form-col label,
.barber-add-form label,
.barber-edit-card label,
.service-add-form label,
.inline-label {
  display: block;
  margin-bottom: 6px
}

.full-span {
  grid-column: 1/-1
}

.calendar-input-group {
  display: flex;
  gap: 8px
}

.calendar-input-group input {
  flex: 1;
  cursor: pointer
}

.calendar-input-group button {
  white-space: nowrap
}

.inline-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 0;
  color: var(--ink-2)
}

.inline-label input {
  width: auto
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px
}

.export-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 16px;
  border-radius: var(--r-sm);
  background: var(--ok);
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--sh-1);
  transition: background .15s
}

.export-btn:hover {
  background: #0b8559
}

.exp-now {
  color: var(--ink-2);
  font-weight: 600
}

.sub-title {
  margin: 28px 0 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 15px
}

/* ---------- Listeler (kasa, gider, borç, müşteri) ---------- */
.crm-list {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  overflow: hidden
}

.crm-list:empty {
  display: none
}

.crm-list>.hint {
  padding: 28px 16px;
  text-align: center;
  max-width: none;
  margin: 0
}

.crm-item,
.expense-item {
  display: grid;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  transition: background .12s
}

.crm-list>:first-child {
  border-top: 0
}

.crm-item:hover,
.expense-item:hover,
.appointment:hover {
  background: var(--surface-2)
}

.crm-item {
  grid-template-columns: 120px minmax(0, 1.6fr) minmax(90px, .6fr) minmax(130px, .8fr) auto
}

.expense-item {
  grid-template-columns: 150px minmax(0, 1.6fr) 110px auto
}

.crm-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink)
}

.crm-date small {
  font-weight: 500
}

.crm-item small,
.expense-item small,
.appointment small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400
}

.crm-item b,
.expense-item b {
  font-weight: 600
}

.crm-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums
}

.expense-item .crm-price {
  color: var(--bad)
}

.crm-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end
}

.badge,
.status-done,
.status-cancel,
.status-pill-22,
.status-pill-live,
.debtor-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 0;
  font: 600 12px/1.5 var(--font);
  letter-spacing: 0;
  white-space: nowrap
}

.badge {
  background: var(--warn-50);
  color: var(--warn)
}

.badge-approved,
.status-done,
.status-pill-22 {
  background: var(--ok-50);
  color: var(--ok)
}

.status-cancel {
  background: var(--bad-50);
  color: var(--bad)
}

.status-pill-live {
  background: var(--brand-50);
  color: var(--brand)
}

.debtor-badge {
  margin: 4px 6px 0 0;
  background: var(--bad-50);
  color: var(--bad);
  font-size: 11px
}

.debt-amount {
  color: var(--bad);
  font-weight: 700
}

/* ---------- Randevu ajandası ---------- */
.appointments {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface)
}

.appointments:empty {
  display: none
}

.appointments>.hint {
  padding: 28px 16px;
  text-align: center;
  max-width: none;
  margin: 0
}

.appointment {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 84px 176px;
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  transition: background .12s
}

.appointments>:first-child {
  border-top: 0
}

.appointment time {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--r-sm);
  background: var(--brand-50);
  color: var(--brand);
  font: 700 14px var(--font);
  font-variant-numeric: tabular-nums
}

.appointment>div {
  min-width: 0;
  overflow-wrap: anywhere
}

.appointment>div b {
  font-weight: 600
}

.appointment .price {
  text-align: right;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ink)
}

.appt-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end
}

.appointment>:nth-child(4) {
  justify-self: end
}

.btn-tick,
.btn-cross,
.btn-debt {
  min-height: 36px;
  padding: 7px 14px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  box-shadow: none
}

.btn-tick {
  background: var(--ok-50);
  color: var(--ok);
  border-color: #bfe8d6
}

.btn-tick:hover {
  background: var(--ok);
  color: #fff;
  border-color: var(--ok)
}

.btn-cross {
  background: #fff;
  color: var(--bad);
  border-color: #f2c3cc
}

.btn-cross:hover {
  background: var(--bad);
  color: #fff;
  border-color: var(--bad)
}

.btn-debt {
  background: var(--warn-50);
  color: var(--warn);
  border-color: #f1d9a6;
  font-size: 13px
}

.btn-debt:hover {
  background: var(--warn);
  color: #fff;
  border-color: var(--warn)
}

.block-form {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.5fr auto;
  gap: 10px;
  margin-top: 16px
}

.block-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 13px
}

.block-item button {
  min-height: 32px;
  padding: 5px 12px;
  font-size: 12px
}

/* ---------- Tablolar ---------- */
.turnover-table-wrap {
  margin-top: 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  -webkit-overflow-scrolling: touch
}

.turnover-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left
}

.turnover-table th {
  padding: 11px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font: 600 12px var(--font);
  letter-spacing: .02em;
  color: var(--muted);
  white-space: nowrap
}

.turnover-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
  white-space: nowrap
}

.turnover-table tbody tr:last-child td {
  border-bottom: 0
}

.turnover-table tbody tr:hover {
  background: var(--surface-2)
}

.turnover-table td b {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink)
}

.turnover-table td b.net-neg {
  color: var(--bad)
}

.turnover-table tr.total-row {
  background: var(--brand-50)
}

.turnover-table tr.total-row td {
  color: var(--brand);
  font-weight: 700;
  font-size: 14px;
  border-top: 1px solid var(--brand-100)
}

.turnover-table td small {
  color: var(--muted)
}

.turnover-table {
  min-width: 560px
}

.hint-cell {
  color: var(--muted);
  text-align: center;
  padding: 28px 16px !important
}

/* ---------- Ayarlar: hizmet, kuaför, galeri ---------- */
.services-edit-grid {
  display: grid;
  gap: 10px;
  margin-top: 16px
}

.service-edit-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(110px, 1fr) auto;
  gap: 10px;
  align-items: center
}

.service-edit-row .srv-delete {
  background: #fff;
  color: var(--bad);
  border-color: #f2c3cc;
  box-shadow: none
}

.service-edit-row .srv-delete:hover {
  background: var(--bad-50)
}

.service-add-form {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(130px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line)
}

.service-add-form h3,
.service-add-form p {
  grid-column: 1/-1;
  margin: 0
}

.service-add-form .sub-title {
  border: 0;
  padding: 0;
  margin: 0
}

.images-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 16px
}

.barbers-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px
}

.img-box,
.barber-edit-card,
.gal-edit-box {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-1)
}

.img-box label {
  color: var(--ink-2)
}

.img-preview {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--surface-2)
}

.barber-edit-card .img-preview {
  height: 210px;
  object-position: center top
}

.barber-edit-card .be-id {
  font-size: 12px;
  color: var(--muted)
}

.barber-edit-card .be-upcoming {
  font-size: 12px;
  font-weight: 600;
  color: var(--brand)
}

.barber-img-box .b-commission {
  padding: 12px;
  border: 1px solid var(--brand-100);
  background: var(--brand-50);
  border-radius: var(--r-sm)
}

.barber-img-box .b-commission label {
  color: var(--brand)
}

.barber-img-box .b-commission small {
  display: block;
  margin-top: 6px;
  color: var(--muted)
}

.barber-img-box[data-id="erhan-sen"] .b-commission {
  display: none
}

.barber-add-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px
}

.barber-add-form .photo-col {
  display: grid;
  gap: 8px;
  align-content: start
}

.barber-add-form .img-preview {
  height: 150px;
  object-position: center top
}

.gallery-edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px
}

.gal-edit-box .gno {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand)
}

.gal-edit-box .img-preview {
  height: 180px
}

.gal-edit-box.dirty {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-100)
}

/* ---------- Takvim penceresi ---------- */
.cal-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(16px + var(--sat)) 16px 16px;
  background: rgba(20, 26, 46, .42);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px)
}

.cal-dialog {
  width: 100%;
  max-width: 372px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 60px -12px rgba(20, 26, 46, .3)
}

.cal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px
}

.cal-header h3 {
  font-size: 17px
}

.cal-close {
  min-height: 34px;
  width: 34px;
  padding: 0
}

.cal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px
}

.cal-nav button {
  min-height: 32px;
  padding: 5px 10px;
  font-size: 12px
}

.cal-nav b {
  font-size: 14px;
  font-weight: 700
}

.cal-weekdays,
.cal-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center
}

.cal-weekdays span {
  padding: 6px 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--faint)
}

.cal-day {
  min-height: 38px;
  padding: 8px 0;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink);
  font: 500 13px var(--font);
  box-shadow: none
}

.cal-day:hover {
  background: var(--brand-50);
  color: var(--brand);
  border-color: transparent
}

.cal-day.today {
  border-color: var(--brand-100);
  color: var(--brand);
  font-weight: 700
}

.cal-day.selected {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  font-weight: 700
}

/* ---------- Giriş ekranı ---------- */
.login-screen {
  position: fixed;
  inset: 0;
  padding-top: var(--sat);
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  background: var(--surface);
  overflow: auto
}

.ls-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: 44px max(5vw, 40px);
  background: radial-gradient(700px 420px at 10% 0, #dfe4ff 0, transparent 62%), radial-gradient(520px 380px at 100% 100%, #e6f3ff 0, transparent 60%), #f3f5fc;
  border-right: 1px solid var(--line);
  overflow: hidden
}

.ls-brand>* {
  position: relative
}

.ls-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink) !important;
  font-size: 14px;
  font-weight: 700
}

.ls-logo small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500
}

.ls-copy .eyebrow {
  color: var(--brand)
}

.ls-copy h2 {
  margin: 10px 0 34px;
  font-size: clamp(30px, 3.2vw, 44px);
  line-height: 1.12;
  letter-spacing: -.035em;
  font-weight: 700
}

.ls-copy h2 em {
  font-style: normal;
  color: var(--brand)
}

.ls-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  max-width: 440px
}

.ls-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: var(--r);
  box-shadow: var(--sh-1)
}

.ls-list i {
  font-style: normal;
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--brand-50);
  color: var(--brand);
  font: 700 12px var(--font)
}

.ls-list b {
  display: block;
  font-size: 14px;
  font-weight: 600
}

.ls-list span {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted)
}

.ls-foot {
  margin: 0;
  font-size: 12px;
  color: var(--muted)
}

.ls-form-wrap {
  display: grid;
  place-items: center;
  padding: 40px 24px
}

.ls-card {
  width: 100%;
  max-width: 410px
}

.ls-back {
  display: inline-block;
  margin-bottom: 28px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted) !important
}

.ls-back:hover {
  color: var(--brand) !important
}

.ls-card h1 {
  font-size: 28px;
  margin: 2px 0 8px
}

.ls-sub {
  margin: 0;
  color: var(--muted);
  font-size: 14px
}

.ls-users {
  display: grid;
  gap: 10px;
  margin: 24px 0 20px
}

#login .ls-user {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 62px;
  padding: 11px 14px;
  text-align: left;
  justify-content: flex-start;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  font-weight: 400;
  box-shadow: var(--sh-1)
}

#login .ls-user:hover {
  background: var(--surface-2);
  border-color: #c4cadb
}

#login .ls-user .av {
  width: 40px;
  height: 40px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand);
  font: 700 13px var(--font)
}

#login .ls-user .nm b {
  display: block;
  font-size: 14px;
  font-weight: 600
}

#login .ls-user .nm small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px
}

#login .ls-user .tick {
  margin-left: auto;
  width: 22px;
  height: 22px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line-2);
  border-radius: 50%;
  font-size: 11px;
  color: transparent
}

#login .ls-user.on {
  border-color: var(--brand);
  background: var(--brand-50);
  box-shadow: 0 0 0 3px var(--brand-100)
}

#login .ls-user.on .av {
  background: var(--brand);
  color: #fff
}

#login .ls-user.on .tick {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff
}

.ls-label {
  display: block;
  margin-bottom: 6px
}

.ls-pass {
  position: relative
}

.ls-pass input {
  padding-right: 84px;
  min-height: 46px
}

#login .ls-eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  min-height: 0;
  padding: 7px 10px;
  background: none;
  border: 0;
  color: var(--brand);
  font-size: 12px;
  font-weight: 600;
  box-shadow: none
}

#login .ls-eye:hover {
  background: var(--brand-50)
}

#login .ls-submit {
  width: 100%;
  min-height: 48px;
  justify-content: space-between;
  margin-top: 16px;
  padding: 12px 18px;
  font-size: 14px
}

#login .msg-error {
  min-height: 18px;
  margin-top: 12px
}

/* ---------- Hamburger / mobil çekmece ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 0 11px;
  background: #fff;
  border: 1px solid var(--line-2);
  box-shadow: none;
  flex: none
}

.nav-toggle span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--ink-2);
  transition: .25s
}

.nav-toggle:hover {
  background: var(--surface-2)
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg)
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg)
}

.side-head,
.side-overlay {
  display: none
}

/* ---------- Duyarlı ---------- */
@media (max-width:1100px) {
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .gallery-edit-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr))
  }

  .barbers-edit-grid,
  .barber-add-form {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

@media (max-width:900px) {
  main {
    padding: 0 14px 48px
  }

  .app-bar {
    height: calc(60px + var(--sat));
    padding: var(--sat) 14px 0;
    gap: 10px
  }

  .nav-toggle {
    display: inline-flex
  }

  .nav-toggle[hidden] {
    display: none !important
  }

  .ab-brand {
    margin-right: auto;
    min-width: 0
  }

  .ab-site,
  .uc-txt {
    display: none
  }

  .ab-user {
    padding-left: 0;
    border-left: 0;
    gap: 10px
  }

  .shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-top: 18px
  }

  .side {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 60;
    width: 290px;
    max-width: 86vw;
    margin: 0;
    padding: calc(14px + var(--sat)) 14px 28px;
    background: #fff;
    border-right: 1px solid var(--line);
    overflow-y: auto;
    transform: translateX(-104%);
    visibility: hidden;
    transition: transform .28s ease, visibility 0s linear .28s
  }

  .side.open {
    transform: none;
    visibility: visible;
    box-shadow: 14px 0 44px rgba(20, 26, 46, .22);
    transition-delay: 0s
  }

  .side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 4px 14px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    font-weight: 700
  }

  .side-close {
    width: 36px;
    min-height: 36px;
    padding: 0;
    background: #fff;
    color: var(--ink-2);
    border-color: var(--line-2);
    box-shadow: none
  }

  .side-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(20, 26, 46, .4);
    opacity: 0;
    transition: opacity .25s
  }

  .side-overlay.show {
    opacity: 1
  }

  .tab-btn.active::before {
    left: -14px
  }

  .welcome {
    margin-bottom: 16px
  }

  .welcome h1 {
    font-size: 23px
  }

  .panel {
    padding: 18px 16px;
    border-radius: 14px;
    margin-bottom: 14px
  }

  .export-btn {
    flex: 1 1 100%;
    justify-content: center
  }

  .login-screen {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr
  }

  .ls-brand {
    padding: 18px 6vw;
    border-right: 0;
    border-bottom: 1px solid var(--line)
  }

  .ls-copy,
  .ls-foot {
    display: none
  }

  .ls-form-wrap {
    place-items: start center;
    padding: 26px 20px 40px
  }

  .ls-back {
    margin-bottom: 18px
  }

  .ls-card h1 {
    font-size: 25px
  }
}

@media (max-width:800px) {

  .crm-grid-form,
  .barber-add-form,
  .images-edit-grid {
    grid-template-columns: 1fr
  }

  .barbers-edit-grid {
    grid-template-columns: 1fr
  }

  .gallery-edit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .gal-edit-box .img-preview {
    height: 150px
  }

  .crm-item,
  .expense-item {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 12px;
    padding: 14px
  }

  .crm-item>:nth-child(2),
  .expense-item>:nth-child(2) {
    grid-column: 1/-1;
    grid-row: 2
  }

  .crm-item>:nth-child(3),
  .expense-item>:nth-child(3) {
    grid-column: 2;
    grid-row: 1;
    text-align: right
  }

  .crm-item>:nth-child(4) {
    grid-column: 1
  }

  .crm-item>:nth-child(5),
  .expense-item>:nth-child(4) {
    grid-column: 2;
    justify-self: end
  }

  .appointment {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding: 14px;
    align-items: start
  }

  .appointment .price {
    grid-column: 3;
    grid-row: 1
  }

  .appointment>:nth-child(4) {
    grid-column: 1/-1
  }

  .appt-actions {
    width: 100%
  }

  .appt-actions button {
    flex: 1;
    min-height: 44px
  }

  .block-form {
    grid-template-columns: 1fr 1fr
  }

  .block-form input#block-reason,
  .block-form button {
    grid-column: 1/-1
  }

  .service-add-form {
    grid-template-columns: 1fr 1fr
  }

  .service-add-form button {
    grid-column: 1/-1
  }

  .filter-controls {
    width: 100%
  }

  .filter-controls>* {
    flex: 1 1 auto
  }

  .filter-controls input[type=date] {
    width: 100% !important
  }

  .calendar-input-group {
    flex-wrap: wrap
  }

  .calendar-input-group input {
    flex: 1 1 100%
  }

  .calendar-input-group button {
    width: 100%
  }

  input,
  select,
  textarea {
    font-size: 16px
  }
}

@media (max-width:600px) {
  .kpis {
    gap: 10px
  }

  .kpi {
    padding: 14px 14px 14px 16px
  }

  .kpi b {
    font-size: 21px
  }

  .block-form,
  .service-add-form {
    grid-template-columns: 1fr
  }

  .service-edit-row {
    grid-template-columns: minmax(0, 1fr) minmax(90px, .65fr) auto
  }

  .barber-edit-card .img-preview {
    height: 220px
  }

  .turnover-table th,
  .turnover-table td {
    padding: 11px 12px
  }

  .cal-modal {
    padding: 8px
  }

  .cal-dialog {
    max-height: 92dvh;
    overflow: auto;
    padding: 16px
  }
}

@media (max-width:480px) {
  .ab-name {
    display: none
  }

  .gallery-edit-grid {
    grid-template-columns: 1fr
  }

  .appt-actions {
    display: grid;
    grid-template-columns: 1fr 1fr 1.3fr
  }

  .appt-actions button {
    min-width: 0;
    padding: 10px 6px
  }
}

@media (pointer:coarse) {

  button,
  .tab-btn,
  select,
  input:not([type=checkbox]):not([type=radio]) {
    min-height: 44px
  }

  .danger-btn,
  .block-item button {
    min-height: 40px
  }
}

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

/* ---------- Bildirim balonları ---------- */
.toasts {
  position: fixed;
  top: calc(72px + var(--sat));
  right: 16px;
  z-index: 1200;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none
}

.toast {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--r);
  box-shadow: var(--sh-2);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  pointer-events: auto;
  animation: toast-in .28s ease both
}

.toast .t-dot {
  flex: none;
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-100)
}

.toast.out {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .4s, transform .4s
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-8px)
  }

  to {
    opacity: 1;
    transform: none
  }
}

.notif-enable {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 13px;
  white-space: nowrap
}

/* ---------- Mobil alt menü ---------- */
.bottom-nav {
  display: none
}

@media (max-width:900px) {
  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 20px -10px rgba(20, 26, 46, .18)
  }

  .bottom-nav button {
    flex-direction: column;
    gap: 3px;
    min-height: 54px;
    padding: 6px 2px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font: 600 11px var(--font);
    box-shadow: none
  }

  .bottom-nav button svg {
    width: 22px;
    height: 22px
  }

  .bottom-nav button:hover {
    background: var(--surface-2);
    color: var(--ink-2)
  }

  .bottom-nav button.active {
    background: var(--brand-50);
    color: var(--brand)
  }

  main {
    padding-bottom: calc(92px + env(safe-area-inset-bottom))
  }

  .toasts {
    top: calc(68px + var(--sat));
    right: 12px;
    left: 12px;
    width: auto
  }

  .ab-right {
    gap: 10px
  }
}

@media (max-width:640px) {
  .notif-enable {
    padding: 6px 10px;
    font-size: 12px
  }

  .w-date {
    padding-bottom: 0
  }
}

/* ---------- Tema düğmesi ---------- */
.theme-toggle {
  flex: none;
  width: 38px;
  min-height: 38px;
  height: 38px;
  padding: 0;
  background: #fff;
  color: var(--ink-2);
  border: 1px solid var(--line-2);
  border-radius: 10px;
  box-shadow: none
}

.theme-toggle:hover {
  background: var(--surface-2);
  border-color: #c4cadb;
  color: var(--ink)
}

.theme-toggle svg {
  width: 18px;
  height: 18px
}

.theme-toggle .i-sun {
  display: none
}

html[data-theme="dark"] .theme-toggle .i-sun {
  display: block
}

html[data-theme="dark"] .theme-toggle .i-moon {
  display: none
}

.ls-theme {
  position: fixed;
  top: calc(16px + var(--sat));
  right: 16px;
  z-index: 70
}

/* ---------- Koyu tema ---------- */
html[data-theme="dark"] {
  --bg: #0e1220;
  --surface: #161b2d;
  --surface-2: #1b2136;
  --line: #262d46;
  --line-2: #323b5a;
  --ink: #eef0f8;
  --ink-2: #c5cbe0;
  --muted: #8f98b4;
  --faint: #6b7491;
  --brand: #7280ff;
  --brand-600: #8794ff;
  --brand-50: #222a55;
  --brand-100: #313a74;
  --ok: #3ccf97;
  --ok-50: #10302a;
  --warn: #e8b04a;
  --warn-50: #33270f;
  --bad: #ff6f86;
  --bad-50: #3a1822;
  --info: #5aa7f0;
  --info-50: #13273d;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .35);
  --sh-2: 0 10px 28px -8px rgba(0, 0, 0, .6);
  --btn: #5566f0;
  --btn-600: #6677f6;
  color-scheme: dark;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  color-scheme: dark
}

html[data-theme="dark"] input:hover,
html[data-theme="dark"] select:hover {
  border-color: #47517a
}

html[data-theme="dark"] input[type=file]::file-selector-button {
  background: var(--surface);
  color: var(--ink-2)
}

html[data-theme="dark"] .secondary,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .nav-toggle,
html[data-theme="dark"] .side-close {
  background: var(--surface);
  color: var(--ink-2);
  border-color: var(--line-2)
}

html[data-theme="dark"] .secondary:hover,
html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .nav-toggle:hover {
  background: var(--surface-2);
  border-color: #47517a;
  color: var(--ink)
}

html[data-theme="dark"] .danger-btn,
html[data-theme="dark"] .btn-cross,
html[data-theme="dark"] .service-edit-row .srv-delete {
  background: var(--surface);
  color: var(--bad);
  border-color: #5a2a38
}

html[data-theme="dark"] .danger-btn:hover,
html[data-theme="dark"] .service-edit-row .srv-delete:hover {
  background: var(--bad-50)
}

html[data-theme="dark"] .btn-tick {
  border-color: #1d5a49
}

html[data-theme="dark"] .btn-debt {
  border-color: #5d4515
}

html[data-theme="dark"] .nav-toggle span {
  background: var(--ink-2)
}

html[data-theme="dark"] .tab-btn:hover {
  background: #1e2540
}

html[data-theme="dark"] .app-bar {
  background: rgba(22, 27, 45, .88)
}

@media (max-width:900px) {
  html[data-theme="dark"] .side {
    background: var(--surface)
  }
}

html[data-theme="dark"] .bottom-nav {
  background: rgba(22, 27, 45, .94);
  box-shadow: 0 -6px 20px -10px rgba(0, 0, 0, .6)
}

html[data-theme="dark"] .cal-dialog,
html[data-theme="dark"] .toast {
  background: var(--surface)
}

html[data-theme="dark"] .cal-modal {
  background: rgba(5, 8, 18, .6)
}

html[data-theme="dark"] .ls-logo,
html[data-theme="dark"] .ab-brand {
  color: var(--ink)
}

html[data-theme="dark"] .login-screen {
  background: var(--bg)
}

html[data-theme="dark"] .ls-brand {
  background: radial-gradient(700px 420px at 10% 0, #222a58 0, transparent 62%), radial-gradient(520px 380px at 100% 100%, #14304d 0, transparent 60%), #10152a
}

html[data-theme="dark"] .ls-list li {
  background: rgba(255, 255, 255, .04);
  border-color: rgba(255, 255, 255, .07)
}

html[data-theme="dark"] #login .ls-user {
  background: var(--surface)
}

html[data-theme="dark"] #login .ls-user:hover {
  background: var(--surface-2);
  border-color: #47517a
}

html[data-theme="dark"] #login .ls-user.on {
  background: var(--brand-50)
}

html[data-theme="dark"] .ls-mark {
  box-shadow: 0 4px 14px -2px rgba(114, 128, 255, .45)
}

html[data-theme="dark"] .export-btn {
  color: #06251b !important
}

html[data-theme="dark"] .uc-av {
  box-shadow: inset 0 0 0 1px var(--brand-100)
}

html[data-theme="dark"] .toast {
  border-color: var(--line)
}

html[data-theme="dark"] .img-preview {
  opacity: .92
}

@media (max-width:480px) {
  .ls-theme {
    top: 10px;
    right: 10px
  }
}

/* ---------- Mobil: tablolar kart düzenine döner (yatay kaydırma yok) ---------- */
@media (max-width:640px) {
  .turnover-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
    border-radius: 0
  }

  .turnover-table {
    min-width: 0;
    display: block;
    width: 100%
  }

  .turnover-table thead {
    display: none
  }

  .turnover-table tbody {
    display: grid;
    gap: 10px
  }

  .turnover-table tbody tr {
    display: block;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden
  }

  .turnover-table tbody tr:hover {
    background: var(--surface)
  }

  .turnover-table td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--line);
    white-space: normal;
    text-align: right;
    overflow-wrap: anywhere
  }

  .turnover-table td::before {
    content: attr(data-label);
    flex: none;
    max-width: 48%;
    text-align: left;
    font: 600 11px/1.4 var(--font);
    letter-spacing: .04em;
    color: var(--muted)
  }

  .turnover-table td:first-child {
    display: block;
    padding: 11px 14px;
    background: var(--surface-2);
    text-align: left;
    font-weight: 700;
    font-size: 14px;
    color: var(--ink)
  }

  .turnover-table td:first-child::before {
    content: none
  }

  .turnover-table tbody tr td:last-child {
    border-bottom: 0
  }

  .turnover-table tr.total-row {
    background: var(--brand-50);
    border-color: var(--brand-100)
  }

  .turnover-table tr.total-row:hover {
    background: var(--brand-50)
  }

  .turnover-table tr.total-row td {
    border-top: 0;
    border-bottom-color: var(--brand-100);
    color: var(--brand)
  }

  .turnover-table tr.total-row td:first-child {
    background: transparent
  }

  .turnover-table td.hint-cell {
    display: block;
    text-align: center;
    padding: 22px 14px !important
  }

  .turnover-table td.hint-cell::before {
    content: none
  }

  /* İşletme sahibi ciro kartları: 4 çocuklu satır, ikili ızgara */
}

/* ---------- Taşma kilidi ve sağlamlaştırma (telefonlarda yana kaymayı önler) ---------- */
img,
svg,
video,
canvas {
  max-width: 100%
}

main,
.shell,
.content,
.tab-content,
.panel,
.title-row,
.list-header,
.welcome {
  min-width: 0;
  max-width: 100%
}

input,
select,
textarea {
  min-width: 0;
  max-width: 100%
}

input[type=date],
input[type=time],
input[type=month],
input[type=file] {
  min-width: 0;
  width: 100%;
  max-width: 100%
}

.img-box,
.barber-edit-card,
.gal-edit-box,
.photo-col,
.form-col {
  grid-template-columns: minmax(0, 1fr)
}

.img-box>*,
.barber-edit-card>*,
.gal-edit-box>*,
.photo-col>*,
.crm-item>*,
.expense-item>*,
.service-edit-row>* {
  min-width: 0
}

.crm-item,
.expense-item {
  overflow-wrap: anywhere
}

.hint,
.panel h2,
.panel p {
  overflow-wrap: anywhere
}

@media (max-width:900px) {
  .app-bar {
    gap: 8px
  }

  .ab-right {
    min-width: 0;
    gap: 8px
  }

  .ab-user {
    min-width: 0
  }

  .bottom-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr))
  }

  .bottom-nav button {
    min-width: 0;
    padding: 6px 0;
    overflow: hidden;
    font-size: 10.5px
  }
}

@media (max-width:600px) {

  /* Hizmet satırı: ad üstte tam genişlik, fiyat + Sil altta */
  .service-edit-row {
    grid-template-columns: minmax(0, 1fr) auto
  }

  .service-edit-row .srv-name {
    grid-column: 1/-1
  }

  .inline-label {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    width: 100%
  }

  .inline-label input {
    flex: 1 1 140px;
    min-width: 0
  }
}

@media (max-width:420px) {
  .app-bar {
    padding: var(--sat) 10px 0;
    gap: 6px
  }

  .ab-right,
  .ab-user {
    gap: 6px
  }

  .ab-logout {
    padding: 6px 10px;
    font-size: 12px
  }

  .theme-toggle,
  .nav-toggle {
    width: 36px;
    min-height: 36px;
    height: 36px
  }

  .ls-mark {
    width: 34px;
    height: 34px;
    font-size: 13px
  }
}

@media (max-width:360px) {
  .user-chip {
    display: none
  }

}

@media (max-width:300px) {
  .ab-brand {
    display: none
  }
}

.status-pill-live {
  white-space: normal
}

.personal-prices-panel {
  margin-bottom: 18px
}

.personal-prices-panel .service-edit-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, 180px) auto;
  align-items: center;
  gap: 10px
}

.personal-prices-panel .service-edit-row label {
  font-size: 13px
}

.personal-prices-panel #save-my-prices {
  margin-top: 14px
}

@media(max-width:520px) {
  .personal-prices-panel .service-edit-row {
    grid-template-columns: minmax(0, 1fr) 110px auto
  }
}

/* Kişisel hizmet yönetimi */
#my-services-list .my-service-name {
  min-width: 0
}

@media(max-width:520px) {
  #my-services-list .my-service-name {
    grid-column: 1/-1
  }
}

/* Randevu işletme sahibi atama ve canlı kasa mobil düzeni */
.assign-wrap {
  display: block;
  min-width: 125px;
  margin: 4px 0
}

.appointment-assign {
  width: 100%;
  max-width: 155px;
  padding: 8px;
  border: 1px solid #d8c7a4;
  border-radius: 8px;
  background: #fff;
  color: #222;
  font-size: 12px
}

.extended-hours-setting {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid rgba(180, 155, 108, .28);
  border-radius: 12px
}

.toggle-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap
}

.toggle-line input {
  width: 20px;
  height: 20px;
  accent-color: #b49b6c
}

#tab-live-cash .turnover-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch
}

@media(max-width:700px) {
  .appointment {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 9px;
    align-items: start
  }

  .appointment .assign-wrap {
    grid-column: 2/-1;
    width: 100%;
    margin: 0
  }

  .appointment-assign {
    max-width: none;
    min-height: 40px
  }

  .appointment .appt-actions {
    grid-column: 2/-1;
    display: flex;
    width: 100%;
    gap: 8px
  }

  .appointment .appt-actions button {
    flex: 1;
    min-height: 40px
  }

  .turnover-table {
    min-width: 680px
  }

  .extended-hours-setting {
    padding: 13px
  }
}

/* ============================================================
   v23 — Randevu kartı, işletme sahibie ata paneli, borç tahsilatı
   ============================================================ */
#appointments .appointment {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 14px 16px;
  grid-template-columns: none
}

#appointments .appointment>* {
  grid-column: auto;
  grid-row: auto;
  justify-self: auto;
  min-width: 0
}

#appointments .ap-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px 12px
}

#appointments .ap-top time {
  margin: 0
}

#appointments .ap-info {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14.5px;
  line-height: 1.35
}

#appointments .ap-info small a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 2px
}

#appointments .ap-top .price {
  white-space: nowrap;
  align-self: center
}

#appointments .ap-barber {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  max-width: 100%;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted)
}

.ap-dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand)
}

#appointments .appt-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  justify-content: stretch
}

#appointments .ab {
  flex: none;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  min-height: 44px;
  padding: 8px 6px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--ink);
  font: 600 13px var(--font);
  line-height: 1;
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer
}

#appointments .ab i {
  font-style: normal;
  font-size: 15px;
  font-weight: 700;
  line-height: 1
}

#appointments .ab-ok {
  background: var(--ok-50);
  color: var(--ok);
  border-color: #bfe8d6
}

#appointments .ab-ok:hover {
  background: var(--ok);
  color: #fff;
  border-color: var(--ok)
}

#appointments .ab-no {
  background: #fff;
  color: var(--bad);
  border-color: #f2c3cc
}

#appointments .ab-no:hover {
  background: var(--bad);
  color: #fff;
  border-color: var(--bad)
}

#appointments .ab-debt {
  background: var(--warn-50);
  color: var(--warn);
  border-color: #f1d9a6
}

#appointments .ab-debt:hover {
  background: var(--warn);
  color: #fff;
  border-color: var(--warn)
}

#appointments .ab-assign {
  background: var(--brand-50);
  color: var(--brand);
  border-color: var(--brand-100)
}

#appointments .ab-assign:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand)
}

#appointments .ap-status {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700
}

#appointments .st-done {
  background: var(--ok-50);
  color: var(--ok)
}

#appointments .st-debt {
  background: var(--warn-50);
  color: var(--warn)
}

#appointments .st-cancel {
  background: #fdecef;
  color: var(--bad)
}

html[data-theme="dark"] #appointments .ab {
  background: var(--surface)
}

html[data-theme="dark"] #appointments .ab-no {
  border-color: #5a2a38
}

html[data-theme="dark"] #appointments .ab-ok {
  border-color: #1d5a49
}

html[data-theme="dark"] #appointments .ab-debt {
  border-color: #5d4515
}

html[data-theme="dark"] #appointments .st-cancel {
  background: #3a1d27
}

@media (min-width:900px) {
  #appointments .appointment {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    align-items: center;
    gap: 8px 20px
  }

  #appointments .ap-top {
    grid-column: 1;
    grid-row: 1
  }

  #appointments .ap-barber {
    grid-column: 1;
    grid-row: 2
  }

  #appointments .appt-actions,
  #appointments .ap-status {
    grid-column: 2;
    grid-row: 1/3;
    align-self: center
  }

  #appointments .ap-status {
    justify-self: end
  }
}

@media (max-width:420px) {
  #appointments .appointment {
    padding: 12px
  }

  #appointments .appt-actions {
    gap: 6px
  }

  #appointments .ab {
    flex-direction: column;
    gap: 4px;
    min-height: 52px;
    padding: 7px 2px;
    font-size: 12px
  }

  #appointments .ab i {
    font-size: 16px
  }
}

/* İşletme sahibie ata — alt panel */
.assign-sheet {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s ease
}

.assign-sheet.show {
  opacity: 1
}

.as-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 35, .55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px)
}

.as-panel {
  position: relative;
  width: min(480px, 100%);
  max-height: 88vh;
  overflow: auto;
  padding: 10px 18px calc(18px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .25);
  transform: translateY(28px);
  transition: transform .22s ease
}

.assign-sheet.show .as-panel {
  transform: none
}

@media (min-width:600px) {
  .assign-sheet {
    align-items: center;
    padding: 20px
  }

  .as-panel {
    border-radius: 20px;
    padding-bottom: 18px
  }
}

.as-grab {
  width: 40px;
  height: 4px;
  margin: 4px auto 14px;
  border-radius: 4px;
  background: var(--line-2)
}

.as-panel h3 {
  margin: 0 0 4px;
  font: 700 18px var(--font);
  color: var(--ink)
}

.as-sub {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted)
}

.as-list {
  display: grid;
  gap: 10px
}

.as-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  color: var(--ink);
  box-shadow: none;
  cursor: pointer
}

.as-item:hover:not(.current) {
  border-color: var(--brand);
  background: var(--brand-50)
}

.as-item:disabled {
  opacity: .6
}

.as-av {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--brand-50)
}

.as-av img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover
}

.as-av em {
  font: 700 14px var(--font);
  font-style: normal;
  color: var(--brand)
}

.as-nm {
  flex: 1;
  min-width: 0
}

.as-nm b {
  display: block;
  font-size: 15px;
  font-weight: 600;
  overflow-wrap: anywhere
}

.as-nm small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted)
}

.as-state {
  flex: none;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font: 700 12px var(--font)
}

.as-item.current {
  background: var(--brand-50);
  border-color: var(--brand)
}

.as-item.current .as-state {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--brand-100)
}

.as-cancel {
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
  border-radius: 12px;
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--line-2);
  font-weight: 600;
  box-shadow: none
}

/* Borç tahsilatı */
.collect-btn {
  min-height: 42px;
  padding: 9px 16px;
  border-radius: 10px;
  background: var(--ok);
  color: #fff;
  border: 1px solid var(--ok);
  font: 700 13px var(--font);
  white-space: nowrap;
  box-shadow: none;
  cursor: pointer
}

.collect-btn:hover {
  filter: brightness(.93)
}

.collect-btn:disabled {
  opacity: .6;
  cursor: wait
}

.debt-item.is-paid {
  opacity: .75
}

@media (max-width:700px) {
  .crm-item.debt-item>:nth-child(5) {
    grid-column: 1/-1;
    justify-self: stretch
  }

  .debt-item .collect-btn {
    width: 100%;
    min-height: 46px
  }
}

/* Bildirim butonu küçük ekranlarda da görünsün (telefonda izin için gerekli) */
.notif-enable {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  padding: 6px 10px
}

@media (max-width:480px) {
  .ab-right .notif-enable {
    max-width: 104px;
    white-space: normal;
    line-height: 1.15;
    text-align: center
  }
}

/* v24 — Ayarlar / şifre butonu ve genel responsive iyileştirmeleri */
#change-password-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px
}

#change-password-form>div {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  gap: 6px
}

#change-password-form label {
  display: block;
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2)
}

#change-password-form input {
  width: 100%;
  min-width: 0
}

#change-password-form>div:last-child {
  align-items: flex-start;
  gap: 8px;
  padding-top: 2px
}

#change-password-form button[type="submit"] {
  width: auto;
  min-width: 148px;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  white-space: nowrap
}

#change-password-msg {
  margin: 2px 0 0
}

/* Tablet ve dar masaüstü */
@media (max-width:1024px) {
  main {
    max-width: 100%;
    padding-left: 18px;
    padding-right: 18px
  }

  .shell {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 22px
  }

  .panel {
    padding: 20px
  }

  .app-bar {
    padding-left: 18px;
    padding-right: 18px
  }
}

/* Telefon ve küçük tablet */
@media (max-width:900px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 0
  }

  .content {
    width: 100%;
    min-width: 0
  }

  .panel,
  .kpi,
  .crm-list,
  .turnover-table-wrap {
    max-width: 100%;
    min-width: 0
  }

  .welcome {
    align-items: flex-start
  }

  .welcome h1 {
    overflow-wrap: anywhere
  }

  .app-bar {
    padding-left: 12px;
    padding-right: 12px
  }

  .ab-right {
    min-width: 0;
    gap: 8px
  }

  .ab-user {
    min-width: 0
  }

  .ab-logout {
    padding: 7px 10px
  }
}

@media (max-width:600px) {
  main {
    padding-left: 10px;
    padding-right: 10px
  }

  .shell {
    padding-top: 12px
  }

  .panel {
    padding: 16px 13px;
    margin-bottom: 12px;
    border-radius: 13px
  }

  .panel h2 {
    font-size: 16px
  }

  .hint {
    font-size: 12px;
    line-height: 1.5
  }

  .welcome {
    gap: 8px;
    margin-bottom: 13px
  }

  .welcome h1 {
    font-size: 21px
  }

  .w-date {
    font-size: 12px
  }

  .app-bar {
    height: calc(58px + var(--sat));
    gap: 8px
  }

  .ls-mark {
    width: 34px;
    height: 34px
  }

  .ab-right {
    gap: 6px
  }

  .ab-user {
    gap: 6px
  }

  .uc-av {
    width: 31px;
    height: 31px
  }

  .ab-logout {
    min-height: 36px;
    font-size: 12px;
    padding: 6px 9px
  }

  #change-password-form {
    gap: 11px
  }

  #change-password-form>div:last-child {
    width: 100%;
    align-items: stretch
  }

  #change-password-form button[type="submit"] {
    width: 100%;
    min-height: 46px
  }

  .block-form {
    grid-template-columns: minmax(0, 1fr)
  }

  .block-form>* {
    grid-column: 1/-1;
    min-width: 0
  }

  .block-item {
    align-items: flex-start;
    flex-wrap: wrap
  }

  .block-item button {
    margin-left: auto
  }

  .filter-controls>* {
    min-width: 0
  }

  .title-row,
  .list-header {
    align-items: stretch
  }

  .title-row button,
  .list-header button {
    max-width: 100%
  }

  .crm-grid-form,
  .form-grid {
    grid-template-columns: minmax(0, 1fr)
  }

  .gallery-edit-grid,
  .barbers-edit-grid,
  .barber-add-form {
    grid-template-columns: minmax(0, 1fr)
  }

  .cal-dialog {
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width:380px) {
  .ab-name {
    display: none
  }

  .app-bar {
    padding-left: 8px;
    padding-right: 8px
  }

  .ab-right {
    gap: 5px
  }

  .ab-logout {
    padding: 5px 7px;
    font-size: 11px
  }

  .panel {
    padding: 13px 10px
  }

  .kpis {
    grid-template-columns: 1fr 1fr;
    gap: 7px
  }

  .kpi {
    padding: 11px
  }

  .kpi b {
    font-size: 18px
  }

  .welcome h1 {
    font-size: 19px
  }

  #change-password-form button[type="submit"] {
    font-size: 13px
  }
}

/* Taşan uzun metinler ve tablolar mobilde sayfayı genişletmesin */
.content,
.tab-content,
.panel,
.form-grid,
.block-form,
.crm-grid-form {
  min-width: 0
}

.turnover-table-wrap,
.crm-list,
.appointments-list {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch
}

input,
select,
textarea,
button {
  max-width: 100%
}


/* v25 — tutarlı panel yerleşimi ve mobil taşma düzeltmeleri */
[hidden] {
  display: none !important
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden
}

body {
  min-width: 320px
}

main,
#dashboard,
.shell,
.content,
.tab-content,
.panel {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%
}

.shell {
  width: 100%
}

.content>* {
  min-width: 0;
  max-width: 100%
}

.side-logout {
  display: none
}

.block-form {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.4fr) auto;
  min-width: 0
}

.block-form input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box
}

.turnover-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch
}

.turnover-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse
}

.kpis,
.kpi,
.crm-item,
.expense-item,
.appointment {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box
}

.kpi b,
.crm-item>* {
  overflow-wrap: anywhere;
  word-break: break-word
}

.login-screen {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box
}

.ls-form-wrap,
.ls-card,
.ls-users {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box
}

.ls-card {
  width: min(100%, 470px)
}

@media(max-width:900px) {
  .side {
    display: flex;
    flex-direction: column
  }

  .side-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 46px;
    margin-top: 18px;
    padding: 10px 14px;
    border: 1px solid var(--line-2);
    border-radius: 12px;
    background: var(--surface-2);
    color: var(--ink-2);
    font: 700 13px var(--font);
    box-shadow: none
  }

  .side-logout span {
    font-size: 19px;
    color: var(--bad)
  }

  .tabs {
    flex: 1;
    min-height: 0
  }

  .block-form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr)
  }

  .block-form input[type=date],
  .block-form input[type=time] {
    width: 100%;
    min-width: 0;
    max-width: 100%
  }

  .block-form input#block-reason,
  .block-form button {
    grid-column: 1/-1
  }

  .turnover-table-wrap {
    margin-right: 0
  }

  .login-screen {
    grid-template-columns: minmax(0, 1fr)
  }

  .ls-brand {
    min-width: 0
  }

  .ls-form-wrap {
    width: 100%;
    padding-left: clamp(12px, 4vw, 24px);
    padding-right: clamp(12px, 4vw, 24px)
  }
}

@media(max-width:600px) {
  main {
    width: 100%;
    padding-left: 10px;
    padding-right: 10px
  }

  .block-form {
    grid-template-columns: minmax(0, 1fr)
  }

  .block-form>* {
    grid-column: 1/-1;
    width: 100%;
    min-width: 0
  }

  .block-form input[type=date],
  .block-form input[type=time] {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box
  }

  .turnover-table {
    min-width: 680px
  }

  .turnover-table th,
  .turnover-table td {
    white-space: nowrap
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }

  .login-screen {
    overflow-x: hidden
  }

  .ls-form-wrap {
    padding-top: 20px;
    padding-bottom: 28px
  }

  .ls-card {
    padding-left: 0;
    padding-right: 0
  }

  #login .ls-user {
    min-width: 0
  }
}

html[data-theme="dark"] .side-logout {
  background: var(--surface-2);
  color: var(--ink-2);
  border-color: var(--line-2)
}

/* Genel ciro — mobilde gerçek kart düzeni; önceki min-width/nowrap kurallarını ezer */
#tab-daily-report {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: visible
}

#tab-daily-report>.panel {
  min-width: 0;
  width: 100%;
  max-width: 100%
}

#tab-daily-report .list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0
}

#tab-daily-report .filter-controls {
  min-width: 0;
  max-width: 100%
}

#tab-daily-report #report-date-picker {
  width: auto;
  max-width: 100%;
  box-sizing: border-box
}

#tab-daily-report .turnover-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto
}

#tab-daily-report .turnover-table {
  width: 100%;
  min-width: 680px
}

@media(max-width:640px) {
  #tab-daily-report .list-header {
    align-items: stretch
  }

  #tab-daily-report .filter-controls {
    width: 100%
  }

  #tab-daily-report #report-date-picker {
    width: 100%;
    min-height: 44px
  }

  #tab-daily-report .turnover-table-wrap {
    overflow: visible !important;
    border: 0;
    background: transparent;
    border-radius: 0
  }

  #tab-daily-report .turnover-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed
  }

  #tab-daily-report .turnover-table thead {
    display: none !important
  }

  #tab-daily-report .turnover-table tbody {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    width: 100%
  }

  #tab-daily-report .turnover-table tbody tr {
    display: block;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 13px
  }

  #tab-daily-report .turnover-table tbody tr:hover {
    background: var(--surface)
  }

  #tab-daily-report .turnover-table tbody td {
    display: flex !important;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 10px 12px;
    white-space: normal !important;
    text-align: right;
    overflow-wrap: anywhere;
    word-break: break-word;
    border-bottom: 1px solid var(--line)
  }

  #tab-daily-report .turnover-table tbody td::before {
    content: attr(data-label);
    display: block;
    flex: 0 1 48%;
    min-width: 0;
    text-align: left;
    font: 700 10px/1.4 var(--font);
    letter-spacing: .035em;
    color: var(--muted);
    overflow-wrap: anywhere
  }

  #tab-daily-report .turnover-table tbody td:first-child {
    display: block !important;
    background: var(--surface-2);
    text-align: left;
    font-weight: 700;
    color: var(--ink)
  }

  #tab-daily-report .turnover-table tbody td:first-child::before {
    content: none
  }

  #tab-daily-report .turnover-table tbody tr td:last-child {
    border-bottom: 0
  }

  #tab-daily-report .turnover-table tbody tr.total-row {
    background: var(--brand-50);
    border-color: var(--brand-100)
  }

  #tab-daily-report .turnover-table tbody tr.total-row td {
    color: var(--brand);
    border-bottom-color: var(--brand-100)
  }

  #tab-daily-report .turnover-table tbody tr.total-row td:first-child {
    background: transparent
  }

  #tab-daily-report .turnover-table td.hint-cell {
    display: block !important;
    text-align: center;
    padding: 20px 12px !important
  }

  #tab-daily-report .turnover-table td.hint-cell::before {
    content: none
  }
}

/* Yönetim panelinde masaüstü fare tekerleği ile sayfa kaydırma */
html,
body {
  min-height: 100%;
  height: auto;
  overflow-x: hidden;
  overflow-y: auto !important;
}

body.nav-open {
  overflow: hidden !important;
}

#dashboard,
.shell,
.content {
  overflow: visible;
}

/* ===== MDC sade arayüz katmanı ===== */
:root {
  --bg: #f6f7f8;
  --surface: #fff;
  --surface-2: #fafafa;
  --line: #e7e9ec;
  --line-2: #d9dde2;
  --ink: #20242a;
  --ink-2: #414852;
  --muted: #737b86;
  --faint: #9aa1aa;
  --brand: #273746;
  --brand-600: #1d2a36;
  --brand-50: #eef2f5;
  --brand-100: #dce4ea;
  --ok: #23835f;
  --ok-50: #eaf5ef;
  --warn: #9b6b1d;
  --warn-50: #fbf4e7;
  --bad: #bd4653;
  --bad-50: #faeef0;
  --info: #426f96;
  --info-50: #edf3f8;
  --btn: var(--brand);
  --btn-600: var(--brand-600);
  --r-sm: 7px;
  --r: 9px;
  --r-lg: 11px;
  --sh-1: 0 1px 2px rgba(20, 26, 46, .035);
  --sh-2: 0 5px 18px rgba(20, 26, 46, .07);
}

html,
body {
  background: var(--bg);
  color: var(--ink);
  scroll-behavior: auto;
  overscroll-behavior-y: auto;
  overflow-y: auto
}

body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5
}

.app-bar {
  height: 62px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
  padding-inline: max(20px, calc((100vw - 1280px)/2 + 20px))
}

.ls-mark {
  background: var(--brand);
  border-radius: 8px;
  box-shadow: none
}

main {
  max-width: 1280px;
  padding-inline: 22px
}

.shell {
  grid-template-columns: 218px minmax(0, 1fr);
  gap: 24px;
  padding-top: 22px
}

.side {
  top: 82px
}

.tabs {
  gap: 3px
}

.side-label {
  padding: 16px 10px 5px;
  color: #8a9199;
  font-size: 10px;
  letter-spacing: .045em
}

.tab-btn {
  min-height: 39px;
  padding: 9px 10px;
  border-radius: 7px;
  font-size: 13px;
  color: #525b65
}

.tab-btn:hover {
  background: #f0f2f4;
  color: #20242a
}

.tab-btn.active {
  background: #edf1f4;
  color: #273746;
  font-weight: 650
}

.tab-btn.active::before {
  display: none
}

.welcome {
  margin-bottom: 17px
}

.welcome h1 {
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -.035em
}

.welcome .eyebrow {
  font-size: 11px;
  color: #7d858e
}

.panel,
.kpi {
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: none;
  background: #fff
}

.panel {
  padding: 20px 21px;
  margin-bottom: 14px
}

.panel .panel {
  background: #fafbfc
}

.kpis {
  gap: 10px;
  margin-bottom: 14px
}

.kpi {
  padding: 15px 16px
}

.kpi::before {
  display: none
}

.kpi span {
  font-size: 11px;
  letter-spacing: 0;
  font-weight: 600;
  color: #7a828b
}

.kpi b {
  font-size: 25px;
  font-weight: 650;
  letter-spacing: -.025em;
  margin-top: 7px
}

.kpi small {
  margin-top: 5px
}

input,
select,
textarea {
  border-color: #dfe3e7;
  border-radius: 7px;
  box-shadow: none;
  transition: border-color .12s
}

input:focus,
select:focus,
textarea:focus {
  border-color: #8999a7;
  box-shadow: 0 0 0 2px rgba(39, 55, 70, .09)
}

button {
  border-radius: 7px;
  box-shadow: none;
  font-weight: 600;
  transition: background .12s, border-color .12s
}

button:hover {
  box-shadow: none
}

.secondary {
  background: #fff
}

.danger-btn {
  box-shadow: none
}

.export-btn {
  border-radius: 7px;
  box-shadow: none
}

.title-row,
.list-header {
  gap: 10px
}

.sub-title {
  margin-top: 22px;
  padding-top: 18px
}

/* Panel kaydırması sayfa üzerinde doğal kalsın. */
html {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto
}

body {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: auto;
  touch-action: pan-y
}

#dashboard,
.shell,
.content,
.tab-content,
.panel {
  min-height: 0;
  overscroll-behavior: contain
}

.side {
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin
}

.content {
  overflow: visible
}

@media(max-width:900px) {
  .app-bar {
    height: 58px;
    padding-inline: 16px
  }

  main {
    padding-inline: 14px
  }

  .shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding-top: 14px
  }

  .side {
    max-height: calc(100dvh - 70px)
  }

  .panel {
    padding: 16px
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr))
  }
}

@media(max-width:560px) {
  .welcome h1 {
    font-size: 22px
  }

  .panel {
    padding: 14px;
    border-radius: 9px
  }

  .kpi {
    padding: 12px
  }

  .kpi b {
    font-size: 21px
  }
}


/* MDC panel: restrained neutral interface */
:root {
  --bg: #f7f8f9;
  --surface: #fff;
  --surface-2: #fbfcfd;
  --line: #e7ebee;
  --line-2: #dce2e6;
  --ink: #202832;
  --ink-2: #46525d;
  --muted: #74808a;
  --faint: #9aa4ac;
  --brand: #263b4d;
  --brand-600: #1c2d3b;
  --brand-50: #eef2f4;
  --brand-100: #dce5eb;
  --r-sm: 7px;
  --r: 9px;
  --r-lg: 11px;
  --sh-1: none;
  --sh-2: 0 4px 16px rgba(25, 39, 52, .06)
}

body {
  background: #f7f8f9;
  color: #202832;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif
}

.app-bar {
  background: #fff;
  border-bottom: 1px solid #e7ebee;
  box-shadow: none
}

.ls-mark {
  background: #263b4d;
  border-radius: 8px;
  box-shadow: none
}

.side {
  background: #fff;
  border: 1px solid #e7ebee;
  border-radius: 10px;
  box-shadow: none
}

.tab-btn {
  border-radius: 7px
}

.tab-btn.active {
  background: #eef2f4;
  color: #263b4d
}

.panel,
.kpi {
  background: #fff;
  border: 1px solid #e7ebee;
  border-radius: 10px;
  box-shadow: none
}

.panel {
  padding: 20px
}

.kpi {
  padding: 16px
}

.kpi::before {
  display: none
}

button {
  box-shadow: none
}

input,
select,
textarea {
  box-shadow: none
}

.crm-list,
.appointments,
.turnover-table-wrap {
  border-color: #e7ebee;
  border-radius: 9px;
  box-shadow: none
}

.crm-item:hover,
.expense-item:hover,
.appointment:hover {
  background: #f7f9fa
}

@media(max-width:900px) {
  .side {
    border-radius: 9px
  }
}

/* ===== Admin: responsive layout hardening ===== */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important
}

main,
.shell,
.content,
.tab-content,
.panel,
.panel>* {
  min-width: 0;
  max-width: 100%
}

.content {
  width: 100%
}

.panel {
  overflow-wrap: anywhere
}

.panel img,
.panel video,
.panel iframe {
  max-width: 100%
}

.table-wrap,
.turnover-table-wrap,
.appointments,
.crm-list,
.gallery-edit-grid,
.images-edit-grid {
  max-width: 100%;
}

.table-wrap,
.turnover-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch
}

button,
input,
select,
textarea {
  max-width: 100%;
}

button {
  touch-action: manipulation
}

@media(max-width:900px) {
  .app-bar {
    position: sticky;
    top: 0;
    z-index: 70;
    padding-inline: 12px;
    gap: 8px
  }

  .nav-toggle {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    padding: 9px;
    border-radius: 9px
  }

  .ab-brand {
    gap: 8px;
    min-width: 0
  }

  .ab-name {
    font-size: 12px;
    white-space: nowrap
  }

  .ab-name small {
    font-size: 9px
  }

  .ab-right {
    gap: 7px;
    min-width: 0
  }

  .ab-user {
    gap: 6px
  }

  .uc-av {
    width: 32px;
    height: 32px
  }

  .ab-logout {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 11px
  }

  main {
    width: 100%;
    padding-inline: 12px;
    padding-bottom: calc(80px + env(safe-area-inset-bottom))
  }

  .shell {
    width: 100%;
    padding-top: 14px
  }

  .side {
    padding-bottom: calc(24px + env(safe-area-inset-bottom))
  }

  .welcome {
    align-items: flex-start
  }

  .welcome h1 {
    font-size: clamp(20px, 4vw, 25px)
  }

  .w-date {
    font-size: 11px;
    text-align: right
  }

  .panel {
    padding: 16px;
    margin-bottom: 12px
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px
  }

  .kpi {
    min-width: 0;
    padding: 12px
  }

  .kpi b {
    font-size: clamp(18px, 4vw, 24px);
    overflow-wrap: anywhere
  }

  .title-row,
  .list-header,
  .filter-controls {
    align-items: stretch
  }

  .filter-controls>* {
    min-width: 0;
    flex: 1 1 140px
  }
}

@media(max-width:600px) {
  .app-bar {
    height: calc(56px + var(--sat));
    padding-top: var(--sat)
  }

  .ls-mark {
    width: 32px;
    height: 32px;
    font-size: 12px
  }

  .ab-name {
    font-size: 10px;
    letter-spacing: -.03em
  }

  .ab-name small {
    font-size: 8px
  }

  .theme-toggle {
    width: 36px;
    min-width: 36px;
    height: 36px;
    padding: 7px
  }

  .ab-user {
    border: 0;
    padding: 0
  }

  .ab-logout {
    font-size: 10px;
    padding: 6px 8px
  }

  main {
    padding-inline: 9px
  }

  .shell {
    padding-top: 10px
  }

  .welcome {
    gap: 8px;
    margin-bottom: 12px
  }

  .welcome h1 {
    font-size: 21px
  }

  .w-date {
    max-width: 42%;
    font-size: 10px
  }

  .panel {
    padding: 13px;
    border-radius: 9px
  }

  .panel h2 {
    font-size: 16px
  }

  .hint {
    font-size: 12px
  }

  .kpis {
    gap: 7px
  }

  .kpi {
    padding: 10px;
    border-radius: 9px
  }

  .kpi span {
    font-size: 9px;
    line-height: 1.3
  }

  .kpi b {
    font-size: 19px;
    margin-top: 6px
  }

  .crm-grid-form,
  .service-add-form,
  .personal-prices-panel .service-edit-row {
    grid-template-columns: minmax(0, 1fr)
  }

  .calendar-input-group {
    flex-wrap: wrap
  }

  .calendar-input-group input {
    flex: 1 1 100%
  }

  .calendar-input-group button {
    width: 100%
  }

  .title-row,
  .list-header {
    display: flex;
    flex-direction: column;
    align-items: stretch
  }

  .title-row button,
  .list-header button {
    width: 100%
  }

  .filter-controls {
    display: grid;
    grid-template-columns: 1fr 1fr
  }

  .filter-controls>* {
    width: 100%;
    min-width: 0
  }

  .appointment,
  .crm-item,
  .expense-item {
    min-width: 0;
    overflow-wrap: anywhere
  }

  .appointment button,
  .crm-item button,
  .expense-item button {
    min-height: 40px
  }

  .gallery-edit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px
  }

  .gallery-edit-grid>* {
    min-width: 0
  }

  .side {
    width: min(310px, 88vw);
    max-width: 88vw
  }

  .tab-btn {
    min-height: 46px;
    font-size: 14px
  }

  .side-overlay {
    z-index: 75
  }

  .side {
    z-index: 80
  }
}

@media(max-width:380px) {
  .ab-name {
    max-width: 118px;
    overflow: hidden;
    text-overflow: ellipsis
  }

  .ab-right {
    gap: 4px
  }

  .ab-logout {
    font-size: 9px;
    padding-inline: 6px
  }

  .kpi b {
    font-size: 17px
  }

  .filter-controls {
    grid-template-columns: 1fr
  }

  .gallery-edit-grid {
    grid-template-columns: 1fr
  }
}

@media(hover:none) {
  button:hover {
    filter: none
  }
}


/* MDC admin — responsive visual refinement */
:root {
  --admin-radius: 14px
}

.app-bar {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px)
}

.panel,
.kpi,
.crm-list,
.appointments,
.turnover-table-wrap,
.settings-card,
.card {
  border-radius: 14px
}

.panel {
  box-shadow: 0 8px 24px rgba(24, 35, 48, .045)
}

.kpi {
  box-shadow: 0 8px 22px rgba(24, 35, 48, .045);
  transition: transform .18s, box-shadow .18s
}

.kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(24, 35, 48, .08)
}

button,
.secondary,
.tab-btn,
input,
select,
textarea {
  transition: border-color .18s, box-shadow .18s, background .18s
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent)
}

.tab-btn {
  border-radius: 10px
}

.appointment {
  border-radius: 13px;
  box-shadow: 0 3px 12px rgba(24, 35, 48, .035)
}

.ab {
  border-radius: 9px
}

.table-wrap,
.turnover-table-wrap {
  box-shadow: 0 3px 14px rgba(24, 35, 48, .035)
}

.side {
  border-radius: 0 16px 16px 0
}

@media(max-width:900px) {
  .app-bar {
    min-height: 64px;
    padding-inline: 14px;
    gap: 10px
  }

  .ab-brand {
    min-width: 0;
    flex: 1
  }

  .ab-right {
    gap: 7px
  }

  .ab-site {
    white-space: nowrap
  }

  .shell,
  .content,
  #dashboard {
    width: 100%;
    max-width: 100%;
    min-width: 0
  }

  .content {
    padding: clamp(12px, 3vw, 22px)
  }

  .tab-content {
    min-width: 0
  }

  .panel {
    padding: clamp(13px, 2.5vw, 20px)
  }

  .side {
    border-radius: 0 16px 16px 0
  }
}

@media(max-width:600px) {
  .app-bar {
    padding: 9px 12px
  }

  .ab-brand .ls-mark {
    width: 36px;
    height: 36px
  }

  .ab-name {
    font-size: 11px;
    letter-spacing: .04em
  }

  .ab-name small {
    font-size: 8px
  }

  .ab-right {
    gap: 5px
  }

  .ab-site {
    font-size: 10px;
    padding: 8px 9px
  }

  .ab-user {
    gap: 6px
  }

  .user-chip {
    padding: 4px 6px
  }

  .uc-txt {
    display: none
  }

  .ab-logout {
    padding: 8px 9px;
    min-height: 36px;
    font-size: 10px
  }

  .content {
    padding: 12px 10px 88px
  }

  .panel {
    padding: 13px;
    border-radius: 12px
  }

  .kpi {
    padding: 13px;
    border-radius: 12px;
    min-width: 0
  }

  .kpi b {
    font-size: clamp(17px, 5vw, 24px)
  }

  .section-head {
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap
  }

  .section-head h2 {
    font-size: 18px
  }

  .form-grid,
  .settings-grid {
    grid-template-columns: minmax(0, 1fr) !important
  }

  .field,
  .form-group {
    min-width: 0
  }

  input,
  select,
  textarea {
    max-width: 100%;
    min-width: 0
  }

  .appointments {
    border-radius: 12px
  }

  .appointment {
    padding: 12px;
    grid-template-columns: minmax(0, 1fr)
  }

  .appointment .ap-top {
    justify-content: space-between
  }

  .appt-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px
  }

  .appt-actions .ab {
    justify-content: center;
    min-width: 0
  }

  .turnover-table-wrap {
    border-radius: 12px
  }

  .side {
    width: min(86vw, 320px);
    max-width: 320px
  }
}

@media(max-width:380px) {
  .ab-site {
    display: none
  }

  .app-bar {
    gap: 7px
  }

  .ab-brand {
    gap: 7px
  }

  .ab-name {
    font-size: 10px
  }

  .content {
    padding-inline: 8px
  }

  .panel {
    padding: 11px
  }

  .appt-actions {
    grid-template-columns: 1fr 1fr
  }
}


/* Admin desktop alignment — sidebar and workspace share one top/grid axis */
@media(min-width:901px) {
  #dashboard {
    width: 100%;
    max-width: 100%;
    margin: 0 auto
  }

  #dashboard>.shell {
    width: min(1480px, calc(100% - 64px));
    max-width: 1480px;
    margin: 0 auto;
    padding: 20px 0 36px;
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: start;
    gap: 24px;
  }

  #dashboard>.shell>.side {
    position: sticky;
    top: 82px;
    align-self: start;
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 14px 12px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(24, 35, 48, .045);
  }

  #dashboard>.shell>.content {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0
  }

  #dashboard>.shell>.content>.welcome {
    margin: 0 0 17px;
    min-height: 42px;
    display: flex;
    align-items: center
  }

  #dashboard>.shell>.side .tabs {
    width: 100%;
    gap: 4px
  }

  #dashboard>.shell>.side .side-label {
    padding: 12px 9px 5px
  }

  #dashboard>.shell>.side .tab-btn {
    width: 100%;
    min-height: 42px;
    justify-content: flex-start
  }
}

@media(min-width:901px) and (max-width:1100px) {
  #dashboard>.shell {
    width: calc(100% - 36px);
    grid-template-columns: 205px minmax(0, 1fr);
    gap: 18px
  }

  #dashboard>.shell>.side {
    padding-inline: 9px
  }
}


/* MDC mobile admin header + drawer correction */
@media(max-width:900px) {
  .app-bar {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding-left: 12px;
    padding-right: 12px;
    overflow: visible;
  }

  .nav-toggle {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    min-width: 40px
  }

  .ab-brand {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    overflow: hidden
  }

  .ab-brand .ls-mark {
    flex: 0 0 36px
  }

  .ab-name {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis
  }

  .ab-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0
  }

  .ab-right>* {
    flex: 0 0 auto
  }

  .ab-user {
    display: flex;
    align-items: center;
    min-width: 0
  }

  .ab-logout {
    white-space: nowrap
  }

  .side {
    box-sizing: border-box;
    width: min(300px, calc(100vw - 48px));
    min-width: min(250px, calc(100vw - 48px));
    max-width: calc(100vw - 48px);
    padding-left: 14px;
    padding-right: 14px;
  }

  .side-head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff
  }

  .tabs {
    width: 100%;
    min-width: 0
  }

  .tab-btn {
    width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere
  }
}

@media(max-width:420px) {
  .app-bar {
    gap: 7px;
    padding-left: 8px;
    padding-right: 8px
  }

  .nav-toggle {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 8px
  }

  .ab-brand {
    flex: 0 1 auto
  }

  .ab-brand .ls-mark {
    width: 32px;
    height: 32px;
    flex-basis: 32px
  }

  .ab-name {
    display: none
  }

  .ab-right {
    margin-left: auto;
    gap: 5px
  }

  .theme-toggle {
    width: 32px;
    min-width: 32px;
    height: 32px;
    padding: 5px
  }

  .ab-user {
    display: none
  }

  .ab-logout {
    min-height: 32px;
    padding: 5px 7px;
    font-size: 10px
  }

  .side {
    width: min(280px, calc(100vw - 42px));
    min-width: min(245px, calc(100vw - 42px));
    max-width: calc(100vw - 42px)
  }
}

@media(max-width:340px) {
  .app-bar {
    gap: 6px
  }

  .theme-toggle {
    display: none
  }

  .ab-logout {
    display: none
  }

  .side-close {
    display: inline-flex
  }

  .side-logout {
    display: flex
  }
}

@media(max-width:900px) {
  body.nav-open {
    overflow: hidden
  }

  body.nav-open .app-bar {
    z-index: 50
  }

  .side-overlay {
    z-index: 75
  }

  .side {
    z-index: 80
  }
}


.fixed-hours-summary {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 16px 18px;
  border: 1px solid #e5d8ca;
  border-radius: 12px;
  background: #fbf7f2;
  color: #6f6257
}

.fixed-hours-summary strong {
  font-size: 24px;
  letter-spacing: .04em;
  color: #a96f4c
}

.fixed-hours-summary span {
  font-size: 13px;
  line-height: 1.5
}

.b-step[readonly] {
  background: #f4f1ed;
  color: #8a796b;
  cursor: not-allowed
}

/* Gece randevusu aç/kapat kontrolü */
.extended-hours-control {
  margin-top: 8px;
}

.extended-hours-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 14px;
  background: var(--surface-soft, #fbf8f4);
}

.extended-hours-row>div {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.extended-hours-row strong {
  color: #b8754e;
  font-size: 24px;
  letter-spacing: .02em;
}

.extended-hours-row span {
  color: var(--muted, #687386);
  font-size: 14px;
  line-height: 1.5;
}

.extended-hours-button {
  min-width: 160px;
  padding: 13px 20px;
  border: 0;
  border-radius: 9px;
  background: #263d50;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.extended-hours-button.is-open {
  background: #a85f3b;
}

.extended-hours-button:disabled {
  opacity: .6;
  cursor: wait;
}

@media(max-width:600px) {
  .extended-hours-row {
    align-items: stretch;
    flex-direction: column;
  }

  .extended-hours-button {
    width: 100%;
  }
}


/* FINAL MOBILE FIX: header anchored to physical viewport edges */
@media screen and (max-width: 900px) {

  html,
  body {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    inset: auto !important;
    overflow-x: hidden !important;
  }

  body {
    position: relative !important;
    left: 0 !important;
    top: 0 !important;
  }

  .app-bar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 56px !important;
    min-height: 56px !important;
    margin: 0 !important;
    padding: 0 8px !important;
    box-sizing: border-box !important;
    transform: none !important;
    translate: none !important;
    z-index: 100 !important;
  }

  /* Fixed header için içerik üstten başlamasın */
  body>main {
    padding-top: 56px !important;
  }

  .side {
    position: fixed !important;
    top: 56px !important;
    left: 0 !important;
    bottom: 0 !important;
    height: calc(100dvh - 56px) !important;
    max-height: calc(100dvh - 56px) !important;
    margin: 0 !important;
    padding: 10px 14px 24px !important;
    box-sizing: border-box !important;
    z-index: 110 !important;
  }

  .side-overlay {
    position: fixed !important;
    top: 56px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 105 !important;
  }
}

@media screen and (max-width: 480px) {
  .app-bar {
    display: grid !important;
    grid-template-columns: 34px minmax(0, 1fr) auto !important;
    gap: 6px !important;
  }
}


/* MDC: Menü açıldığında üst çubuktaki hamburger/X simgesini gizle.
   Menü panelindeki .side-close X düğmesi görünür kalır. */
@media (max-width: 900px) {
  .app-bar .nav-toggle[aria-expanded="true"] {
    display: none !important;
  }
}


/* ===== Manuel randevu: sade, editoryal ve adım odaklı düzen ===== */
#tab-manual-booking {
  padding: 0;
}
#tab-manual-booking.manual-booking {
  position: relative;
  overflow: hidden;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(22px, 3.2vw, 42px) clamp(20px, 4vw, 54px);
  background: #fff;
  border: 1px solid #e8ebef;
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(20, 34, 50, .045);
}
#tab-manual-booking.manual-booking::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #263d50 0%, #668092 100%);
}
#tab-manual-booking .mb-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 25px;
  border-bottom: 1px solid #edf0f2;
}
#tab-manual-booking .mb-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  color: #77838c;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .13em;
}
#tab-manual-booking .mb-kicker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b68b55;
  box-shadow: 0 0 0 4px #f7f1e9;
}
#tab-manual-booking .mb-heading h2 {
  margin: 0;
  color: #1e2d38;
  font-size: clamp(23px, 2.5vw, 30px);
  line-height: 1.2;
  letter-spacing: -.045em;
}
#tab-manual-booking .mb-heading p {
  margin: 9px 0 0;
  max-width: 650px;
  color: #7b8790;
  font-size: 13px;
  line-height: 1.7;
}
#tab-manual-booking .mb-heading-mark {
  display: grid;
  flex: 0 0 66px;
  width: 66px;
  height: 66px;
  place-items: center;
  color: #314b5d;
  background: #f2f5f6;
  border-radius: 20px;
}
#tab-manual-booking .mb-heading-mark svg {
  width: 36px;
  height: 36px;
}
#tab-manual-booking .mb-steps {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 23px 0 26px;
  border-bottom: 1px solid #edf0f2;
}
#tab-manual-booking .mb-steps > i {
  flex: 1;
  height: 1px;
  max-width: 100px;
  background: #e6eaed;
}
#tab-manual-booking .mb-step {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
#tab-manual-booking .mb-step > span {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #344e60;
  background: #edf2f4;
  border: 1px solid #e2e9ec;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
}
#tab-manual-booking .mb-step div {
  display: grid;
  gap: 2px;
}
#tab-manual-booking .mb-step b {
  color: #34434d;
  font-size: 11px;
  font-weight: 750;
}
#tab-manual-booking .mb-step small {
  color: #9aa3aa;
  font-size: 10px;
}
#tab-manual-booking .mb-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(18px, 3vw, 36px);
  row-gap: 20px;
  padding-top: 27px;
}
#tab-manual-booking .mb-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 8px;
}
#tab-manual-booking .mb-field label {
  color: #46545e;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .01em;
}
#tab-manual-booking .mb-field label em,
#tab-manual-booking .mb-required-note em {
  color: #b77e48;
  font-style: normal;
}
#tab-manual-booking .mb-field label small {
  margin-left: 5px;
  color: #a1aab0;
  font-size: 10px;
  font-weight: 500;
}
#tab-manual-booking .mb-field input,
#tab-manual-booking .mb-field select {
  min-height: 48px;
  padding: 12px 14px;
  color: #293943;
  background-color: #fbfcfc;
  border: 1px solid #dfe5e8;
  border-radius: 9px;
  font-size: 13px;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
#tab-manual-booking .mb-field input::placeholder {
  color: #aab3b9;
}
#tab-manual-booking .mb-field input:hover,
#tab-manual-booking .mb-field select:hover {
  background: #fff;
  border-color: #bdcbd2;
}
#tab-manual-booking .mb-field input:focus,
#tab-manual-booking .mb-field select:focus {
  background: #fff;
  border-color: #617d8e;
  box-shadow: 0 0 0 3px rgba(73, 105, 125, .11);
}
#tab-manual-booking .mb-field-note {
  grid-column: 1 / -1;
}
#tab-manual-booking .mb-form-footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 3px;
  padding-top: 20px;
  border-top: 1px solid #edf0f2;
}
#tab-manual-booking .mb-required-note {
  margin: 0;
  color: #9aa3aa;
  font-size: 10px;
}
#tab-manual-booking .mb-submit-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
#tab-manual-booking .mb-submit-wrap .msg-gold {
  margin: 0;
}
#tab-manual-booking .mb-submit {
  min-height: 47px;
  padding: 0 22px;
  color: #fff;
  background: #263e50;
  border: 1px solid #263e50;
  border-radius: 9px;
  box-shadow: 0 5px 13px rgba(38, 62, 80, .13);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .01em;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
#tab-manual-booking .mb-submit:hover {
  background: #1d3140;
  box-shadow: 0 8px 18px rgba(38, 62, 80, .18);
  transform: translateY(-1px);
}
#tab-manual-booking .mb-submit svg {
  width: 16px;
  height: 16px;
}
@media (max-width: 700px) {
  #tab-manual-booking.manual-booking {
    padding: 23px 19px;
    border-radius: 14px;
  }
  #tab-manual-booking .mb-heading-mark {
    flex-basis: 52px;
    width: 52px;
    height: 52px;
    border-radius: 15px;
  }
  #tab-manual-booking .mb-heading-mark svg {
    width: 30px;
    height: 30px;
  }
  #tab-manual-booking .mb-steps {
    gap: 9px;
    justify-content: space-between;
  }
  #tab-manual-booking .mb-steps > i {
    display: none;
  }
  #tab-manual-booking .mb-step {
    gap: 7px;
  }
  #tab-manual-booking .mb-step > span {
    flex-basis: 29px;
    width: 29px;
    height: 29px;
  }
  #tab-manual-booking .mb-step b {
    font-size: 10px;
  }
  #tab-manual-booking .mb-step small {
    display: none;
  }
  #tab-manual-booking .mb-form-grid {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 16px;
    padding-top: 22px;
  }
  #tab-manual-booking .mb-field-note,
  #tab-manual-booking .mb-form-footer {
    grid-column: 1;
  }
  #tab-manual-booking .mb-form-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  #tab-manual-booking .mb-submit-wrap {
    width: 100%;
    justify-content: stretch;
  }
  #tab-manual-booking .mb-submit {
    width: 100%;
  }
}
@media (max-width: 420px) {
  #tab-manual-booking .mb-heading-mark {
    display: none;
  }
  #tab-manual-booking .mb-step {
    flex-direction: column;
    align-items: flex-start;
  }
  #tab-manual-booking .mb-step div {
    min-height: 15px;
  }
}


/* Manuel randevu: açılır liste yerine dokunulabilir saat kartları */
.mb-time-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
  gap: 9px;
  margin-top: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface-2);
  min-height: 58px;
}
.mb-time-option {
  min-height: 43px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: 700 14px var(--font);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s, transform .15s;
}
.mb-time-option:hover { border-color: var(--brand); transform: translateY(-1px); }
.mb-time-option.selected {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 18%, transparent);
}
.mb-time-placeholder {
  grid-column: 1 / -1;
  align-self: center;
  color: var(--muted);
  font-size: 13px;
  padding: 7px 2px;
}
.mb-time-help { display:block; margin-top:7px; color:var(--muted); font-size:12px; }
@media (max-width: 520px) {
  .mb-time-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap:7px; padding:9px; }
  .mb-time-option { min-height:42px; }
}


/* Yönetim paneli: randevu, borç, hizmet ve ciro arayüzü */
.mb-barber-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:8px}
.mb-barber-card{display:flex;align-items:center;gap:12px;text-align:left;padding:14px;border:1px solid var(--line,#ddd);border-radius:16px;background:var(--panel,#fff);color:var(--text,inherit);cursor:pointer;transition:.18s ease}
.mb-barber-card:hover{border-color:#b89558;transform:translateY(-1px);background:rgba(184,149,88,.10);color:var(--text,inherit)}
.mb-barber-card.selected{border-color:#b89558;box-shadow:0 0 0 2px rgba(184,149,88,.2);background:rgba(184,149,88,.14)}
.mb-barber-avatar{display:grid;place-items:center;width:42px;height:42px;flex:0 0 42px;border-radius:50%;background:rgba(184,149,88,.18);font-weight:800;color:#a27b3d}
.mb-barber-card b{display:block}.mb-barber-card small{display:block;opacity:.65;margin-top:3px}
.mb-time-option{transition:background .15s ease,color .15s ease,border-color .15s ease}
.mb-time-option:hover,.mb-time-option:focus-visible{background:#b89558!important;border-color:#b89558!important;color:#17130d!important}
.mb-time-option.selected{background:#b89558!important;border-color:#b89558!important;color:#17130d!important}
.block-form-modern{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:18px;border:1px solid var(--line,#ddd);border-radius:18px;background:rgba(184,149,88,.045)}
.block-form-modern input,.block-form-modern button{min-height:46px;border-radius:11px}
.block-form-modern button{grid-column:1/-1}
.service-edit-row{grid-template-columns:minmax(140px,1fr) minmax(110px,.5fr) minmax(180px,1fr) auto!important;align-items:start}
.service-edit-row textarea,.service-description-field textarea{width:100%;min-height:64px;padding:10px 12px;border:1px solid var(--line,#ddd);border-radius:10px;background:var(--input-bg,transparent);color:inherit;font:inherit;resize:vertical}
.service-description-field{grid-column:1/-1}
#tab-debts .panel{border-radius:22px}
#tab-debts .crm-list{display:grid;gap:12px;margin-top:20px}
#tab-debts .crm-item{padding:18px;border:1px solid var(--line,#ddd);border-radius:16px;background:linear-gradient(135deg,rgba(184,149,88,.09),transparent 70%);box-shadow:0 8px 24px rgba(0,0,0,.035)}
.monthly-revenue-panel{min-height:250px;display:flex;flex-direction:column;justify-content:center;align-items:flex-start}
.monthly-revenue-value{font-size:clamp(2.5rem,7vw,4.8rem);font-weight:850;letter-spacing:-.055em;line-height:1.1;margin-top:18px;color:var(--gold,#b89558)}
#monthly-revenue-period{margin-bottom:0}
@media(max-width:720px){.mb-barber-cards{grid-template-columns:1fr}.block-form-modern{grid-template-columns:1fr}.service-edit-row{grid-template-columns:1fr 1fr!important}.service-edit-row textarea{grid-column:1/-1}.service-edit-row .srv-delete{grid-column:1/-1}}


.manual-booking-own-list{margin-top:24px;border-radius:18px}
.manual-booking-own-list h3{margin:4px 0 14px}
.manual-booking-item{display:grid;grid-template-columns:1.2fr 1fr auto 1fr;gap:12px;align-items:center}
#mb-date,.block-form-modern input[type=date],.block-form-modern input[type=time]{color-scheme:light;min-height:46px;border-radius:12px;padding:10px 12px}
@media(max-width:720px){.manual-booking-item{grid-template-columns:1fr 1fr}.manual-booking-item .crm-price{justify-self:start}}

/* Aylık kişisel ciro kartı ve randevu fiyat güncelleme */
.monthly-revenue-panel{position:relative;overflow:hidden;min-height:320px;padding:clamp(22px,4vw,38px);border:1px solid rgba(184,149,88,.28);border-radius:24px;background:radial-gradient(circle at 90% 5%,rgba(184,149,88,.18),transparent 34%),linear-gradient(135deg,var(--surface),var(--surface-2,#f8f6f1));box-shadow:0 18px 50px rgba(25,25,25,.06)}.monthly-revenue-panel .monthly-revenue-value{font-size:clamp(3rem,8vw,5.5rem);font-weight:850;letter-spacing:-.06em;line-height:1.05;margin:24px 0 12px;color:var(--gold,#b89558)}#monthly-revenue-month{max-width:220px;border-radius:12px;padding:11px 13px}.monthly-revenue-meta{width:min(100%,360px);display:flex;align-items:center;justify-content:space-between;margin-top:20px;padding:14px 16px;border-radius:14px;background:rgba(184,149,88,.10);border:1px solid rgba(184,149,88,.2)}.monthly-revenue-meta b{font-size:18px}.monthly-revenue-panel #monthly-revenue-period{font-size:13px;opacity:.72}.monthly-revenue-tab:not([hidden]){border-color:rgba(184,149,88,.3)}#appointments .ab-price{background:rgba(184,149,88,.12);color:var(--gold,#8a6a32);border-color:rgba(184,149,88,.35)}#appointments .ab-price:hover{background:var(--gold,#b89558);color:#fff}

/* Aylık ciro özet kartı */
.monthly-revenue-summary{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(220px,.7fr);gap:18px;margin-top:22px;align-items:stretch}
.monthly-revenue-total{padding:22px 24px;border-radius:18px;background:linear-gradient(135deg,rgba(184,149,88,.16),rgba(184,149,88,.045));border:1px solid rgba(184,149,88,.22);display:flex;flex-direction:column;gap:8px}
.monthly-revenue-total>span,.monthly-revenue-stats span{font-size:11px;font-weight:800;letter-spacing:.12em;color:var(--muted,#777)}
.monthly-revenue-panel .monthly-revenue-value{font-size:clamp(1.8rem,4vw,2.8rem);line-height:1.15;letter-spacing:-.035em;margin:2px 0;color:var(--gold,#b89558);overflow-wrap:anywhere}
.monthly-revenue-total small{font-size:12px;color:var(--muted,#777)}
.monthly-revenue-stats{display:grid;grid-template-columns:1fr;gap:10px}
.monthly-revenue-stats>div{padding:16px 18px;border:1px solid var(--line,rgba(0,0,0,.1));border-radius:16px;background:var(--surface,#fff);display:flex;justify-content:space-between;align-items:center;gap:12px}
.monthly-revenue-stats b{font-size:20px;font-weight:800}
@media(max-width:620px){.monthly-revenue-summary{grid-template-columns:1fr}.monthly-revenue-stats{grid-template-columns:1fr 1fr}.monthly-revenue-stats>div{align-items:flex-start;flex-direction:column}.monthly-revenue-stats b{font-size:17px}}

/* Responsive iyilestirmeler: randevu aksiyonlari ve tum panel */
#appointments .appt-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;}
#appointments .appt-actions .ab{min-width:0;width:100%;min-height:42px;padding:9px 10px;display:flex;align-items:center;justify-content:center;gap:7px;white-space:normal;line-height:1.2;text-align:center;}
#appointments .appt-actions .ab span{min-width:0;overflow-wrap:anywhere;font-size:13px;}
#appointments .appt-actions .ab-price{grid-column:auto;}
@media(min-width:901px){#appointments .appt-actions{grid-template-columns:repeat(5,minmax(76px,1fr));}}
@media(max-width:900px){
  html,body{max-width:100%;overflow-x:hidden}
  .admin-shell,.app-shell,.main-layout,.content,.panel,.tab-panel{min-width:0;max-width:100%}
  .content{padding-left:clamp(10px,3vw,20px);padding-right:clamp(10px,3vw,20px)}
  .appointment{min-width:0;grid-template-columns:minmax(52px,auto) minmax(0,1fr)!important;gap:10px!important}
  .appointment>*{min-width:0}
  .appointment .appt-actions{grid-column:1/-1;grid-template-columns:repeat(2,minmax(0,1fr));}
  .appointment .ap-info,.appointment .ap-info small{min-width:0;overflow-wrap:anywhere}
  .appointment .ap-info small{display:block;line-height:1.45}
  .appointment .ab{min-height:44px}
  input,select,textarea,button{max-width:100%}
  img,video,iframe{max-width:100%}
  .table-wrap,.table-responsive{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
}
@media(max-width:480px){
  #appointments .appt-actions{gap:7px}
  #appointments .appt-actions .ab{padding:9px 6px;min-height:46px}
  #appointments .appt-actions .ab span{font-size:12px}
  .appointment{padding:12px!important}
  .appointment .ap-info b{overflow-wrap:anywhere}
}
@media(min-width:901px) and (max-width:1200px){.content{min-width:0}.panel{min-width:0}}


/* GLOBAL RESPONSIVE HARDENING */
html, body { width:100%; max-width:100%; overflow-x:clip; }
*, *::before, *::after { box-sizing:border-box; }
main, .app, .app-main, .content, .tab-content, .panel, .panel > *, .list-header, .form-grid, .crm-grid-form { min-width:0; max-width:100%; }
img, svg, canvas { max-width:100%; }
input, select, textarea, button { max-width:100%; }
.panel { overflow-wrap:anywhere; }
.table-wrap, .turnover-table-wrap { width:100%; max-width:100%; min-width:0; }
.turnover-table { width:100%; min-width:0; table-layout:fixed; }
.turnover-table th, .turnover-table td { overflow-wrap:anywhere; word-break:normal; }
#block-form, .block-form-modern { width:100%; min-width:0; grid-template-columns:repeat(2,minmax(0,1fr)); }
#block-form > *, .block-form-modern > * { width:100%; min-width:0; max-width:100%; }
#block-form input[type="date"], #block-form input[type="time"], .block-form-modern input[type="date"], .block-form-modern input[type="time"] { display:block; min-width:0; width:100%; max-width:100%; padding-inline:10px; font-size:14px; }
#block-form input, #block-form button { min-width:0; }
@media(max-width:700px) {
 #tab-live-cash .turnover-table-wrap, #tab-daily-report .turnover-table-wrap { overflow:visible; width:100%; }
 #tab-live-cash .turnover-table, #tab-daily-report .turnover-table { display:block; width:100%; min-width:0; border:0; table-layout:auto; }
 #tab-live-cash .turnover-table thead, #tab-daily-report .turnover-table thead { display:none; }
 #tab-live-cash .turnover-table tbody, #tab-daily-report .turnover-table tbody { display:grid; gap:10px; width:100%; }
 #tab-live-cash .turnover-table tr, #tab-daily-report .turnover-table tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 12px; width:100%; padding:12px 13px; border:1px solid var(--line,#e6e9f1); border-radius:13px; background:var(--surface,#fff); }
 #tab-live-cash .turnover-table td, #tab-daily-report .turnover-table td { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:3px; min-width:0; padding:9px 2px; border:0; border-bottom:1px solid var(--line,#edf0f4); text-align:left; font-size:12px; overflow-wrap:anywhere; }
 #tab-live-cash .turnover-table td::before, #tab-daily-report .turnover-table td::before { content:attr(data-label); display:block; color:var(--muted,#6c768d); font-size:9px; line-height:1.3; font-weight:800; letter-spacing:.045em; }
 #tab-live-cash .turnover-table td:first-child, #tab-daily-report .turnover-table td:first-child { grid-column:1/-1; font-size:14px; font-weight:800; }
 #tab-live-cash .turnover-table .total-row, #tab-daily-report .turnover-table .total-row { background:#f8f4ed; border-color:rgba(184,149,88,.35); }
 #tab-live-cash .turnover-table .total-row td:first-child, #tab-daily-report .turnover-table .total-row td:first-child { color:#8c6840; }
 #tab-daily-report #past-reports-tbody tr { grid-template-columns:repeat(2,minmax(0,1fr)); }
 #tab-daily-report #past-reports-tbody td:first-child { grid-column:1/-1; }
 .list-header { align-items:flex-start; flex-wrap:wrap; gap:12px; }
 .list-header > * { min-width:0; max-width:100%; }
 .filter-controls { width:100%; }
 .filter-controls input { width:100%!important; }
}
@media(max-width:520px) {
 #block-form, .block-form-modern { grid-template-columns:minmax(0,1fr); padding:12px; gap:10px; }
 #block-form button, .block-form-modern button { grid-column:1; width:100%; }
 .panel { padding:15px!important; }
 .monthly-revenue-stats { grid-template-columns:1fr!important; }
 .monthly-revenue-stats > div { flex-direction:row!important; align-items:center!important; }
 .appointment, .crm-item, .manual-booking-item { min-width:0; max-width:100%; }
}


/* =========================================================
   SON DÜZENLEME — ADMIN PANELİ GENEL RESPONSIVE + BUTONLAR
   Bu bölüm mevcut stilleri bozmadan en alttan uygular.
   ========================================================= */

/* Genel taşma ve kutu ölçüleri */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

main,
.shell,
.content,
.panel,
.panel > *,
.title-row,
.list-header,
.crm-grid-form,
.appointments,
.appointment,
.crm-list,
.crm-item,
.expense-item,
.block-form,
.services-edit-grid,
.service-edit-row,
.service-add-form,
.images-edit-grid,
.barbers-edit-grid,
.barber-add-form,
.gallery-edit-grid {
  min-width: 0;
  max-width: 100%;
}

img,
svg,
canvas,
video,
iframe {
  max-width: 100%;
}

input,
select,
textarea,
button {
  max-width: 100%;
  min-width: 0;
}

.panel {
  overflow-wrap: break-word;
}

.table-wrap,
.table-responsive,
.turnover-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* Randevu kartı: fiyat, müşteri ve işlem alanları dengeli */
.appointment {
  grid-template-columns: 72px minmax(0, 1fr) minmax(64px, auto) minmax(330px, 1.45fr);
  gap: 12px;
  min-width: 0;
}

.appointment > * {
  min-width: 0;
}

.appointment > div,
.appointment .ap-info,
.appointment .ap-info small {
  overflow-wrap: break-word;
  word-break: normal;
}

.appointment .price {
  white-space: nowrap;
}

/* İşlem butonları: kelimeleri ortadan bölme, her butonu hizala */
.appointment .appt-actions,
#appointments .appt-actions {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  align-items: stretch;
  justify-content: stretch;
  gap: 7px !important;
  width: 100%;
  min-width: 0;
}

.appointment .appt-actions button,
#appointments .appt-actions button,
.appointment .appt-actions .ab,
#appointments .appt-actions .ab {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 46px;
  height: auto;
  padding: 7px 4px !important;
  text-align: center !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
  line-height: 1.2 !important;
  font-family: var(--font);
  font-size: 12px !important;
  font-weight: 650 !important;
  box-shadow: none;
}

.appointment .appt-actions button *,
#appointments .appt-actions button *,
.appointment .appt-actions .ab *,
#appointments .appt-actions .ab * {
  min-width: 0;
  max-width: 100%;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
  text-align: center;
}

.appointment .appt-actions button span,
#appointments .appt-actions button span,
.appointment .appt-actions .ab span,
#appointments .appt-actions .ab span {
  display: block !important;
  width: 100%;
  font-size: 11px !important;
  line-height: 1.2 !important;
}

.appointment .appt-actions button i,
#appointments .appt-actions button i {
  flex: 0 0 auto;
  font-style: normal;
  line-height: 1;
}

/* Butonların kendi renkleri korunur */
.appointment .appt-actions .btn-tick { color: var(--ok); }
.appointment .appt-actions .btn-cross { color: var(--bad); }
.appointment .appt-actions .btn-debt { color: var(--warn); }

/* Saat açma / kapama alanları */
.block-form,
#block-form,
.block-form-modern {
  width: 100%;
  min-width: 0;
}

.block-form > *,
#block-form > *,
.block-form-modern > * {
  min-width: 0;
  max-width: 100%;
}

.block-form input[type="date"],
.block-form input[type="time"],
#block-form input[type="date"],
#block-form input[type="time"],
.block-form-modern input[type="date"],
.block-form-modern input[type="time"] {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

/* Masaüstü / geniş tablet */
@media (max-width: 1200px) {
  .appointment {
    grid-template-columns: 68px minmax(0, 1fr) minmax(64px, auto);
  }

  .appointment .appt-actions {
    grid-column: 1 / -1;
  }
}

/* Tablet ve telefon */
@media (max-width: 900px) {
  main {
    width: 100%;
    padding-left: 14px;
    padding-right: 14px;
  }

  .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .content,
  .panel {
    width: 100%;
    min-width: 0;
  }

  .appointment {
    grid-template-columns: 64px minmax(0, 1fr) minmax(64px, auto) !important;
    gap: 8px 10px !important;
    padding: 13px !important;
  }

  .appointment .appt-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .appointment .appt-actions button,
  .appointment .appt-actions .ab {
    min-height: 44px;
    flex-direction: row !important;
    padding: 9px 7px !important;
    font-size: 12px !important;
  }

  .appointment .appt-actions button span,
  .appointment .appt-actions .ab span {
    width: auto;
    font-size: 12px !important;
  }

  .block-form,
  #block-form,
  .block-form-modern {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .turnover-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Küçük telefon */
@media (max-width: 600px) {
  main {
    padding: 0 10px 36px;
  }

  .app-bar {
    padding-left: 10px;
    padding-right: 10px;
  }

  .welcome {
    align-items: flex-start;
  }

  .welcome h1 {
    font-size: 21px;
    line-height: 1.25;
  }

  .panel {
    padding: 15px 12px !important;
    border-radius: 13px;
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .kpi {
    min-width: 0;
    padding: 13px 11px;
  }

  .kpi b {
    font-size: clamp(18px, 5vw, 22px);
    overflow-wrap: anywhere;
  }

  .appointment {
    grid-template-columns: 58px minmax(0, 1fr) !important;
    gap: 8px 10px !important;
    padding: 12px !important;
  }

  .appointment .price {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    text-align: left;
  }

  .appointment .appt-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .appointment .appt-actions button,
  .appointment .appt-actions .ab {
    min-height: 44px;
    padding: 8px 5px !important;
  }

  .block-form,
  #block-form,
  .block-form-modern,
  .service-add-form {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px;
  }

  .block-form > *,
  #block-form > *,
  .block-form-modern > *,
  .service-add-form > * {
    grid-column: 1 !important;
    width: 100%;
  }

  .service-edit-row {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .crm-grid-form,
  .barber-add-form,
  .barbers-edit-grid,
  .images-edit-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .gallery-edit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-controls {
    width: 100%;
    min-width: 0;
  }

  .filter-controls > * {
    min-width: 0;
    max-width: 100%;
  }

  .list-header {
    align-items: stretch;
  }

  .list-header > * {
    min-width: 0;
    max-width: 100%;
  }
}

/* Çok dar ekranlar */
@media (max-width: 360px) {
  main {
    padding-left: 7px;
    padding-right: 7px;
  }

  .panel {
    padding: 12px 9px !important;
  }

  .appointment {
    padding: 10px !important;
  }

  .appointment .appt-actions {
    gap: 6px !important;
  }

  .appointment .appt-actions button,
  .appointment .appt-actions .ab {
    font-size: 11px !important;
    padding: 7px 3px !important;
  }

  .appointment .appt-actions button span,
  .appointment .appt-actions .ab span {
    font-size: 11px !important;
  }

  .gallery-edit-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* Manuel randevu bağımsız sekmedir; ajanda içinde asla görünmez. */
#tab-manual-booking[hidden] {
  display: none !important;
}
#tab-manual-booking.manual-booking {
  display: block;
}
#tab-manual-booking.manual-booking[hidden] {
  display: none !important;
}


/* Sekme görünürlüğü: hidden niteliği CSS tarafından ezilmesin. */
[hidden] {
  display: none !important;
}

.notif-enable[hidden]{display:none!important}

/* ===================================================================
   v26 — TAM RESPONSIVE KATMAN (telefon · tablet · pc) — en sonda, diğer kuralları tamamlar
   =================================================================== */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{overflow-x:hidden;min-height:100dvh}
img,svg,video,canvas{max-width:100%;height:auto}
.panel,.panel>*,.tab-content,.content,.shell,.list-header,.form-grid,.crm-item,.appt,.appt-main,.appt-info{min-width:0}
.panel h2,.panel h3,.crm-item b,.crm-item small,.appt b,.appt small,.user-chip b,.ab-name{overflow-wrap:anywhere}
input,select,textarea,button{max-width:100%}
/* iOS: odaklanınca otomatik yakınlaştırma olmasın */
@media (max-width:900px){input,select,textarea{font-size:16px!important}}
/* dokunmatik hedefler */
@media (pointer:coarse){button,.tab-btn,.bottom-nav button,select,input[type=date],input[type=time],input[type=month]{min-height:44px}}
/* geniş tablolar kendi içinde kayar, sayfa yana kaymaz */
.table-wrap,.turnover-wrap,.table-scroll{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
table{max-width:100%}

/* ---- Üst çubuk: dar ekranlarda sıkışmasın ---- */
.app-bar{gap:8px;padding-top:max(8px,env(safe-area-inset-top))}
.ab-right{min-width:0;flex-wrap:nowrap}
.ab-name{min-width:0}
@media (max-width:640px){
  .ab-site{display:none}
  .ab-name small{display:none}
  .notif-enable{font-size:11px!important;padding:4px 8px!important;max-width:96px;white-space:normal!important;line-height:1.15!important;min-height:36px!important}
  .app-bar .user-chip .uc-txt{display:none}
  #logout{padding:6px 10px;font-size:12px}
}
@media (max-width:380px){
  .ab-brand .ab-name{display:none}
  .app-bar{padding-left:8px;padding-right:8px}
}

/* ---- Alt menü: çentikli telefonlarda güvenli alan, yatay telefonda alçak ---- */
.bottom-nav{padding-bottom:env(safe-area-inset-bottom,0)}
@media (max-width:900px){
  .content,.tab-content{padding-bottom:calc(92px + env(safe-area-inset-bottom,0))}
}
@media (max-height:480px) and (orientation:landscape){
  .bottom-nav button{padding:3px 0;font-size:10px}
  .bottom-nav button svg{width:18px;height:18px}
  .content,.tab-content{padding-bottom:70px}
  .login-screen{min-height:auto}
}

/* ---- Telefon ---- */
@media (max-width:600px){
  .panel{padding:16px 14px;border-radius:16px}
  .monthly-revenue-panel{align-items:stretch!important;min-height:0!important}
  .monthly-revenue-summary{grid-template-columns:1fr!important}
  .inline-label input{flex:none;height:auto}
  .form-grid,.crm-form,.manual-booking-grid{grid-template-columns:1fr!important}
  h1{font-size:clamp(22px,7vw,30px)}
}

/* ---- Tablet (601–1100): geniş içerik, 2 kolonlu formlar, kartlar ferah ---- */
@media (min-width:601px) and (max-width:1100px){
  .content{max-width:880px;margin-inline:auto}
  .monthly-revenue-panel{align-items:stretch}
  .monthly-revenue-summary{grid-template-columns:minmax(0,1.3fr) minmax(0,.7fr)}
  .kpi-grid,.kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media (min-width:601px) and (max-width:900px) and (orientation:portrait){
  .appt-list,.crm-list{display:grid;grid-template-columns:1fr;gap:12px}
}

/* ---- Küçük laptop / büyük tablet yatay (901–1199): kenar menü daralır ---- */
@media (min-width:901px) and (max-width:1199px){
  #dashboard>.shell{width:calc(100% - 24px);grid-template-columns:190px minmax(0,1fr);gap:14px}
  .kpi-grid,.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* ---- Geniş ekran: içerik çok uzamasın, kartlar 2 kolon ---- */
@media (min-width:1600px){
  #dashboard>.shell{max-width:1560px;margin-inline:auto}
  .kpi-grid,.kpis{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media (prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* ==========================================================
   DARK THEME PATCH — late legacy rules must not force light UI
   ========================================================== */
html[data-theme="dark"] body,
html[data-theme="dark"] #dashboard,
html[data-theme="dark"] .login-screen,
html[data-theme="dark"] .content,
html[data-theme="dark"] .shell {
  background-color: var(--bg) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] .side,
html[data-theme="dark"] .side-head,
html[data-theme="dark"] .app-bar,
html[data-theme="dark"] .bottom-nav,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .kpi,
html[data-theme="dark"] .card,
html[data-theme="dark"] .cal-dialog,
html[data-theme="dark"] .cal-modal > *,
html[data-theme="dark"] .toast,
html[data-theme="dark"] .img-preview,
html[data-theme="dark"] .manual-booking,
html[data-theme="dark"] #tab-manual-booking.manual-booking,
html[data-theme="dark"] .extended-hours-setting,
html[data-theme="dark"] .service-edit-row,
html[data-theme="dark"] .crm-item,
html[data-theme="dark"] .appt,
html[data-theme="dark"] .list-item,
html[data-theme="dark"] .user-card,
html[data-theme="dark"] .setting-card,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .modal-box,
html[data-theme="dark"] .dialog,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .popover,
html[data-theme="dark"] .table-wrap {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}
html[data-theme="dark"] .secondary,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .nav-toggle,
html[data-theme="dark"] .side-close,
html[data-theme="dark"] .btn-cross,
html[data-theme="dark"] #appointments .ab-no,
html[data-theme="dark"] .service-edit-row .srv-delete,
html[data-theme="dark"] .extended-hours-setting button {
  background: var(--surface-2) !important;
  color: var(--ink-2) !important;
  border-color: var(--line-2) !important;
}
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .mb-field input,
html[data-theme="dark"] .mb-field select {
  background-color: var(--surface-2) !important;
  color: var(--ink) !important;
  border-color: var(--line-2) !important;
  color-scheme: dark;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: var(--muted) !important;
}
html[data-theme="dark"] table,
html[data-theme="dark"] thead,
html[data-theme="dark"] tbody,
html[data-theme="dark"] tr,
html[data-theme="dark"] th,
html[data-theme="dark"] td,
html[data-theme="dark"] .table,
html[data-theme="dark"] .table thead th {
  background-color: transparent;
  color: var(--ink-2);
  border-color: var(--line) !important;
}
html[data-theme="dark"] .tab-btn,
html[data-theme="dark"] .nav-link,
html[data-theme="dark"] .side a,
html[data-theme="dark"] .side button,
html[data-theme="dark"] label,
html[data-theme="dark"] .muted-s,
html[data-theme="dark"] .form-hint,
html[data-theme="dark"] .mb-field label,
html[data-theme="dark"] .mb-heading p,
html[data-theme="dark"] .mb-step small {
  color: var(--ink-2);
}
html[data-theme="dark"] .tab-btn:hover,
html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .side a:hover,
html[data-theme="dark"] .side button:hover {
  background-color: var(--surface-2) !important;
  color: var(--ink) !important;
}
html[data-theme="dark"] .mb-field input:hover,
html[data-theme="dark"] .mb-field select:hover,
html[data-theme="dark"] .mb-field input:focus,
html[data-theme="dark"] .mb-field select:focus {
  background-color: var(--surface-2) !important;
  border-color: var(--brand) !important;
}
html[data-theme="dark"] .extended-hours-setting { color: var(--ink-2) !important; }
html[data-theme="dark"] .extended-hours-setting * { border-color: var(--line-2); }
html[data-theme="dark"] .ls-brand {
  background: radial-gradient(700px 420px at 10% 0, #222a58 0, transparent 62%), radial-gradient(520px 380px at 100% 100%, #14304d 0, transparent 60%), #10152a !important;
}
html[data-theme="dark"] .ls-user,
html[data-theme="dark"] .ls-list li,
html[data-theme="dark"] .barber-card,
html[data-theme="dark"] .service-card,
html[data-theme="dark"] .slot-card,
html[data-theme="dark"] .date-card {
  background: var(--surface-2) !important;
  color: var(--ink) !important;
  border-color: var(--line) !important;
}


/* ==========================================================
   MOBILE ADMIN POLISH — hızlı işlemler ve tek elle kullanım
   ========================================================== */
.mobile-shortcuts{display:none}
@media (max-width:900px){
  .mobile-shortcuts{
    display:grid;
    grid-template-columns:1.35fr 1fr 1fr;
    gap:8px;
    margin:0 0 14px;
  }
  .mobile-shortcut{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    min-width:0;
    min-height:48px;
    padding:9px 10px;
    border:1px solid var(--line);
    border-radius:14px;
    background:var(--surface);
    color:var(--ink);
    box-shadow:var(--sh-1);
    font:700 12px var(--font);
    white-space:nowrap;
    -webkit-tap-highlight-color:transparent;
    transition:transform .16s ease,background .16s ease,border-color .16s ease;
  }
  .mobile-shortcut:active{transform:scale(.97)}
  .mobile-shortcut .shortcut-symbol{
    display:grid;
    place-items:center;
    width:25px;height:25px;flex:none;
    border-radius:9px;
    background:var(--surface-2);
    color:var(--brand);
    font-size:17px;line-height:1;
  }
  .mobile-shortcut-primary{
    color:#fff;
    background:linear-gradient(135deg,var(--brand),var(--brand-strong,var(--brand)));
    border-color:transparent;
    box-shadow:0 7px 18px rgba(55,75,210,.2);
  }
  .mobile-shortcut-primary .shortcut-symbol{background:rgba(255,255,255,.18);color:#fff}
  .welcome{padding:4px 2px 2px;gap:5px;margin-bottom:13px}
  .welcome .eyebrow{font-size:10px;letter-spacing:.08em;font-weight:700}
  .welcome h1{font-size:clamp(20px,5.8vw,25px);letter-spacing:-.035em}
  .w-date{font-size:11px;padding:0;max-width:45%;text-align:right;line-height:1.35}
  .panel{box-shadow:0 5px 18px rgba(20,26,46,.045)}
  .panel h2{font-size:19px;line-height:1.25}
  .panel .hint{font-size:13px;line-height:1.55}
  .bottom-nav{padding-top:7px;padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right));}
  .bottom-nav button{min-height:58px;border-radius:13px;font-size:10px;letter-spacing:.01em}
  .bottom-nav button.active{font-weight:800;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--brand) 12%,transparent)}
  .bottom-nav button svg{width:21px;height:21px}
  .appointment{border-radius:15px!important;box-shadow:0 3px 12px rgba(20,26,46,.045)}
  .appointment .appt-actions{gap:8px!important}
  .appointment .appt-actions .ab{min-height:48px!important;border-radius:11px!important;font-weight:750}
  .appointment .ap-time{font-size:15px}
  .appointment .ap-info b{font-size:14px;line-height:1.35}
  .tab-content{scroll-margin-top:76px}
}
@media(max-width:380px){
  .mobile-shortcuts{gap:6px}
  .mobile-shortcut{padding:8px 6px;font-size:11px;gap:5px}
  .mobile-shortcut .shortcut-symbol{width:22px;height:22px}
  .w-date{font-size:10px}
  .bottom-nav button{font-size:9px}
}
@media(prefers-reduced-motion:reduce){.mobile-shortcut{transition:none}}
