:root {
  /* Grado MC — paleta institucional */
  --background: 46.6667 75% 95.2941%;      /* #FCF8EA papel cálido */
  --foreground: 105 6% 13%;           /* #20231F */
  --card: 45 100% 98%;                /* #FFFDF7 */
  --card-foreground: 105 6% 13%;
  --popover: 45 100% 98%;
  --popover-foreground: 105 6% 13%;

  --primary: 163 41% 15%;              /* #17372E verde institucional */
  --primary-foreground: 60 100% 97%;  /* #FFFFF0 */
  --secondary: 49 40% 92%;            /* #F3F0E3 */
  --secondary-foreground: 163 41% 15%;
  --muted: 47 44% 94%;                /* #F6F3E8 */
  --muted-foreground: 86 3% 41%;      /* #686B64 */
  --accent: 42 46% 89%;               /* #F0E8D6 */
  --accent-foreground: 163 41% 15%;

  --gold: 41 49% 36%;                 /* #8A6D2F */
  --gold-soft: 41 36% 54%;            /* #B49A61 */

  --destructive: 346 53% 31%;         /* #7A263A burgundy */
  --destructive-foreground: 60 100% 97%;
  --success: 152 39% 30%;             /* #2F6B4F */
  --success-foreground: 60 100% 97%;
  --warning: 41 49% 36%;              /* ocre institucional */
  --warning-foreground: 60 100% 97%;

  --border: 46 24% 83%;               /* #DDD8C8 */
  --input: 46 24% 83%;
  --ring: 163 41% 15%;

  --chart-1: 163 41% 22%;
  --chart-2: 152 39% 35%;
  --chart-3: 41 49% 42%;
  --chart-4: 346 53% 36%;
  --chart-5: 86 3% 48%;
  --radius: 0.625rem;

  --font-heading: Georgia, "Times New Roman", "Iowan Old Style", "Palatino Linotype", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", "Iowan Old Style", "Palatino Linotype", serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  --sidebar-background: 50 69% 95%;    /* #FBF8E9 */
  --sidebar-foreground: 163 30% 18%;
  --sidebar-primary: 163 41% 15%;
  --sidebar-primary-foreground: 60 100% 97%;
  --sidebar-accent: 42 45% 87%;        /* #EDE4CF */
  --sidebar-accent-foreground: 163 41% 15%;
  --sidebar-border: 46 24% 83%;
  --sidebar-ring: 163 41% 15%;
}
.dark {
  --background: 163 27% 8%;
  --foreground: 60 35% 92%;
  --card: 163 24% 11%;
  --card-foreground: 60 35% 92%;
  --popover: 163 24% 11%;
  --popover-foreground: 60 35% 92%;
  --primary: 41 36% 54%;
  --primary-foreground: 163 27% 8%;
  --secondary: 163 18% 17%;
  --secondary-foreground: 60 35% 92%;
  --muted: 163 16% 16%;
  --muted-foreground: 50 12% 66%;
  --accent: 41 22% 22%;
  --accent-foreground: 50 55% 88%;
  --gold: 41 40% 62%;
  --gold-soft: 41 32% 52%;
  --destructive: 346 42% 58%;
  --destructive-foreground: 60 35% 94%;
  --success: 152 30% 57%;
  --success-foreground: 163 27% 8%;
  --warning: 41 40% 62%;
  --warning-foreground: 163 27% 8%;
  --border: 163 15% 22%;
  --input: 163 15% 22%;
  --ring: 41 36% 54%;
  --chart-1: 41 36% 54%;
  --chart-2: 152 30% 57%;
  --chart-3: 50 30% 66%;
  --chart-4: 346 42% 58%;
  --chart-5: 163 14% 48%;
  --sidebar-background: 163 28% 7%;
  --sidebar-foreground: 60 30% 90%;
  --sidebar-primary: 41 36% 54%;
  --sidebar-primary-foreground: 163 27% 8%;
  --sidebar-accent: 163 18% 15%;
  --sidebar-accent-foreground: 60 30% 92%;
  --sidebar-border: 163 15% 20%;
  --sidebar-ring: 41 36% 54%;
}
* { box-sizing:border-box; border-color:hsl(var(--border)); }
html,body,#root { min-height:100%; }
html, body, #root { background:#FCF8EA; }
body { margin:0; background:hsl(var(--background)); color:hsl(var(--foreground)); font-family:var(--font-body); -webkit-font-smoothing:antialiased; }
h1,h2,h3,h4 { font-family:var(--font-heading); color:hsl(var(--primary)); }
.text-success { color:hsl(var(--success)); } .bg-success { background-color:hsl(var(--success)); }
.text-warning { color:hsl(var(--warning)); } .bg-warning { background-color:hsl(var(--warning)); }
.no-scrollbar::-webkit-scrollbar { display:none; } .no-scrollbar { -ms-overflow-style:none; scrollbar-width:none; }
.safe-bottom { padding-bottom:env(safe-area-inset-bottom); }

/* Pequeños refinamientos para conservar un aspecto editorial y sobrio */
::selection { background:hsl(var(--accent)); color:hsl(var(--primary)); }
button, a { -webkit-tap-highlight-color: transparent; }
