<!DOCTYPE html>
<html lang="es">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Panel de Usuario</title>
  <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
  <style>
    body {
      margin: 0;
      font-family: 'Segoe UI', sans-serif;
      display: flex;
      height: 100vh;
    }

    body.camaleon  { background: #00b894; color: white; }
    body.express   { background: #d84719; color: white; }
    body.gourmet   { background: #512c80; color: white; }
    body.del_sabor { background: #a52a2a; color: white; }
    body.default   { background: #2c2c3e; color: white; }

    .sidebar {
      width: 260px;
      background: rgba(0, 0, 0, 0.15);
      color: inherit;
      padding: 1.5rem 1rem;
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    .sidebar img {
      width: 100px;
      height: auto;
      margin-bottom: 1rem;
    }

    .sidebar h2 {
      margin-bottom: 2rem;
      font-size: 1.6rem;
      text-align: center;
    }

    .sidebar a {
      color: inherit;
      text-decoration: none;
      margin: 12px 0;
      font-weight: 600;
      padding: 8px;
      border-radius: 6px;
      transition: background 0.2s;
      width: 100%;
      text-align: center;
    }

    .sidebar a:hover {
      background: rgba(255, 255, 255, 0.2);
    }

    .content {
      flex: 1;
      background: white;
      padding: 2rem;
      overflow-y: auto;
    }

    .header {
      background: #e0e0e0;
      padding: 1rem;
      border-radius: 10px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.1);
      margin-bottom: 2rem;
      color: #333;
    }

    .card {
      background: #f9f9f9;
      padding: 1.5rem;
      border-radius: 10px;
      box-shadow: 0 2px 8px rgba(0,0,0,0.05);
      margin-bottom: 1.5rem;
      color: #333;
    }
  </style>
</head>
<body class="{{ marca.lower().replace(' ', '_') if marca else 'default' }}">
  <div class="sidebar">
    {% set logos = {
      'CAMALEON': 'carritoscam.png',
      'DEL SABOR': 'carritosdelsabor.png',
      'EXPRESS': 'carritosEXPRESS.png',
      'GOURMET': 'carritosgourmet.png'
    } %}
    {% set logo = logos.get(marca.upper(), '') %}
    {% if logo %}
      <img src="/static/{{ logo }}" alt="Logo {{ marca }}">
    {% endif %}
    <h2>{{ marca.upper() if marca != 'default' else 'GD GROUP' }}</h2>
    <a href="#">Inicio</a>
    <a href="#">Crear Lead</a>
    <a href="#">Buscar Lead</a>
    <a href="#">Actualizar Lead</a>
    <a href="#">Eliminar Lead</a>
    <a href="#">Dashboard</a>
    <a href="/login">Cerrar Sesión</a>
  </div>

  <div class="content">
    <div class="header">
      <h1>Bienvenido al Panel de Usuario</h1>
      <p>Marca activa: <strong>{{ marca.upper() }}</strong></p>
    </div>
    <div class="card">
      <h3>Actividad del día</h3>
      <p>Resumen de leads generados hoy.</p>
    </div>
    <div class="card">
      <h3>Próximas acciones</h3>
      <p>Seguimientos pendientes y tareas asignadas.</p>
    </div>
  </div>
</body>
</html>
