:root {
  --primary-color: #eb4625;
  --secondary-color: #af361e;
  --background-light: #f8fafc;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
}

/* Estilos de autenticación */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: var(--background-light);
}

.auth-card {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.auth-card .logo {
  justify-content: center;
  margin-bottom: 1.5rem;
}

.auth-card h2 {
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.form-group {
  margin-bottom: 1rem;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 1rem;
}

.btn-primary {
  width: 100%;
  padding: 0.75rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 1rem;
  transition: background 0.3s;
}

.btn-primary:hover {
  background: var(--secondary-color);
}

.auth-footer {
  margin-top: 1.5rem;
  color: var(--text-light);
}

.auth-footer a {
  color: var(--primary-color);
  text-decoration: none;
}


/* Estilos para el botón de logout */
.logout-btn {
  width: 100%;
  padding: 0.75rem;
  margin-top: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.logout-btn:hover {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fecaca;
}

/* Resto de estilos originales... */
.container {
  display: flex;
  min-height: 100vh;
  background-color: var(--background-light);
}

.sidebar {
  width: 250px;
  background: white;
  padding: 1rem;
  position: fixed;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--primary-color);
}

.logo-icon {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.menu {
  flex: 1;
  margin-top: 1rem;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: 8px;
  color: var(--text-dark);
  text-decoration: none;
  transition: all 0.3s;
}

.menu-item:hover {
  background-color: #ffefef;
}

.menu-item svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
}

.sidebar-footer {
  border-top: 1px solid #e2e8f0;
  padding: 1rem 0;
  position: relative;
}

.first-steps {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  color: var(--text-dark);
}

.help-icon {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.main-content {
  margin-left: 250px;
  flex: 1;
  padding: 2rem;
}

.search-container {
  position: relative;
  flex: 1;
  max-width: 600px;
}

.search-container input {
  width: 100%;
  padding: 0.75rem 2.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 1rem;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  stroke: var(--text-light);
}

.action-buttons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.btn-premium {
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-premium:hover {
  background: var(--secondary-color);
}

.btn-profile {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: #e2e8f0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-banner {
  display: flex;
  align-items: center;
  background-color: #fededb;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  padding: 2rem;
  margin-bottom: 2rem;
}

.main-banner h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.main-banner p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.btn-plan {
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.tool-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.3s;
}

.tool-emoji {
  width: 80px;
  height: 80px;
  font-size: 60px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tool-card:hover {
  transform: translateY(30px);
}

.section-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.btn-view-all {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
}

.classes-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.btn-create {
  align-self: flex-start;
  background: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.class-card {
  border: 1px solid #cbd5e1;
  padding: 1rem;
  border-radius: 8px;
}

.text-container {
  flex: 1;
  padding-right: 30px;
  z-index: 1;
}

#typing-text {
  font-size: 2.5em;
  white-space: nowrap;
  overflow: hidden;
  border-right: .15em solid orange;
  animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
}

@keyframes typing {
  from { width: 0 }
  to { width: 100% }
}

@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: orange; }
}



.checklist-item {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.checklist-item.active {
  opacity: 1;
  transform: translateY(0);
}

.checkmark {
  width: 25px;
  height: 25px;
  border: 2px solid #eb4625;
  border-radius: 4px;
  margin-right: 15px;
  position: relative;
}

.checkmark::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 12px;
  border: solid #eb4625;
  border-width: 0 3px 3px 0;
  transform: translate(-50%, -50%) rotate(45deg);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.checklist-item.checked .checkmark::after {
  opacity: 1;
}

.moving-element {
  position: absolute;
  width: 50px;
  height: 50px;
  background-color: #ffcc80;
  border-radius: 50%;
  top: 50%;
  left: 100%;
  animation: moveElement 5s linear infinite alternate;
}

@keyframes moveElement {
  0% { transform: translate(-100%, -50%); }
  100% { transform: translate(-50%, -50%); }
}

.status-message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
  font-weight: bold;
  text-align: center;
}

.status-message.success {
  background-color: #d1fae5;
  color: #065f46;
}

.status-message.error {
  background-color: #fee2e2;
  color: #991b1b;
}
/* Todos los estilos anteriores... */

/* Añadir estos nuevos estilos al final del archivo */

/* Filtros */
.filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.filter-tag {
  background: #e2e8f0;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.3s;
}

.filter-tag:hover {
  background: #cbd5e1;
}

/* Sección "Todos" */
.all-tools h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

/* Herramientas IA */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.tool-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  text-align: center;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.tool-emoji {
  width: 80px;
  height: 80px;
  font-size: 60px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.tool-card p {
  color: var(--text-dark);
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .tools-grid {
      grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  .tool-emoji {
      width: 60px;
      height: 60px;
      font-size: 40px;
  }
}
/* Todos los estilos anteriores... */

/* Añadir estos nuevos estilos al final del archivo */

/* Estilos específicos para Plano de la Realidad */
.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.content-header h1 {
  font-size: 1.75rem;
  color: var(--text-dark);
}

.btn-description {
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
  font-size: 1rem;
}

.btn-description:hover {
  background: var(--secondary-color);
}

/* Popup */
.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.popup-overlay.active {
  display: flex;
}

.popup-content {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}



.btn-close-popup {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
}

.tabs-container {
  margin-bottom: 1.5rem;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.tab {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.3s;
}

.tab.active {
  background: var(--primary-color);
  color: white;
}

.tab .btn-close-tab {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  font-size: 0.875rem;
}

.tab-content {
  margin-top: 1rem;
}

.tab-content-item {
  display: none;
}

.tab-content-item.active {
  display: block;
}

.problems-list {
  margin-top: 1rem;
}

.problems-list ul {
  list-style: none;
  margin-top: 0.5rem;
}

.problems-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.problems-list li button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  margin-left: 0.5rem;
}

.problems-list li button:hover {
  color: var(--primary-color);
}

.popup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1rem;
}

.btn-save {
  background: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-save:hover {
  background: var(--secondary-color);
}

.btn-add-tab {
  background: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-bottom: 1rem;
  transition: background 0.3s;
}

.btn-add-tab:hover {
  background: var(--secondary-color);
}

.btn-add-problem {
  background: #10b981;
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.3s;
}

.btn-add-problem:hover {
  background: #0d946e;
}

/* Tarjetas de temas */
.tool-card {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
  margin-bottom: 1rem;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.tool-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.tool-card .btn-edit,
.tool-card .btn-delete {
  position: absolute;
  top: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.5rem;
}

.tool-card .btn-edit {
  right: 2.5rem;
  color: var(--primary-color);
}

.tool-card .btn-delete {
  right: 0.5rem;
  color: #ef4444;
}

/* Responsive */
@media (max-width: 768px) {
  .popup-content {
      width: 95%;
      padding: 1rem;
  }
  
  .content-header {
      flex-direction: column;
      align-items: flex-start;
      gap: 1rem;
  }
}

/* Eliminar secciones duplicadas (como .sidebar, .menu-item) y conservar solo estilos específicos del Plano Contextual */
.info-table-section {
  margin-top: 2rem;
  background: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.primary-row {
  background-color: #fff9c4;
  transition: background 0.3s;
}

.primary-row.complete {
  background-color: #c8e6c9;
}


/* Estilos modificados para la barra superior */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.membership-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
}

.membership-badge.premium {
  background-color: #d1fae5;
  color: #065f46;
}

.membership-badge.basic {
  background-color: #e2e8f0;
  color: #475569;
}


/* Estilos para el panel de administración */
.membership-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: capitalize;
}

.membership-badge.premium {
  background-color: #d1fae5;
  color: #065f46;
}

.membership-badge.basic {
  background-color: #e2e8f0;
  color: #475569;
}

.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.popup-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  max-width: 400px;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.popup-content img {
  margin: 1rem 0;
}

.close-popup {
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
  font-size: 1.5rem;
  color: #333;
}

.hidden {
  display: none;
}

:root {
  --primary-color: #eb4625;
  --secondary-color: #af361e;
  --background-light: #f8fafc;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --premium-color: #28a745;
}

/* ... (mantén todos los estilos anteriores) ... */

/* Sidebar colapsable */
.sidebar {
  width: 250px;
  background: white;
  padding: 1rem;
  position: fixed;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  z-index: 1000;
}

.sidebar.collapsed {
  width: 70px;
}

.sidebar.collapsed .logo span,
.sidebar.collapsed .menu-item span,
.sidebar.collapsed .first-steps span,
.sidebar.collapsed .logout-btn span {
  display: none;
}

.sidebar.collapsed .logo {
  justify-content: center;
  padding: 1rem 0;
}

.sidebar.collapsed .menu-item,
.sidebar.collapsed .first-steps,
.sidebar.collapsed .logout-btn {
  justify-content: center;
  padding: 0.75rem 0;
}

.sidebar.collapsed .help-icon {
  display: none;
}

.main-content {
  margin-left: 250px;
  transition: margin-left 0.3s ease;
}

.sidebar.collapsed + .main-content {
  margin-left: 70px;
}

/* Logo con efecto de membresía */
.logo-icon {
  width: 24px;
  height: 24px;
  fill: var(--primary-color);
  transition: all 0.3s ease;
}

.premium .logo-icon {
  fill: var(--premium-color);
  filter: drop-shadow(0 0 3px rgba(40, 167, 69, 0.6));
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { filter: drop-shadow(0 0 2px rgba(40, 167, 69, 0.6)); }
  50% { filter: drop-shadow(0 0 5px rgba(40, 167, 69, 0.9)); }
  100% { filter: drop-shadow(0 0 2px rgba(40, 167, 69, 0.6)); }
}

/* Iconos del menú */
.menu-icon {
  width: 20px;
  height: 20px;
  margin-right: 0.75rem;
  transition: all 0.3s ease;
}

.sidebar.collapsed .menu-icon {
  margin-right: 0;
  font-size: 1.25rem;
}

/* Botón de toggle */
.sidebar-toggle {
  position: absolute;
  top: 1rem;
  right: -12px;
  width: 28px;
  height: 28px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
}

.sidebar-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

.sidebar-toggle i {
  color: var(--primary-color);
  font-size: 12px;
  transition: all 0.3s ease;
}

#subscription-content {
  position: relative;
  background: #fff;
  border-radius: 8px;
  padding: 20px;
  max-width: 400px;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  text-align: center;
}
.blue-button {
  background: #3483FA;
  color: #fff;
  padding: 12px 30px;
  border-radius: 5px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(52,131,250,0.3);
  transition: all 0.3s;
}
.blue-button:hover {
  background: #2a68c8;
  transform: translateY(-2px);
}
.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 18px;
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
}
.info-text {
  font-size: 12px;
  color: #999;
  margin-top: 15px;
}
#payment-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}
.modal-box {
  position: relative;
  width: 90%;
  max-width: 600px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}
.modal-box iframe {
  width: 100%;
  height: 600px;
  border: none;
}