/* ============================================================
   RESET + BASE
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100%;
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background 0.25s, color 0.25s;
}

a { text-decoration: none; color: inherit; }

img { max-width: 100%; }

/* ============================================================
   FORM ELEMENTS
============================================================ */
label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="email"],
textarea,
select {
  width: 100%;
  padding: 11px 14px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  box-shadow: var(--input-focus-shadow);
}

input::placeholder, textarea::placeholder { color: var(--text3); }

.form-group { margin-bottom: 18px; }

.helper-text {
  font-size: 0.78rem;
  color: var(--text3);
  margin-top: 6px;
}

/* ============================================================
   PAGE HEADERS
============================================================ */
.page-header { margin-bottom: 20px; }

.page-header h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 4px;
}

.page-header p {
  font-size: 0.9rem;
  color: var(--text3);
}

/* ============================================================
   UTILS
============================================================ */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.text-muted { color: var(--text3); }

/* ============================================================
   ANIMATIONS
============================================================ */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in { animation: slideDown 0.22s ease forwards; }

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

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

/* Loading skeleton */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg2) 0px, var(--surface2) 200px, var(--bg2) 400px);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--radius-sm);
}
