/* ==========================================================================
   DonaTrack - Design Tokens
   ========================================================================== */

:root {
    /* ---------- 1. PRIMITIVAS - Color ---------------------------------- */

    /* Marca: azul petroleo. */
    --c-brand-50:  #eff9fa;
    --c-brand-100: #d3eef1;
    --c-brand-200: #a7dde3;
    --c-brand-300: #6fc4ce;
    --c-brand-400: #3aa5b3;
    --c-brand-500: #1e8796;
    --c-brand-600: #146d7c;  /* accion primaria - 5.2:1 sobre blanco  AA */
    --c-brand-700: #0f5a66;
    --c-brand-800: #0c4650;
    --c-brand-900: #08323a;

    /* Acento: naranja calido. */
    --c-accent-50:  #fff5ed;
    --c-accent-100: #ffe6d5;
    --c-accent-200: #fec9aa;
    --c-accent-300: #fda474;
    --c-accent-400: #fb8b4c;
    --c-accent-500: #ea670f;
    --c-accent-600: #c2410c;  /* 5.0:1 sobre blanco  AA */
    --c-accent-700: #9a3412;

    /* Neutros */
    --c-neutral-0:   #ffffff;
    --c-neutral-50:  #f8fafc;
    --c-neutral-100: #f1f5f9;
    --c-neutral-200: #e2e8f0;
    --c-neutral-300: #cbd5e1;
    --c-neutral-400: #94a3b8;
    --c-neutral-500: #64748b;  /* 4.9:1 sobre blanco  AA texto normal */
    --c-neutral-600: #475569;  /* 7.5:1  AAA */
    --c-neutral-700: #334155;
    --c-neutral-800: #1e293b;
    --c-neutral-900: #0f172a;  /* 16:1   AAA */

    /* Semaforo. */
    --c-success-50:  #f0fdf4;
    --c-success-100: #dcfce7;
    --c-success-600: #16a34a;
    --c-success-700: #15803d;
    --c-warning-50:  #fffbeb;
    --c-warning-100: #fef3c7;
    --c-warning-600: #ca8a04;
    --c-warning-700: #a16207;
    --c-danger-50:   #fef2f2;
    --c-danger-100:  #fee2e2;
    --c-danger-600:  #dc2626;
    --c-danger-700:  #b91c1c;
    --c-info-50:     #eff6ff;
    --c-info-100:    #dbeafe;
    --c-info-600:    #2563eb;
    --c-info-700:    #1d4ed8;

    /* ---------- 2. SEMANTICAS - Color ---------------------------------- */

    /* Superficies */
    --color-bg:            var(--c-neutral-50);
    --color-surface:       var(--c-neutral-0);
    --color-surface-alt:   var(--c-neutral-100);
    --color-surface-sunken: var(--c-neutral-200);

    /* Texto. */
    --color-text:          var(--c-neutral-900);
    --color-text-soft:     var(--c-neutral-600);
    --color-text-muted:    var(--c-neutral-500);
    --color-text-inverse:  var(--c-neutral-0);
    --color-text-link:     var(--c-brand-700);

    /* Bordes */
    --color-border:        var(--c-neutral-200);
    --color-border-strong: var(--c-neutral-300);

    /* Accion primaria */
    --color-primary:        var(--c-brand-600);
    --color-primary-hover:  var(--c-brand-700);
    --color-primary-active: var(--c-brand-800);
    --color-primary-soft:   var(--c-brand-50);
    --color-on-primary:     var(--c-neutral-0);

    /* Accion de acento */
    --color-accent:        var(--c-accent-600);
    --color-accent-hover:  var(--c-accent-700);
    --color-accent-soft:   var(--c-accent-50);
    --color-on-accent:     var(--c-neutral-0);

    /* Feedback */
    --color-success: var(--c-success-700);
    --color-warning: var(--c-warning-700);
    --color-danger:  var(--c-danger-700);
    --color-info:    var(--c-info-700);

    /* Fondo de los overlays (modal y drawer) */
    --color-backdrop: rgba(15, 23, 42, 0.55);

    /* Foco. */
    --color-focus: var(--c-brand-500);

    /* ---------- 3. Tipografia ------------------------------------------ */

    /* Stack del sistema: cero requests externos, cero FOUT, soporte total. */
    --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas,
    "Liberation Mono", monospace;

    /* Escala modular */
    --text-xs:   0.75rem;   /* 12px */
    --text-sm:   0.875rem;  /* 14px */
    --text-base: 1rem;      /* 16px */
    --text-lg:   1.125rem;  /* 18px */
    --text-xl:   1.25rem;   /* 20px */
    --text-2xl:  1.5rem;    /* 24px */
    --text-3xl:  1.875rem;  /* 30px */
    --text-4xl:  2.25rem;   /* 36px */
    --text-5xl:  3rem;      /* 48px */

    --leading-tight:  1.2;
    --leading-snug:   1.4;
    --leading-normal: 1.6;

    --weight-normal:   400;
    --weight-medium:   500;
    --weight-semibold: 600;
    --weight-bold:     700;

    /* ---------- 4. Espaciado (base 4px) -------------------------------- */
    --space-0:  0;
    --space-1:  0.25rem;  /*  4px */
    --space-2:  0.5rem;   /*  8px */
    --space-3:  0.75rem;  /* 12px */
    --space-4:  1rem;     /* 16px */
    --space-5:  1.25rem;  /* 20px */
    --space-6:  1.5rem;   /* 24px */
    --space-8:  2rem;     /* 32px */
    --space-10: 2.5rem;   /* 40px */
    --space-12: 3rem;     /* 48px */
    --space-16: 4rem;     /* 64px */
    --space-20: 5rem;     /* 80px */

    /* ---------- 5. Bordes y radios ------------------------------------- */
    --radius-sm:   4px;
    --radius-md:   8px;
    --radius-lg:   12px;
    --radius-xl:   16px;
    --radius-full: 9999px;

    --border-width: 1px;
    --border-width-thick: 2px;

    /* ---------- 6. Sombras (elevacion tipo Material) ------------------- */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06),
    0 1px 3px rgba(15, 23, 42, 0.10);
    --shadow-md: 0 2px 4px rgba(15, 23, 42, 0.06),
    0 4px 8px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 4px 8px rgba(15, 23, 42, 0.06),
    0 12px 24px rgba(15, 23, 42, 0.10);

    /* ---------- 7. Accesibilidad tactil -------------------------------- */
    /* Requisito de entrega: hit area minima 48x48px. */
    --tap-target: 48px;

    /* ---------- 8. Capas (z-index) ------------------------------------- */
    --z-base:     0;
    --z-sticky:   100;
    --z-drawer:   200;
    --z-overlay:  300;
    --z-modal:    400;
    --z-toast:    500;

    /* ---------- 9. Movimiento ------------------------------------------ */
    --ease:      cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out:  cubic-bezier(0, 0, 0.2, 1);
    --duration-fast:   150ms;
    --duration-normal: 250ms;
    --duration-slow:   400ms;

    /* ---------- 10. Layout --------------------------------------------- */
    --container-max: 1200px;
    --container-narrow: 720px;
    --header-height: 64px;
    --sidebar-width: 260px;
}
