      /* ================= ESTILOS GENERALES (CSS) ================= */
      /*
      :root {
       
        --primary-dark: #1b5e20;
        --secondary: #ff6f00;  
        --bg-light: #f4f6f8;
        --text-dark: #333;
        --white: #ffffff;
        --gray: #9e9e9e;
        --shadow: 0 4px 6px rgba(0,0,0,0.1);
        --radius: 8px;
    }

    */
      
      :root {
        --primary: #000080; /* Verde alimenticio */
        --primary-dark: #0099FF;
        --secondary: #ff6f00; /* Naranja para acciones */
        --bg-light: #f4f6f8;
        --text-dark: #333;
        --white: #ffffff;
        --gray: #9e9e9e;
        --accent: #27ae60;
        --red:      #FF0000;
        --shadow: 0 4px 6px rgba(0,0,0,0.1);
        --radius: 8px;
    }
    
    * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
    
    body { background-color: var(--bg-light); color: var(--text-dark); line-height: 1.6; }

    /* Utilidades */
    .hidden { display: none !important; }
    .btn { padding: 10px 20px; border: none; border-radius: var(--radius); cursor: pointer; font-weight: bold; transition: 0.3s; display: inline-flex; align-items: center; gap: 5px; }
    .btn-primary { background-color: var(--primary); color: var(--white); }
    .btn-primary:hover { background-color: var(--primary-dark); }
    .btn-secondary { background-color: var(--secondary); color: var(--white); }
    .btn-secondary:hover { background-color: #e65100; }
    .btn-danger { background-color: #d32f2f; color: var(--white); }
    .btn-sm { padding: 5px 10px; font-size: 0.85rem; }
    .card { 
      background: var(--white); 
      padding: 20px; 
      border-radius: var(--radius); 
      box-shadow: var(--shadow); 
      margin-bottom: 20px; 
    }
    .tag { padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: bold; }
    .tag-pending { background: #fff3e0; color: #ef6c00; }
    .tag-shipped { background: #e3f2fd; color: #1565c0; }
    .tag-delivered { background: #e8f5e9; color: #2e7d32; }

    /* HEADER */
    header { background-color: var(--primary); color: var(--white); padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; box-shadow: var(--shadow); }
    .logo { font-size: 1.5rem; font-weight: bold; display: flex; align-items: center; gap: 10px; }
    .user-info { display: flex; align-items: center; gap: 15px; }

    /* LAYOUT PRINCIPAL */
    main { max-width: 1200px; margin: 2rem auto; padding: 0 1rem; }
    
    /* LOGIN SCREEN */
    #login-screen { 
      display: flex; 
      flex-direction: column; 
      align-items: center; 
      justify-content: center; 
      height: 60vh; 
      text-align: center;
     }
    .role-grid { display: grid; 
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
      gap: 20px; 
      margin-top: 40px; 
      width: 100%; 
      max-width: 900px; 
    }
    .role-card { 
      background: var(--white);
      padding: 10px;
      border-radius: var(--radius); 
      cursor: pointer; 
      border: 2px solid transparent; 
      transition: 0.3s; box-shadow: var(--shadow);
    }
    .role-card:hover { border-color: var(--primary); transform: translateY(-5px); }
    .role-icon { font-size: 3rem; margin-bottom: 15px; display: block; }

    /* VISTAS ESPECÍFICAS */
    .dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
    
    /* Grid de Productos (Comprador) */
    .product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
    .product-card { display: flex; flex-direction: column; justify-content: space-between; height: 100%; }
    .product-img { width: 100%; height: 150px; object-fit: cover; border-radius: 4px; background-color: #eee; margin-bottom: 10px; }
    .product-price { font-size: 1.2rem; font-weight: bold; color: var(--primary); }
    
    /* Tablas (Distribuidor, Transportista, Vendedor) */
    table { width: 100%; border-collapse: collapse; margin-top: 10px; }
    th, td { padding: 12px; text-align: left; border-bottom: 1px solid #ddd; }
    th { background-color: #f8f9fa; font-weight: 600; color: #555; }
    
    /* Formularios */
    .form-group { margin-bottom: 15px; }
    .form-group label { display: block; margin-bottom: 5px; font-weight: 500; }
    .form-control { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: var(--radius); }
    
    /* Backend Code View */
    pre { background: #2d2d2d; color: #ccc; padding: 15px; border-radius: var(--radius); overflow-x: auto; font-size: 0.9rem; }
    .code-block { margin-bottom: 20px; }

    /* Toast Notifications */
    #toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 1000; }
    .toast { background: #333; color: #fff; padding: 12px 24px; border-radius: 4px; margin-top: 10px; opacity: 0; animation: fadeIn 0.3s forwards; box-shadow: 0 2px 10px rgba(0,0,0,0.2); }
    @keyframes fadeIn { to { opacity: 1; transform: translateY(0); } from { opacity: 0; transform: translateY(20px); } }



/*index php*/
  
        body { font-family: 'Segoe UI', sans-serif; margin: 0; background: #f4f7f6; }
        header { background: var(--primary); color: white; padding: 1rem 5%; display: flex; justify-content: space-between; align-items: center; }
      /*  .nav-roles a { color: #bdc3c7; text-decoration: none; margin-left: 15px; font-size: 0.9rem; }*/
        
        .container { padding: 40px 5%; }
        .grid-productos { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 25px; }
        
        .card { background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.1); transition: 0.3s; }
        .card:hover { transform: translateY(-5px); }
        .card img { width: 100%; height: 180px; object-fit: cover; }
        .card-body { padding: 15px; }
        .precio { color: var(--red); font-size: 1.4rem; font-weight: bold; }
        .btn-compra { 
          width: 100%; 
          background: var(--gray); 
          color: white; 
          border: none; 
          padding: 10px; 
          border-radius: 5px; 
          cursor: not-allowed; 
          margin-top: 10px; 
        }
        .card-ven{
          color: var(--secondary);
          background:  transparent; 
          white-space: nowrap;         /* Evita saltos de línea */
          overflow: hidden;            /* Oculta el texto que sobra */
          text-overflow: ellipsis;
        }

        .card-tit {
          font-family: 'Roboto', sans-serif;
          font-weight: 700; /* Negrita */
          font-size: 1.2rem;
        }
        .producto-precio {
          font-family: 'Oswald', sans-serif; /* Fuente llamativa para precio */
          font-size: 1.5rem;
          color: #e41e26; /* Color llamativo */
        }
        .badge{ 

          font-size: 0.7rem; 
          padding: 3px 8px; 
          border-radius: 10px; 
          background: #ddd; 
          white-space: nowrap;         /* Evita saltos de línea */
          overflow: hidden;            /* Oculta el texto que sobra */
          text-overflow: ellipsis;     /* Añade '...' al final */
         
          
        }




    /* Responsive */
    @media (max-width: 768px) {
        .role-grid { grid-template-columns: 1fr; }
        header { flex-direction: column; gap: 10px; }
    }