/* Hemen Randevu — ortak tasarım sistemi */
:root {
  --brand: #0d9488;
  --brand-600: #0f766e;
  --brand-700: #115e59;
  --brand-50: #f0fdfa;
  --brand-100: #ccfbf1;
  --accent: #f97316;
  --accent-50: #fff7ed;
  --ink: #0b1324;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-2: #f1f5f9;
  --bg: #f6f8fb;
  --card: #ffffff;
  --ok: #059669; --ok-bg: #ecfdf5; --ok-line: #a7f3d0;
  --warn: #b45309; --warn-bg: #fffbeb; --warn-line: #fde68a;
  --err: #dc2626; --err-bg: #fef2f2; --err-line: #fecaca;
  --info: #2563eb; --info-bg: #eff6ff; --info-line: #bfdbfe;
  --pro: #7c3aed; --pro-bg: #f5f3ff; --pro-line: #ddd6fe;
  --r-sm: 10px; --r: 14px; --r-lg: 20px;
  --sh-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --sh: 0 4px 20px -6px rgba(15, 23, 42, .10), 0 1px 3px rgba(15, 23, 42, .05);
  --sh-lg: 0 24px 60px -18px rgba(15, 23, 42, .25);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
.ic { flex-shrink: 0; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }
.stack > * + * { margin-top: 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Butonlar ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font: 600 14.5px var(--font); cursor: pointer; transition: .15s; white-space: nowrap; text-decoration: none !important; color: var(--ink); background: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px -6px rgba(13, 148, 136, .6); }
.btn-primary:hover:not(:disabled) { background: var(--brand-600); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover:not(:disabled) { background: #1e293b; }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 6px 16px -6px rgba(249, 115, 22, .6); }
.btn-pro { background: linear-gradient(135deg, #7c3aed, #a855f7); color: #fff; }
.btn-ghost { background: #fff; border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { border-color: #cbd5e1; background: #f8fafc; }
.btn-soft { background: var(--brand-50); color: var(--brand-700); }
.btn-soft:hover { background: var(--brand-100); }
.btn-danger { background: var(--err); color: #fff; }
.btn-wa { background: #25d366; color: #fff; }
.btn-wa:hover { background: #1ebe5a; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { height: 54px; padding: 0 26px; font-size: 16px; border-radius: 14px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--line-2); color: var(--ink); }
.link-btn { background: none; border: 0; color: var(--brand-600); font: 600 13.5px var(--font); cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 4px; }

/* ---------- Form ---------- */
label.lbl, .lbl { display: block; font-weight: 600; font-size: 13.5px; margin-bottom: 6px; color: var(--ink-2); }
.input, select.input, textarea.input { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: 500 14.5px var(--font);
  color: var(--ink); outline: none; transition: .15s; }
textarea.input { height: auto; min-height: 84px; padding: 11px 14px; resize: vertical; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(13, 148, 136, .12); }
.input::placeholder { color: #94a3b8; }
.input-sm { height: 36px; font-size: 13.5px; border-radius: 10px; padding: 0 10px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.field { margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 760px) { .grid2, .grid3 { grid-template-columns: 1fr; } .grid4 { grid-template-columns: 1fr 1fr; } }
.input-group { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.input-group span { display: grid; place-items: center; padding: 0 12px; background: var(--line-2); color: var(--muted); font-size: 13.5px; white-space: nowrap; }
.input-group .input { border: 0; border-radius: 0; box-shadow: none !important; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 44px; height: 26px; border-radius: 99px; background: #cbd5e1; transition: .2s; position: relative; flex-shrink: 0; }
.switch .track::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: .2s; }
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 4px rgba(13, 148, 136, .2); }

/* ---------- Kart, rozet ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--sh-sm); }
.card-tight { padding: 16px; }
.card h3 { font-size: 17px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-err { background: var(--err-bg); color: var(--err); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-pro { background: var(--pro-bg); color: var(--pro); }
.badge-brand { background: var(--brand-50); color: var(--brand-700); }
.st-pending { background: var(--warn-bg); color: var(--warn); }
.st-confirmed { background: var(--info-bg); color: var(--info); }
.st-completed { background: var(--ok-bg); color: var(--ok); }
.st-cancelled { background: var(--err-bg); color: var(--err); }
.st-noshow { background: #f1f5f9; color: #475569; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); border: 1px solid; font-size: 14px; }
.alert .ic { margin-top: 1px; }
.alert-ok { background: var(--ok-bg); border-color: var(--ok-line); color: #065f46; }
.alert-warn { background: var(--warn-bg); border-color: var(--warn-line); color: #92400e; }
.alert-err { background: var(--err-bg); border-color: var(--err-line); color: #991b1b; }
.alert-info { background: var(--info-bg); border-color: var(--info-line); color: #1e40af; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); border: 1.5px dashed var(--line); border-radius: var(--r-lg); background: #fff; }
.empty .ic { color: #cbd5e1; margin-bottom: 8px; }

/* ---------- Tablo ---------- */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); padding: 13px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 13px; background: #fbfcfd; }
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: #fafbfc; }
.status-select { height: 34px; border-radius: 10px; border: 0; padding: 0 30px 0 12px; font: 700 12.5px var(--font); cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }

/* ---------- Modal & toast ---------- */
.modal-wrap { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 16px; z-index: 100; opacity: 0; transition: .2s; }
.modal-wrap.show { opacity: 1; }
.modal { background: #fff; border-radius: var(--r-lg); width: 100%; max-width: 480px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: var(--sh-lg); transform: translateY(10px) scale(.98); transition: .2s; }
.modal-wide { max-width: 720px; }
.modal-wrap.show .modal { transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line-2); }
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: center; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 500; box-shadow: var(--sh-lg);
  opacity: 0; transform: translateY(10px); transition: .25s; max-width: min(92vw, 520px); }
.toast.show { opacity: 1; transform: none; }
.toast-ok .ic { color: #5eead4; }
.toast-err { background: #7f1d1d; }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
.loading { display: grid; place-items: center; padding: 60px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Marka ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 19px; letter-spacing: -.03em; text-decoration: none !important; }
.brand b { color: var(--brand); font-weight: 800; }
.brand small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-top: -2px; }

/* ---------- Mini takvim ---------- */
.cal { user-select: none; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head strong { font-size: 15.5px; }
.cal-nav { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.cal-nav:disabled { opacity: .35; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); padding: 4px 0 8px; }
.cal-day { aspect-ratio: 1; max-height: 48px; border: 0; background: transparent; border-radius: 12px; font: 600 14px var(--font); color: var(--ink); cursor: pointer; position: relative; }
.cal-day:hover:not(:disabled) { background: var(--brand-50); }
.cal-day:disabled { color: #cbd5e1; cursor: default; font-weight: 500; }
.cal-day.today::after { content: ''; position: absolute; bottom: 6px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--brand); }
.cal-day.sel { background: var(--brand) !important; color: #fff; }
.cal-day.sel::after { background: #fff; }
.cal-day .dot { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 10px; line-height: 16px; padding: 0 4px; }

/* ---------- Slot butonları ---------- */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.slot { height: 50px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font: 700 15px var(--font); color: var(--ink); cursor: pointer; transition: .12s; }
.slot:hover { border-color: var(--brand); color: var(--brand-600); }
.slot.sel { background: var(--brand); border-color: var(--brand); color: #fff; }

@media (max-width: 600px) {
  body { font-size: 14.5px; }
  .card { padding: 18px; border-radius: 16px; }
  .btn-lg { height: 52px; }
}
