/* 
 * Dashboard base styles
 * Design inspired by Nursing Station UI
 */

:root {
  /* Legacy layout aliases, resolved from the shared product identity. */
  --bg-body: var(--bg);
  --bg-surface: var(--surface);
  --bg-elevated: var(--surface-2);
  --bg-hover: var(--line);
  --text-primary: var(--ink);
  --text-secondary: var(--ink-dim);
  --text-muted: var(--ink-faint);
  --border-color: var(--line);
  --border-light: var(--line-soft);
  --accent-primary: var(--ok);
  --accent-primary-soft: var(--ok-soft);
  --status-alert: var(--bad);
  --status-alert-soft: var(--bad-soft);
  --status-warn: var(--warn);
  --status-warn-soft: var(--warn-soft);
  --status-ok: var(--ok);
  --status-ok-soft: var(--ok-soft);
  --status-stale: var(--off);
  --status-stale-soft: var(--off-soft);
  --font-display: var(--disp);
  --font-body: var(--mono);
  --font-mono: var(--mono);
  
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  /* Borders & Shadows */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
}

/* Keep the legacy toggle without introducing a second colour language. */
[data-theme="bright"] {
  --bg-body: var(--bg);
  --bg-surface: var(--surface);
  --bg-elevated: var(--surface-2);
  --bg-hover: var(--line);
  --text-primary: var(--ink);
  --text-secondary: var(--ink-dim);
  --text-muted: var(--ink-faint);
  --border-color: var(--line);
  --border-light: var(--line-soft);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-md);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-body);
  min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }

p {
  color: var(--text-secondary);
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

a:hover {
  opacity: 0.8;
}

code, .mono {
  font-family: var(--font-mono);
}

/* Lists */
ul, ol {
  list-style: none;
}

/* Buttons */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Form elements */
input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: var(--bg-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-soft);
}

/* Utility classes */
.text-alert { color: var(--status-alert); }
.text-warn { color: var(--status-warn); }
.text-ok { color: var(--status-ok); }
.text-muted { color: var(--text-muted); }

.bg-alert { background: var(--status-alert); }
.bg-warn { background: var(--status-warn); }
.bg-ok { background: var(--status-ok); }

.hidden { display: none !important; }

/* Eyebrow text */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--font-size-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* Lead text */
.lead {
  font-size: var(--font-size-lg);
  color: var(--text-secondary);
}
