﻿/* ==========================================================================
   TEACHAI - SISTEMA DE DISEÃ‘O Y HOJA DE ESTILOS PRINCIPAL
   Servidor Compartido - Compatible con todos los navegadores modernos
   ========================================================================== */

:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: #1f2937;
  --bg-card-hover: #283548;
  --border-color: #374151;
  --border-light: #4b5563;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-light: #d1d5db;

  /* Colores Distintivos de los 3 Modelos */
  --sunburst-color: #f59e0b;
  --sunburst-glow: rgba(245, 158, 11, 0.25);
  --sunburst-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);

  --flare-color: #ef4444;
  --flare-glow: rgba(239, 68, 68, 0.25);
  --flare-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);

  --sol-color: #3b82f6;
  --sol-glow: rgba(59, 130, 246, 0.25);
  --sol-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);

  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-glow: rgba(79, 70, 229, 0.3);
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

/* Reset y Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Contenedores y Layout */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background-color: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.5px;
}

.nav-brand img {
  height: 38px;
  width: auto;
  border-radius: var(--radius-sm);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  outline: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-sunburst {
  background: var(--sunburst-gradient);
  color: #111;
  font-weight: 700;
}
.btn-flare {
  background: var(--flare-gradient);
  color: #fff;
}
.btn-sol {
  background: var(--sol-gradient);
  color: #fff;
}

/* Hero Section */
.hero {
  padding: 90px 0 60px;
  text-align: center;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: rgba(79, 70, 229, 0.15);
  border: 1px solid rgba(79, 70, 229, 0.35);
  color: #a5b4fc;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 3.25rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

/* Showcase Grid de Modelos */
.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.section-title p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 28px;
  margin-bottom: 80px;
}

/* Tarjeta de Modelo */
.model-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.model-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--card-accent, var(--primary));
  opacity: 0.9;
}

.model-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card);
  border-color: var(--card-accent, var(--border-light));
}

.model-card.sunburst-theme {
  --card-accent: var(--sunburst-color);
}
.model-card.flare-theme {
  --card-accent: var(--flare-color);
}
.model-card.sol-theme {
  --card-accent: var(--sol-color);
}

.model-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.model-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.model-number {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.model-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Recuadro "Para quÃ© es mejor" */
.model-specialty-box {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid;
}

.sunburst-theme .model-specialty-box {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.flare-theme .model-specialty-box {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.sol-theme .model-specialty-box {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

.model-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
  flex-grow: 1;
}

.model-features {
  list-style: none;
  margin-bottom: 24px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.model-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  font-size: 0.88rem;
  margin-bottom: 8px;
}

/* Panel Layout (Admin y Usuario) */
.dashboard-layout {
  display: flex;
  min-height: calc(100vh - 75px);
}

.sidebar {
  width: 320px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-menu {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
  overflow-y: auto;
}

.menu-category {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 12px 6px;
  letter-spacing: 0.8px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-light);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.menu-item:hover, .menu-item.active {
  background: var(--bg-card);
  color: var(--text-main);
}

.menu-item.active {
  border-left: 3px solid var(--primary);
}

/* HISTORIAL DE CHATS CON RECUADRO SUPERIOR DERECHO */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 4px;
}

.history-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  overflow: hidden;
}

.history-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-light);
  transform: translateX(3px);
}

.history-card.active {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.12);
}

