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

[hidden] { display: none !important; }

html, body {
  height: 100%;
  font-family: 'Work Sans', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

button {
  cursor: pointer;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.75em 1em;
  transition: opacity 0.15s, transform 0.1s, background 0.15s;
  border: 2px solid transparent;
}

button:active {
  transform: scale(0.97);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input, textarea, select {
  font-family: inherit;
  font-size: 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.8rem;
  width: 100%;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--coral);
}

a {
  color: var(--coral);
  text-decoration: none;
}

#app {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.view {
  flex: 1;
  overflow-y: auto;
  padding-bottom: var(--nav-height);
}

/* UNL-style primary button: solid scarlet */
.btn-primary {
  background: var(--coral);
  color: #fefdfa;
  border-color: var(--coral);
  font-weight: 600;
}

.btn-primary:hover {
  background: var(--coral-dark);
  border-color: var(--coral-dark);
}

/* UNL-style secondary button: outlined scarlet */
.btn-secondary {
  background: #fefdfa;
  color: var(--coral);
  border: 2px solid var(--coral);
}

.btn-secondary:hover {
  background: rgba(208, 0, 0, 0.06);
}

/* UNL-style teal button */
.btn-teal {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
  font-weight: 600;
}

.btn-teal:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}

.center-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-height));
  padding: 1.5rem;
  text-align: center;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.error-msg {
  color: var(--coral);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 2rem auto;
}

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

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(66, 167, 198, 0.12);
  color: var(--teal-dark);
  border-radius: 2px;
  padding: 0.2rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tag .remove-tag {
  cursor: pointer;
  opacity: 0.6;
  font-size: 1rem;
  line-height: 1;
  background: none;
  border: none;
  padding: 0;
  color: inherit;
}

.tag .remove-tag:hover {
  opacity: 1;
}
