@import url('./tokens.css');

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink-950);
  background: var(--surface-soft);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: min(100% - 32px, var(--content-max));
  margin-inline: auto;
}

.muted { color: var(--ink-600); }
.text-danger { color: var(--danger); }
.text-success { color: var(--green-700); }
.text-center { text-align: center; }
.stack { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wrap { flex-wrap: wrap; }

.toast-region {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 9999;
  display: grid;
  gap: 10px;
  width: min(390px, calc(100vw - 36px));
}
.toast {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--green-600);
  animation: toast-in 220ms ease both;
}
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--orange-600); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(6px);
}
.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid var(--green-100);
  border-top-color: var(--green-700);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
