/* NeoRandevu — ortak stil (mobil öncelikli) */
:root {
  --brand: #0f766e;
  --brand-ink: #ffffff;
  --brand-soft: color-mix(in srgb, var(--brand) 12%, transparent);
  --bg: #f6f5f2;
  --surface: #ffffff;
  --surface-2: #f1efea;
  --ink: #1c1917;
  --ink-2: #57534e;
  --ink-3: #8a837c;
  --line: #e7e4de;
  --ok: #15803d;
  --warn: #b45309;
  --bad: #b91c1c;
  --info: #1d4ed8;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(28, 25, 23, .06), 0 8px 24px rgba(28, 25, 23, .06);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12110f;
    --surface: #1c1a17;
    --surface-2: #262420;
    --ink: #f5f3ef;
    --ink-2: #c4beb6;
    --ink-3: #8f8880;
    --line: #2f2c27;
    --brand-soft: color-mix(in srgb, var(--brand) 22%, transparent);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12110f; --surface: #1c1a17; --surface-2: #262420; --ink: #f5f3ef; --ink-2: #c4beb6; --ink-3: #8f8880;
  --line: #2f2c27; --brand-soft: color-mix(in srgb, var(--brand) 22%, transparent); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -.01em; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.center { text-align: center; }
.tabular { font-variant-numeric: tabular-nums; }

/* Butonlar */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  background: var(--brand); color: var(--brand-ink); font-weight: 700; font-size: 15px;
  cursor: pointer; text-decoration: none; transition: transform .08s, filter .15s, background .15s;
  user-select: none;
}
.btn:active { transform: scale(.98); }
.btn:hover { filter: brightness(1.06); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.block { width: 100%; }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn.soft { background: var(--brand-soft); color: var(--brand); }
.btn.danger { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn.icon { width: 44px; min-height: 44px; padding: 0; }
.btn svg { width: 18px; height: 18px; flex: none; }
.link { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 700; cursor: pointer; }

/* Kartlar */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card.pad-lg { padding: 20px; }

/* Formlar */
.field { display: block; }
.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); font-size: 16px; /* iOS zoom önler */
  outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; min-height: 40px; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Etiketler */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.tag.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.tag.warn { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.tag.bad { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--bad); }
.tag.info { background: color-mix(in srgb, var(--info) 14%, transparent); color: var(--info); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; cursor: pointer; }
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; flex: none; font-size: 15px; }

/* Bildirim (toast) */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: .25s; z-index: 1000; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--bad); color: #fff; }

/* Alt sayfa (bottom sheet) */
.sheet-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 900; opacity: 0; transition: opacity .2s; }
.sheet-bg.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 901; background: var(--surface);
  border-radius: 22px 22px 0 0; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  transform: translateY(100%); transition: transform .25s cubic-bezier(.2, .8, .2, 1);
  padding: 8px 18px calc(20px + env(safe-area-inset-bottom));
}
.sheet.show { transform: none; }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 12px; }
.sheet h2 { font-size: 19px; margin-bottom: 14px; }
@media (min-width: 720px) {
  .sheet { left: 50%; right: auto; width: 560px; bottom: auto; top: 50%; border-radius: 22px;
    transform: translate(-50%, -46%); opacity: 0; transition: .2s; padding-bottom: 22px; }
  .sheet.show { transform: translate(-50%, -50%); opacity: 1; }
  .sheet .grab { display: none; }
}

.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; margin: 24px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }
.empty { text-align: center; padding: 28px 12px; color: var(--ink-3); }

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