:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --line: #dfe4ee;
  --text: #1f2430;
  --muted: #6b7280;
  --accent: #3a7bd5;
  --accent-soft: #dbe7ff;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  --danger: #9f1f1f;
  --danger-line: #e2b4b4;
  --app-font-family: Arial, sans-serif;
  --app-font-size: 16px;
}

:root.light {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --text: #1f2430;
  --line: #dfe4ee;
}

:root.dark {
  --bg: #0f1117;
  --panel: #171a22;
  --text: #e8ecf3;
  --muted: #a7b0c0;
  --line: #2a3140;
  --accent: #4c8dff;
  --accent-soft: #1a2742;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  --danger: #ff8a8a;
  --danger-line: #6a2f2f;
}

:root.crema {
  --bg: #f4ecdf;
  --panel: #fffaf1;
  --text: #332b22;
  --muted: #7a6d5f;
  --line: #e4d8c6;
  --accent: #9a6b2f;
  --accent-soft: #f1e2cb;
  --shadow: 0 1px 2px rgba(60, 45, 25, 0.08);
  --danger: #a94442;
  --danger-line: #d7b0a8;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--app-font-family);
  font-size: var(--app-font-size);
}

html {
  background: var(--bg);
}

body {
  opacity: 0;
  transition: opacity 0.18s ease;
}

body.page-ready {
  opacity: 1;
}

.hidden {
  display: none !important;
}

/* Fuerza tipografía global */
body,
button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
}

/* Dark Theme Global Overrides */
:root.dark body {
  background: var(--bg);
  color: var(--text);
}

/* Crema Theme Global Overrides */
:root.crema body {
  background: var(--bg);
  color: var(--text);
}
