:root {
  --brand: #b01a19;
  --brand-bright: #ff3b3b;
  --brand-soft: #fdecec;
  --ink: #15171c;
  --ink-2: #3a3f4b;
  --muted: #6b7280;
  --line: #e7e9ee;
  --bg: #f5f6f8;
  --card: #ffffff;
  --ok: #12a150;
  --ok-soft: #e7f6ee;
  --warn: #b26b00;
  --warn-soft: #fff4e0;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.06);
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  cursor: pointer;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  transition: transform 0.08s ease, opacity 0.2s ease, background 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn.light {
  background: #fff;
  color: var(--brand);
}

.btn.link {
  background: transparent;
  color: var(--brand);
  min-height: 40px;
  font-weight: 600;
}

.btn .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn.ghost .spinner,
.btn.link .spinner {
  border-color: rgba(0, 0, 0, 0.15);
  border-top-color: var(--brand);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.field {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  min-height: 56px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(176, 26, 25, 0.08);
}

.field select {
  border: 0;
  background: transparent;
  padding: 0 6px 0 14px;
  height: 54px;
  font-weight: 600;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.field .divider {
  width: 1px;
  height: 26px;
  background: var(--line);
  margin: 0 4px;
}

.field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0 14px 0 10px;
  height: 54px;
  font-size: 17px;
  letter-spacing: 0.3px;
}

.error-text {
  color: #c62828;
  font-size: 14px;
  min-height: 20px;
  margin-top: 10px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
  max-width: calc(100% - 32px);
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.shake {
  animation: shake 0.35s ease;
}

@keyframes shake {
  20%,
  60% {
    transform: translateX(-6px);
  }
  40%,
  80% {
    transform: translateX(6px);
  }
}
