/* ═══════════════════════════════════════
   base.css — reset, variables, typography
   NCD Screening Register
   ═══════════════════════════════════════ */

:root {
  --blue:        #1d72c0;
  --blue-dark:   #1560a8;
  --blue-light:  #EBF5FF;
  --blue-border: #bfdbfe;
  --blue-mid:    #93c5fd;

  --green:        #166534;
  --green-light:  #dcfce7;
  --green-border: #86efac;

  --red:        #991b1b;
  --red-light:  #fee2e2;
  --red-border: #fca5a5;

  --amber:        #92400e;
  --amber-light:  #fef3c7;
  --amber-border: #fde68a;

  --text-primary:   #1a1a1a;
  --text-secondary: #555;
  --text-muted:     #888;
  --text-faint:     #bbb;

  --bg-page:    #f0f2f5;
  --bg-card:    #ffffff;
  --bg-subtle:  #f8f8f6;
  --bg-hover:   #fafaf8;

  --border:       #e8e8e8;
  --border-input: #e0e0e0;
  --border-focus: #1d72c0;

  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 99px;

  --shadow-card: 0 4px 32px rgba(0,0,0,.07);
  --shadow-focus: 0 0 0 3px rgba(29,114,192,.1);

  --font: system-ui, -apple-system, sans-serif;
}

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

html, body {
  font-family: var(--font);
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Loading spinner ── */
.loading-screen {
  position: fixed;
  inset: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  z-index: 999;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

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

.loading-label {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Utility ── */
.hidden { display: none !important; }

.empty-state {
  text-align: center;
  padding: 32px;
  color: var(--text-faint);
  font-size: 13px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
}
