* {
  box-sizing: border-box;
}

html, body {
  margin: 0 !important;
  padding: 0 !important;
}

/* single-spa-layout a veces envuelve las rutas/apps en contenedores
   propios que no están en tu HTML fuente — este selector cubre el
   caso típico sin afectar nada más. Si no aplica, quítalo. */
#single-spa-application\:root,
[id^="single-spa-application"] {
  margin: 0;
}

:root {
  --uqroo-green: #054c31;
  --uqroo-green-dark: #033b26;
  --uqroo-green-light: #f0f5f2;
  --uqroo-gold: #f1cd08;
  --uqroo-gold-dark: #c9ac00;
  --color-text: #1a1a2e;
  --color-text-light: #64748b;
  --color-border: rgba(5, 76, 49, 0.12);
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: linear-gradient(160deg, var(--uqroo-green-light) 0%, #f7f7f5 45%, #fdfaf0 100%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =============================================================================
   CARDS DE APLICACIONES
   ============================================================================= */
.card-container {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 24px;
}

.app-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(5, 76, 49, 0.08);
  width: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid var(--color-border);
  position: relative;
  min-height: 320px;
  overflow: hidden;
}

/* Acento dorado superior, consistente con el resto del sistema UQROO */
.app-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--uqroo-green), var(--uqroo-gold));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(5, 76, 49, 0.16);
}

.app-card:hover::before {
  opacity: 1;
}

.card-header {
  width: 100%;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(160deg, var(--uqroo-green-light) 0%, #eef4f0 100%);
  border-radius: 14px 14px 0 0;
  min-height: 110px;
}

.card-header img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 8px;
  margin-top: 16px;
  filter: drop-shadow(0 2px 6px rgba(5, 76, 49, 0.12));
}

.card-body {
  flex: 1;
  padding: 18px 18px 0 18px;
  text-align: center;
}

.card-body h3 {
  font-size: 1.1rem;
  margin: 8px 0 8px 0;
  color: var(--color-text);
  font-weight: 700;
}

.card-body p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin: 0;
  text-align: left;
  line-height: 1.4;
}

.card-footer {
  padding: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.card-footer button {
  background: linear-gradient(135deg, var(--uqroo-green), var(--uqroo-green-dark));
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(5, 76, 49, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-footer button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(5, 76, 49, 0.3);
}

/* =============================================================================
   TABS
   ============================================================================= */
#tabs-container {
  display: flex;
  gap: 2px;
  margin-top: 0px;
  margin-bottom: 0;
  border-bottom: 1px solid var(--color-border);
}

#tabs-container button {
  background: #f8faf9;
  color: var(--color-text-light);
  border: 1px solid transparent;
  border-radius: 10px 10px 0 0;
  padding: 8px 24px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  margin-bottom: 0px;
}

#tabs-container button.active-tab {
  background: var(--uqroo-green);
  color: #fff;
  font-weight: 700;
  border: 1px solid var(--uqroo-green);
  border-bottom: 3px solid var(--uqroo-gold);
}

#tabs-container button.active-tab .close-tab {
  color: rgba(255, 255, 255, 0.7);
}

#tabs-container button.active-tab .close-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
}

#tabs-container button:not(.active-tab):hover {
  background: #fff;
  color: var(--uqroo-green);
  border-color: var(--color-border);
}

#tabs-container .close-tab {
  margin-left: 10px;
  color: #9ca3af;
  font-weight: bold;
  cursor: pointer;
  font-size: 1.1em;
  transition: color 0.2s, background 0.2s;
  border-radius: 50%;
  padding: 0 6px;
  vertical-align: middle;
}

#tabs-container .close-tab:hover {
  color: #ef4444;
  background: #fef2f2;
}

.microfront-container {
  width: 100%;
  min-height: 400px;
  display: none;
}