/* ==========================================================================
   MAIN CSS: Variables, Reset, Typography & Utilities
   Generador de Cuadernillos Educativos
   ========================================================================== */

:root {
  /* Paleta Educativa Amigable (Pastel vibrante con alto contraste para lectura) */
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --primary-light: #EEF2FF;
  --primary-surface: #E0E7FF;
  
  --secondary: #0D9488;
  --secondary-hover: #0F766E;
  --secondary-light: #F0FDFA;
  
  --accent-amber: #F59E0B;
  --accent-amber-light: #FEF3C7;
  --accent-pink: #EC4899;
  --accent-pink-light: #FCE7F3;
  --accent-emerald: #10B981;
  --accent-emerald-light: #D1FAE5;
  
  /* Grises y Neutros */
  --bg-app: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-muted: #F1F5F9;
  --bg-active: #E2E8F0;
  
  --text-main: #1E293B;
  --text-muted: #64748B;
  --text-inverse: #FFFFFF;
  
  --border-color: #E2E8F0;
  --border-focus: #818CF8;
  
  /* Formato US Letter (8.5 x 11 pulgadas) */
  --sheet-width-in: 8.5in;
  --sheet-height-in: 11in;
  --sheet-ratio: calc(8.5 / 11);
  --sheet-margin: 0.5in;
  --sheet-bg: #FFFFFF;
  --sheet-border: #D1D5DB;
  
  /* Tipografía */
  --font-main: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --font-kids: 'Comic Sans MS', 'Short Stack', cursive, system-ui, sans-serif;
  --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  
  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-sheet: 0 12px 30px -5px rgba(15, 23, 42, 0.15), 0 4px 10px -2px rgba(15, 23, 42, 0.08);
  
  /* Bordes redondeados */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  /* Dimensiones Layout */
  --sidebar-width: 270px;
  --sidebar-collapsed-width: 76px;
  --topbar-height: 64px;
  --transition-speed: 0.25s;
}

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

html, body {
  height: 100%;
  font-family: var(--font-main);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-main);
  background-color: var(--bg-app);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Utilidades tipográficas */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
}

a {
  color: var(--primary);
  text-decoration: none;
}

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

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Iconos SVG */
.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

.icon-sm { width: 16px; height: 16px; }
.icon-md { width: 20px; height: 20px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }

/* Scrollbar estilizada */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-muted);
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}
