/* ════════════════════════════════════════════════════
   base.css  —  змінні, reset, утиліти, .btn-*, .toast
   ════════════════════════════════════════════════════ */

:root {
  --font:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --primary: #0369a1;
  --primary-hover: #0284c7;
  --success: #15803d;
  --error:   #dc2626;
  --warning: #d97706;
  --text:    #1e293b;
  --muted:   #64748b;
  --border:  #e2e8f0;
  --bg:      #f1f5f9;
  --radius:  10px;
}

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

html { -webkit-text-size-adjust: none; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:active   { transform: scale(0.98); }

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

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--border);
}
.btn-ghost:hover { background: #f8fafc; color: var(--text); }

.btn-danger {
  background: #fef2f2;
  color: var(--error);
  border-color: #fecaca;
}
.btn-danger:hover { background: #fee2e2; }

.btn-warning {
  background: #fffbeb;
  color: var(--warning);
  border-color: #fde68a;
}
.btn-warning:hover { background: #fef3c7; }

.btn-success-outline {
  background: #f0fdf4;
  color: var(--success);
  border-color: #bbf7d0;
}
.btn-success-outline:hover { background: #dcfce7; }

.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }
.btn-lg { padding: 12px 24px; font-size: 15px; border-radius: 10px; }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #1e293b;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 9999;
  white-space: nowrap;
  max-width: calc(100vw - 40px);
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success { background: #15803d; }
.toast.error   { background: var(--error); }
.toast.warning { background: var(--warning); }

/* ── Field (shared) ── */
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.field label span { color: var(--error); }
.field input,
.field select,
.field textarea {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s;
  width: 100%;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.field small { font-size: 11px; color: var(--muted); }
