:root {
      --numia-azul: #863DFF;
      --numia-azul-oscuro: #060A27;
      --numia-success: #10b981;
      --numia-text: #1f2937;
      --numia-text-light: #6b7280;
    }
    
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }
    
    body {
      font-family: 'Roboto', Arial, sans-serif;
      background: #f5f5f5;
      color: var(--numia-text);
      min-height: 100vh;
      display: flex;
      gap: 2rem;
      padding: 2rem;
      align-items: center;
      justify-content: center;
      margin: 0;
    }
    
    /* Contenedor del tótem */
    .totem-container {
      max-width: 600px;
      width: 100%;
      background: white;
      border-radius: 24px;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
      overflow: hidden;
      position: relative;
      height: calc(100vh - 4rem);
      display: flex;
      flex-direction: column;
      flex-shrink: 0;
    }
    
    /* Header del tótem */
    .totem-header {
      background: var(--numia-azul-oscuro);
      padding: 1.5rem 2rem;
      color: white;
      display: flex;
      align-items: center;
      gap: 0.75rem;
      flex-shrink: 0;
    }
    
    .totem-logo {
      width: 40px;
      height: 40px;
      background: white;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      color: var(--numia-azul-oscuro);
      font-size: 1.2rem;
    }
    
    .totem-content {
      flex: 1;
      overflow: hidden;
      padding: 1.5rem 2rem;
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      align-items: center;
      min-height: 0;
    }
    
    /* Pantalla 1: Ingreso de DNI */
    .screen-dni {
      width: 100%;
      max-width: 500px;
      text-align: center;
    }
    
    .screen-dni h1 {
      font-size: 1.8rem;
      font-weight: 700;
      color: var(--numia-text);
      margin-bottom: 0.75rem;
    }
    
    .screen-dni .instruction {
      font-size: 1rem;
      color: var(--numia-azul);
      margin-bottom: 1.5rem;
      font-weight: 500;
    }
    
    .dni-display {
      background: white;
      color: var(--numia-text);
      font-size: 1.5rem;
      font-weight: 600;
      padding: 1rem;
      border: 3px solid #ff8c42;
      border-radius: 12px;
      margin-bottom: 1.5rem;
      min-height: 60px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-family: 'Courier New', monospace;
      letter-spacing: 0.2rem;
    }
    
    .dni-display.empty {
      color: rgba(0, 0, 0, 0.3);
    }
    
    .dni-display.empty:before {
      content: 'Ingrese su DNI';
    }
    
    .keypad {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 0.5rem;
      margin-bottom: 0.5rem;
      max-width: 350px;
      margin-left: auto;
      margin-right: auto;
    }
    
    .keypad-row-bottom {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 0.5rem;
      max-width: 350px;
      margin-left: auto;
      margin-right: auto;
      margin-bottom: 0.75rem;
    }
    
    .keypad-btn {
      background: white;
      color: var(--numia-text);
      border: 1px solid #000;
      border-radius: 8px;
      padding: 1rem;
      font-size: 1.5rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    
    .keypad-btn:hover {
      background: #f5f5f5;
      transform: scale(1.02);
    }
    
    .keypad-btn:active {
      transform: scale(0.98);
      background: #e5e5e5;
    }
    
    .keypad-btn.delete {
      background: white;
      color: var(--numia-text);
      border: 1px solid #000;
      font-size: 1.5rem;
    }
    
    .keypad-btn.delete:hover {
      background: #f5f5f5;
    }
    
    .keypad-btn.empty {
      background: transparent;
      border: none;
      cursor: default;
    }
    
    .keypad-btn.empty:hover {
      transform: none;
      background: transparent;
    }
    
    .btn-continuar {
      width: 100%;
      max-width: 350px;
      background: #ff8c42;
      color: white;
      border: none;
      border-radius: 12px;
      padding: 1rem;
      font-size: 1rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.3s;
      margin-top: 0.5rem;
      margin-left: auto;
      margin-right: auto;
      display: block;
    }
    
    .btn-continuar:hover {
      background: #ff7a2e;
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(255, 140, 66, 0.4);
    }
    
    .btn-continuar:active {
      transform: translateY(0);
    }
    
    .btn-continuar.active {
      background: #ff8c42;
    }
    
    .btn-continuar:disabled {
      background: #d1d5db;
      cursor: not-allowed;
      transform: none;
    }
    
    .btn-continuar:disabled:hover {
      background: #d1d5db;
      transform: none;
      box-shadow: none;
    }
    
    /* Pantalla 2: Opciones de atención */
    .screen-opciones {
      width: 100%;
      max-width: 500px;
      text-align: center;
      display: none;
    }
    
    .screen-opciones.active {
      display: block;
    }
    
    .screen-opciones h2 {
      font-size: 1.5rem;
      font-weight: 700;
      color: var(--numia-text);
      margin-bottom: 0.5rem;
    }
    
    .screen-opciones .subtitle {
      font-size: 0.95rem;
      color: var(--numia-text-light);
      margin-bottom: 1rem;
    }
    
    .opciones-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 1rem;
      margin-bottom: 1rem;
      align-items: stretch;
    }
    
    .opcion-card {
      background: white;
      border: 3px solid #e5e7eb;
      border-radius: 12px;
      padding: 1.25rem;
      cursor: pointer;
      transition: all 0.3s;
      text-align: center;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }
    
    .opcion-card.videollamada {
      padding: 1.5rem 1.25rem;
    }
    
    .opcion-card.videollamada .opcion-icon {
      font-size: 3rem;
    }
    
    .opcion-card.videollamada .opcion-title {
      font-size: 1.3rem;
    }
    
    .opcion-card.presencial {
      padding: 1rem;
    }
    
    .opcion-card.presencial .opcion-icon {
      font-size: 2rem;
    }
    
    .opcion-card.presencial .opcion-title {
      font-size: 1rem;
    }
    
    .opcion-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    }
    
    .opcion-card.videollamada {
      border-color: var(--numia-success);
      background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    }
    
    .opcion-card.videollamada:hover {
      border-color: var(--numia-success);
      box-shadow: 0 8px 24px rgba(16, 185, 129, 0.3);
    }
    
    .opcion-card.presencial {
      border-color: var(--numia-azul);
      background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    }
    
    .opcion-card.presencial:hover {
      border-color: var(--numia-azul);
      box-shadow: 0 8px 24px rgba(134, 61, 255, 0.3);
    }
    
    .opcion-card.opcion-demanda {
      border-color: var(--numia-azul);
      background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    }
    .opcion-card.opcion-demanda:hover {
      border-color: var(--numia-azul);
      box-shadow: 0 8px 24px rgba(134, 61, 255, 0.3);
    }
    
    .opcion-card.opcion-pago-qr {
      border-color: #0d9488;
      background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
      cursor: pointer;
    }
    .opcion-card.opcion-pago-caja {
      border-color: var(--numia-azul);
      background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
      cursor: pointer;
    }
    
    .qr-sim-wrap {
      padding: 1.5rem;
      background: #fff;
      border-radius: 16px;
      display: inline-block;
      box-shadow: 0 4px 20px rgba(0,0,0,0.08);
      margin: 1rem auto;
    }
    .qr-sim-wrap img {
      display: block;
      width: 220px;
      height: 220px;
    }
    
    .opcion-card.disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
    
    .opcion-card.disabled:hover {
      transform: none;
    }
    
    .opcion-icon {
      font-size: 2.5rem;
      margin-bottom: 0.5rem;
    }
    
    .opcion-card.videollamada .opcion-icon {
      color: var(--numia-success);
    }
    
    .opcion-card.presencial .opcion-icon {
      color: var(--numia-azul);
    }
    
    .opcion-title {
      font-size: 1.1rem;
      font-weight: 700;
      color: var(--numia-text);
      margin-bottom: 0.25rem;
    }
    
    .opcion-badge {
      display: inline-block;
      background: var(--numia-success);
      color: white;
      font-size: 0.65rem;
      font-weight: 600;
      padding: 0.2rem 0.5rem;
      border-radius: 8px;
      margin-top: 0.25rem;
    }
    
    .opcion-badge.less-recommended {
      background: #ef4444;
      color: white;
    }
    
    .opcion-desc {
      font-size: 0.75rem;
      color: var(--numia-text-light);
      margin-top: 0.25rem;
    }
    
    /* Pantalla 3: Confirmación */
    .screen-confirmacion {
      width: 100%;
      max-width: 500px;
      text-align: center;
      display: none;
    }
    
    .screen-confirmacion.active {
      display: block;
    }
    
    .screen-confirmacion .success-icon {
      font-size: 3.5rem;
      color: var(--numia-success);
      margin-bottom: 1rem;
      animation: pulse 2s infinite;
    }
    
    @keyframes pulse {
      0%, 100% { transform: scale(1); }
      50% { transform: scale(1.1); }
    }
    
    .screen-confirmacion h2 {
      font-size: 1.5rem;
      font-weight: 700;
      color: var(--numia-text);
      margin-bottom: 0.75rem;
    }
    
    .screen-confirmacion .message {
      font-size: 1rem;
      color: var(--numia-text-light);
      margin-bottom: 1.5rem;
      line-height: 1.5;
    }
    
    .tiempo-espera {
      background: #f0fdf4;
      border: 2px solid var(--numia-success);
      border-radius: 12px;
      padding: 1rem;
      margin-bottom: 1rem;
    }
    
    .tiempo-espera-label {
      font-size: 0.8rem;
      color: var(--numia-text-light);
      margin-bottom: 0.25rem;
    }
    
    .tiempo-espera-valor {
      font-size: 1.5rem;
      font-weight: 700;
      color: var(--numia-success);
    }
    
    .video-link-container {
      margin-top: 2rem;
    }
    
    .btn-video {
      background: var(--numia-success);
      color: white;
      border: none;
      border-radius: 12px;
      padding: 1rem 2rem;
      font-size: 1.1rem;
      font-weight: 600;
      cursor: pointer;
      text-decoration: none;
      display: inline-block;
      transition: all 0.3s;
    }
    
    .btn-video:hover {
      background: #059669;
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
      color: white;
    }
    
    /* Log container (igual que app-cliente.html) */
    .log-container {
      flex: 1;
      min-width: 400px;
      max-width: 500px;
      background: #1a1a1a;
      border-radius: 12px;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
      display: none;
      flex-direction: column;
      height: calc(100vh - 4rem);
      overflow: hidden;
    }
    
    .log-container.visible {
      display: flex;
    }
    
    .log-header {
      background: #2d2d2d;
      padding: 1rem 1.5rem;
      color: #ffffff;
      font-family: 'Courier New', monospace;
      font-size: 0.9rem;
      font-weight: 600;
      border-bottom: 2px solid #ffffff;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      flex-shrink: 0;
    }
    
    .log-header::before {
      content: '▶';
      color: #ffffff;
      animation: blink 1s infinite;
    }
    
    @keyframes blink {
      0%, 50% { opacity: 1; }
      51%, 100% { opacity: 0.3; }
    }
    
    .log-content {
      flex: 1;
      overflow-y: auto;
      padding: 1rem;
      color: #ffffff;
      font-family: 'Courier New', monospace;
      font-size: 0.85rem;
      line-height: 1.6;
    }
    
    .log-content::-webkit-scrollbar {
      width: 8px;
    }
    
    .log-content::-webkit-scrollbar-track {
      background: #2d2d2d;
    }
    
    .log-content::-webkit-scrollbar-thumb {
      background: #555;
      border-radius: 4px;
    }
    
    .log-content::-webkit-scrollbar-thumb:hover {
      background: #777;
    }
    
    .atencion-section {
      background: transparent !important;
      border-radius: 0;
      padding: 0;
      margin: 0;
      box-shadow: none;
      display: none;
    }
    
    .atencion-section.active {
      display: block;
    }
    
    .steps-container {
      margin: 0;
    }
    
    .step-item {
      background: #2d2d2d;
      border-left: 3px solid #ffffff;
      border-radius: 4px;
      padding: 0.75rem;
      margin-bottom: 0.75rem;
      color: #ffffff;
      font-family: 'Courier New', monospace;
    }
    
    .step-item.completed {
      border-left-color: #ffffff;
      background: #2d2d2d;
    }
    
    .step-item.processing {
      border-left-color: #ffaa00;
      background: #3a2e1e;
    }
    
    .step-title {
      color: #ffffff;
      font-weight: 600;
      margin-bottom: 0.25rem;
    }
    
    .step-output-content {
      background: #1a1a1a;
      border: 1px solid #333;
      border-radius: 4px;
      padding: 0.75rem;
      margin-top: 0.5rem;
      color: #ffffff;
    }
    
    .summary-section {
      background: #2d2d2d;
      border-left: 3px solid #ffffff;
      border-radius: 4px;
      padding: 1rem;
      margin-top: 1rem;
      color: #ffffff;
    }
    
    .summary-title {
      color: #ffffff;
      font-family: 'Courier New', monospace;
    }
    
    .summary-content {
      color: #ffffff;
      font-family: 'Courier New', monospace;
    }
    
    .agent-conclusions {
      margin-top: 1rem;
      padding-top: 1rem;
      border-top: 1px solid #444;
    }
    
    .agent-conclusions-title {
      font-weight: 700;
      margin-bottom: 0.5rem;
      color: #e8e8e8;
    }
    
    .agent-conclusions-text {
      margin: 0;
      line-height: 1.45;
      white-space: pre-wrap;
    }
    
    .summary-resumen-api {
      margin-bottom: 0.75rem;
      white-space: pre-wrap;
    }
    
    .conversation-output {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
    }
    
    .conversation-line {
      background: #1a1a1a;
      border-left: 2px solid #444;
      color: #ffffff;
    }
    
    .conversation-line.success {
      background: #2d2d2d;
      border-left-color: #ffffff;
      color: #ffffff;
    }
    
    .conversation-line.error {
      background: #3a1e1e;
      border-left-color: #ff4444;
      color: #ff8888;
    }
    
    .conversation-line.info {
      background: #1e1e3a;
      border-left-color: #4444ff;
    }
    
    @media (max-width: 1024px) {
      body {
        flex-direction: column;
        padding: 1rem;
      }
      
      .totem-container {
        max-width: 100%;
        height: 50vh;
      }
      
      .log-container {
        min-width: 100%;
        max-width: 100%;
        height: 50vh;
      }
    }
