/* =============================================================
   Malina — Base Reset & Global Defaults
   Sourced from Malina tokens.css (post-:root block) + app.css shell resets
   ============================================================= */

/* ── Backward-compat variable aliases (used in inline styles in HTML) ── */
:root {
  /* Old name → new token */
  --gold:           var(--accent);
  --gold-dim:       var(--accent-tint);
  --gold-light:     var(--gold-200);
  --border-gold:    var(--accent-border);
  --rose:           var(--danger);
  --teal:           var(--info);
  --teal-dim:       var(--info-tint);
  --mint:           var(--success);
  --text-primary:   var(--fg);
  --text-secondary: var(--fg-muted);
  --text-muted:     var(--fg-dim);
  --bg-card:        var(--bg-elev-2);
  --bg-surface:     var(--bg-elev-1);
  --bg-elevated:    var(--bg-elev-2);
  --bg-hover:       var(--bg-elev-3);
}

/* Box-model reset */
*, *::before, *::after { box-sizing: border-box; }

/* Full-height root */
html, body, #root { height: 100%; margin: 0; padding: 0; }

body {
  background: var(--bg-base);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  overflow: hidden;
}

/* Selection */
::selection { background: var(--accent-tint-2); color: var(--fg-strong); }

/* Webkit scrollbars */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--fg-dim);
  background-clip: padding-box;
  border: 2px solid transparent;
}

/* Lucide icons — consistent stroke width */
[data-lucide] { stroke-width: 1.6; }

/* Remove default list styles */
ul, ol { margin: 0; padding: 0; list-style: none; }

/* Remove default button styles */
button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: transparent;
  color: inherit;
  padding: 0;
}

/* Remove default input styles */
input, textarea, select {
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
}

/* Remove default fieldset/legend styles */
fieldset { border: none; margin: 0; padding: 0; }
legend { padding: 0; }

/* Images responsive by default */
img, svg { display: block; max-width: 100%; }

/* Chart.js canvas — always fills its container */
canvas { width: 100% !important; }

/* Tables reset */
table { border-collapse: collapse; }
th, td { text-align: left; }

/* Focus outline — use ring-focus via :focus-visible */
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--ring-focus); }
