/* =========================================================================
   Meya Studio — panel stilleri
   Tema renkleri (--primary, --bg, --surface, --sidebar, --accent, --text,
   --muted) ayarlardan gelir; geri kalan tonlar bunlardan türetilir.
   ========================================================================= */

:root {
  --primary: #2b2420; --primary-ink: #fff; --bg: #f7efe3; --surface: #fffcf7;
  --sidebar: #fbf6ee; --sidebar-ink: #221d19; --accent: #b9855a; --accent-ink: #fff;
  --text: #221d19; --muted: #7a6f64;

  --line: color-mix(in srgb, var(--text) 9%, transparent);
  --line-strong: color-mix(in srgb, var(--text) 15%, transparent);
  --surface-2: color-mix(in srgb, var(--surface) 55%, var(--bg));
  --hover: color-mix(in srgb, var(--text) 4%, transparent);
  --focus: color-mix(in srgb, var(--primary) 22%, transparent);
  --shadow-sm: 0 1px 2px rgba(60, 40, 20, .05);
  --shadow: 0 1px 2px rgba(60, 40, 20, .05), 0 6px 18px rgba(60, 40, 20, .06);
  --shadow-lg: 0 24px 60px rgba(40, 25, 10, .18), 0 2px 6px rgba(40, 25, 10, .08);
  --radius-sm: 10px; --radius: 14px; --radius-lg: 18px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --good: #1d6b31; --good-bg: #e3f4e7; --good-line: #bfe3c8;
  --bad: #a3302a; --bad-bg: #fbe6e4; --bad-line: #f2c5c0;
  --warn: #8a5a00; --warn-bg: #fdf3d7; --warn-line: #f3dc9f;
  --info: #1f4f8f; --info-bg: #e5eefb; --info-line: #c4d7f2;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 14.5px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 600; }
p { margin: 0; }
.ic { flex-shrink: 0; display: block; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.strong { font-weight: 600; }
.pos { color: var(--good); }
.neg { color: var(--bad); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden, [hidden] { display: none !important; }

/* ---------- Uygulama iskeleti ---------- */
.app { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--sidebar); color: var(--sidebar-ink);
  border-right: 1px solid color-mix(in srgb, var(--sidebar-ink) 9%, transparent);
  padding: 22px 18px 18px; display: flex; flex-direction: column; gap: 4px; z-index: 60;
}
.brand { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 6px 18px; }
.brand-link { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  background: var(--primary); color: var(--primary-ink); flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), var(--shadow-sm);
}
.brand-name { font-size: 20px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-label {
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600;
  color: color-mix(in srgb, var(--sidebar-ink) 55%, transparent); padding: 14px 12px 8px;
}
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px;
  color: color-mix(in srgb, var(--sidebar-ink) 82%, transparent); font-weight: 500; font-size: 15px;
  transition: background .15s, color .15s; position: relative;
}
.nav-item:hover { background: color-mix(in srgb, var(--sidebar-ink) 6%, transparent); color: var(--sidebar-ink); }
.nav-item.active {
  background: var(--primary); color: var(--primary-ink); font-weight: 600;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 28%, transparent);
}
.nav-item span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-count {
  margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 700; min-width: 22px; height: 22px;
  padding: 0 6px; border-radius: 999px; display: grid; place-items: center;
  background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line);
}
.sidebar-foot { margin-top: auto; padding-top: 18px; }
.sidebar-backdrop { display: none; }

/* Daraltılmış menü (masaüstü) */
.app.collapsed { grid-template-columns: 86px minmax(0, 1fr); }
.app.collapsed .brand-name, .app.collapsed .nav-item span, .app.collapsed .nav-label,
.app.collapsed .nav-count { display: none; }
.app.collapsed .brand { flex-direction: column; padding-bottom: 10px; }
.app.collapsed .nav-item { justify-content: center; padding: 12px; }
.app.collapsed .nav-label { display: block; height: 1px; padding: 0; margin: 12px 8px; background: var(--line); font-size: 0; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40; height: 78px; display: flex; align-items: center; gap: 16px;
  padding: 0 28px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 78%, transparent); backdrop-filter: blur(10px);
}
.topbar-title { font-size: 22px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; min-width: 160px; }
.icon-btn.menu-btn { display: none; }
.search {
  flex: 0 1 420px; margin: 0 auto; display: flex; align-items: center; gap: 10px; height: 48px;
  padding: 0 8px 0 14px; border: 1px solid var(--line-strong); border-radius: 13px; background: var(--surface);
  color: var(--muted);
}
.search:focus-within { box-shadow: 0 0 0 4px var(--focus); border-color: color-mix(in srgb, var(--primary) 40%, transparent); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; height: 100%; color: var(--text); }
.search input::placeholder { color: var(--muted); }
.kbd { display: flex; gap: 5px; }
kbd {
  font-family: var(--font); font-size: 12px; min-width: 30px; height: 30px; display: grid; place-items: center;
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-2); color: var(--text);
}
.topbar-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.user-chip { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 4px 6px 4px 4px; border-radius: 14px; }
.user-chip:hover { background: var(--hover); }
.user-meta { display: flex; flex-direction: column; line-height: 1.25; }
.user-meta strong { font-size: 15px; }
.user-meta small { color: var(--muted); font-size: 13px; }