/* PEQUEÃ‘O RECUADRO EN LA ESQUINA SUPERIOR DERECHA: FECHA Y MODELO */
.history-badge-corner {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.history-badge-corner.sunburst-badge {
  border-color: var(--sunburst-color);
  color: #fbbf24;
}

.history-badge-corner.flare-badge {
  border-color: var(--flare-color);
  color: #f87171;
}

.history-badge-corner.sol-badge {
  border-color: var(--sol-color);
  color: #60a5fa;
}

.history-card-title {
  font-weight: 600;
  font-size: 0.9rem;
  margin-top: 18px;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 10px;
}

.history-card-preview {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ãrea Principal de Trabajo */
.main-content {
  flex-grow: 1;
  background-color: var(--bg-primary);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* Chat Container */
.chat-workspace {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
  padding: 24px;
}

.chat-messages {
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 24px;
}

.chat-bubble {
  display: flex;
  gap: 16px;
  max-width: 88%;
}

.chat-bubble.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 700;
}

.chat-bubble.user .chat-avatar {
  background: var(--primary);
  color: #fff;
}

.chat-bubble.assistant .chat-avatar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
}

.chat-text {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  color: var(--text-light);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.chat-bubble.user .chat-text {
  background: #312e81;
  border-color: #4338ca;
  color: #fff;
}

/* Controles de Entrada de Chat */
.chat-input-bar {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.chat-input-bar textarea {
  flex-grow: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1rem;
  resize: none;
  outline: none;
  max-height: 140px;
}

/* Modales y Formularios */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 500px;
  padding: 32px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  transform: translateY(20px);
  transition: transform 0.25s ease;
}

.modal-overlay.open .modal-box {
  transform: translateY(0);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-light);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.95rem;
  transition: border-color 0.2s;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Tablas del Admin (Cuadro de Registro) */
.data-table-wrapper {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  background: var(--bg-card);
  padding: 14px 20px;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-light);
}

.data-table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Badge de Estado */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

.status-active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}
.status-suspended {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* Selector de Ãngulos para GPT 2.5 Flare */
.angles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.angle-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
}

.angle-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.angle-card-info {
  padding: 10px 14px;
}

.angle-card-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--flare-color);
}

/* Alertas de NotificaciÃ³n */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 900px) {
  .dashboard-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  .hero-title {
    font-size: 2.3rem;
  }
}


/* ==================== SLIDES CSS ==================== */
/* ==========================================================================
   TEACHAI - ESTILOS DEL VISOR INTERACTIVO DE DIAPOSITIVAS (GPT 6 SOL)
   ========================================================================== */

.presentation-container {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  margin-top: 16px;
  position: relative;
}

.presentation-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #1e293b;
  border-bottom: 1px solid #334155;
}

.presentation-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: #93c5fd;
  display: flex;
  align-items: center;
  gap: 8px;
}

.presentation-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Ãrea de la Diapositiva */
.slide-stage {
  aspect-ratio: 16 / 9;
  min-height: 380px;
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.12) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
              #090d16;
  position: relative;
  transition: all 0.3s ease;
}

.slide-badge-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: fit-content;
}

.slide-main-title {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #ffffff;
  margin-top: 10px;
  margin-bottom: 6px;
  line-height: 1.2;
}

.slide-subtitle {
  font-size: 1.1rem;
  color: #94a3b8;
  margin-bottom: 24px;
}

.slide-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.slide-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 1.05rem;
  color: #e2e8f0;
  line-height: 1.5;
}

.slide-bullet-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3b82f6;
  box-shadow: 0 0 10px #3b82f6;
  margin-top: 8px;
  flex-shrink: 0;
}

.slide-highlight-card {
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-left: 4px solid #3b82f6;
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 0.92rem;
  color: #cbd5e1;
}

/* Barra inferior de navegaciÃ³n */
.slide-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: #1e293b;
  border-top: 1px solid #334155;
}

.slide-counter {
  font-size: 0.88rem;
  font-weight: 600;
  color: #94a3b8;
}

.slide-nav-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Notas del orador */
.speaker-notes-drawer {
  background: #0b1120;
  border-top: 1px dashed #334155;
  padding: 14px 20px;
  font-size: 0.85rem;
  color: #94a3b8;
  display: none;
}

.speaker-notes-drawer.open {
  display: block;
}

/* Modo Pantalla Completa */
.presentation-container:fullscreen {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  border: none;
}

.presentation-container:fullscreen .slide-stage {
  height: calc(100vh - 120px);
  padding: 60px 80px;
}

.presentation-container:fullscreen .slide-main-title {
  font-size: 3rem;
}

.presentation-container:fullscreen .slide-bullets li {
  font-size: 1.4rem;
}

