/* Çekirdek token'lar ve temel öğeler. Modül CSS'leri yalnız bu token'ları kullanır. */
:root {
  --bg: #f4f5f4;
  --surface: #ffffff;
  --surface-2: #f8f9f8;
  --border: #dcdfdc;
  --border-strong: #c3c8c3;
  --text: #1c211d;
  --text-2: #4f5751;
  --text-3: #79817b;
  --accent: #1d6b4f;
  --accent-hover: #155a41;
  --accent-soft: #e6f1ec;
  --danger: #b4232a;
  --danger-soft: #fbeaea;
  --warn: #8a5a00;
  --warn-soft: #fdf3dc;
  --ok: #1d6b4f;
  --user-loc: #1a73e8; /* kullanıcı konum noktası (harita geleneği) */
  --radius: 6px;
  --radius-sm: 4px;
  --shadow: 0 1px 2px rgba(20, 26, 22, .08);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs: 14px;
  --fs-md: 16px;
  --fs-lg: 20px;
  --fs-xl: 24px;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --panel-w: 440px;
  --topbar-h: 56px;
}

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

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  height: 36px;
  padding: 0 var(--sp-4);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-sm { height: 30px; padding: 0 var(--sp-3); font-size: var(--fs-sm); }
.btn-block { width: 100%; }

.field {
  height: 36px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
}
.field:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }

.muted { color: var(--text-3); }
.small { font-size: var(--fs-sm); }

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed;
  left: 50%;
  bottom: var(--sp-5);
  transform: translateX(-50%) translateY(20px);
  max-width: min(560px, calc(100vw - 32px));
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius);
  background: var(--text);
  color: #fff;
  font-size: var(--fs-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 1000;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.is-error { background: var(--danger); }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2s; }
  .toast { transition: none; }
}