.content { padding: 26px 28px 56px; display: flex; flex-direction: column; gap: 20px; }

/* ---------- Ortak bileşenler ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 0; flex-wrap: wrap; }
.card-head h3 { font-size: 16.5px; }
.card-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.card-body { padding: 16px 20px 20px; }
.card-body.flush { padding: 12px 0 0; }
.card-foot { padding: 12px 20px 16px; border-top: 1px solid var(--line); }

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h2 { font-size: 26px; font-weight: 500; letter-spacing: -.02em; }
.page-head h2 strong { font-weight: 700; }
.page-head p { color: var(--muted); margin-top: 4px; }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.grid { display: grid; gap: 18px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split-main { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
.split-side { grid-template-columns: minmax(0, 1fr) minmax(300px, 370px); }

/* Butonlar */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px;
  border-radius: 12px; border: 1px solid transparent; font-weight: 600; font-size: 14.5px; cursor: pointer;
  background: var(--surface); white-space: nowrap; transition: filter .15s, background .15s, box-shadow .15s;
}
.btn:focus-visible, .icon-btn:focus-visible, .nav-item:focus-visible { outline: 0; box-shadow: 0 0 0 4px var(--focus); }
.btn-primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 24%, transparent); }
.btn-primary:hover { filter: brightness(1.12); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { filter: brightness(1.06); }
.btn-outline { border-color: var(--line-strong); color: var(--text); }
.btn-outline:hover, .btn-ghost:hover { background: var(--hover); }
.btn-ghost { background: transparent; }
.btn-danger { background: transparent; color: var(--bad); border-color: var(--bad-line); }
.btn-danger:hover { background: var(--bad-bg); }
.btn-good { background: #2e7d43; color: #fff; }
.btn-good:hover { filter: brightness(1.08); }
.btn-sm { height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 10px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.icon-btn {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; position: relative;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); cursor: pointer; list-style: none;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.sm { width: 34px; height: 34px; border-radius: 10px; }
.icon-btn.ghost { border-color: transparent; background: transparent; }
.icon-btn.ghost:hover { background: var(--hover); }
.icon-btn .dot { position: absolute; top: 10px; right: 11px; width: 9px; height: 9px; border-radius: 50%; background: #d63b3b; box-shadow: 0 0 0 2px var(--surface); }

/* Dropdown (details) */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; z-index: 70;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px;
}
.dropdown-menu.wide { width: 330px; }
.dropdown-menu.left { right: auto; left: 0; }
.dropdown-menu a, .dropdown-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 9px;
  border: 0; background: none; cursor: pointer; text-align: left; font-size: 14px;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--hover); }
.dropdown-menu .danger { color: var(--bad); }
.dropdown-menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
.dropdown-head { display: flex; justify-content: space-between; font-weight: 600; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.dropdown-foot { justify-content: center; font-weight: 600; border-top: 1px solid var(--line); margin-top: 4px; border-radius: 0 0 9px 9px !important; }
.notif-item > span:not(.avatar) { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.notif-item small { color: var(--muted); }
.empty-sm { padding: 14px 10px; color: var(--muted); font-size: 13.5px; }

/* Rozetler */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; border: 1px solid; white-space: nowrap; line-height: 1.5;
}
.badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-pending   { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.badge-confirmed { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.badge-completed { background: var(--good-bg); color: var(--good); border-color: var(--good-line); }
.badge-cancelled { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.badge-no_show   { background: #f0e9e2; color: #6a5d50; border-color: #ddd1c4; }
.badge-neutral   { background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.badge-good      { background: var(--good-bg); color: var(--good); border-color: var(--good-line); }
.badge-bad       { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.label {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600;
  background: color-mix(in srgb, var(--c) 11%, var(--surface)); color: color-mix(in srgb, var(--c) 72%, var(--text));
  border: 1px solid color-mix(in srgb, var(--c) 26%, transparent); white-space: nowrap;
}
.label i { width: 7px; height: 7px; border-radius: 2px; background: var(--c); }
.chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; border: 1px solid;
}
.chip.up { background: var(--good-bg); color: var(--good); border-color: var(--good-line); }
.chip.down { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.chip.flat { background: var(--surface-2); color: var(--muted); border-color: var(--line); }

/* span.avatar: kapsayıcıdaki "x span" kuralları baş harfleri kaydırmasın */
span.avatar, .avatar {
  width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-weight: 700; font-size: 13px; letter-spacing: .02em; line-height: 1; text-align: center;
}
.avatar.sm { width: 30px; height: 30px; font-size: 11.5px; }
.avatar.lg { width: 68px; height: 68px; font-size: 23px; }
.person { display: flex; align-items: center; gap: 11px; min-width: 0; }
.person > span:not(.avatar) { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.person strong { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person small { color: var(--muted); font-size: 12.5px; }
.color-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--c); flex-shrink: 0; }

/* Formlar */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field-label { font-size: 13px; font-weight: 600; }
.field .hint { font-size: 12.5px; color: var(--muted); }
.input, .field input:not([type=checkbox]):not([type=radio]):not([type=color]), .field select, .field textarea, .filters select, .filters input {
  width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 11px;
  background: var(--surface); color: var(--text); outline: 0; transition: box-shadow .15s, border-color .15s;
}
.field textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .filters select:focus, .filters input:focus, .input:focus {
  border-color: color-mix(in srgb, var(--primary) 45%, transparent); box-shadow: 0 0 0 4px var(--focus);
}
.input-group { display: flex; align-items: stretch; }
.input-group .addon {
  display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line-strong); border-right: 0;
  border-radius: 11px 0 0 11px; background: var(--surface-2); color: var(--muted); font-weight: 600;
}
.input-group input { border-radius: 0 11px 11px 0 !important; }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 14px; }
.check-group { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.check-group + .check-group { margin-top: 10px; }
.check-group legend { font-weight: 600; font-size: 13px; padding: 0 6px; }
.form-error { background: var(--bad-bg); color: var(--bad); border: 1px solid var(--bad-line); border-radius: 11px; padding: 10px 12px; font-size: 13.5px; }
.form-warn { background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); border-radius: 11px; padding: 10px 12px; font-size: 13.5px; }

/* Filtre çubuğu */
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.filters .field { min-width: 150px; flex: 0 1 190px; }
.filters .grow { flex: 1 1 240px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.summary-pill { display: flex; align-items: baseline; gap: 10px; color: var(--muted); }
.summary-pill strong { font-size: 22px; color: var(--text); letter-spacing: -.01em; }

/* Segment kontrol */
.seg { display: inline-flex; padding: 4px; gap: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.seg a, .seg button {
  padding: 7px 14px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--muted);
  border: 0; background: none; cursor: pointer; white-space: nowrap;
}
.seg .on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }

/* Tablo */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table thead th {
  background: var(--surface-2); color: var(--muted); text-transform: uppercase; font-size: 11.5px;
  letter-spacing: .05em; font-weight: 600; padding: 12px 14px; text-align: left; white-space: nowrap;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.table thead th:first-child { border-left: 1px solid var(--line); border-radius: 11px 0 0 11px; }
.table thead th:last-child { border-right: 1px solid var(--line); border-radius: 0 11px 11px 0; }
.table thead th.num { text-align: right; }
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--hover); }
.table tfoot td { padding: 13px 14px; font-weight: 700; border-top: 1px solid var(--line-strong); }
.table .row-link { cursor: pointer; }
.table-pad { padding: 0 20px 8px; }
.sort { display: inline-flex; gap: 6px; align-items: center; }
.sort span { opacity: .55; font-size: 12px; }
.sort.on { color: var(--text); }
.sort.on span { opacity: 1; }
.cell-actions { display: flex; gap: 4px; justify-content: flex-end; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .ic { margin: 0 auto 10px; opacity: .6; }

.pagination { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 20px 18px; flex-wrap: wrap; font-size: 13.5px; }
.pagination div { display: flex; gap: 4px; }
.pagination a, .pagination .dots { min-width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); font-weight: 600; }
.pagination .dots { border: 0; }
.pagination a.active { background: var(--primary); color: var(--primary-ink); border-color: transparent; }

/* Bildirim mesajları */
.flash {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid; font-weight: 500;
}
.flash span { flex: 1; }
.flash-success { background: var(--good-bg); color: var(--good); border-color: var(--good-line); }
.flash-error { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.flash-x { border: 0; background: none; cursor: pointer; color: inherit; opacity: .7; padding: 2px; }
.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 200; max-width: 360px; padding: 12px 16px; border-radius: 12px;
  background: var(--primary); color: var(--primary-ink); box-shadow: var(--shadow-lg); font-weight: 600;
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: none; }
.toast.error { background: #a3302a; color: #fff; }

/* Modal */
.modal {
  border: 0; padding: 0; border-radius: 20px; width: min(580px, calc(100vw - 24px)); max-height: calc(100vh - 32px);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); overflow: hidden;
}
.modal.wide { width: min(760px, calc(100vw - 24px)); }
.modal.narrow { width: min(440px, calc(100vw - 24px)); }
.modal[open] { display: flex; flex-direction: column; animation: pop .18s ease-out; }
.modal::backdrop { background: rgba(35, 24, 14, .38); backdrop-filter: blur(2px); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.modal form { display: flex; flex-direction: column; min-height: 0; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 6px; }
.modal-head h3 { font-size: 18px; }
.modal-head p { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.modal-body { padding: 14px 22px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 14px 22px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }

/* ---------- Gösterge paneli ---------- */
.stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 6px; min-width: 0; }
.stat-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 9px 12px; color: var(--muted); font-size: 14px; }
.stat-head a { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; }
.stat-head a:hover { background: var(--hover); color: var(--text); }
.stat-inner { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 18px 18px 16px; box-shadow: var(--shadow); }
.stat-value { display: flex; align-items: flex-start; gap: 8px; font-size: 31px; font-weight: 600; letter-spacing: -.025em; line-height: 1.1; white-space: nowrap; }
.stat-unit { font-size: 15px; font-weight: 500; letter-spacing: 0; margin-top: 3px; }
.stat-sub { margin-top: 12px; font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 26px; }
.stat-sub .sep { width: 1px; height: 16px; background: var(--line-strong); }
.t-warn { color: #b07400; font-weight: 600; }
.t-bad { color: var(--bad); font-weight: 600; }
.t-good { color: var(--good); font-weight: 600; }
.t-info { color: var(--info); font-weight: 600; }

.day-strip { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.day-pills { display: flex; gap: 2px; padding: 5px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); overflow-x: auto; }
.day-pill { min-width: 62px; padding: 6px 4px; border-radius: 10px; text-align: center; font-weight: 600; font-size: 15px; line-height: 1.2; }
.day-pill small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.day-pill:hover { background: var(--hover); }
.day-pill.on { background: var(--primary); color: var(--primary-ink); box-shadow: var(--shadow); }
.day-pill.on small { color: inherit; opacity: .75; }
.day-pill.today:not(.on) { box-shadow: inset 0 0 0 1px var(--line-strong); }

.appt-list { display: flex; flex-direction: column; gap: 10px; }
.appt-row {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.2fr) auto auto; align-items: center; gap: 14px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
}
.appt-row:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.appt-meta { display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; min-width: 0; }
.appt-meta span { display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt-meta .ic { color: var(--muted); }
.appt-scroll { max-height: 452px; overflow-y: auto; padding-right: 2px; }

.insights { display: flex; flex-direction: column; gap: 10px; }
.insight { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--surface); }
.insight-head { display: flex; align-items: center; gap: 10px; font-weight: 600; padding-bottom: 9px; border-bottom: 1px solid var(--line); margin-bottom: 9px; font-size: 14.5px; }
.insight-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0;
  background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: color-mix(in srgb, var(--accent) 75%, var(--text)); }
.insight p { font-size: 13.5px; color: var(--muted); }
.insight p b { color: var(--text); font-weight: 600; }
.insight a.more { font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; }

/* ---------- Grafikler ---------- */
.chart { position: relative; width: 100%; }
.chart svg { display: block; overflow: visible; }
.chart text { font-family: var(--font); font-size: 11.5px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .base-line { stroke: var(--line-strong); stroke-width: 1; }
.chart .hover-band { fill: var(--text); opacity: 0; }
.chart .hover-band.on { opacity: .045; }
.chart-tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 150px; padding: 10px 12px; border-radius: 11px;
  background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); font-size: 13px;
  opacity: 0; transition: opacity .12s; white-space: nowrap;
}
.chart-tip.on { opacity: 1; }
.chart-tip .tt { font-weight: 700; margin-bottom: 6px; }
.chart-tip .tr { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.chart-tip .tr span { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.chart-tip .tr i { width: 9px; height: 9px; border-radius: 3px; background: var(--c); }
.chart-tip .tr b { font-variant-numeric: tabular-nums; }
.chart-tip .tr.total { border-top: 1px solid var(--line); margin-top: 5px; padding-top: 5px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.chart-table { margin-top: 8px; max-height: 320px; overflow: auto; }
.chart-table .table td, .chart-table .table th { padding: 8px 10px; }
.link-btn { border: 0; background: none; padding: 0; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.link-btn:hover { color: var(--text); }

.hbars { display: flex; flex-direction: column; gap: 12px; }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: 13.5px; }
.hbar .hb-label { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hbar .hb-label span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar .hb-val { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.hbar .hb-val small { color: var(--muted); font-weight: 500; margin-left: 6px; }
.hbar .hb-track { grid-column: 1 / -1; height: 9px; border-radius: 4px; background: color-mix(in srgb, var(--text) 6%, transparent); }
.hbar .hb-fill { height: 100%; border-radius: 4px; background: var(--c); min-width: 3px; }

.segbar { display: flex; gap: 2px; height: 14px; border-radius: 5px; overflow: hidden; background: var(--surface); }
.segbar span { background: var(--c); min-width: 3px; }
.seg-legend { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.seg-legend div { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.seg-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex-shrink: 0; }
.seg-legend b { margin-left: auto; font-variant-numeric: tabular-nums; }
.seg-legend small { color: var(--muted); margin-left: 4px; font-weight: 500; }

.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; min-width: 0; }
.kpi .k-label { color: var(--muted); font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.kpi .k-value { font-size: 26px; font-weight: 600; letter-spacing: -.02em; margin-top: 6px; white-space: nowrap; display: flex; align-items: center; gap: 10px; }
.kpi .k-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.kpi.highlight { background: var(--primary); color: var(--primary-ink); border-color: transparent; }
.kpi.highlight .k-label, .kpi.highlight .k-sub { color: color-mix(in srgb, var(--primary-ink) 72%, transparent); }

/* ---------- Takvim ---------- */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav h3 { font-size: 19px; min-width: 190px; }
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.cal-dow { padding: 10px 12px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.cal-cell {
  min-height: 128px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px; cursor: pointer; min-width: 0; transition: background .12s;
}
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell:hover { background: var(--hover); }
.cal-cell.other { background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.cal-cell.other .cal-daynum { color: var(--muted); font-weight: 500; }
.cal-cell.closed { background-image: repeating-linear-gradient(135deg, transparent 0 9px, color-mix(in srgb, var(--text) 3%, transparent) 9px 10px); }
.cal-cell-head { display: flex; align-items: center; justify-content: space-between; }
.cal-daynum { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 600; font-size: 13.5px; }
.cal-cell.today .cal-daynum { background: var(--primary); color: var(--primary-ink); }
.cal-count { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.cal-count b { font-weight: 700; }
.cal-dow .ds { display: none; }
.cal-chip {
  display: flex; align-items: center; gap: 6px; font-size: 12px; padding: 3px 7px; border-radius: 7px; min-width: 0;
  background: color-mix(in srgb, var(--c) 11%, var(--surface)); border-left: 3px solid var(--c); line-height: 1.45;
}
.cal-chip b { font-weight: 700; font-variant-numeric: tabular-nums; }
.cal-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-chip.st-cancelled, .cal-chip.st-no_show { opacity: .6; }
.cal-chip.st-cancelled span { text-decoration: line-through; }
.cal-chip:hover { filter: brightness(.97); }
.cal-more { font-size: 12px; color: var(--muted); font-weight: 600; padding: 2px 4px; border-radius: 6px; align-self: flex-start; }
.cal-more:hover { background: var(--hover); color: var(--text); }

/* Saat ızgarası (hafta / gün) */
.tg-scroll { overflow: auto; max-height: calc(100vh - 250px); min-height: 420px; border-top: 1px solid var(--line); }
.tg { display: grid; position: relative; }
.tg-corner, .tg-colhead { position: sticky; top: 0; z-index: 4; background: var(--surface); border-bottom: 1px solid var(--line); }
.tg-corner { left: 0; z-index: 5; }
.tg-colhead { padding: 10px 10px; border-left: 1px solid var(--line); display: flex; align-items: center; gap: 10px; min-height: 60px; }
.tg-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.tg-who b, .tg-who small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-colhead { min-width: 0; }
.tg-colhead.today { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.tg-colhead .d-num { font-size: 20px; font-weight: 700; line-height: 1; }
.tg-colhead small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }
.tg-colhead.today .d-num { color: color-mix(in srgb, var(--accent) 80%, var(--text)); }
.tg-axis { position: sticky; left: 0; z-index: 3; background: var(--surface); }
.tg-axis div { height: var(--hour-h); font-size: 11.5px; color: var(--muted); text-align: right; padding: 3px 10px 0 0; font-variant-numeric: tabular-nums; border-top: 1px solid var(--line); }
.tg-col {
  position: relative; border-left: 1px solid var(--line); cursor: copy;
  background-image:
    linear-gradient(to bottom, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--text) 4%, transparent) 1px, transparent 1px);
  background-size: 100% var(--hour-h), 100% calc(var(--hour-h) / 2);
  background-position: 0 0, 0 calc(var(--hour-h) / 2);
}
.tg-col.closed { background-color: color-mix(in srgb, var(--surface-2) 70%, transparent); cursor: not-allowed; }
.tg-col:hover .tg-ghost { display: block; }
.tg-ghost { display: none; position: absolute; left: 4px; right: 4px; height: calc(var(--hour-h) / 2); border-radius: 8px; background: color-mix(in srgb, var(--primary) 8%, transparent); border: 1px dashed color-mix(in srgb, var(--primary) 35%, transparent); pointer-events: none; font-size: 11.5px; padding: 2px 8px; color: var(--muted); font-weight: 600; }
.tg-block {
  position: absolute; z-index: 2; border-radius: 9px; padding: 5px 8px; overflow: hidden; cursor: pointer; font-size: 12px; line-height: 1.35;
  background: color-mix(in srgb, var(--c) 13%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  border-left: 3px solid var(--c); box-shadow: 0 0 0 2px var(--surface); transition: box-shadow .12s;
}
.tg-block:hover { box-shadow: 0 0 0 2px var(--surface), var(--shadow); z-index: 3; }
.tg-block .tb-time { font-weight: 700; font-variant-numeric: tabular-nums; display: flex; justify-content: space-between; gap: 6px; }
.tg-block .tb-time em { font-style: normal; font-weight: 600; color: color-mix(in srgb, var(--c) 80%, var(--text)); white-space: nowrap; }
.tg-block .tb-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-block .tb-t { font-variant-numeric: tabular-nums; }
.tg-block .tb-svc { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 5px; }
.tg-block.st-cancelled, .tg-block.st-no_show { opacity: .62; }
.tg-block.st-cancelled .tb-name { text-decoration: line-through; }
.tg-now { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid #c0392b; z-index: 3; pointer-events: none; }
.tg-now::before { content: ""; position: absolute; left: -6px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: #c0392b; }

/* Randevu detayı */
.detail-head { display: flex; align-items: center; gap: 14px; }
.detail-head .person strong { font-size: 17px; }
.contact-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.contact-links a { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line-strong); }
.contact-links a:hover { background: var(--hover); }
.contact-links a.wa { color: #1b7f45; border-color: #bfe3c8; background: #eef8f1; }
.detail-list { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px 14px; font-size: 14px; margin: 0; }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; font-weight: 500; }
.pay-panel { border: 1px solid var(--good-line); background: color-mix(in srgb, var(--good-bg) 55%, var(--surface)); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.pay-panel h4 { font-size: 14.5px; display: flex; align-items: center; gap: 8px; color: var(--good); }
.code { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .12em; font-weight: 700; }

/* Combobox */
.combo { position: relative; }
.combo-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; max-height: 250px; overflow-y: auto; z-index: 10;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 4px;
}
.combo-opt { display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.combo-opt small { color: var(--muted); }
.combo-opt.on, .combo-opt:hover { background: var(--hover); }
.combo-new { color: var(--text); font-weight: 600; border-top: 1px solid var(--line); margin-top: 4px; border-radius: 0 0 8px 8px; }
.new-customer { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 12px; }

/* Müşteri profili */
.profile { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.profile h2 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.profile-meta { display: flex; gap: 6px 18px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin-top: 6px; }
.profile-meta span { display: inline-flex; align-items: center; gap: 6px; }
.note-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14px; white-space: pre-line; }

/* Personel kartları */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.staff-card { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.staff-card.inactive { opacity: .6; }
.staff-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.staff-stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.staff-stats div { padding: 10px 12px; }
.staff-stats div + div { border-left: 1px solid var(--line); }
.staff-stats small { display: block; color: var(--muted); font-size: 12px; }
.staff-stats b { font-size: 15px; font-variant-numeric: tabular-nums; }
.staff-info { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; color: var(--muted); }
.staff-info span { display: flex; align-items: center; gap: 8px; }

/* Kategori yönetimi listesi */
.cat-list { display: flex; flex-direction: column; gap: 6px; }
.cat-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 11px; }
.cat-item form { display: contents; }
.cat-item input[type=text] { flex: 1; min-width: 0; height: 34px; border: 1px solid transparent; background: transparent; border-radius: 8px; padding: 0 8px; }
.cat-item input[type=text]:focus { border-color: var(--line-strong); background: var(--surface); outline: 0; }
input[type=color] { width: 34px; height: 34px; padding: 2px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); cursor: pointer; flex-shrink: 0; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 6px; }

/* Ayarlar */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tabs a.on { color: var(--text); border-color: var(--primary); }
.color-field { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.color-field input[type=color] { width: 48px; height: 48px; border-radius: 12px; }
.color-field input[type=text] { width: 110px; height: 38px; font-family: ui-monospace, Menlo, monospace; font-size: 13px; }
.color-field .cf-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.color-field .cf-text small { color: var(--muted); font-size: 12.5px; }
.presets { display: flex; flex-wrap: wrap; gap: 10px; }
.preset { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); cursor: pointer; font-weight: 600; font-size: 13.5px; }
.preset:hover { background: var(--hover); }
.preset .sw { display: flex; border-radius: 8px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.preset .sw i { width: 14px; height: 28px; }
.theme-preview { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: grid; grid-template-columns: 120px 1fr; min-height: 200px; }
.theme-preview .tp-side { background: var(--sidebar); padding: 14px 10px; display: flex; flex-direction: column; gap: 6px; }
.theme-preview .tp-side i { height: 10px; border-radius: 4px; background: color-mix(in srgb, var(--sidebar-ink) 14%, transparent); }
.theme-preview .tp-side i.on { background: var(--primary); height: 24px; border-radius: 7px; }
.theme-preview .tp-main { background: var(--bg); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.theme-preview .tp-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; justify-content: space-between; align-items: center; color: var(--text); font-weight: 600; font-size: 13px; }
.theme-preview .tp-btn { background: var(--primary); color: var(--primary-ink); border-radius: 8px; padding: 6px 10px; font-size: 12px; }
.theme-preview .tp-accent { background: var(--accent); color: var(--accent-ink); border-radius: 8px; padding: 6px 10px; font-size: 12px; }
.section-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.section-desc { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
.day-checks { display: flex; gap: 6px; flex-wrap: wrap; }
.day-checks label { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 13.5px; }
.day-checks input { accent-color: var(--primary); }

/* Online randevu kanalı, satır içi ikonlar */
.ic.inline-ic { display: inline-block; vertical-align: -2px; }
.badge-online { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: color-mix(in srgb, var(--accent) 70%, var(--text)); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.badge-online .ic { margin-left: -2px; }
.notif-item .notif-src { margin-left: auto; flex-direction: row; align-items: center; gap: 4px; font-size: 11.5px; padding: 2px 8px; }
.tb-online { display: inline-flex; vertical-align: -2px; margin-right: 3px; color: color-mix(in srgb, var(--accent) 75%, var(--text)); }
.tb-online .ic { display: inline-block; }

/* ---------- Form bileşenleri (widgets.js) ---------- */
.opt { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
  color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); vertical-align: 1px; }
.wfield { position: relative; display: block; min-width: 0; }
.w-display { display: flex; align-items: center; width: 100%; height: 44px; padding: 0 38px 0 12px; text-align: left; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 11px; background: var(--surface); color: var(--text); font: inherit;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-display.is-empty { color: var(--muted); }
.w-display:focus-visible { outline: 0; border-color: color-mix(in srgb, var(--primary) 45%, transparent); box-shadow: 0 0 0 4px var(--focus); }
.w-ic { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; display: flex; }
.actions .wfield, .cal-toolbar .wfield { display: inline-block; }
.wpop { position: fixed; z-index: 1000; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong);
  border-radius: 14px; box-shadow: var(--shadow-lg); padding: 10px; }
.dp-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.dp-head select { flex: 1; min-width: 0; height: 34px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 9px;
  background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: 14px; }
.dp-title { flex: 1; text-align: center; font-size: 15px; }
.dp-nav { width: 34px; height: 34px; flex-shrink: 0; display: grid; place-items: center; border: 1px solid var(--line-strong);
  border-radius: 9px; background: var(--surface); color: var(--text); cursor: pointer; }
.dp-nav:hover { background: var(--hover); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 38px); gap: 2px; }
.dp-dow { font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; padding: 4px 0 6px; }
.dp-day { width: 38px; height: 36px; border: 0; border-radius: 9px; background: none; color: var(--text); cursor: pointer;
  font: inherit; font-size: 14px; font-variant-numeric: tabular-nums; display: grid; place-items: center; }
.dp-day:hover { background: var(--hover); }
.dp-day.out { color: var(--muted); opacity: .55; }
.dp-day.today { box-shadow: inset 0 0 0 1px var(--line-strong); font-weight: 700; }
.dp-day.sel { background: var(--primary); color: var(--primary-ink); font-weight: 700; box-shadow: none; opacity: 1; }
.dp-day:focus-visible, .dp-month:focus-visible { outline: 0; box-shadow: 0 0 0 3px var(--focus); }
.dp-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 270px; }
.dp-month { height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text);
  cursor: pointer; font: inherit; font-size: 14px; font-weight: 500; }
.dp-month:hover { background: var(--hover); }
.dp-month.today { border-color: var(--line-strong); font-weight: 700; }
.dp-month.sel { background: var(--primary); color: var(--primary-ink); border-color: transparent; font-weight: 700; }
.dp-foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.dp-foot button, .ss-foot button { border: 0; background: none; padding: 4px 6px; border-radius: 7px; cursor: pointer; font: inherit;
  font-size: 13px; font-weight: 600; color: var(--text); }
.dp-foot button:hover, .ss-foot button:hover { background: var(--hover); }
.ss-pop { padding: 8px; }
.ss-search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px; margin-bottom: 6px; color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); }
.ss-search:focus-within { border-color: color-mix(in srgb, var(--primary) 45%, transparent); box-shadow: 0 0 0 3px var(--focus); }
.ss-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; }
.ss-list { max-height: 260px; overflow-y: auto; }
.ss-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px;
  cursor: pointer; font-size: 14px; }
.ss-opt small { color: var(--muted); font-variant-numeric: tabular-nums; }
.ss-opt.on { background: var(--hover); }
.ss-opt.sel { font-weight: 700; }
.ss-group { padding: 8px 10px 4px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ss-empty { padding: 12px 10px; color: var(--muted); font-size: 13.5px; }
.ss-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.ss-foot span { font-size: 12px; color: var(--muted); }

/* ---------- Logo ---------- */
.brand-link { display: flex; align-items: center; min-width: 0; height: 46px; }
.brand-logo { display: block; height: 42px; width: auto; max-width: 170px; object-fit: contain; }
.brand-mark-img { display: none; width: 40px; height: 40px; object-fit: contain; }
.app.collapsed .brand-logo { display: none; }
.app.collapsed .brand-mark-img { display: block; }
.auth-brand { display: flex; justify-content: center; padding: 0 0 10px; }
.auth-logo { display: block; width: 190px; height: auto; }

/* Giriş ekranı */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-wrap { width: 100%; display: flex; justify-content: center; }
.auth-card { width: min(540px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 44px 48px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 18px; }
.auth-card h1 { font-size: 26px; letter-spacing: -.01em; }
.auth-card .field input { height: 50px; }
.auth-card .btn { height: 50px; font-size: 15px; }
@media (max-width: 640px) { .auth-card { padding: 30px 22px; border-radius: 20px; } }
.auth-card p.lead { color: var(--muted); margin-top: -8px; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.auth-card .btn { width: 100%; }

/* ---------- Duyarlı düzen ---------- */
@media (max-width: 1280px) {
  .cols-4, .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-main { grid-template-columns: minmax(0, 1fr); }
  .stat-value { font-size: 28px; }
}
@media (max-width: 1100px) {
  .split-side, .cols-3 { grid-template-columns: minmax(0, 1fr); }
  .search { flex-basis: 300px; }
  .user-meta { display: none; }
}
@media (max-width: 900px) {
  .app, .app.collapsed { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-102%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(35, 24, 14, .35); z-index: 55; }
  .app.collapsed .brand-name, .app.collapsed .nav-item span, .app.collapsed .nav-label { display: initial; }
  .app.collapsed .brand-logo { display: block; }
  .app.collapsed .brand-mark-img { display: none; }
  .icon-btn.menu-btn { display: grid; }
  .topbar { padding: 0 16px; height: 68px; gap: 10px; }
  .topbar-title { min-width: 0; font-size: 18px; overflow: hidden; text-overflow: ellipsis; }
  .search { display: none; }
  .content { padding: 18px 16px 40px; }
  .cols-2 { grid-template-columns: minmax(0, 1fr); }
  .appt-row { grid-template-columns: minmax(0, 1fr) auto; }
  .appt-row .appt-meta { grid-column: 1 / -1; grid-row: 2; flex-direction: row; flex-wrap: wrap; gap: 4px 14px; }
  .appt-row .appt-more { display: none; }
  .cal-cell { min-height: 84px; padding: 5px; }
  .cal-chip span { display: none; }
  .cal-dow { padding: 8px 4px; text-align: center; font-size: 11px; }
}
@media (max-width: 640px) {
  .cols-4, .kpi-row, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .page-head h2 { font-size: 22px; }
  .stat-value { font-size: 26px; }
  .filters .field { flex: 1 1 140px; }
  .detail-list { grid-template-columns: 110px minmax(0, 1fr); }
  .theme-preview { grid-template-columns: 80px 1fr; }
  .cal-dow .dl { display: none; }
  .cal-dow .ds { display: inline; }
  .cal-cell { min-height: 62px; padding: 4px; gap: 2px; }
  .cal-cell-head { flex-direction: column; align-items: flex-start; gap: 2px; }
  .cal-chip, .cal-more, .cc-word { display: none; }
  .cal-count { font-size: 11px; padding: 0 6px; border-radius: 999px; background: var(--info-bg); color: var(--info); }
}

/* ---------- Site Yönetimi ---------- */
.web-grid { grid-template-columns: minmax(0, 1fr) 420px; align-items: start; }
.web-preview { position: sticky; top: 98px; }
.phone { width: 360px; max-width: 100%; height: 700px; margin: 0 auto; border-radius: 34px; padding: 10px; background: #1f1a16;
  box-shadow: var(--shadow-lg); }
.phone iframe { display: block; width: 100%; height: 100%; border: 0; border-radius: 26px; background: #fff; }

.avatar-edit { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.avatar-prev { width: 104px; height: 104px; border-radius: 50%; overflow: hidden; background: #fff; flex-shrink: 0;
  border: 4px solid #fff; box-shadow: 0 0 0 1px var(--line-strong), 0 6px 18px rgba(60, 30, 40, .12); }
.avatar-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-prev.is-logo img { object-fit: contain; padding: 18px 12px; }
.field input[type=file] { height: auto; padding: 9px 10px; cursor: pointer; }
.file-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
.file-ui { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 5px 6px; border: 1px solid var(--line-strong);
  border-radius: 11px; background: var(--surface); min-width: 0; }
.file-ui .file-name { color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-ui.has-file .file-name { color: var(--text); font-weight: 600; }
.field:has(.file-native) { position: relative; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface); background: var(--c); cursor: pointer;
  box-shadow: 0 0 0 1px var(--line-strong); }
.swatch:hover { transform: scale(1.1); }

.web-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.web-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.web-row.off { background: var(--surface-2); }
.web-row.off .web-main strong { color: var(--muted); }
.web-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.web-main strong { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.web-main small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.web-warn { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; margin-top: 3px; padding: 1px 8px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--warn-bg); color: var(--warn); border: 1px solid var(--warn-line); }
.sort-btns { display: flex; flex-direction: column; }
.sort-btns .icon-btn { width: 28px; height: 22px; border-radius: 6px; }
.sort-btns .icon-btn[disabled] { opacity: .25; cursor: default; }
.web-row form, .proto-actions form { display: contents; }

.switch { position: relative; width: 40px; height: 24px; flex-shrink: 0; border-radius: 999px; border: 0; padding: 0; cursor: pointer;
  background: color-mix(in srgb, var(--text) 18%, transparent); transition: background .15s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .15s; }
.switch.on { background: #2e7d43; }
.switch.on i { transform: translateX(16px); }
.switch:focus-visible { outline: 0; box-shadow: 0 0 0 4px var(--focus); }

.upload-drop { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px; border: 1.5px dashed var(--line-strong);
  border-radius: 14px; background: var(--surface-2); }
.upload-ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--surface);
  border: 1px solid var(--line); color: var(--muted); flex-shrink: 0; }
.proto-grid { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.proto-item { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); display: flex; flex-direction: column; }
.proto-item.off img { opacity: .4; }
.proto-item img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--surface-2); }
.proto-meta { padding: 10px 12px 4px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.proto-meta strong { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.proto-meta small { color: var(--muted); font-size: 12px; }
.proto-actions { display: flex; align-items: center; gap: 4px; padding: 6px 8px 10px; margin-top: auto; }
.proto-actions .sort-btns { flex-direction: row; gap: 2px; margin-right: auto; }
.proto-actions .sort-btns .icon-btn { width: 30px; height: 30px; }
.proto-actions .sort-btns form:first-child svg { transform: rotate(-90deg); }
.proto-actions .sort-btns form:last-child svg { transform: rotate(-90deg); }

@media (max-width: 1280px) {
  .web-grid { grid-template-columns: minmax(0, 1fr); }
  .web-preview { position: static; }
}

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