/* ============================================================
   PuntoVenta SaaS - Design Tokens
   Contrato de tokens con valores por defecto = Light theme
   Todos los módulos consumen estas variables; los archivos de
   tema las redefinen mediante el selector [data-theme="..."]
   ============================================================ */

:root {

    /* ---- Brand ---- */
    --pv-color-brand-primary:        #4f46e5;
    --pv-color-brand-primary-active: #3730a3;
    --pv-color-brand-accent:         #06b6d4;
    --pv-color-brand-accent-active:  #0891b2;

    /* ---- Backgrounds de página ---- */
    --pv-color-bg-primary:   #f8fafc;
    --pv-color-bg-secondary: #f1f5f9;

    /* ---- Surfaces (cards, paneles, modales) ---- */
    --pv-color-surface-primary:   #ffffff;
    --pv-color-surface-secondary: #f8fafc;

    /* ---- Bordes ---- */
    --pv-color-border-primary:   #e2e8f0;
    --pv-color-border-secondary: #5c5c5c;

    /* ---- Texto ---- */
    --pv-color-text-primary:   #0f172a;
    --pv-color-text-secondary: #475569;
    --pv-color-text-tertiary:  #94a3b8;
    --pv-color-text-inverse:   #ffffff;

    /* ---- Estado / Feedback ---- */
    --pv-color-status-danger:  #dc3545;
    --pv-color-status-success: #54e140;
    --pv-color-status-warning: #f59e0b;
    --pv-color-status-info:    #06b6d4;

    /* ---- Inputs / Formularios ---- */
    --pv-input-bg:          #ffffff;
    --pv-input-color:       #333333;
    --pv-input-border:      #5c5c5c;
    --pv-input-border-focus:#4a90d9;
    --pv-input-readonly-bg: #e9e9ed;
    --pv-input-placeholder: #a0aec0;

    /* ---- Sidebar / Navegación lateral ---- */
    --pv-sidebar-bg:          #1e293b;
    --pv-sidebar-text:        rgba(255, 255, 255, 0.6);
    --pv-sidebar-active-bg:   rgba(79, 70, 229, 0.15);
    --pv-sidebar-active-text: #818cf8;
    --pv-sidebar-border:      rgba(255, 255, 255, 0.05);

    /* ---- Cards ---- */
    --pv-card-bg:         #ffffff;
    --pv-card-border:     #e2e8f0;
    --pv-card-shadow:     0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --pv-card-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.08);

    /* ---- DataTables / Tablas ---- */
    --pv-table-header-bg:     #f8fafc;
    --pv-table-row-bg:        #ffffff;
    --pv-table-row-alt-bg:    #f1f5f9;
    --pv-table-row-hover:     rgba(79, 70, 229, 0.04);
    --pv-table-border:        #e2e8f0;
    --pv-table-child-bg:      #bfdbff;
    --pv-table-fila-baja-bg:     #fef3c7;
    --pv-table-fila-baja-hover:  #fde68a;
    --pv-table-fila-baja-border: #f59e0b;

    /* ---- Badges semánticos ---- */
    --pv-badge-success-bg:   #d4edda;
    --pv-badge-success-text: #155724;
    --pv-badge-danger-bg:    #f8d7da;
    --pv-badge-danger-text:  #721c24;
    --pv-badge-warning-bg:   #fff3cd;
    --pv-badge-warning-text: #856404;
    --pv-badge-info-bg:      #e3f2fd;
    --pv-badge-info-text:    #1565c0;
    --pv-badge-purple-bg:    #f3e5f5;
    --pv-badge-purple-text:  #6a1b9a;
    --pv-badge-orange-bg:    #fff3e0;
    --pv-badge-orange-text:  #e65100;
    --pv-badge-pink-bg:      #fce4ec;
    --pv-badge-pink-text:    #880e4f;

    /* ---- Texto de estado (comparaciones, simulador) ---- */
    --pv-color-text-success: #2e7d32;
    --pv-color-text-danger:  #c62828;

    /* ---- Filas con estado en tablas ---- */
    --pv-row-mod-bg: rgba(255, 251, 204, 0.60);
    --pv-row-ok-bg:  rgba(212, 237, 218, 0.60);
    --pv-row-err-bg: rgba(248, 215, 218, 0.60);

    /* ---- Iconos ---- */
    --pv-icon-filter: none; /* temas claros: iconos oscuros originales */

    /* ---- Welcome card gradient ---- */
    --pv-welcome-gradient-end: #7c3aed;   /* violeta — se sobreescribe por tema */

    /* ---- Radios y misc ---- */
    --pv-border-radius:    16px;
    --pv-border-radius-md: 12px;
    --pv-border-radius-sm: 8px;
    --pv-border-radius-xs: 4px;

    /* ---- Backward-compat (variables antiguas de login.css / landing.css) ---- */
    --pv-primary:      #4f46e5;
    --pv-primary-dark: #3730a3;
    --pv-accent:       #06b6d4;
    --pv-bg-dark:      #0f172a;
    --pv-bg-darker:    #020617;
    --pv-card-shadow-login: 0 20px 60px rgba(0, 0, 0, 0.1);
}
